diff --git a/applications/solvers/combustion/rhoReactingFoam/pEqn.H b/applications/solvers/combustion/rhoReactingFoam/pEqn.H index a58cd28de..a0725d692 100644 --- a/applications/solvers/combustion/rhoReactingFoam/pEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/pEqn.H @@ -31,7 +31,12 @@ - fvm::laplacian(rho*rUA, p) ); - if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) + if + ( + ocorr == nOuterCorr + && corr == nCorr + && nonOrth == nNonOrthCorr + ) { pEqn.solve(mesh.solver(p.name() + "Final")); } @@ -64,7 +69,12 @@ - fvm::laplacian(rho*rUA, p) ); - if (ocorr == nOuterCorr && corr == nCorr && nonOrth == nNonOrthCorr) + if + ( + ocorr == nOuterCorr + && corr == nCorr + && nonOrth == nNonOrthCorr + ) { pEqn.solve(mesh.solver(p.name() + "Final")); } diff --git a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C index db74fea4e..9b83bde0f 100644 --- a/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C +++ b/applications/solvers/combustion/rhoReactingFoam/rhoReactingFoam.C @@ -42,16 +42,16 @@ Description int main(int argc, char *argv[]) { - #include "setRootCase.H" - #include "createTime.H" - #include "createMesh.H" - #include "readChemistryProperties.H" - #include "readGravitationalAcceleration.H" - #include "createFields.H" - #include "initContinuityErrs.H" - #include "readTimeControls.H" - #include "compressibleCourantNo.H" - #include "setInitialDeltaT.H" +# include "setRootCase.H" +# include "createTime.H" +# include "createMesh.H" +# include "readChemistryProperties.H" +# include "readGravitationalAcceleration.H" +# include "createFields.H" +# include "initContinuityErrs.H" +# include "readTimeControls.H" +# include "compressibleCourantNo.H" +# include "setInitialDeltaT.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,27 +59,27 @@ int main(int argc, char *argv[]) while (runTime.run()) { - #include "readTimeControls.H" - #include "readPISOControls.H" - #include "compressibleCourantNo.H" - #include "setDeltaT.H" +# include "readTimeControls.H" +# include "readPISOControls.H" +# include "compressibleCourantNo.H" +# include "setDeltaT.H" runTime++; Info<< "Time = " << runTime.timeName() << nl << endl; - #include "chemistry.H" - #include "rhoEqn.H" +# include "chemistry.H" +# include "rhoEqn.H" for (label ocorr=1; ocorr <= nOuterCorr; ocorr++) { - #include "UEqn.H" - #include "YEqn.H" - #include "hsEqn.H" +# include "UEqn.H" +# include "YEqn.H" +# include "hsEqn.H" // --- PISO loop for (int corr=1; corr<=nCorr; corr++) { - #include "pEqn.H" +# include "pEqn.H" } } diff --git a/src/OpenFOAM/fields/Fields/Field/Field.H b/src/OpenFOAM/fields/Fields/Field/Field.H index 9224a99db..3cbca2e55 100644 --- a/src/OpenFOAM/fields/Fields/Field/Field.H +++ b/src/OpenFOAM/fields/Fields/Field/Field.H @@ -194,6 +194,12 @@ public: //- Clone tmp > clone() const; + //- Return a pointer to a new Field created on freestore + static autoPtr > New(Istream& is) + { + return autoPtr >(new Field(is)); + } + //- Return a pointer to a new calculatedFvPatchFieldField created on // freestore without setting patchField values template diff --git a/src/OpenFOAM/primitives/DiagTensor/DiagTensorI.H b/src/OpenFOAM/primitives/DiagTensor/DiagTensorI.H index 58ebf382c..6922173a9 100644 --- a/src/OpenFOAM/primitives/DiagTensor/DiagTensorI.H +++ b/src/OpenFOAM/primitives/DiagTensor/DiagTensorI.H @@ -299,7 +299,7 @@ inline Cmpt det(const DiagTensor& t) template inline DiagTensor inv(const DiagTensor& dt) { - return DiagTensor(1.0/dt.xx(), 1.0/dt.yy(), 1.0/dt.zz()); + return DiagTensor(1.0/dt.xx(), 1.0/dt.yy(), 1.0/dt.zz()); } diff --git a/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.H b/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.H index 471a264d5..9f662b8ef 100644 --- a/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.H +++ b/src/OpenFOAM/primitives/DiagTensor/diagTensor/diagTensor.H @@ -48,7 +48,6 @@ namespace Foam typedef DiagTensor diagTensor; - //- Data associated with diagTensor type are contiguous template<> inline bool contiguous() {return true;} diff --git a/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.H b/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.H index 945737fb0..17660ec03 100644 --- a/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.H +++ b/src/OpenFOAM/primitives/SphericalTensor/labelSphericalTensor/labelSphericalTensor.H @@ -48,7 +48,7 @@ namespace Foam typedef SphericalTensor