From ff6dd11bc2b6e5602ab0b09cbc6c9a0f6066e2b6 Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 29 May 2008 21:33:08 +0100 Subject: [PATCH 1/3] Minor reformatting. --- .../CrankNicholsonDdtScheme.C | 46 +++++++++---------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C index a0a52fe593..d3d5505c74 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/CrankNicholsonDdtScheme/CrankNicholsonDdtScheme.C @@ -21,7 +21,7 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - + \*---------------------------------------------------------------------------*/ #include "CrankNicholsonDdtScheme.H" @@ -69,7 +69,7 @@ CrankNicholsonDdtScheme::DDt0Field::DDt0Field ) : GeoField(io, mesh, dimType), - startTimeIndex_(mesh.time().timeIndex()) + startTimeIndex_(mesh.time().timeIndex()) {} @@ -324,7 +324,7 @@ CrankNicholsonDdtScheme::fvcDdt { dimensionedScalar rDtCoef0 = rDtCoef0_(ddt0); - ddt0.dimensionedInternalField() = + ddt0.dimensionedInternalField() = ( (rDtCoef0*dt)*(mesh().V0() - mesh().V00()) - mesh().V00()*offCentre_(ddt0.dimensionedInternalField()) @@ -371,7 +371,7 @@ CrankNicholsonDdtScheme::fvcDdt { scalar rDtCoef0 = rDtCoef0_(ddt0).value(); - ddt0.internalField() = + ddt0.internalField() = ( rDtCoef0* ( @@ -380,7 +380,7 @@ CrankNicholsonDdtScheme::fvcDdt ) - mesh().V00()*offCentre_(ddt0.internalField()) )/mesh().V0(); - ddt0.boundaryField() = + ddt0.boundaryField() = ( rDtCoef0* ( @@ -461,7 +461,7 @@ CrankNicholsonDdtScheme::fvcDdt { scalar rDtCoef0 = rDtCoef0_(ddt0).value(); - ddt0.internalField() = + ddt0.internalField() = ( rDtCoef0*rho.value()* ( @@ -470,7 +470,7 @@ CrankNicholsonDdtScheme::fvcDdt ) - mesh().V00()*offCentre_(ddt0.internalField()) )/mesh().V0(); - ddt0.boundaryField() = + ddt0.boundaryField() = ( rDtCoef0*rho.value()* ( @@ -551,7 +551,7 @@ CrankNicholsonDdtScheme::fvcDdt { scalar rDtCoef0 = rDtCoef0_(ddt0).value(); - ddt0.internalField() = + ddt0.internalField() = ( rDtCoef0* ( @@ -562,7 +562,7 @@ CrankNicholsonDdtScheme::fvcDdt ) - mesh().V00()*offCentre_(ddt0.internalField()) )/mesh().V0(); - ddt0.boundaryField() = + ddt0.boundaryField() = ( rDtCoef0* ( @@ -658,7 +658,7 @@ CrankNicholsonDdtScheme::fvmDdt { scalar rDtCoef0 = rDtCoef0_(ddt0).value(); - ddt0.internalField() = + ddt0.internalField() = ( rDtCoef0* ( @@ -668,7 +668,7 @@ CrankNicholsonDdtScheme::fvmDdt - mesh().V00()*offCentre_(ddt0.internalField()) )/mesh().V0(); - ddt0.boundaryField() = + ddt0.boundaryField() = ( rDtCoef0* ( @@ -693,7 +693,7 @@ CrankNicholsonDdtScheme::fvmDdt - offCentre_(ddt0()); } - fvm.source() = + fvm.source() = ( rDtCoef*vf.oldTime().internalField() + offCentre_(ddt0.internalField()) @@ -740,7 +740,7 @@ CrankNicholsonDdtScheme::fvmDdt { scalar rDtCoef0 = rDtCoef0_(ddt0).value(); - ddt0.internalField() = + ddt0.internalField() = ( rDtCoef0*rho.value()* ( @@ -750,7 +750,7 @@ CrankNicholsonDdtScheme::fvmDdt - mesh().V00()*offCentre_(ddt0.internalField()) )/mesh().V0(); - ddt0.boundaryField() = + ddt0.boundaryField() = ( rDtCoef0*rho.value()* ( @@ -775,7 +775,7 @@ CrankNicholsonDdtScheme::fvmDdt - offCentre_(ddt0()); } - fvm.source() = + fvm.source() = ( rDtCoef*rho.value()*vf.oldTime().internalField() + offCentre_(ddt0.internalField()) @@ -823,7 +823,7 @@ CrankNicholsonDdtScheme::fvmDdt { scalar rDtCoef0 = rDtCoef0_(ddt0).value(); - ddt0.internalField() = + ddt0.internalField() = ( rDtCoef0* ( @@ -835,7 +835,7 @@ CrankNicholsonDdtScheme::fvmDdt - mesh().V00()*offCentre_(ddt0.internalField()) )/mesh().V0(); - ddt0.boundaryField() = + ddt0.boundaryField() = ( rDtCoef0* ( @@ -865,7 +865,7 @@ CrankNicholsonDdtScheme::fvmDdt ) - offCentre_(ddt0()); } - fvm.source() = + fvm.source() = ( rDtCoef*rho.oldTime().internalField()*vf.oldTime().internalField() + offCentre_(ddt0.internalField()) @@ -930,14 +930,14 @@ CrankNicholsonDdtScheme::fvcDdtPhiCorr { if (evaluate(dUdt0)) { - dUdt0 = + dUdt0 = rDtCoef0_(dUdt0)*(U.oldTime() - U.oldTime().oldTime()) - offCentre_(dUdt0()); } if (evaluate(dphidt0)) { - dphidt0 = + dphidt0 = rDtCoef0_(dphidt0)*(phi.oldTime() - phi.oldTime().oldTime()) - offCentre_(dphidt0()); } @@ -1065,7 +1065,7 @@ CrankNicholsonDdtScheme::fvcDdtPhiCorr ) ); } - else if + else if ( U.dimensions() == dimVelocity && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea @@ -1117,7 +1117,7 @@ CrankNicholsonDdtScheme::fvcDdtPhiCorr ) ); } - else if + else if ( U.dimensions() == rho.dimensions()*dimVelocity && phi.dimensions() == rho.dimensions()*dimVelocity*dimArea @@ -1186,7 +1186,7 @@ tmp CrankNicholsonDdtScheme::meshPhi if (evaluate(meshPhi0)) { - meshPhi0 = + meshPhi0 = coef0_(meshPhi0)*mesh().phi().oldTime() - offCentre_(meshPhi0()); } From 8dc018bb5366785c3a088a2df077d886dfe61a26 Mon Sep 17 00:00:00 2001 From: henry Date: Thu, 29 May 2008 23:29:28 +0100 Subject: [PATCH 2/3] Add flex version selection of the yywrap() function to support the new and more correct version 2.5.34. --- .../mesh/conversion/ansysToFoam/ansysToFoam.L | 6 +- .../fluent3DMeshToFoam/fluent3DMeshToFoam.L | 4 + .../fluentMeshToFoam/fluentMeshToFoam.L | 104 +++++++++--------- .../conversion/gambitToFoam/gambitToFoam.L | 10 +- .../chemkinReader/chemkinLexer.L | 4 + .../triSurface/interfaces/STL/readSTLASCII.L | 9 +- 6 files changed, 81 insertions(+), 56 deletions(-) diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 5150717d82..ea650ad98a 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -70,7 +70,11 @@ PtrList > slPatchCellFaces; // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> +#if YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() +#else +int yyFlexLexer::yywrap() +#endif { return 1; } @@ -393,7 +397,7 @@ int main(int argc, char *argv[]) } // Warning: tet face order has changed between version 1.9.6 and 2.0 - // + // label faceIndex[7][6] = { {-1, -1, -1, -1, -1, -1}, // 0 diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index cb9d0a8f64..22bbb4002b 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -116,7 +116,11 @@ void uniquify(word& name, HashSet& patchNames) // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. // See <> +#if YY_FLEX_SUBMINOR_VERSION < 34 extern "C" int yywrap() +#else +int yyFlexLexer::yywrap() +#endif { return 1; } diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index f2d041e542..f028ac227a 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -93,7 +93,7 @@ SLList