From af039f0eb72ee3fff7ba32bff7cae73aca9eb579 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 13 Apr 2010 16:06:57 +0200 Subject: [PATCH 01/41] ENH: add fvPatch::start() method to simplify some expressions --- .../fvMesh/fvPatches/fvPatch/fvPatch.C | 53 ++++++++----------- .../fvMesh/fvPatches/fvPatch/fvPatch.H | 10 +++- 2 files changed, 31 insertions(+), 32 deletions(-) diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C index c546459875..0b42c7f6bb 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,21 +31,18 @@ License #include "volFields.H" #include "surfaceFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(fvPatch, 0); -defineRunTimeSelectionTable(fvPatch, polyPatch); -addToRunTimeSelectionTable(fvPatch, fvPatch, polyPatch); - + defineTypeNameAndDebug(fvPatch, 0); + defineRunTimeSelectionTable(fvPatch, polyPatch); + addToRunTimeSelectionTable(fvPatch, fvPatch, polyPatch); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm) +Foam::fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm) : polyPatch_(p), boundaryMesh_(bm) @@ -54,19 +51,19 @@ fvPatch::fvPatch(const polyPatch& p, const fvBoundaryMesh& bm) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -fvPatch::~fvPatch() +Foam::fvPatch::~fvPatch() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool fvPatch::constraintType(const word& pt) +bool Foam::fvPatch::constraintType(const word& pt) { return fvPatchField::patchConstructorTablePtr_->found(pt); } -wordList fvPatch::constraintTypes() +Foam::wordList Foam::fvPatch::constraintTypes() { wordList cTypes(polyPatchConstructorTablePtr_->size()); @@ -92,19 +89,19 @@ wordList fvPatch::constraintTypes() } -const unallocLabelList& fvPatch::faceCells() const +const Foam::unallocLabelList& Foam::fvPatch::faceCells() const { return polyPatch_.faceCells(); } -const vectorField& fvPatch::Cf() const +const Foam::vectorField& Foam::fvPatch::Cf() const { return boundaryMesh().mesh().Cf().boundaryField()[index()]; } -tmp fvPatch::Cn() const +Foam::tmp Foam::fvPatch::Cn() const { tmp tcc(new vectorField(size())); vectorField& cc = tcc(); @@ -123,64 +120,60 @@ tmp fvPatch::Cn() const } -tmp fvPatch::nf() const +Foam::tmp Foam::fvPatch::nf() const { return Sf()/magSf(); } -const vectorField& fvPatch::Sf() const +const Foam::vectorField& Foam::fvPatch::Sf() const { return boundaryMesh().mesh().Sf().boundaryField()[index()]; } -const scalarField& fvPatch::magSf() const +const Foam::scalarField& Foam::fvPatch::magSf() const { return boundaryMesh().mesh().magSf().boundaryField()[index()]; } -tmp fvPatch::delta() const +Foam::tmp Foam::fvPatch::delta() const { return Cf() - Cn(); } -void fvPatch::makeWeights(scalarField& w) const +void Foam::fvPatch::makeWeights(scalarField& w) const { w = 1.0; } -void fvPatch::makeDeltaCoeffs(scalarField& dc) const +void Foam::fvPatch::makeDeltaCoeffs(scalarField& dc) const { dc = 1.0/(nf() & delta()); } -void fvPatch::initMovePoints() +void Foam::fvPatch::initMovePoints() {} -void fvPatch::movePoints() +void Foam::fvPatch::movePoints() {} -const scalarField& fvPatch::deltaCoeffs() const +const Foam::scalarField& Foam::fvPatch::deltaCoeffs() const { return boundaryMesh().mesh().deltaCoeffs().boundaryField()[index()]; } -const scalarField& fvPatch::weights() const +const Foam::scalarField& Foam::fvPatch::weights() const { return boundaryMesh().mesh().weights().boundaryField()[index()]; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H index 1b57ab0601..fbadb7cdbe 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -151,6 +151,12 @@ public: return polyPatch_.name(); } + //- Return start label of this patch in the polyMesh face list + label start() const + { + return polyPatch_.start(); + } + //- Return size virtual label size() const { @@ -185,7 +191,7 @@ public: template const typename List::subList patchSlice(const List& l) const { - return typename List::subList(l, size(), polyPatch_.start()); + return typename List::subList(l, size(), start()); } //- Return faceCells From 6b819eb50af2e88ab399191695936051ae34a01d Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 13 Apr 2010 17:12:57 +0200 Subject: [PATCH 02/41] STYLE: use new fvPatch::start() method --- .../test/nearWallDist-wave/testWallDist2.C | 3 +-- .../dynamicRefineFvMesh/dynamicRefineFvMesh.C | 2 +- .../fvMeshDistribute/fvMeshDistributeTemplates.C | 2 +- .../activeBaffleVelocityFvPatchVectorField.C | 2 +- .../directMappedFixedValueFvPatchField.C | 2 +- ...irectMappedVelocityFluxFixedValueFvPatchField.C | 4 ++-- .../extendedCellToFaceStencilTemplates.C | 2 +- .../extendedUpwindCellToFaceStencilTemplates.C | 2 +- .../fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C | 14 +++++++------- .../schemes/CentredFitScheme/CentredFitData.C | 2 +- .../schemes/UpwindFitScheme/UpwindFitData.C | 4 ++-- .../inverseFaceDistanceDiffusivity.C | 2 +- .../inversePointDistanceDiffusivity.C | 2 +- .../directMappedFixedInternalValueFvPatchField.C | 6 ++++-- .../rawTopoChangerFvMeshTemplates.C | 2 +- ...entTemperatureCoupledBaffleFvPatchScalarField.C | 2 +- ...mperatureCoupledBaffleMixedFvPatchScalarField.C | 2 +- 17 files changed, 28 insertions(+), 27 deletions(-) diff --git a/applications/test/nearWallDist-wave/testWallDist2.C b/applications/test/nearWallDist-wave/testWallDist2.C index e5d528e7d3..ee9fff90b3 100644 --- a/applications/test/nearWallDist-wave/testWallDist2.C +++ b/applications/test/nearWallDist-wave/testWallDist2.C @@ -176,8 +176,7 @@ int main(int argc, char *argv[]) forAll(patchField, patchFaceI) { - label meshFaceI = - patchField.patch().patch().start() + patchFaceI; + const label meshFaceI = patchField.patch().start() + patchFaceI; scalar dist = faceInfo[meshFaceI].distSqr(); if (faceInfo[meshFaceI].valid()) diff --git a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C index 3deee0484f..d66982bb35 100644 --- a/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C +++ b/src/dynamicFvMesh/dynamicRefineFvMesh/dynamicRefineFvMesh.C @@ -332,7 +332,7 @@ Foam::dynamicRefineFvMesh::refine const fvsPatchScalarField& patchPhiU = phiU.boundaryField()[patchI]; - label faceI = patchPhi.patch().patch().start(); + label faceI = patchPhi.patch().start(); forAll(patchPhi, i) { diff --git a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C index 588dda7566..5d29abaf90 100644 --- a/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C +++ b/src/dynamicMesh/fvMeshDistribute/fvMeshDistributeTemplates.C @@ -186,7 +186,7 @@ void Foam::fvMeshDistribute::mapBoundaryFields forAll(bfld, patchI) { fvsPatchField& patchFld = bfld[patchI]; - label faceI = patchFld.patch().patch().start(); + label faceI = patchFld.patch().start(); forAll(patchFld, i) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C index d996a2e8b9..2b9fd74349 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/activeBaffleVelocity/activeBaffleVelocityFvPatchVectorField.C @@ -231,7 +231,7 @@ void Foam::activeBaffleVelocityFvPatchVectorField::updateCoeffs() Info<< "openFraction = " << openFraction_ << endl; - vectorField::subField Sfw = patch().patch().faceAreas(); + vectorField::subField Sfw = this->patch().patch().faceAreas(); vectorField newSfw = (1 - openFraction_)*initWallSf_; forAll(Sfw, facei) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C index a3d7598451..27b5adcbbb 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedFixedValue/directMappedFixedValueFvPatchField.C @@ -249,7 +249,7 @@ void directMappedFixedValueFvPatchField::updateCoeffs() { const fvPatchField& pf = nbrField.boundaryField()[patchI]; - label faceStart = pf.patch().patch().start(); + label faceStart = pf.patch().start(); forAll(pf, faceI) { diff --git a/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C index 80f50e4808..402ec5ea56 100644 --- a/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/derived/directMappedVelocityFluxFixedValue/directMappedVelocityFluxFixedValueFvPatchField.C @@ -116,7 +116,7 @@ directMappedVelocityFluxFixedValueFvPatchField // Force calculation of schedule (uses parallel comms) const directMappedPolyPatch& mpp = refCast ( - patch().patch() + this->patch().patch() ); (void)mpp.map().schedule(); } @@ -187,7 +187,7 @@ void directMappedVelocityFluxFixedValueFvPatchField::updateCoeffs() const fvPatchVectorField& Upf = UField.boundaryField()[patchI]; const scalarField& phipf = phiField.boundaryField()[patchI]; - label faceStart = Upf.patch().patch().start(); + label faceStart = Upf.patch().start(); forAll(Upf, faceI) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C index 25caa5a090..e37d17f60a 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedCellToFaceStencilTemplates.C @@ -139,7 +139,7 @@ Foam::extendedCellToFaceStencil::weightedSum if (pSfCorr.coupled()) { - label faceI = pSfCorr.patch().patch().start(); + label faceI = pSfCorr.patch().start(); forAll(pSfCorr, i) { diff --git a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C index 27eb7032ef..9ba34e2282 100644 --- a/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C +++ b/src/finiteVolume/fvMesh/extendedStencil/cellToFace/extendedUpwindCellToFaceStencilTemplates.C @@ -106,7 +106,7 @@ Foam::extendedUpwindCellToFaceStencil::weightedSum if (pSfCorr.coupled()) { - label faceI = pSfCorr.patch().patch().start(); + label faceI = pSfCorr.patch().start(); forAll(pSfCorr, i) { diff --git a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C index 4a7078723c..4fa17952ec 100644 --- a/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C +++ b/src/finiteVolume/fvMesh/fvMeshSubset/fvMeshSubsetInterpolate.C @@ -73,14 +73,14 @@ tmp > fvMeshSubset::interpolate // Construct addressing const fvPatch& subPatch = sMesh.boundary()[patchI]; const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]]; - label baseStart = basePatch.patch().start(); - label baseSize = basePatch.size(); + const label baseStart = basePatch.start(); + const label baseSize = basePatch.size(); labelList directAddressing(subPatch.size()); forAll(directAddressing, i) { - label baseFaceI = faceMap[subPatch.patch().start()+i]; + label baseFaceI = faceMap[subPatch.start()+i]; if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize) { @@ -197,14 +197,14 @@ tmp > fvMeshSubset::interpolate // Construct addressing const fvPatch& subPatch = sMesh.boundary()[patchI]; const fvPatch& basePatch = vf.mesh().boundary()[patchMap[patchI]]; - label baseStart = basePatch.patch().start(); - label baseSize = basePatch.size(); + const label baseStart = basePatch.start(); + const label baseSize = basePatch.size(); labelList directAddressing(subPatch.size()); forAll(directAddressing, i) { - label baseFaceI = faceMap[subPatch.patch().start()+i]; + label baseFaceI = faceMap[subPatch.start()+i]; if (baseFaceI >= baseStart && baseFaceI < baseStart+baseSize) { @@ -239,7 +239,7 @@ tmp > fvMeshSubset::interpolate { fvsPatchField& pfld = patchFields[patchI]; - label meshFaceI = pfld.patch().patch().start(); + label meshFaceI = pfld.patch().start(); forAll(pfld, i) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C index bca4e0aaf6..a10c1cc22b 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/CentredFitScheme/CentredFitData.C @@ -103,7 +103,7 @@ void Foam::CentredFitData::calcFit() if (pw.coupled()) { - label facei = pw.patch().patch().start(); + label facei = pw.patch().start(); forAll(pw, i) { diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C index 49d22582fd..47a7d69e46 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/UpwindFitScheme/UpwindFitData.C @@ -121,7 +121,7 @@ void Foam::UpwindFitData::calcFit() if (pw.coupled()) { - label facei = pw.patch().patch().start(); + label facei = pw.patch().start(); forAll(pw, i) { @@ -180,7 +180,7 @@ void Foam::UpwindFitData::calcFit() if (pw.coupled()) { - label facei = pw.patch().patch().start(); + label facei = pw.patch().start(); forAll(pw, i) { diff --git a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C index 2ef5a2a1fc..934f29e018 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C @@ -144,7 +144,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct() } else { - label start = bfld.patch().patch().start(); + const label start = bfld.patch().start(); forAll(bfld, i) { diff --git a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C index ec47a05a6c..00063e203c 100644 --- a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C @@ -190,7 +190,7 @@ void Foam::inversePointDistanceDiffusivity::correct() } else { - label start = bfld.patch().patch().start(); + const label start = bfld.patch().start(); forAll(bfld, i) { diff --git a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C b/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C index 9c84101d85..0f5c3db7c1 100644 --- a/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C +++ b/src/surfaceFilmModels/derivedFvPatchFields/directMappedFixedInternalValue/directMappedFixedInternalValueFvPatchField.C @@ -111,8 +111,10 @@ void directMappedFixedInternalValueFvPatchField::updateCoeffs() directMappedFixedValueFvPatchField::updateCoeffs(); // Get the coupling information from the directMappedPatchBase - const directMappedPatchBase& mpp = - refCast(this->patch().patch()); + const directMappedPatchBase& mpp = refCast + ( + this->patch().patch() + ); const polyMesh& nbrMesh = mpp.sampleMesh(); const fvPatch& nbrPatch = refCast diff --git a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C index 0207910567..388487c505 100644 --- a/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C +++ b/src/topoChangerFvMesh/rawTopoChangerFvMesh/rawTopoChangerFvMeshTemplates.C @@ -45,7 +45,7 @@ void Foam::rawTopoChangerFvMesh::setUnmappedValues fld.boundaryField()[patchI] ); - label start = fvp.patch().patch().start(); + const label start = fvp.patch().start(); forAll(fvp, i) { if (!mappedFace[start+i]) diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C index 97e665b707..ae719eb968 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffle/turbulentTemperatureCoupledBaffleFvPatchScalarField.C @@ -237,7 +237,7 @@ void Foam::turbulentTemperatureCoupledBaffleFvPatchScalarField::updateCoeffs() // Get the coupling information from the directMappedPatchBase const directMappedPatchBase& mpp = refCast ( - patch().patch() + this->patch().patch() ); const polyMesh& nbrMesh = mpp.sampleMesh(); const fvPatch& nbrPatch = refCast diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C index 42d82bb63a..bb3ce48d3a 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/turbulentTemperatureCoupledBaffleMixed/turbulentTemperatureCoupledBaffleMixedFvPatchScalarField.C @@ -200,7 +200,7 @@ void turbulentTemperatureCoupledBaffleMixedFvPatchScalarField::updateCoeffs() // Get the coupling information from the directMappedPatchBase const directMappedPatchBase& mpp = refCast ( - patch().patch() + this->patch().patch() ); const polyMesh& nbrMesh = mpp.sampleMesh(); const fvPatch& nbrPatch = refCast From 42807ddd7eec3b8fdfc3c4018e3d79b6c42181aa Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 13 Apr 2010 17:45:49 +0200 Subject: [PATCH 03/41] STYLE: fix worst spacing violations for 'os <<' constructions - accept some violations of the coding guidelines though - perhaps adding a style exception would be simpler. --- .../alphaContactAngleFvPatchScalarField.C | 2 +- applications/test/Dictionary/DictionaryTest.C | 4 +-- applications/test/Field/testField.H | 2 +- applications/test/HashTable/hashTableTest.C | 2 +- applications/test/ISLList/ISLListTest.C | 2 +- applications/test/PtrList/PtrListTest.C | 2 +- .../StaticHashTable/staticHashTableTest.C | 2 +- .../test/UDictionary/UDictionaryTest.C | 2 +- .../test/primitivePatch/testPrimitivePatch.C | 3 +-- applications/test/sha1/testSHA1.C | 6 ++--- .../mesh/conversion/cfx4ToFoam/block.C | 6 ++--- .../mesh/conversion/cfx4ToFoam/hexBlock.C | 2 +- .../mesh/conversion/plot3dToFoam/hexBlock.C | 8 +++--- .../conversion/writeMeshObj/writeMeshObj.C | 2 +- .../patchPointEdgeCirculator.C | 2 +- .../mesh/manipulation/setSet/setSet.C | 2 +- .../mesh/manipulation/setSet/writeFuns.C | 16 +++++------ .../foamToFieldview9/writeFunctions.C | 6 ++--- .../foamToTecplot360/foamToTecplot360.C | 10 +++---- .../dataConversion/foamToVTK/foamToVTK.C | 10 +++---- .../dataConversion/foamToVTK/writeFuns.C | 20 +++++++------- .../PV3FoamReader/vtkPV3FoamReader.cxx | 11 ++++---- .../vtkPV3blockMeshReader.cxx | 4 +-- .../miscellaneous/postChannel/sumData.C | 2 +- .../surfaceSplitNonManifolds.C | 6 ++--- .../mixtureAdiabaticFlameT/substance.H | 4 +-- src/OSspecific/POSIX/printStack.C | 23 ++++++++-------- .../basic/coupled/coupledPolyPatch.C | 2 +- src/dynamicMesh/meshCut/cellCuts/cellCuts.C | 4 +-- src/lagrangian/basic/IOPosition/IOPosition.C | 4 +-- src/meshTools/octree/treeLeaf.C | 2 +- src/meshTools/octree/treeNode.C | 2 +- .../triSurface/interfaces/DX/writeDX.C | 27 +++++++++---------- .../triSurface/interfaces/OBJ/writeOBJ.C | 4 +-- .../triSurface/interfaces/OFF/writeOFF.C | 6 ++--- .../triSurface/interfaces/STL/writeSTL.C | 22 +++++++-------- .../surfacePatch/surfacePatchIOList.C | 2 +- 37 files changed, 115 insertions(+), 121 deletions(-) diff --git a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C index 990db1cda3..3cf76bab1b 100644 --- a/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C +++ b/applications/solvers/multiphase/multiphaseInterFoam/multiphaseMixture/alphaContactAngle/alphaContactAngleFvPatchScalarField.C @@ -50,7 +50,7 @@ Istream& operator>> alphaContactAngleFvPatchScalarField::interfaceThetaProps& tp ) { - is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_; + is >> tp.theta0_ >> tp.uTheta_ >> tp.thetaA_ >> tp.thetaR_; return is; } diff --git a/applications/test/Dictionary/DictionaryTest.C b/applications/test/Dictionary/DictionaryTest.C index 2844489f72..db4bc1ce75 100644 --- a/applications/test/Dictionary/DictionaryTest.C +++ b/applications/test/Dictionary/DictionaryTest.C @@ -59,7 +59,7 @@ public: friend Ostream& operator<<(Ostream& os, const ent& e) { - os << e.keyword_ << ' ' << e.i_ << endl; + os << e.keyword_ << ' ' << e.i_ << endl; return os; } }; @@ -88,7 +88,7 @@ public: friend Ostream& operator<<(Ostream& os, const Scalar& val) { - os << val.data_; + os << val.data_; return os; } }; diff --git a/applications/test/Field/testField.H b/applications/test/Field/testField.H index d43452fea7..530b662525 100644 --- a/applications/test/Field/testField.H +++ b/applications/test/Field/testField.H @@ -38,7 +38,7 @@ public: friend std::ostream& operator<<(std::ostream& os, const Vector& v) { - os << v.X << '\t' << v.Y << '\n'; + os << v.X << '\t' << v.Y << '\n'; return os; } }; diff --git a/applications/test/HashTable/hashTableTest.C b/applications/test/HashTable/hashTableTest.C index a109f1d911..0cbd4ded85 100644 --- a/applications/test/HashTable/hashTableTest.C +++ b/applications/test/HashTable/hashTableTest.C @@ -89,7 +89,7 @@ int main() { OStringStream os; - os << table1; + os << table1; HASHTABLE_CLASS readTable(IStringStream(os.str())(), 100); Info<< "Istream constructor:" << readTable << endl; diff --git a/applications/test/ISLList/ISLListTest.C b/applications/test/ISLList/ISLListTest.C index 1991aa4f24..7ebff5dbc0 100644 --- a/applications/test/ISLList/ISLListTest.C +++ b/applications/test/ISLList/ISLListTest.C @@ -54,7 +54,7 @@ public: friend Ostream& operator<<(Ostream& os, const Scalar& s) { - os << s.data_; + os << s.data_; return os; } diff --git a/applications/test/PtrList/PtrListTest.C b/applications/test/PtrList/PtrListTest.C index ffcde48b96..d17f56885a 100644 --- a/applications/test/PtrList/PtrListTest.C +++ b/applications/test/PtrList/PtrListTest.C @@ -60,7 +60,7 @@ public: friend Ostream& operator<<(Ostream& os, const Scalar& val) { - os << val.data_; + os << val.data_; return os; } }; diff --git a/applications/test/StaticHashTable/staticHashTableTest.C b/applications/test/StaticHashTable/staticHashTableTest.C index 77a456f2ba..d51bf1f5d2 100644 --- a/applications/test/StaticHashTable/staticHashTableTest.C +++ b/applications/test/StaticHashTable/staticHashTableTest.C @@ -83,7 +83,7 @@ int main() { OStringStream os; - os << table1; + os << table1; HASHTABLE_CLASS readTable(IStringStream(os.str())(), 100); Info<< "Istream constructor:" << readTable << endl; diff --git a/applications/test/UDictionary/UDictionaryTest.C b/applications/test/UDictionary/UDictionaryTest.C index 57fc55c0b3..e884bcddd8 100644 --- a/applications/test/UDictionary/UDictionaryTest.C +++ b/applications/test/UDictionary/UDictionaryTest.C @@ -56,7 +56,7 @@ public: friend Ostream& operator<<(Ostream& os, const ent& e) { - os << e.keyword_ << ' ' << e.i_ << endl; + os << e.keyword_ << ' ' << e.i_ << endl; return os; } }; diff --git a/applications/test/primitivePatch/testPrimitivePatch.C b/applications/test/primitivePatch/testPrimitivePatch.C index 37fd7b32eb..e2336530e6 100644 --- a/applications/test/primitivePatch/testPrimitivePatch.C +++ b/applications/test/primitivePatch/testPrimitivePatch.C @@ -47,8 +47,7 @@ void writeObj(Ostream& os,const pointField& points) { const point& pt = points[pointI]; - os << "v " << pt.x() << ' ' << pt.y() - << ' ' << pt.z() << endl; + os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl; } } diff --git a/applications/test/sha1/testSHA1.C b/applications/test/sha1/testSHA1.C index 45fd3814b8..c3e3685108 100644 --- a/applications/test/sha1/testSHA1.C +++ b/applications/test/sha1/testSHA1.C @@ -92,14 +92,14 @@ int main(int argc, char * argv[]) { OSHA1stream os; - os << str; + os << str; Info<< os.digest() << endl; - os << str; + os << str; Info<< os.digest() << endl; os.rewind(); - os << "The quick brown fox jumps over the lazy dog"; + os << "The quick brown fox jumps over the lazy dog"; Info<< os.digest() << endl; } diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/block.C b/applications/utilities/mesh/conversion/cfx4ToFoam/block.C index 906ebac9ec..e61b80ce08 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/block.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/block.C @@ -110,9 +110,9 @@ const labelListListList& block::boundaryPatches() const Ostream& operator<<(Ostream& os, const block& b) { - os << b.Vertices << nl - << b.Cells << nl - << b.BoundaryPatches << endl; + os << b.Vertices << nl + << b.Cells << nl + << b.BoundaryPatches << endl; return os; } diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/hexBlock.C b/applications/utilities/mesh/conversion/cfx4ToFoam/hexBlock.C index e4dc4d82c5..2bdc448ed4 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/hexBlock.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/hexBlock.C @@ -57,7 +57,7 @@ void hexBlock::readPoints(Istream& is) { forAll(points_, i) { - is >> points_[i].x() >> points_[i].y() >> points_[i].z(); + is >> points_[i].x() >> points_[i].y() >> points_[i].z(); } // Calculate the handedness of the block diff --git a/applications/utilities/mesh/conversion/plot3dToFoam/hexBlock.C b/applications/utilities/mesh/conversion/plot3dToFoam/hexBlock.C index 74543ed4c1..e7ab90647a 100644 --- a/applications/utilities/mesh/conversion/plot3dToFoam/hexBlock.C +++ b/applications/utilities/mesh/conversion/plot3dToFoam/hexBlock.C @@ -128,13 +128,13 @@ void hexBlock::readPoints Info<< "Reading " << nPoints << " x coordinates..." << endl; for (label i=0; i < nPoints; i++) { - is >> points_[i].x(); + is >> points_[i].x(); } Info<< "Reading " << nPoints << " y coordinates..." << endl; for (label i=0; i < nPoints; i++) { - is >> points_[i].y(); + is >> points_[i].y(); } if (twoDThicknes > 0) @@ -156,7 +156,7 @@ void hexBlock::readPoints Info<< "Reading " << nPoints << " z coordinates..." << endl; for (label i=0; i < nPoints; i++) { - is >> points_[i].z(); + is >> points_[i].z(); } } @@ -166,7 +166,7 @@ void hexBlock::readPoints Info<< "Reading " << nPoints << " blanks..." << endl; for (label i=0; i < nPoints; i++) { - is >> iBlank; + is >> iBlank; } } diff --git a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C index d0e067a070..2d37090daa 100644 --- a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C +++ b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C @@ -51,7 +51,7 @@ using namespace Foam; void writeOBJ(const point& pt, Ostream& os) { - os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << nl; + os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << nl; } // All edges of mesh diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/patchPointEdgeCirculator.C b/applications/utilities/mesh/generation/extrudeToRegionMesh/patchPointEdgeCirculator.C index b91f06fe3f..67db0ccbab 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/patchPointEdgeCirculator.C +++ b/applications/utilities/mesh/generation/extrudeToRegionMesh/patchPointEdgeCirculator.C @@ -58,7 +58,7 @@ Foam::Ostream& Foam::operator<< if (faceI != -1) { - os<< " fc:" << c.patch_.localFaces()[faceI].centre(pts); + os << " fc:" << c.patch_.localFaces()[faceI].centre(pts); } return os; } diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index 9750237161..d8c216c662 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -974,7 +974,7 @@ int main(int argc, char *argv[]) IStringStream is(rawLine + ' '); // Type: cellSet, faceSet, pointSet, faceZoneSet - is >> setType; + is >> setType; stat = parseType(runTime, mesh, setType, is); diff --git a/applications/utilities/mesh/manipulation/setSet/writeFuns.C b/applications/utilities/mesh/manipulation/setSet/writeFuns.C index e7a67bc09b..d347bcc7f4 100644 --- a/applications/utilities/mesh/manipulation/setSet/writeFuns.C +++ b/applications/utilities/mesh/manipulation/setSet/writeFuns.C @@ -85,20 +85,20 @@ void Foam::writeFuns::write fField.size()*sizeof(float) ); - os << std::endl; + os << std::endl; } else { forAll(fField, i) { - os << fField[i] << ' '; + os << fField[i] << ' '; if (i > 0 && (i % 10) == 0) { - os << std::endl; + os << std::endl; } } - os << std::endl; + os << std::endl; } } @@ -134,20 +134,20 @@ void Foam::writeFuns::write elems.size()*sizeof(label) ); - os << std::endl; + os << std::endl; } else { forAll(elems, i) { - os << elems[i] << ' '; + os << elems[i] << ' '; if (i > 0 && (i % 10) == 0) { - os << std::endl; + os << std::endl; } } - os << std::endl; + os << std::endl; } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/writeFunctions.C b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/writeFunctions.C index 2de1128c63..eec0beea36 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/writeFunctions.C +++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/writeFunctions.C @@ -85,12 +85,12 @@ void writeBytes(char* start, int nBytes) // Debug: write wall flags data void writeWallFlags(Ostream& os, label cellI, const labelList& wallFlags) { - os << "cell " << cellI << " wallsFlags:"; + os << "cell " << cellI << " wallsFlags:"; forAll(wallFlags, wallFaceI) { - os << wallFlags[wallFaceI] << " "; + os << wallFlags[wallFaceI] << ' '; } - os << endl; + os << endl; } diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C index 0231e15938..2ba61565d9 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C @@ -99,12 +99,12 @@ void print(const char* msg, Ostream& os, const PtrList& flds) { if (flds.size()) { - os << msg; + os << msg; forAll(flds, i) { - os<< ' ' << flds[i].name(); + os << ' ' << flds[i].name(); } - os << endl; + os << endl; } } @@ -113,9 +113,9 @@ void print(Ostream& os, const wordList& flds) { forAll(flds, i) { - os<< ' ' << flds[i]; + os << ' ' << flds[i]; } - os << endl; + os << endl; } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index 0637dabbd6..a93885d976 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C @@ -163,12 +163,12 @@ void print(const char* msg, Ostream& os, const PtrList& flds) { if (flds.size()) { - os << msg; + os << msg; forAll(flds, i) { - os<< ' ' << flds[i].name(); + os << ' ' << flds[i].name(); } - os << endl; + os << endl; } } @@ -177,9 +177,9 @@ void print(Ostream& os, const wordList& flds) { forAll(flds, i) { - os<< ' ' << flds[i]; + os << ' ' << flds[i]; } - os << endl; + os << endl; } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C index 5e657f87cf..89f0a59327 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C @@ -94,20 +94,20 @@ void Foam::writeFuns::write fField.size()*sizeof(float) ); - os << std::endl; + os << std::endl; } else { forAll(fField, i) { - os << fField[i] << ' '; + os << fField[i] << ' '; if (i > 0 && (i % 10) == 0) { - os << std::endl; + os << std::endl; } } - os << std::endl; + os << std::endl; } } @@ -143,20 +143,20 @@ void Foam::writeFuns::write elems.size()*sizeof(label) ); - os << std::endl; + os << std::endl; } else { forAll(elems, i) { - os << elems[i] << ' '; + os << elems[i] << ' '; if (i > 0 && (i % 10) == 0) { - os << std::endl; + os << std::endl; } } - os << std::endl; + os << std::endl; } } @@ -186,11 +186,11 @@ void Foam::writeFuns::writeHeader if (binary) { - os << "BINARY" << std::endl; + os << "BINARY" << std::endl; } else { - os << "ASCII" << std::endl; + os << "ASCII" << std::endl; } } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx index 74f8f013a8..b508d21ec0 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx @@ -502,15 +502,14 @@ void vtkPV3FoamReader::PrintSelf(ostream& os, vtkIndent indent) vtkDebugMacro(<<"PrintSelf"); this->Superclass::PrintSelf(os,indent); - os<< indent << "File name: " - << (this->FileName ? this->FileName : "(none)") << "\n"; + os << indent << "File name: " + << (this->FileName ? this->FileName : "(none)") << "\n"; foamData_->PrintSelf(os, indent); - os<< indent << "Time step range: " - << this->TimeStepRange[0] << " - " << this->TimeStepRange[1] - << "\n"; - os<< indent << "Time step: " << this->GetTimeStep() << endl; + os << indent << "Time step range: " + << this->TimeStepRange[0] << " - " << this->TimeStepRange[1] << "\n" + << indent << "Time step: " << this->GetTimeStep() << endl; } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx index 89532a6dde..547c4ff66b 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx @@ -283,8 +283,8 @@ void vtkPV3blockMeshReader::PrintSelf(ostream& os, vtkIndent indent) vtkDebugMacro(<<"PrintSelf"); this->Superclass::PrintSelf(os,indent); - os<< indent << "File name: " - << (this->FileName ? this->FileName : "(none)") << "\n"; + os << indent << "File name: " + << (this->FileName ? this->FileName : "(none)") << "\n"; foamData_->PrintSelf(os, indent); } diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/sumData.C b/applications/utilities/postProcessing/miscellaneous/postChannel/sumData.C index 9f929b4814..73fdaf2038 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/sumData.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/sumData.C @@ -41,7 +41,7 @@ Foam::Ostream& Foam::operator<< Foam::Istream& Foam::operator>>(Foam::Istream& is, Foam::sumData& wDist) { - return is >> wDist.oldFace_ >> wDist.sum_ >> wDist.count_; + return is >> wDist.oldFace_ >> wDist.sum_ >> wDist.count_; } diff --git a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C index ce32c54206..32975365c8 100644 --- a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C +++ b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C @@ -65,7 +65,7 @@ void writeOBJ(Ostream& os, const pointField& pts) { const point& pt = pts[i]; - os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl; + os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl; } } @@ -85,7 +85,7 @@ void dumpPoints(const triSurface& surf, const labelList& borderPoint) { const point& pt = surf.localPoints()[pointI]; - os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl; + os << "v " << pt.x() << ' ' << pt.y() << ' ' << pt.z() << endl; } } } @@ -108,7 +108,7 @@ void dumpEdges(const triSurface& surf, const boolList& borderEdge) { const edge& e = surf.edges()[edgeI]; - os << "l " << e.start()+1 << ' ' << e.end()+1 << endl; + os << "l " << e.start()+1 << ' ' << e.end()+1 << endl; } } } diff --git a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/substance.H b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/substance.H index b7232cc2c7..561e3fc1b6 100644 --- a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/substance.H +++ b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/substance.H @@ -95,13 +95,13 @@ public: friend Istream& operator>>(Istream& is, substance& s) { - is >> s.name_ >> s.volFrac_; + is >> s.name_ >> s.volFrac_; return is; } friend Ostream& operator<<(Ostream& os, const substance& s) { - os << s.name_ << token::SPACE << s.volFrac_; + os << s.name_ << token::SPACE << s.volFrac_; return os; } }; diff --git a/src/OSspecific/POSIX/printStack.C b/src/OSspecific/POSIX/printStack.C index 323c812a98..87482265db 100644 --- a/src/OSspecific/POSIX/printStack.C +++ b/src/OSspecific/POSIX/printStack.C @@ -122,19 +122,18 @@ void printSourceFileAndLine if (line == "") { - os << " addr2line failed"; + os << " addr2line failed"; } else if (line == "??:0") { - os << " in " << filename; + os << " in " << filename; } else { string cwdLine(line.replaceAll(cwd() + '/', "")); - string homeLine(cwdLine.replaceAll(home(), '~')); - os << " at " << homeLine.c_str(); + os << " at " << homeLine.c_str(); } } } @@ -160,11 +159,11 @@ void getSymbolForRaw if (fcnt != "") { - os << fcnt.c_str(); + os << fcnt.c_str(); return; } } - os << "Uninterpreted: " << raw.c_str(); + os << "Uninterpreted: " << raw.c_str(); } @@ -210,8 +209,8 @@ void error::printStack(Ostream& os) fileName programFile; word address; - os << '#' << label(i) << " "; - //os << "Raw : " << msg << "\n\t"; + os << '#' << label(i) << " "; + //os << "Raw : " << msg << "\n\t"; { string::size_type lPos = msg.find('['); string::size_type rPos = msg.find(']'); @@ -263,12 +262,12 @@ void error::printStack(Ostream& os) if (status == 0 && cplusNamePtr) { - os << cplusNamePtr; + os << cplusNamePtr; free(cplusNamePtr); } else { - os << cName.c_str(); + os << cName.c_str(); } } else @@ -279,7 +278,7 @@ void error::printStack(Ostream& os) { string fullName(msg.substr(start, endBracketPos-start)); - os << fullName.c_str() << nl; + os << fullName.c_str() << nl; } else { @@ -296,7 +295,7 @@ void error::printStack(Ostream& os) printSourceFileAndLine(os, addressMap, programFile, address); - os << nl; + os << nl; } free(strings); diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C index 26b892921e..a18ec94f5c 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/basic/coupled/coupledPolyPatch.C @@ -71,7 +71,7 @@ void Foam::coupledPolyPatch::writeOBJ writeOBJ(os, p1); vertI++; - os<< "l " << vertI-1 << ' ' << vertI << nl; + os << "l " << vertI-1 << ' ' << vertI << nl; } diff --git a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C index e429782622..0a856360c4 100644 --- a/src/dynamicMesh/meshCut/cellCuts/cellCuts.C +++ b/src/dynamicMesh/meshCut/cellCuts/cellCuts.C @@ -3036,12 +3036,12 @@ void Foam::cellCuts::writeOBJ vertI++; } - os << 'f'; + os << 'f'; forAll(loopPts, fp) { os << ' ' << startVertI + fp + 1; } - os<< endl; + os << endl; } diff --git a/src/lagrangian/basic/IOPosition/IOPosition.C b/src/lagrangian/basic/IOPosition/IOPosition.C index b3345417c0..5d0d62facb 100644 --- a/src/lagrangian/basic/IOPosition/IOPosition.C +++ b/src/lagrangian/basic/IOPosition/IOPosition.C @@ -67,7 +67,7 @@ bool Foam::IOPosition::write() const template bool Foam::IOPosition::writeData(Ostream& os) const { - os<< cloud_.size() << nl << token::BEGIN_LIST << nl; + os << cloud_.size() << nl << token::BEGIN_LIST << nl; forAllConstIter(typename Cloud, cloud_, iter) { @@ -80,7 +80,7 @@ bool Foam::IOPosition::writeData(Ostream& os) const os << nl; } - os<< token::END_LIST << endl; + os << token::END_LIST << endl; return os.good(); } diff --git a/src/meshTools/octree/treeLeaf.C b/src/meshTools/octree/treeLeaf.C index c0b4ead2df..823594fb71 100644 --- a/src/meshTools/octree/treeLeaf.C +++ b/src/meshTools/octree/treeLeaf.C @@ -36,7 +36,7 @@ void Foam::treeLeaf::space(Ostream& os, const label n) { for (label i=0; i::space(Ostream& os, const label n) { for (label i=0; i Date: Tue, 13 Apr 2010 18:47:47 +0200 Subject: [PATCH 04/41] STYLE: consistent naming of files containing the 'New' method before: - 'new' prefixed to camel-cased class name: eg, someClass -> newSomeClass - 'New' prefixed to templated class name: eg, TmplClass -> NewTmplClass - 'New' suffixed to class name: eg, someClass -> someClassNew after: - consistent 'New' suffixed to class name, no change of case eg, someClass -> someClassNew eg, TmplClass -> TmplClassNew --- .../solvers/combustion/PDRFoam/Make/files | 8 ++++---- .../{newPDRDragModel.C => PDRDragModelNew.C} | 0 .../{newXiEqModel.C => XiEqModelNew.C} | 0 .../XiGModel/{newXiGModel.C => XiGModelNew.C} | 0 .../XiModel/{newXiModel.C => XiModelNew.C} | 0 .../fireFoam/combustionModels/Make/files | 2 +- ...wCombustionModel.C => combustionModelNew.C} | 0 .../multiphase/interPhaseChangeFoam/Make/files | 2 +- .../phaseChangeTwoPhaseMixture.H | 2 +- ...xture.C => phaseChangeTwoPhaseMixtureNew.C} | 0 .../interfacialModels/Make/files | 2 +- .../dragModels/dragModel/dragModel.H | 2 +- .../{newDragModel.C => dragModelNew.C} | 0 .../kineticTheoryModels/Make/files | 10 +++++----- ...ductivityModel.C => conductivityModelNew.C} | 0 ...tressModel.C => frictionalStressModelNew.C} | 0 ...ssureModel.C => granularPressureModelNew.C} | 0 .../{newRadialModel.C => radialModelNew.C} | 0 ...newViscosityModel.C => viscosityModelNew.C} | 0 .../extrudeMesh/extrudeModel/Make/files | 2 +- .../{newExtrudeModel.C => extrudeModelNew.C} | 0 .../tabulatedWallFunction/Make/files | 2 +- ...llFunction.C => tabulatedWallFunctionNew.C} | 0 src/ODE/Make/files | 2 +- .../{newODESolver.C => ODESolverNew.C} | 0 src/OpenFOAM/Make/files | 14 +++++++------- .../pointPatchField/pointPatchField.C | 2 +- ...wPointPatchField.C => pointPatchFieldNew.C} | 0 ...nterfaceField.C => GAMGInterfaceFieldNew.C} | 0 .../{newGAMGInterface.C => GAMGInterfaceNew.C} | 0 ...newFacePointPatch.C => facePointPatchNew.C} | 0 .../polyMesh/polyPatches/polyPatch/polyPatch.H | 2 +- .../{newPolyPatch.C => polyPatchNew.C} | 0 .../meshes/polyMesh/zones/cellZone/cellZone.H | 2 +- .../cellZone/{newCellZone.C => cellZoneNew.C} | 0 .../meshes/polyMesh/zones/faceZone/faceZone.H | 2 +- .../faceZone/{newFaceZone.C => faceZoneNew.C} | 0 .../polyMesh/zones/pointZone/pointZone.H | 2 +- .../{newPointZone.C => pointZoneNew.C} | 0 src/dynamicFvMesh/Make/files | 4 ++-- .../dynamicFvMesh/dynamicFvMesh.H | 2 +- .../{newDynamicFvMesh.C => dynamicFvMeshNew.C} | 0 .../solidBodyMotionFunction.H | 2 +- ...Function.C => solidBodyMotionFunctionNew.C} | 0 src/dynamicMesh/Make/files | 2 +- ...olyMeshModifier.C => polyMeshModifierNew.C} | 0 src/engine/Make/files | 2 +- .../{newEngineMesh.C => engineMeshNew.C} | 0 src/finiteVolume/Make/files | 4 ++-- .../SRFModel/{newSRFModel.C => SRFModelNew.C} | 0 .../fvPatchFields/fvPatchField/fvPatchField.C | 2 +- .../fvPatchFields/fvPatchField/fvPatchField.H | 2 +- .../{newFvPatchField.C => fvPatchFieldNew.C} | 0 .../fvsPatchField/fvsPatchField.C | 2 +- .../fvsPatchField/fvsPatchField.H | 2 +- .../{newFvsPatchField.C => fvsPatchFieldNew.C} | 0 .../fvMesh/fvPatches/fvPatch/fvPatch.H | 2 +- .../fvPatch/{newFvPatch.C => fvPatchNew.C} | 0 .../interpolation/interpolation.C | 2 +- .../{newInterpolation.C => interpolationNew.C} | 0 src/lagrangian/dieselSpray/Make/files | 18 +++++++++--------- ...tomizationModel.C => atomizationModelNew.C} | 0 .../{newBreakupModel.C => breakupModelNew.C} | 0 ...newCollisionModel.C => collisionModelNew.C} | 0 ...wDispersionModel.C => dispersionModelNew.C} | 0 .../{newDragModel.C => dragModelNew.C} | 0 ...vaporationModel.C => evaporationModelNew.C} | 0 ...tTransferModel.C => heatTransferModelNew.C} | 0 .../{newInjectorModel.C => injectorModelNew.C} | 0 .../{newWallModel.C => wallModelNew.C} | 0 .../BinaryCollisionModel.C | 2 +- .../BinaryCollisionModel.H | 2 +- ...lisionModel.C => BinaryCollisionModelNew.C} | 0 .../InflowBoundaryModel/InflowBoundaryModel.C | 2 +- .../InflowBoundaryModel/InflowBoundaryModel.H | 2 +- ...oundaryModel.C => InflowBoundaryModelNew.C} | 0 .../WallInteractionModel.C | 2 +- .../WallInteractionModel.H | 2 +- ...actionModel.C => WallInteractionModelNew.C} | 0 .../IntegrationScheme/IntegrationScheme.C | 2 +- ...egrationScheme.C => IntegrationSchemeNew.C} | 0 .../IO/DataEntry/DataEntry/DataEntry.H | 4 ++-- .../{NewDataEntry.C => DataEntryNew.C} | 0 .../DispersionModel/DispersionModel.C | 2 +- ...wDispersionModel.C => DispersionModelNew.C} | 0 .../Kinematic/DragModel/DragModel/DragModel.C | 2 +- .../Kinematic/DragModel/DragModel/DragModel.H | 2 +- .../{NewDragModel.C => DragModelNew.C} | 0 .../InjectionModel/InjectionModel.C | 2 +- .../InjectionModel/InjectionModel.H | 2 +- ...NewInjectionModel.C => InjectionModelNew.C} | 0 .../PatchInteractionModel.C | 2 +- .../PatchInteractionModel.H | 2 +- ...ctionModel.C => PatchInteractionModelNew.C} | 0 .../PostProcessingModel/PostProcessingModel.C | 2 +- .../PostProcessingModel/PostProcessingModel.H | 2 +- ...cessingModel.C => PostProcessingModelNew.C} | 0 .../SurfaceFilmModel/SurfaceFilmModel.C | 2 +- .../SurfaceFilmModel/SurfaceFilmModel.H | 2 +- ...urfaceFilmModel.C => SurfaceFilmModelNew.C} | 0 .../CompositionModel/CompositionModel.C | 2 +- .../CompositionModel/CompositionModel.H | 2 +- ...ompositionModel.C => CompositionModelNew.C} | 0 .../PhaseChangeModel/PhaseChangeModel.C | 2 +- .../PhaseChangeModel/PhaseChangeModel.H | 2 +- ...haseChangeModel.C => PhaseChangeModelNew.C} | 0 .../DevolatilisationModel.C | 2 +- .../DevolatilisationModel.H | 2 +- ...ationModel.C => DevolatilisationModelNew.C} | 0 .../SurfaceReactionModel.C | 2 +- .../SurfaceReactionModel.H | 2 +- ...actionModel.C => SurfaceReactionModelNew.C} | 0 .../HeatTransferModel/HeatTransferModel.C | 2 +- .../HeatTransferModel/HeatTransferModel.H | 2 +- ...tTransferModel.C => HeatTransferModelNew.C} | 0 .../molecularDynamics/potential/Make/files | 8 ++++---- .../basic/energyScalingFunction.H | 4 ++-- ...ngFunction.C => energyScalingFunctionNew.C} | 0 .../pairPotential/basic/pairPotential.H | 4 ++-- .../{newPairPotential.C => pairPotentialNew.C} | 0 .../tetherPotential/basic/tetherPotential.H | 2 +- ...wTetherPotential.C => tetherPotentialNew.C} | 0 .../foamCalcFunctions/Make/files | 2 +- .../calcType/{newCalcType.C => calcTypeNew.C} | 0 .../functionObjects/forces/Make/files | 4 ++-- .../sixDoFRigidBodyMotionConstraint.H | 2 +- ....C => sixDoFRigidBodyMotionConstraintNew.C} | 0 .../sixDoFRigidBodyMotionRestraint.H | 2 +- ...t.C => sixDoFRigidBodyMotionRestraintNew.C} | 0 src/surfaceFilmModels/Make/files | 6 +++--- ...newInjectionModel.C => injectionModelNew.C} | 0 ...haseChangeModel.C => phaseChangeModelNew.C} | 0 ...urfaceFilmModel.C => surfaceFilmModelNew.C} | 0 .../barotropicCompressibilityModel/Make/files | 2 +- ...l.C => barotropicCompressibilityModelNew.C} | 0 src/thermophysicalModels/basic/Make/files | 4 ++-- .../psiThermo/basicPsiThermo/basicPsiThermo.H | 2 +- ...newBasicPsiThermo.C => basicPsiThermoNew.C} | 0 .../rhoThermo/basicRhoThermo/basicRhoThermo.H | 2 +- ...newBasicRhoThermo.C => basicRhoThermoNew.C} | 0 .../chemistryModel/Make/files | 4 ++-- ...ChemistryModel.C => psiChemistryModelNew.C} | 0 ...ChemistryModel.C => rhoChemistryModelNew.C} | 0 .../chemistrySolver/chemistrySolver.H | 2 +- ...wChemistrySolver.C => chemistrySolverNew.C} | 0 .../laminarFlameSpeed/Make/files | 2 +- .../laminarFlameSpeed/laminarFlameSpeed.H | 2 +- ...inarFlameSpeed.C => laminarFlameSpeedNew.C} | 0 src/thermophysicalModels/pdfs/Make/files | 2 +- src/thermophysicalModels/pdfs/pdf/pdf.H | 2 +- .../pdfs/pdf/{newPdf.C => pdfNew.C} | 0 src/thermophysicalModels/radiation/Make/files | 6 +++--- ...newRadiationModel.C => radiationModelNew.C} | 0 ...ionModel.C => absorptionEmissionModelNew.C} | 0 .../{newScatterModel.C => scatterModelNew.C} | 0 .../reactionThermo/Make/files | 10 +++++----- ...mbustionThermo.C => hCombustionThermoNew.C} | 0 .../hhuCombustionThermo/hhuCombustionThermo.H | 2 +- ...ustionThermo.C => hhuCombustionThermoNew.C} | 0 ...bustionThermo.C => hsCombustionThermoNew.C} | 0 ...whReactionThermo.C => hReactionThermoNew.C} | 0 ...sReactionThermo.C => hsReactionThermoNew.C} | 0 src/thermophysicalModels/solids/Make/files | 2 +- .../solids/solid/{newSolid.C => solidNew.C} | 0 src/transportModels/incompressible/Make/files | 2 +- .../viscosityModel/viscosityModel.H | 2 +- ...newViscosityModel.C => viscosityModelNew.C} | 0 167 files changed, 123 insertions(+), 123 deletions(-) rename applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/{newPDRDragModel.C => PDRDragModelNew.C} (100%) rename applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/{newXiEqModel.C => XiEqModelNew.C} (100%) rename applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/{newXiGModel.C => XiGModelNew.C} (100%) rename applications/solvers/combustion/PDRFoam/XiModels/XiModel/{newXiModel.C => XiModelNew.C} (100%) rename applications/solvers/combustion/fireFoam/combustionModels/combustionModel/{newCombustionModel.C => combustionModelNew.C} (100%) rename applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/{newPhaseChangeTwoPhaseMixture.C => phaseChangeTwoPhaseMixtureNew.C} (100%) rename applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/{newDragModel.C => dragModelNew.C} (100%) rename applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/{newConductivityModel.C => conductivityModelNew.C} (100%) rename applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/{newFrictionalStressModel.C => frictionalStressModelNew.C} (100%) rename applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/{newGranularPressureModel.C => granularPressureModelNew.C} (100%) rename applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/{newRadialModel.C => radialModelNew.C} (100%) rename applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/{newViscosityModel.C => viscosityModelNew.C} (100%) rename applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/{newExtrudeModel.C => extrudeModelNew.C} (100%) rename applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/{newTabulatedWallFunction.C => tabulatedWallFunctionNew.C} (100%) rename src/ODE/ODESolvers/ODESolver/{newODESolver.C => ODESolverNew.C} (100%) rename src/OpenFOAM/fields/pointPatchFields/pointPatchField/{newPointPatchField.C => pointPatchFieldNew.C} (100%) rename src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/{newGAMGInterfaceField.C => GAMGInterfaceFieldNew.C} (100%) rename src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/{newGAMGInterface.C => GAMGInterfaceNew.C} (100%) rename src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/{newFacePointPatch.C => facePointPatchNew.C} (100%) rename src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/{newPolyPatch.C => polyPatchNew.C} (100%) rename src/OpenFOAM/meshes/polyMesh/zones/cellZone/{newCellZone.C => cellZoneNew.C} (100%) rename src/OpenFOAM/meshes/polyMesh/zones/faceZone/{newFaceZone.C => faceZoneNew.C} (100%) rename src/OpenFOAM/meshes/polyMesh/zones/pointZone/{newPointZone.C => pointZoneNew.C} (100%) rename src/dynamicFvMesh/dynamicFvMesh/{newDynamicFvMesh.C => dynamicFvMeshNew.C} (100%) rename src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/{newSolidBodyMotionFunction.C => solidBodyMotionFunctionNew.C} (100%) rename src/dynamicMesh/polyTopoChange/polyMeshModifier/{newPolyMeshModifier.C => polyMeshModifierNew.C} (100%) rename src/engine/engineMesh/engineMesh/{newEngineMesh.C => engineMeshNew.C} (100%) rename src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/{newSRFModel.C => SRFModelNew.C} (100%) rename src/finiteVolume/fields/fvPatchFields/fvPatchField/{newFvPatchField.C => fvPatchFieldNew.C} (100%) rename src/finiteVolume/fields/fvsPatchFields/fvsPatchField/{newFvsPatchField.C => fvsPatchFieldNew.C} (100%) rename src/finiteVolume/fvMesh/fvPatches/fvPatch/{newFvPatch.C => fvPatchNew.C} (100%) rename src/finiteVolume/interpolation/interpolation/interpolation/{newInterpolation.C => interpolationNew.C} (100%) rename src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/{newAtomizationModel.C => atomizationModelNew.C} (100%) rename src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/{newBreakupModel.C => breakupModelNew.C} (100%) rename src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/{newCollisionModel.C => collisionModelNew.C} (100%) rename src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/{newDispersionModel.C => dispersionModelNew.C} (100%) rename src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/{newDragModel.C => dragModelNew.C} (100%) rename src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/{newEvaporationModel.C => evaporationModelNew.C} (100%) rename src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/{newHeatTransferModel.C => heatTransferModelNew.C} (100%) rename src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/{newInjectorModel.C => injectorModelNew.C} (100%) rename src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/{newWallModel.C => wallModelNew.C} (100%) rename src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/{NewBinaryCollisionModel.C => BinaryCollisionModelNew.C} (100%) rename src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/{NewInflowBoundaryModel.C => InflowBoundaryModelNew.C} (100%) rename src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/{NewWallInteractionModel.C => WallInteractionModelNew.C} (100%) rename src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/{newIntegrationScheme.C => IntegrationSchemeNew.C} (100%) rename src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/{NewDataEntry.C => DataEntryNew.C} (100%) rename src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/{NewDispersionModel.C => DispersionModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/{NewDragModel.C => DragModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/{NewInjectionModel.C => InjectionModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/{NewPatchInteractionModel.C => PatchInteractionModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/{NewPostProcessingModel.C => PostProcessingModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/{NewSurfaceFilmModel.C => SurfaceFilmModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/{NewCompositionModel.C => CompositionModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/{NewPhaseChangeModel.C => PhaseChangeModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/{NewDevolatilisationModel.C => DevolatilisationModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/{NewSurfaceReactionModel.C => SurfaceReactionModelNew.C} (100%) rename src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/{NewHeatTransferModel.C => HeatTransferModelNew.C} (100%) rename src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/{newEnergyScalingFunction.C => energyScalingFunctionNew.C} (100%) rename src/lagrangian/molecularDynamics/potential/pairPotential/basic/{newPairPotential.C => pairPotentialNew.C} (100%) rename src/lagrangian/molecularDynamics/potential/tetherPotential/basic/{newTetherPotential.C => tetherPotentialNew.C} (100%) rename src/postProcessing/foamCalcFunctions/calcType/{newCalcType.C => calcTypeNew.C} (100%) rename src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/{newSixDoFRigidBodyMotionConstraint.C => sixDoFRigidBodyMotionConstraintNew.C} (100%) rename src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/{newSixDoFRigidBodyMotionRestraint.C => sixDoFRigidBodyMotionRestraintNew.C} (100%) rename src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/{newInjectionModel.C => injectionModelNew.C} (100%) rename src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/{newPhaseChangeModel.C => phaseChangeModelNew.C} (100%) rename src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/{newSurfaceFilmModel.C => surfaceFilmModelNew.C} (100%) rename src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/{newBarotropicCompressibilityModel.C => barotropicCompressibilityModelNew.C} (100%) rename src/thermophysicalModels/basic/psiThermo/basicPsiThermo/{newBasicPsiThermo.C => basicPsiThermoNew.C} (100%) rename src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/{newBasicRhoThermo.C => basicRhoThermoNew.C} (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/{newPsiChemistryModel.C => psiChemistryModelNew.C} (100%) rename src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/{newRhoChemistryModel.C => rhoChemistryModelNew.C} (100%) rename src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/{newChemistrySolver.C => chemistrySolverNew.C} (100%) rename src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/{newLaminarFlameSpeed.C => laminarFlameSpeedNew.C} (100%) rename src/thermophysicalModels/pdfs/pdf/{newPdf.C => pdfNew.C} (100%) rename src/thermophysicalModels/radiation/radiationModel/radiationModel/{newRadiationModel.C => radiationModelNew.C} (100%) rename src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/{newAbsorptionEmissionModel.C => absorptionEmissionModelNew.C} (100%) rename src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/{newScatterModel.C => scatterModelNew.C} (100%) rename src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/{newhCombustionThermo.C => hCombustionThermoNew.C} (100%) rename src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/{newhhuCombustionThermo.C => hhuCombustionThermoNew.C} (100%) rename src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/{newhsCombustionThermo.C => hsCombustionThermoNew.C} (100%) rename src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/{newhReactionThermo.C => hReactionThermoNew.C} (100%) rename src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/{newhsReactionThermo.C => hsReactionThermoNew.C} (100%) rename src/thermophysicalModels/solids/solid/{newSolid.C => solidNew.C} (100%) rename src/transportModels/incompressible/viscosityModels/viscosityModel/{newViscosityModel.C => viscosityModelNew.C} (100%) diff --git a/applications/solvers/combustion/PDRFoam/Make/files b/applications/solvers/combustion/PDRFoam/Make/files index 889eebc33e..d1b1d5a8f8 100644 --- a/applications/solvers/combustion/PDRFoam/Make/files +++ b/applications/solvers/combustion/PDRFoam/Make/files @@ -1,25 +1,25 @@ XiModels/XiModel/XiModel.C -XiModels/XiModel/newXiModel.C +XiModels/XiModel/XiModelNew.C XiModels/fixed/fixed.C XiModels/algebraic/algebraic.C XiModels/transport/transport.C XiModels/XiEqModels/XiEqModel/XiEqModel.C -XiModels/XiEqModels/XiEqModel/newXiEqModel.C +XiModels/XiEqModels/XiEqModel/XiEqModelNew.C XiModels/XiEqModels/Gulder/Gulder.C XiModels/XiEqModels/instabilityXiEq/instabilityXiEq.C XiModels/XiEqModels/SCOPEBlendXiEq/SCOPEBlendXiEq.C XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.C XiModels/XiGModels/XiGModel/XiGModel.C -XiModels/XiGModels/XiGModel/newXiGModel.C +XiModels/XiGModels/XiGModel/XiGModelNew.C XiModels/XiGModels/KTS/KTS.C XiModels/XiGModels/instabilityG/instabilityG.C PDRModels/turbulence/PDRkEpsilon/PDRkEpsilon.C PDRModels/dragModels/PDRDragModel/PDRDragModel.C -PDRModels/dragModels/PDRDragModel/newPDRDragModel.C +PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C PDRModels/dragModels/basic/basic.C PDRModels/XiEqModels/basicXiSubXiEq/basicXiSubXiEq.C diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C similarity index 100% rename from applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/newPDRDragModel.C rename to applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C similarity index 100% rename from applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/newXiEqModel.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C similarity index 100% rename from applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/newXiGModel.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C similarity index 100% rename from applications/solvers/combustion/PDRFoam/XiModels/XiModel/newXiModel.C rename to applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C diff --git a/applications/solvers/combustion/fireFoam/combustionModels/Make/files b/applications/solvers/combustion/fireFoam/combustionModels/Make/files index 5b1262b70d..86696b0709 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/Make/files +++ b/applications/solvers/combustion/fireFoam/combustionModels/Make/files @@ -1,5 +1,5 @@ combustionModel/combustionModel.C -combustionModel/newCombustionModel.C +combustionModel/combustionModelNew.C infinitelyFastChemistry/infinitelyFastChemistry.C diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/newCombustionModel.C b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C similarity index 100% rename from applications/solvers/combustion/fireFoam/combustionModels/combustionModel/newCombustionModel.C rename to applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/Make/files b/applications/solvers/multiphase/interPhaseChangeFoam/Make/files index 5f65a3a4c2..5a7f01e980 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/Make/files +++ b/applications/solvers/multiphase/interPhaseChangeFoam/Make/files @@ -1,6 +1,6 @@ interPhaseChangeFoam.C phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.C -phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C +phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C phaseChangeTwoPhaseMixtures/Kunz/Kunz.C phaseChangeTwoPhaseMixtures/Merkle/Merkle.C phaseChangeTwoPhaseMixtures/SchnerrSauer/SchnerrSauer.C diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H index 0aa466b06e..5c345db148 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixture.H @@ -28,7 +28,7 @@ Description SourceFiles phaseChangeTwoPhaseMixture.C - newPhaseChangeModel.C + phaseChangeModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C similarity index 100% rename from applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/newPhaseChangeTwoPhaseMixture.C rename to applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files index 8d23cb9550..cf4603e1f8 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/Make/files @@ -1,5 +1,5 @@ dragModels/dragModel/dragModel.C -dragModels/dragModel/newDragModel.C +dragModels/dragModel/dragModelNew.C dragModels/Ergun/Ergun.C dragModels/GidaspowErgunWenYu/GidaspowErgunWenYu.C dragModels/GidaspowSchillerNaumann/GidaspowSchillerNaumann.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.H b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.H index 4dbcbe86e6..7e05bcb464 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.H +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModel.H @@ -28,7 +28,7 @@ Description SourceFiles dragModel.C - newDragModel.C + dragModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/newDragModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/Make/files b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/Make/files index a6ff2ca0f0..43c2f6df9d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/Make/files +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/Make/files @@ -1,32 +1,32 @@ kineticTheoryModel/kineticTheoryModel.C viscosityModel/viscosityModel/viscosityModel.C -viscosityModel/viscosityModel/newViscosityModel.C +viscosityModel/viscosityModel/viscosityModelNew.C viscosityModel/Gidaspow/GidaspowViscosity.C viscosityModel/Syamlal/SyamlalViscosity.C viscosityModel/HrenyaSinclair/HrenyaSinclairViscosity.C viscosityModel/none/noneViscosity.C conductivityModel/conductivityModel/conductivityModel.C -conductivityModel/conductivityModel/newConductivityModel.C +conductivityModel/conductivityModel/conductivityModelNew.C conductivityModel/Gidaspow/GidaspowConductivity.C conductivityModel/Syamlal/SyamlalConductivity.C conductivityModel/HrenyaSinclair/HrenyaSinclairConductivity.C radialModel/radialModel/radialModel.C -radialModel/radialModel/newRadialModel.C +radialModel/radialModel/radialModelNew.C radialModel/CarnahanStarling/CarnahanStarlingRadial.C radialModel/Gidaspow/GidaspowRadial.C radialModel/LunSavage/LunSavageRadial.C radialModel/SinclairJackson/SinclairJacksonRadial.C granularPressureModel/granularPressureModel/granularPressureModel.C -granularPressureModel/granularPressureModel/newGranularPressureModel.C +granularPressureModel/granularPressureModel/granularPressureModelNew.C granularPressureModel/Lun/LunPressure.C granularPressureModel/SyamlalRogersOBrien/SyamlalRogersOBrienPressure.C frictionalStressModel/frictionalStressModel/frictionalStressModel.C -frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C +frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C frictionalStressModel/JohnsonJackson/JohnsonJacksonFrictionalStress.C frictionalStressModel/Schaeffer/SchaefferFrictionalStress.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/newConductivityModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/newFrictionalStressModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/newGranularPressureModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/newRadialModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/newRadialModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C similarity index 100% rename from applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/newViscosityModel.C rename to applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/Make/files b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/Make/files index 91b2eccf28..fdd7c3e7b7 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/Make/files +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/Make/files @@ -1,5 +1,5 @@ extrudeModel/extrudeModel.C -extrudeModel/newExtrudeModel.C +extrudeModel/extrudeModelNew.C linearNormal/linearNormal.C linearDirection/linearDirection.C linearRadial/linearRadial.C diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/newExtrudeModel.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C similarity index 100% rename from applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/newExtrudeModel.C rename to applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C diff --git a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/Make/files b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/Make/files index 77c9217ded..96d2bb2a85 100644 --- a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/Make/files +++ b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/Make/files @@ -1,5 +1,5 @@ tabulatedWallFunction/tabulatedWallFunction.C -tabulatedWallFunction/newTabulatedWallFunction.C +tabulatedWallFunction/tabulatedWallFunctionNew.C SpaldingsLaw/SpaldingsLaw.C general/general.C diff --git a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/newTabulatedWallFunction.C b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunctionNew.C similarity index 100% rename from applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/newTabulatedWallFunction.C rename to applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/tabulatedWallFunction/tabulatedWallFunctionNew.C diff --git a/src/ODE/Make/files b/src/ODE/Make/files index bf01c69130..0e6c49a915 100644 --- a/src/ODE/Make/files +++ b/src/ODE/Make/files @@ -6,7 +6,7 @@ ODESolversRK = ODESolvers/RK ODESolversSIBS = ODESolvers/SIBS $(ODESolversODESolver)/ODESolver.C -$(ODESolversODESolver)/newODESolver.C +$(ODESolversODESolver)/ODESolverNew.C $(ODESolversRK)/RK.C diff --git a/src/ODE/ODESolvers/ODESolver/newODESolver.C b/src/ODE/ODESolvers/ODESolver/ODESolverNew.C similarity index 100% rename from src/ODE/ODESolvers/ODESolver/newODESolver.C rename to src/ODE/ODESolvers/ODESolver/ODESolverNew.C diff --git a/src/OpenFOAM/Make/files b/src/OpenFOAM/Make/files index 17da5aefef..0016b235f1 100644 --- a/src/OpenFOAM/Make/files +++ b/src/OpenFOAM/Make/files @@ -258,13 +258,13 @@ $(GAMG)/GAMGSolverSolve.C GAMGInterfaces = $(GAMG)/interfaces $(GAMGInterfaces)/GAMGInterface/GAMGInterface.C -$(GAMGInterfaces)/GAMGInterface/newGAMGInterface.C +$(GAMGInterfaces)/GAMGInterface/GAMGInterfaceNew.C $(GAMGInterfaces)/processorGAMGInterface/processorGAMGInterface.C $(GAMGInterfaces)/cyclicGAMGInterface/cyclicGAMGInterface.C GAMGInterfaceFields = $(GAMG)/interfaceFields $(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceField.C -$(GAMGInterfaceFields)/GAMGInterfaceField/newGAMGInterfaceField.C +$(GAMGInterfaceFields)/GAMGInterfaceField/GAMGInterfaceFieldNew.C $(GAMGInterfaceFields)/processorGAMGInterfaceField/processorGAMGInterfaceField.C $(GAMGInterfaceFields)/cyclicGAMGInterfaceField/cyclicGAMGInterfaceField.C @@ -328,7 +328,7 @@ polyMesh = meshes/polyMesh polyPatches = $(polyMesh)/polyPatches $(polyPatches)/polyPatch/polyPatch.C -$(polyPatches)/polyPatch/newPolyPatch.C +$(polyPatches)/polyPatch/polyPatchNew.C basicPolyPatches = $(polyPatches)/basic $(basicPolyPatches)/coupled/coupledPolyPatch.C @@ -362,15 +362,15 @@ $(zone)/zone.C cellZone = $(polyMesh)/zones/cellZone $(cellZone)/cellZone.C -$(cellZone)/newCellZone.C +$(cellZone)/cellZoneNew.C faceZone = $(polyMesh)/zones/faceZone $(faceZone)/faceZone.C -$(faceZone)/newFaceZone.C +$(faceZone)/faceZoneNew.C pointZone = $(polyMesh)/zones/pointZone $(pointZone)/pointZone.C -$(pointZone)/newPointZone.C +$(pointZone)/pointZoneNew.C $(polyMesh)/polyMesh.C $(polyMesh)/polyMeshFromShapeMesh.C @@ -438,7 +438,7 @@ $(pointMeshMapper)/pointPatchMapper.C pointPatches = $(pointMesh)/pointPatches $(pointPatches)/pointPatch/pointPatch.C $(pointPatches)/facePointPatch/facePointPatch.C -$(pointPatches)/facePointPatch/newFacePointPatch.C +$(pointPatches)/facePointPatch/facePointPatchNew.C basicPointPatches = $(pointPatches)/basic $(basicPointPatches)/coupled/coupledPointPatch.C diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C index 1b18dbdc21..764fa5b31b 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchField.C @@ -346,6 +346,6 @@ Ostream& operator<< // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "newPointPatchField.C" +#include "pointPatchFieldNew.C" // ************************************************************************* // diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/newPointPatchField.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C similarity index 100% rename from src/OpenFOAM/fields/pointPatchFields/pointPatchField/newPointPatchField.C rename to src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/newGAMGInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C similarity index 100% rename from src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/newGAMGInterfaceField.C rename to src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/newGAMGInterface.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C similarity index 100% rename from src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/newGAMGInterface.C rename to src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/newFacePointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C similarity index 100% rename from src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/newFacePointPatch.C rename to src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H index f9cbfcad9a..c9e5a8c853 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatch.H @@ -32,7 +32,7 @@ Description SourceFiles polyPatch.C - newPolyPatch.C + polyPatchNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/newPolyPatch.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C similarity index 100% rename from src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/newPolyPatch.C rename to src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H index 2186ba2116..fd0dfc5b11 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZone.H @@ -34,7 +34,7 @@ Description SourceFiles cellZone.C - newCellZone.C + cellZoneNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/newCellZone.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C similarity index 100% rename from src/OpenFOAM/meshes/polyMesh/zones/cellZone/newCellZone.C rename to src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H index bdfc52bb58..291d18db74 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.H @@ -33,7 +33,7 @@ Description SourceFiles faceZone.C - newFaceZone.C + faceZoneNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/newFaceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C similarity index 100% rename from src/OpenFOAM/meshes/polyMesh/zones/faceZone/newFaceZone.C rename to src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H index 44f510d958..0aaf2a6a05 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZone.H @@ -35,7 +35,7 @@ Description SourceFiles pointZone.C - newPointZone.C + pointZoneNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/newPointZone.C b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C similarity index 100% rename from src/OpenFOAM/meshes/polyMesh/zones/pointZone/newPointZone.C rename to src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C diff --git a/src/dynamicFvMesh/Make/files b/src/dynamicFvMesh/Make/files index ca9a99aca6..ecfb8bc9f7 100644 --- a/src/dynamicFvMesh/Make/files +++ b/src/dynamicFvMesh/Make/files @@ -1,5 +1,5 @@ dynamicFvMesh/dynamicFvMesh.C -dynamicFvMesh/newDynamicFvMesh.C +dynamicFvMesh/dynamicFvMeshNew.C staticFvMesh/staticFvMesh.C dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C dynamicInkJetFvMesh/dynamicInkJetFvMesh.C @@ -8,7 +8,7 @@ dynamicRefineFvMesh/dynamicRefineFvMesh.C solidBodyMotionFvMesh/solidBodyMotionFvMesh.C solidBodyMotionFunctions = solidBodyMotionFvMesh/solidBodyMotionFunctions $(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunction.C -$(solidBodyMotionFunctions)/solidBodyMotionFunction/newSolidBodyMotionFunction.C +$(solidBodyMotionFunctions)/solidBodyMotionFunction/solidBodyMotionFunctionNew.C $(solidBodyMotionFunctions)/SDA/SDA.C $(solidBodyMotionFunctions)/tabulated6DoFMotion/tabulated6DoFMotion.C $(solidBodyMotionFunctions)/linearMotion/linearMotion.C diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H index 31d68d43ef..adfd30fb2c 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H @@ -29,7 +29,7 @@ Description SourceFiles dynamicFvMesh.C - newDynamicFvMesh.C + dynamicFvMeshNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/dynamicFvMesh/dynamicFvMesh/newDynamicFvMesh.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C similarity index 100% rename from src/dynamicFvMesh/dynamicFvMesh/newDynamicFvMesh.C rename to src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.H b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.H index 0f0bcb7787..367649d076 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.H +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunction.H @@ -36,7 +36,7 @@ Description SourceFiles solidBodyMotionFunction.C - newDynamicFvMesh.C + dynamicFvMeshNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/newSolidBodyMotionFunction.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C similarity index 100% rename from src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/newSolidBodyMotionFunction.C rename to src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C diff --git a/src/dynamicMesh/Make/files b/src/dynamicMesh/Make/files index 8201b7236d..02e9ad7ce4 100644 --- a/src/dynamicMesh/Make/files +++ b/src/dynamicMesh/Make/files @@ -19,7 +19,7 @@ $(enrichedPatch)/enrichedPatchMasterPoints.C polyMeshModifier = polyTopoChange/polyMeshModifier $(polyMeshModifier)/polyMeshModifier.C -$(polyMeshModifier)/newPolyMeshModifier.C +$(polyMeshModifier)/polyMeshModifierNew.C polyTopoChange/polyTopoChange/topoAction/topoActions.C polyTopoChange/polyTopoChanger/polyTopoChanger.C diff --git a/src/dynamicMesh/polyTopoChange/polyMeshModifier/newPolyMeshModifier.C b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C similarity index 100% rename from src/dynamicMesh/polyTopoChange/polyMeshModifier/newPolyMeshModifier.C rename to src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C diff --git a/src/engine/Make/files b/src/engine/Make/files index 81cb8ea6ba..a11ecaf06f 100644 --- a/src/engine/Make/files +++ b/src/engine/Make/files @@ -8,7 +8,7 @@ engineValve/engineValve.C enginePiston/enginePiston.C engineMesh/engineMesh/engineMesh.C -engineMesh/engineMesh/newEngineMesh.C +engineMesh/engineMesh/engineMeshNew.C engineMesh/staticEngineMesh/staticEngineMesh.C engineMesh/layeredEngineMesh/layeredEngineMesh.C engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C diff --git a/src/engine/engineMesh/engineMesh/newEngineMesh.C b/src/engine/engineMesh/engineMesh/engineMeshNew.C similarity index 100% rename from src/engine/engineMesh/engineMesh/newEngineMesh.C rename to src/engine/engineMesh/engineMesh/engineMeshNew.C diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index fecd16bd4e..f1a91c869d 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -9,7 +9,7 @@ $(fvBoundaryMesh)/fvBoundaryMesh.C fvPatches = fvMesh/fvPatches $(fvPatches)/fvPatch/fvPatch.C -$(fvPatches)/fvPatch/newFvPatch.C +$(fvPatches)/fvPatch/fvPatchNew.C basicFvPatches = $(fvPatches)/basic $(basicFvPatches)/coupled/coupledFvPatch.C @@ -334,7 +334,7 @@ $(MRF)/MRFZones.C SRF = $(general)/SRF $(SRF)/SRFModel/SRFModel/SRFModel.C -$(SRF)/SRFModel/SRFModel/newSRFModel.C +$(SRF)/SRFModel/SRFModel/SRFModelNew.C $(SRF)/SRFModel/rpm/rpm.C $(SRF)/derivedFvPatchFields/SRFVelocityFvPatchVectorField/SRFVelocityFvPatchVectorField.C diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C similarity index 100% rename from src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/newSRFModel.C rename to src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C index 4e7c797c11..aba51a3404 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.C @@ -479,6 +479,6 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const fvPatchField& ptf) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -# include "newFvPatchField.C" +# include "fvPatchFieldNew.C" // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H index 1a8720af06..e43423b1b1 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchField.H @@ -37,7 +37,7 @@ Description SourceFiles fvPatchField.C - newFvPatchField.C + fvPatchFieldNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/newFvPatchField.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C similarity index 100% rename from src/finiteVolume/fields/fvPatchFields/fvPatchField/newFvPatchField.C rename to src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C index 10660e68c1..2b0514a5de 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.C @@ -403,6 +403,6 @@ Ostream& operator<<(Ostream& os, const fvsPatchField& ptf) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -# include "newFvsPatchField.C" +# include "fvsPatchFieldNew.C" // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H index b98fdcd453..85d139ac74 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchField.H @@ -37,7 +37,7 @@ Description SourceFiles fvsPatchField.C - newFvsPatchField.C + fvsPatchFieldNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/newFvsPatchField.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C similarity index 100% rename from src/finiteVolume/fields/fvsPatchFields/fvsPatchField/newFvsPatchField.C rename to src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H index fbadb7cdbe..ddadbd538e 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H @@ -29,7 +29,7 @@ Description SourceFiles fvPatch.C - newFvPatch.C + fvPatchNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/newFvPatch.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C similarity index 100% rename from src/finiteVolume/fvMesh/fvPatches/fvPatch/newFvPatch.C rename to src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C diff --git a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.C b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.C index c5a6c94438..4a58469a7d 100644 --- a/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.C +++ b/src/finiteVolume/interpolation/interpolation/interpolation/interpolation.C @@ -56,6 +56,6 @@ interpolation::interpolation // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -# include "newInterpolation.C" +# include "interpolationNew.C" // ************************************************************************* // diff --git a/src/finiteVolume/interpolation/interpolation/interpolation/newInterpolation.C b/src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C similarity index 100% rename from src/finiteVolume/interpolation/interpolation/interpolation/newInterpolation.C rename to src/finiteVolume/interpolation/interpolation/interpolation/interpolationNew.C diff --git a/src/lagrangian/dieselSpray/Make/files b/src/lagrangian/dieselSpray/Make/files index 7fd1ca7f2a..a619925bbc 100644 --- a/src/lagrangian/dieselSpray/Make/files +++ b/src/lagrangian/dieselSpray/Make/files @@ -32,12 +32,12 @@ $(injector)/swirlInjector/swirlInjector.C $(injector)/definedInjector/definedInjector.C $(atomizationModels)/atomizationModel/atomizationModel.C -$(atomizationModels)/atomizationModel/newAtomizationModel.C +$(atomizationModels)/atomizationModel/atomizationModelNew.C $(atomizationModels)/LISA/LISA.C $(atomizationModels)/noAtomization/noAtomization.C $(atomizationModels)/blobsSheetAtomization/blobsSheetAtomization.C -$(breakupModels)/breakupModel/newBreakupModel.C +$(breakupModels)/breakupModel/breakupModelNew.C $(breakupModels)/breakupModel/breakupModel.C $(breakupModels)/noBreakup/noBreakup.C $(breakupModels)/reitzDiwakar/reitzDiwakar.C @@ -46,24 +46,24 @@ $(breakupModels)/SHF/SHF.C $(breakupModels)/TAB/TAB.C $(breakupModels)/ETAB/ETAB.C -$(dragModels)/dragModel/newDragModel.C +$(dragModels)/dragModel/dragModelNew.C $(dragModels)/dragModel/dragModel.C $(dragModels)/noDragModel/noDragModel.C $(dragModels)/standardDragModel/standardDragModel.C -$(evaporationModels)/evaporationModel/newEvaporationModel.C +$(evaporationModels)/evaporationModel/evaporationModelNew.C $(evaporationModels)/evaporationModel/evaporationModel.C $(evaporationModels)/noEvaporation/noEvaporation.C $(evaporationModels)/RutlandFlashBoil/RutlandFlashBoil.C $(evaporationModels)/standardEvaporationModel/standardEvaporationModel.C $(evaporationModels)/saturateEvaporationModel/saturateEvaporationModel.C -$(heatTransferModels)/heatTransferModel/newHeatTransferModel.C +$(heatTransferModels)/heatTransferModel/heatTransferModelNew.C $(heatTransferModels)/heatTransferModel/heatTransferModel.C $(heatTransferModels)/noHeatTransfer/noHeatTransfer.C $(heatTransferModels)/RanzMarshall/RanzMarshall.C -$(injectorModels)/injectorModel/newInjectorModel.C +$(injectorModels)/injectorModel/injectorModelNew.C $(injectorModels)/injectorModel/injectorModel.C $(injectorModels)/constant/constInjector.C $(injectorModels)/Chomiak/Chomiak.C @@ -73,19 +73,19 @@ $(injectorModels)/definedHollowCone/definedHollowCone.C $(injectorModels)/definedPressureSwirl/definedPressureSwirl.C $(injectorModels)/blobsSwirl/blobsSwirlInjector.C -$(wallModels)/wallModel/newWallModel.C +$(wallModels)/wallModel/wallModelNew.C $(wallModels)/wallModel/wallModel.C $(wallModels)/removeParcel/removeParcel.C $(wallModels)/reflectParcel/reflectParcel.C $(collisionModels)/collisionModel/collisionModel.C -$(collisionModels)/collisionModel/newCollisionModel.C +$(collisionModels)/collisionModel/collisionModelNew.C $(collisionModels)/noCollision/noCollision.C $(collisionModels)/ORourke/ORourkeCollisionModel.C $(collisionModels)/trajectoryModel/trajectoryModel.C $(dispersionModels)/dispersionModel/dispersionModel.C -$(dispersionModels)/dispersionModel/newDispersionModel.C +$(dispersionModels)/dispersionModel/dispersionModelNew.C $(dispersionModels)/dispersionRASModel/dispersionRASModel.C $(dispersionModels)/dispersionLESModel/dispersionLESModel.C $(dispersionModels)/noDispersion/noDispersion.C diff --git a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/newAtomizationModel.C b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C similarity index 100% rename from src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/newAtomizationModel.C rename to src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C diff --git a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/newBreakupModel.C b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C similarity index 100% rename from src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/newBreakupModel.C rename to src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C diff --git a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/newCollisionModel.C b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C similarity index 100% rename from src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/newCollisionModel.C rename to src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C diff --git a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/newDispersionModel.C b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C similarity index 100% rename from src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/newDispersionModel.C rename to src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C diff --git a/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/newDragModel.C b/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C similarity index 100% rename from src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/newDragModel.C rename to src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C diff --git a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/newEvaporationModel.C b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C similarity index 100% rename from src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/newEvaporationModel.C rename to src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C diff --git a/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/newHeatTransferModel.C b/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C similarity index 100% rename from src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/newHeatTransferModel.C rename to src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/newInjectorModel.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C similarity index 100% rename from src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/newInjectorModel.C rename to src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C diff --git a/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/newWallModel.C b/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C similarity index 100% rename from src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/newWallModel.C rename to src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C index ac7a5a3a97..c22949610e 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.C @@ -84,7 +84,7 @@ Foam::BinaryCollisionModel::coeffDict() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewBinaryCollisionModel.C" +#include "BinaryCollisionModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H index 6343f44c28..f6f6e834e9 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModel.H @@ -29,7 +29,7 @@ Description SourceFiles BinaryCollisionModel.C - NewBinaryCollisionModel.C + BinaryCollisionModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/NewBinaryCollisionModel.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C similarity index 100% rename from src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/NewBinaryCollisionModel.C rename to src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C index f9b0527ae6..81117e2250 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.C @@ -80,7 +80,7 @@ const Foam::dictionary& Foam::InflowBoundaryModel::coeffDict() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewInflowBoundaryModel.C" +#include "InflowBoundaryModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H index 762c7dd047..233aa384e6 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModel.H @@ -30,7 +30,7 @@ Description SourceFiles InflowBoundaryModel.C - NewInflowBoundaryModel.C + InflowBoundaryModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C similarity index 100% rename from src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/NewInflowBoundaryModel.C rename to src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C index cc81903cd4..454787cca6 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.C @@ -81,7 +81,7 @@ Foam::WallInteractionModel::coeffDict() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewWallInteractionModel.C" +#include "WallInteractionModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H index dbf6eabb91..76c499bc3f 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModel.H @@ -29,7 +29,7 @@ Description SourceFiles WallInteractionModel.C - NewWallInteractionModel.C + WallInteractionModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C similarity index 100% rename from src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/NewWallInteractionModel.C rename to src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C diff --git a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.C b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.C index d99eb2dbfe..f54635283d 100644 --- a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.C +++ b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationScheme.C @@ -48,6 +48,6 @@ Foam::IntegrationScheme::~IntegrationScheme() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -#include "newIntegrationScheme.C" +#include "IntegrationSchemeNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/newIntegrationScheme.C b/src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C similarity index 100% rename from src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/newIntegrationScheme.C rename to src/lagrangian/intermediate/IntegrationScheme/IntegrationScheme/IntegrationSchemeNew.C diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H index 4fc46e49ab..bf4af83b0f 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntry.H @@ -32,7 +32,7 @@ Description SourceFiles DataEntry.C - NewDataEntry.C + DataEntryNew.C \*---------------------------------------------------------------------------*/ @@ -172,7 +172,7 @@ public: #ifdef NoRepository # include "DataEntry.C" -# include "NewDataEntry.C" +# include "DataEntryNew.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/NewDataEntry.C rename to src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C index 64b5133d08..8e6853593a 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModel.C @@ -79,6 +79,6 @@ const Foam::dictionary& Foam::DispersionModel::dict() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewDispersionModel.C" +#include "DispersionModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/NewDispersionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/NewDispersionModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C index 08a2ade296..9138509a35 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.C @@ -78,7 +78,7 @@ Foam::scalar Foam::DragModel::utc // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewDragModel.C" +#include "DragModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H index 2d0d4367a5..a01ed90bbd 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModel.H @@ -29,7 +29,7 @@ Description SourceFiles DragModel.C - NewDragModel.C + DragModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/NewDragModel.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/NewDragModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index 3ee135476b..f7436f5ada 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -454,6 +454,6 @@ void Foam::InjectionModel::info(Ostream& os) const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewInjectionModel.C" +#include "InjectionModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H index 999e249c72..0f7efefbf1 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.H @@ -41,7 +41,7 @@ Description SourceFiles InjectionModel.C - NewInjectionModel.C + InjectionModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/NewInjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/NewInjectionModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C index 366a19f774..e86ddefb42 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.C @@ -149,7 +149,7 @@ Foam::PatchInteractionModel::coeffDict() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewPatchInteractionModel.C" +#include "PatchInteractionModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H index b2e8055a45..42fbe9be93 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModel.H @@ -29,7 +29,7 @@ Description SourceFiles PatchInteractionModel.C - NewPatchInteractionModel.C + PatchInteractionModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/NewPatchInteractionModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.C index 493005c5bd..6bfb6e016c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.C @@ -71,6 +71,6 @@ void Foam::PostProcessingModel::post() // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewPostProcessingModel.C" +#include "PostProcessingModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H index b32da26c7f..d8454e9eb7 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModel.H @@ -29,7 +29,7 @@ Description SourceFiles PostProcessingModel.C - NewPostProcessingModel.C + PostProcessingModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/NewPostProcessingModel.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/NewPostProcessingModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C index 8c78868648..8f98590bf4 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.C @@ -186,6 +186,6 @@ void Foam::SurfaceFilmModel::setParcelProperties // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewSurfaceFilmModel.C" +#include "SurfaceFilmModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H index 41d01f0eee..2ba518788f 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModel.H @@ -29,7 +29,7 @@ Description SourceFiles SurfaceFilmModel.C - NewSurfaceFilmModel.C + SurfaceFilmModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/NewSurfaceFilmModel.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/NewSurfaceFilmModel.C rename to src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C index eb8f6609c0..bc97c3e685 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.C @@ -669,7 +669,7 @@ Foam::scalar Foam::CompositionModel::L // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewCompositionModel.C" +#include "CompositionModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H index 94d75492fe..f48ddd9a67 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModel.H @@ -31,7 +31,7 @@ Description SourceFiles CompositionModel.C - NewCompositionModel.C + CompositionModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/NewCompositionModel.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/NewCompositionModel.C rename to src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C index 42c6198987..cd595e0a47 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.C @@ -139,7 +139,7 @@ Foam::PhaseChangeModel::enthalpyTransfer() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewPhaseChangeModel.C" +#include "PhaseChangeModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H index f73de25400..f05a0eb661 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModel.H @@ -29,7 +29,7 @@ Description SourceFiles PhaseChangeModel.C - NewPhaseChangeModel.C + PhaseChangeModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/NewPhaseChangeModel.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/NewPhaseChangeModel.C rename to src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C index 03193e9ead..6e3ab3fa1d 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.C @@ -84,7 +84,7 @@ const Foam::dictionary& Foam::DevolatilisationModel::coeffDict() cons // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewDevolatilisationModel.C" +#include "DevolatilisationModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H index d85d95ab6e..d5be203a04 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModel.H @@ -29,7 +29,7 @@ Description SourceFiles DevolatilisationModel.C - NewDevolatilisationModel.C + DevolatilisationModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/NewDevolatilisationModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/NewDevolatilisationModel.C rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C index 40c5c0cd8c..9aa949f4c4 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.C @@ -85,7 +85,7 @@ const Foam::dictionary& Foam::SurfaceReactionModel::coeffDict() const // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewSurfaceReactionModel.C" +#include "SurfaceReactionModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H index 2630ce6f99..447bab9473 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModel.H @@ -29,7 +29,7 @@ Description SourceFiles SurfaceReactionModel.C - NewSurfaceReactionModel.C + SurfaceReactionModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/NewSurfaceReactionModel.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/NewSurfaceReactionModel.C rename to src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C index f19f694001..1170ec97ac 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.C @@ -118,7 +118,7 @@ Foam::scalar Foam::HeatTransferModel::htc // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#include "NewHeatTransferModel.C" +#include "HeatTransferModelNew.C" // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H index fb6b57af8a..9019f02140 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModel.H @@ -29,7 +29,7 @@ Description SourceFiles HeatTransferModel.C - NewHeatTransferModel.C + HeatTransferModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/NewHeatTransferModel.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C similarity index 100% rename from src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/NewHeatTransferModel.C rename to src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C diff --git a/src/lagrangian/molecularDynamics/potential/Make/files b/src/lagrangian/molecularDynamics/potential/Make/files index 4afe4de3d9..db94eec41e 100644 --- a/src/lagrangian/molecularDynamics/potential/Make/files +++ b/src/lagrangian/molecularDynamics/potential/Make/files @@ -8,7 +8,7 @@ $(pairPotential)/pairPotentialList/pairPotentialList.C $(pairPotential)/basic/pairPotential.C $(pairPotential)/basic/pairPotentialIO.C -$(pairPotential)/basic/newPairPotential.C +$(pairPotential)/basic/pairPotentialNew.C $(pairPotential)/derived/lennardJones/lennardJones.C $(pairPotential)/derived/maitlandSmith/maitlandSmith.C @@ -21,7 +21,7 @@ $(pairPotential)/derived/noInteraction/noInteraction.C energyScalingFunction = energyScalingFunction $(energyScalingFunction)/basic/energyScalingFunction.C -$(energyScalingFunction)/basic/newEnergyScalingFunction.C +$(energyScalingFunction)/basic/energyScalingFunctionNew.C $(energyScalingFunction)/derived/shifted/shifted.C $(energyScalingFunction)/derived/shiftedForce/shiftedForce.C @@ -34,7 +34,7 @@ tetherPotential = tetherPotential $(tetherPotential)/tetherPotentialList/tetherPotentialList.C $(tetherPotential)/basic/tetherPotential.C -$(tetherPotential)/basic/newTetherPotential.C +$(tetherPotential)/basic/tetherPotentialNew.C $(tetherPotential)/derived/harmonicSpring/harmonicSpring.C $(tetherPotential)/derived/restrainedHarmonicSpring/restrainedHarmonicSpring.C @@ -44,4 +44,4 @@ electrostaticPotential = electrostaticPotential $(electrostaticPotential)/electrostaticPotential.C -LIB = $(FOAM_LIBBIN)/libpotential \ No newline at end of file +LIB = $(FOAM_LIBBIN)/libpotential diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.H b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.H index 227548b6ef..11f211b664 100644 --- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.H +++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.H @@ -28,7 +28,7 @@ Description SourceFiles energyScalingFunction.C - newEnergyScalingFunction.C + energyScalingFunctionNew.C \*---------------------------------------------------------------------------*/ @@ -47,7 +47,7 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class energyScalingFunction Declaration + Class energyScalingFunction Declaration \*---------------------------------------------------------------------------*/ class energyScalingFunction diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C similarity index 100% rename from src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/newEnergyScalingFunction.C rename to src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H index a7e8198a13..f7d62c755f 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotential.H @@ -28,7 +28,7 @@ Description SourceFiles pairPotential.C - newPairPotential.C + pairPotentialNew.C \*---------------------------------------------------------------------------*/ @@ -52,7 +52,7 @@ namespace Foam class energyScalingFunction; /*---------------------------------------------------------------------------*\ - Class pairPotential Declaration + Class pairPotential Declaration \*---------------------------------------------------------------------------*/ class pairPotential diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C similarity index 100% rename from src/lagrangian/molecularDynamics/potential/pairPotential/basic/newPairPotential.C rename to src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotential.H b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotential.H index 26d03fcf22..b34beb19d6 100644 --- a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotential.H +++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotential.H @@ -28,7 +28,7 @@ Description SourceFiles tetherPotential.C - newTetherPotential.C + tetherPotentialNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C similarity index 100% rename from src/lagrangian/molecularDynamics/potential/tetherPotential/basic/newTetherPotential.C rename to src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C diff --git a/src/postProcessing/foamCalcFunctions/Make/files b/src/postProcessing/foamCalcFunctions/Make/files index 55297ca8c8..8fa83c42e0 100644 --- a/src/postProcessing/foamCalcFunctions/Make/files +++ b/src/postProcessing/foamCalcFunctions/Make/files @@ -1,5 +1,5 @@ calcType/calcType.C -calcType/newCalcType.C +calcType/calcTypeNew.C field/components/components.C field/mag/mag.C diff --git a/src/postProcessing/foamCalcFunctions/calcType/newCalcType.C b/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C similarity index 100% rename from src/postProcessing/foamCalcFunctions/calcType/newCalcType.C rename to src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C diff --git a/src/postProcessing/functionObjects/forces/Make/files b/src/postProcessing/functionObjects/forces/Make/files index 0cde9d248e..4f9cf09214 100644 --- a/src/postProcessing/functionObjects/forces/Make/files +++ b/src/postProcessing/functionObjects/forces/Make/files @@ -14,7 +14,7 @@ $(sDoFRBM)/sixDoFRigidBodyMotionStateIO.C sDoFRBMR = $(sDoFRBM)/sixDoFRigidBodyMotionRestraint $(sDoFRBMR)/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint.C -$(sDoFRBMR)/sixDoFRigidBodyMotionRestraint/newSixDoFRigidBodyMotionRestraint.C +$(sDoFRBMR)/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C $(sDoFRBMR)/linearAxialAngularSpring/linearAxialAngularSpring.C $(sDoFRBMR)/linearSpring/linearSpring.C $(sDoFRBMR)/sphericalAngularSpring/sphericalAngularSpring.C @@ -23,7 +23,7 @@ $(sDoFRBMR)/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C sDoFRBMC = $(sDoFRBM)/sixDoFRigidBodyMotionConstraint $(sDoFRBMC)/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint.C -$(sDoFRBMC)/sixDoFRigidBodyMotionConstraint/newSixDoFRigidBodyMotionConstraint.C +$(sDoFRBMC)/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C $(sDoFRBMC)/fixedAxis/fixedAxis.C $(sDoFRBMC)/fixedLine/fixedLine.C $(sDoFRBMC)/fixedOrientation/fixedOrientation.C diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint.H b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint.H index ccb684ed96..3c63ece5da 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint.H +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint.H @@ -36,7 +36,7 @@ Description SourceFiles sixDoFRigidBodyMotionConstraint.C - newDynamicFvMesh.C + dynamicFvMeshNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/newSixDoFRigidBodyMotionConstraint.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C similarity index 100% rename from src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/newSixDoFRigidBodyMotionConstraint.C rename to src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint.H b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint.H index a5f053d325..bab292bc4d 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint.H +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint.H @@ -36,7 +36,7 @@ Description SourceFiles sixDoFRigidBodyMotionRestraint.C - newDynamicFvMesh.C + dynamicFvMeshNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/newSixDoFRigidBodyMotionRestraint.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C similarity index 100% rename from src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/newSixDoFRigidBodyMotionRestraint.C rename to src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C diff --git a/src/surfaceFilmModels/Make/files b/src/surfaceFilmModels/Make/files index aecce33191..cbaf49b810 100644 --- a/src/surfaceFilmModels/Make/files +++ b/src/surfaceFilmModels/Make/files @@ -1,6 +1,6 @@ /* Surface film models */ surfaceFilmModel/surfaceFilmModel/surfaceFilmModel.C -surfaceFilmModel/surfaceFilmModel/newSurfaceFilmModel.C +surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C surfaceFilmModel/noFilm/noFilm.C surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C @@ -8,12 +8,12 @@ surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C /* Sub-models */ submodels/kinematic/injectionModel/injectionModel/injectionModel.C -submodels/kinematic/injectionModel/injectionModel/newInjectionModel.C +submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C submodels/kinematic/injectionModel/noInjection/noInjection.C submodels/kinematic/injectionModel/removeInjection/removeInjection.C submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModel.C -submodels/thermo/phaseChangeModel/phaseChangeModel/newPhaseChangeModel.C +submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C submodels/thermo/phaseChangeModel/noPhaseChange/noPhaseChange.C diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/newInjectionModel.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C similarity index 100% rename from src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/newInjectionModel.C rename to src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/newPhaseChangeModel.C b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C similarity index 100% rename from src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/newPhaseChangeModel.C rename to src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C diff --git a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/newSurfaceFilmModel.C b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C similarity index 100% rename from src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/newSurfaceFilmModel.C rename to src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/Make/files b/src/thermophysicalModels/barotropicCompressibilityModel/Make/files index 999ee53918..deda154917 100644 --- a/src/thermophysicalModels/barotropicCompressibilityModel/Make/files +++ b/src/thermophysicalModels/barotropicCompressibilityModel/Make/files @@ -1,5 +1,5 @@ barotropicCompressibilityModel/barotropicCompressibilityModel.C -barotropicCompressibilityModel/newBarotropicCompressibilityModel.C +barotropicCompressibilityModel/barotropicCompressibilityModelNew.C linear/linear.C Wallis/Wallis.C Chung/Chung.C diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/newBarotropicCompressibilityModel.C b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C similarity index 100% rename from src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/newBarotropicCompressibilityModel.C rename to src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C diff --git a/src/thermophysicalModels/basic/Make/files b/src/thermophysicalModels/basic/Make/files index 59f8f822ea..1a9d82af06 100644 --- a/src/thermophysicalModels/basic/Make/files +++ b/src/thermophysicalModels/basic/Make/files @@ -4,13 +4,13 @@ mixtures/basicMixture/basicMixtures.C basicThermo/basicThermo.C psiThermo/basicPsiThermo/basicPsiThermo.C -psiThermo/basicPsiThermo/newBasicPsiThermo.C +psiThermo/basicPsiThermo/basicPsiThermoNew.C psiThermo/hPsiThermo/hPsiThermos.C psiThermo/hsPsiThermo/hsPsiThermos.C psiThermo/ePsiThermo/ePsiThermos.C rhoThermo/basicRhoThermo/basicRhoThermo.C -rhoThermo/basicRhoThermo/newBasicRhoThermo.C +rhoThermo/basicRhoThermo/basicRhoThermoNew.C rhoThermo/hRhoThermo/hRhoThermos.C rhoThermo/hsRhoThermo/hsRhoThermos.C diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H index 2fbae5388c..5205347037 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H +++ b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermo.H @@ -29,7 +29,7 @@ Description SourceFiles basicPsiThermo.C - newBasicPsiThermo.C + basicPsiThermoNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/newBasicPsiThermo.C b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C similarity index 100% rename from src/thermophysicalModels/basic/psiThermo/basicPsiThermo/newBasicPsiThermo.C rename to src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H index 2e149af170..dcc85aa852 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H +++ b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermo.H @@ -29,7 +29,7 @@ Description SourceFiles basicRhoThermo.C - newBasicRhoThermo.C + basicRhoThermoNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/newBasicRhoThermo.C b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C similarity index 100% rename from src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/newBasicRhoThermo.C rename to src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C diff --git a/src/thermophysicalModels/chemistryModel/Make/files b/src/thermophysicalModels/chemistryModel/Make/files index b92108d63a..f78853a7ea 100644 --- a/src/thermophysicalModels/chemistryModel/Make/files +++ b/src/thermophysicalModels/chemistryModel/Make/files @@ -1,11 +1,11 @@ chemistryModel/basicChemistryModel/basicChemistryModel.C chemistryModel/psiChemistryModel/psiChemistryModel.C -chemistryModel/psiChemistryModel/newPsiChemistryModel.C +chemistryModel/psiChemistryModel/psiChemistryModelNew.C chemistryModel/psiChemistryModel/psiChemistryModels.C chemistryModel/rhoChemistryModel/rhoChemistryModel.C -chemistryModel/rhoChemistryModel/newRhoChemistryModel.C +chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C chemistryModel/rhoChemistryModel/rhoChemistryModels.C chemistrySolver/chemistrySolver/makeChemistrySolvers.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/newPsiChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/newPsiChemistryModel.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/newRhoChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/newRhoChemistryModel.C rename to src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H index 37ae0bb73b..544020eac1 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.H @@ -170,7 +170,7 @@ public: #ifdef NoRepository # include "chemistrySolver.C" -# include "newChemistrySolver.C" +# include "chemistrySolverNew.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/newChemistrySolver.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C similarity index 100% rename from src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/newChemistrySolver.C rename to src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C diff --git a/src/thermophysicalModels/laminarFlameSpeed/Make/files b/src/thermophysicalModels/laminarFlameSpeed/Make/files index fb7ccec330..468c086eea 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/Make/files +++ b/src/thermophysicalModels/laminarFlameSpeed/Make/files @@ -1,5 +1,5 @@ laminarFlameSpeed/laminarFlameSpeed.C -laminarFlameSpeed/newLaminarFlameSpeed.C +laminarFlameSpeed/laminarFlameSpeedNew.C constant/constant.C Gulders/Gulders.C GuldersEGR/GuldersEGR.C diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H index 38b031de40..68e8c187dc 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeed.H @@ -36,7 +36,7 @@ Description SourceFiles laminarFlameSpeed.C - newLaminarFlameSpeed.C + laminarFlameSpeedNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/newLaminarFlameSpeed.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C similarity index 100% rename from src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/newLaminarFlameSpeed.C rename to src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C diff --git a/src/thermophysicalModels/pdfs/Make/files b/src/thermophysicalModels/pdfs/Make/files index 7b0c50a956..e032b86bc5 100644 --- a/src/thermophysicalModels/pdfs/Make/files +++ b/src/thermophysicalModels/pdfs/Make/files @@ -1,5 +1,5 @@ pdf/pdf.C -pdf/newPdf.C +pdf/pdfNew.C exponential/exponential.C fixedValue/fixedValue.C diff --git a/src/thermophysicalModels/pdfs/pdf/pdf.H b/src/thermophysicalModels/pdfs/pdf/pdf.H index 42318f2c93..b0c5ea671d 100644 --- a/src/thermophysicalModels/pdfs/pdf/pdf.H +++ b/src/thermophysicalModels/pdfs/pdf/pdf.H @@ -45,7 +45,7 @@ Description SourceFiles pdf.C - newPdf.C + pdfNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/thermophysicalModels/pdfs/pdf/newPdf.C b/src/thermophysicalModels/pdfs/pdf/pdfNew.C similarity index 100% rename from src/thermophysicalModels/pdfs/pdf/newPdf.C rename to src/thermophysicalModels/pdfs/pdf/pdfNew.C diff --git a/src/thermophysicalModels/radiation/Make/files b/src/thermophysicalModels/radiation/Make/files index efa6279d30..5c77d42f12 100644 --- a/src/thermophysicalModels/radiation/Make/files +++ b/src/thermophysicalModels/radiation/Make/files @@ -1,6 +1,6 @@ /* Radiation model */ radiationModel/radiationModel/radiationModel.C -radiationModel/radiationModel/newRadiationModel.C +radiationModel/radiationModel/radiationModelNew.C radiationModel/noRadiation/noRadiation.C radiationModel/P1/P1.C radiationModel/fvDOM/fvDOM/fvDOM.C @@ -10,13 +10,13 @@ radiationModel/fvDOM/absorptionCoeffs/absorptionCoeffs.C /* Scatter model */ submodels/scatterModel/scatterModel/scatterModel.C -submodels/scatterModel/scatterModel/newScatterModel.C +submodels/scatterModel/scatterModel/scatterModelNew.C submodels/scatterModel/constantScatter/constantScatter.C /* Absorption/Emission model */ submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModel.C -submodels/absorptionEmissionModel/absorptionEmissionModel/newAbsorptionEmissionModel.C +submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C submodels/absorptionEmissionModel/noAbsorptionEmission/noAbsorptionEmission.C submodels/absorptionEmissionModel/constantAbsorptionEmission/constantAbsorptionEmission.C submodels/absorptionEmissionModel/binaryAbsorptionEmission/binaryAbsorptionEmission.C diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C similarity index 100% rename from src/thermophysicalModels/radiation/radiationModel/radiationModel/newRadiationModel.C rename to src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/newAbsorptionEmissionModel.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C similarity index 100% rename from src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/newAbsorptionEmissionModel.C rename to src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C diff --git a/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/newScatterModel.C b/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C similarity index 100% rename from src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/newScatterModel.C rename to src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C diff --git a/src/thermophysicalModels/reactionThermo/Make/files b/src/thermophysicalModels/reactionThermo/Make/files index 471dbb114d..6f56f0ef00 100644 --- a/src/thermophysicalModels/reactionThermo/Make/files +++ b/src/thermophysicalModels/reactionThermo/Make/files @@ -5,23 +5,23 @@ chemistryReaders/chemistryReader/makeChemistryReaders.C mixtures/basicMultiComponentMixture/basicMultiComponentMixture.C combustionThermo/hCombustionThermo/hCombustionThermo.C -combustionThermo/hCombustionThermo/newhCombustionThermo.C +combustionThermo/hCombustionThermo/hCombustionThermoNew.C combustionThermo/hCombustionThermo/hCombustionThermos.C combustionThermo/hsCombustionThermo/hsCombustionThermo.C -combustionThermo/hsCombustionThermo/newhsCombustionThermo.C +combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C combustionThermo/hsCombustionThermo/hsCombustionThermos.C combustionThermo/hhuCombustionThermo/hhuCombustionThermo.C -combustionThermo/hhuCombustionThermo/newhhuCombustionThermo.C +combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C combustionThermo/hhuCombustionThermo/hhuCombustionThermos.C reactionThermo/hReactionThermo/hReactionThermo.C -reactionThermo/hReactionThermo/newhReactionThermo.C +reactionThermo/hReactionThermo/hReactionThermoNew.C reactionThermo/hReactionThermo/hReactionThermos.C reactionThermo/hsReactionThermo/hsReactionThermo.C -reactionThermo/hsReactionThermo/newhsReactionThermo.C +reactionThermo/hsReactionThermo/hsReactionThermoNew.C reactionThermo/hsReactionThermo/hsReactionThermos.C derivedFvPatchFields/fixedUnburntEnthalpy/fixedUnburntEnthalpyFvPatchScalarField.C diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/newhCombustionThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C similarity index 100% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/newhCombustionThermo.C rename to src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H index f466c33a64..22f3214352 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermo.H @@ -29,7 +29,7 @@ Description SourceFiles hhuCombustionThermo.C - newhhuCombustionThermo.C + hhuCombustionThermoNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/newhhuCombustionThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C similarity index 100% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/newhhuCombustionThermo.C rename to src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/newhsCombustionThermo.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C similarity index 100% rename from src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/newhsCombustionThermo.C rename to src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/newhReactionThermo.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C similarity index 100% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/newhReactionThermo.C rename to src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/newhsReactionThermo.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C similarity index 100% rename from src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/newhsReactionThermo.C rename to src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C diff --git a/src/thermophysicalModels/solids/Make/files b/src/thermophysicalModels/solids/Make/files index 5da964b97f..9dfd710c3d 100644 --- a/src/thermophysicalModels/solids/Make/files +++ b/src/thermophysicalModels/solids/Make/files @@ -1,5 +1,5 @@ solid/solid.C -solid/newSolid.C +solid/solidNew.C ash/ash.C C/C.C diff --git a/src/thermophysicalModels/solids/solid/newSolid.C b/src/thermophysicalModels/solids/solid/solidNew.C similarity index 100% rename from src/thermophysicalModels/solids/solid/newSolid.C rename to src/thermophysicalModels/solids/solid/solidNew.C diff --git a/src/transportModels/incompressible/Make/files b/src/transportModels/incompressible/Make/files index bf2c44863a..898a3c648c 100644 --- a/src/transportModels/incompressible/Make/files +++ b/src/transportModels/incompressible/Make/files @@ -1,5 +1,5 @@ viscosityModels/viscosityModel/viscosityModel.C -viscosityModels/viscosityModel/newViscosityModel.C +viscosityModels/viscosityModel/viscosityModelNew.C viscosityModels/Newtonian/Newtonian.C viscosityModels/powerLaw/powerLaw.C viscosityModels/CrossPowerLaw/CrossPowerLaw.C diff --git a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.H b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.H index ce68da1571..e95774991c 100644 --- a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.H +++ b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModel.H @@ -40,7 +40,7 @@ Description SourceFiles viscosityModel.C - newViscosityModel.C + viscosityModelNew.C \*---------------------------------------------------------------------------*/ diff --git a/src/transportModels/incompressible/viscosityModels/viscosityModel/newViscosityModel.C b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C similarity index 100% rename from src/transportModels/incompressible/viscosityModels/viscosityModel/newViscosityModel.C rename to src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C From bbb22dc331cf028c6cd427e1dd18e9bdab584031 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 14 Apr 2010 09:14:49 +0200 Subject: [PATCH 05/41] ENH: remove existing doxygen html/ in background --- doc/Allwmake | 5 +- doc/Doxygen/Allwmake | 14 ++- doc/Doxygen/tabs.css | 109 +++++++++--------- doc/{Doxygen => }/tools/README | 0 doc/{Doxygen => }/tools/find-its | 0 doc/{Doxygen => }/tools/find-junkFiles | 0 doc/{Doxygen => }/tools/find-longlines | 0 .../tools/find-placeholderDescription | 0 doc/{Doxygen => }/tools/find-retagged | 0 doc/{Doxygen => }/tools/find-suspiciousTags | 0 .../tools/find-templateInComments | 0 doc/{Doxygen => }/tools/find-tinyDescription | 0 doc/{Doxygen => }/tools/fix-Class | 0 .../fvMesh/fvPatches/fvPatch/fvPatch.H | 10 +- 14 files changed, 75 insertions(+), 63 deletions(-) rename doc/{Doxygen => }/tools/README (100%) rename doc/{Doxygen => }/tools/find-its (100%) rename doc/{Doxygen => }/tools/find-junkFiles (100%) rename doc/{Doxygen => }/tools/find-longlines (100%) rename doc/{Doxygen => }/tools/find-placeholderDescription (100%) rename doc/{Doxygen => }/tools/find-retagged (100%) rename doc/{Doxygen => }/tools/find-suspiciousTags (100%) rename doc/{Doxygen => }/tools/find-templateInComments (100%) rename doc/{Doxygen => }/tools/find-tinyDescription (100%) rename doc/{Doxygen => }/tools/fix-Class (100%) diff --git a/doc/Allwmake b/doc/Allwmake index e180b24e0f..5d8ed9c5a0 100755 --- a/doc/Allwmake +++ b/doc/Allwmake @@ -2,9 +2,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x -chmod a+rX $WM_PROJECT_DIR -chmod a+rX $WM_PROJECT_DIR/doc -chmod -R a+rX Doxygen +# fix permissions (NB: '+X' and not '+x'!) +chmod a+rX $WM_PROJECT_DIR $WM_PROJECT_DIR/doc Doxygen Doxygen/Allwmake diff --git a/doc/Doxygen/Allwmake b/doc/Doxygen/Allwmake index dab44579b8..a34eb3fd7e 100755 --- a/doc/Doxygen/Allwmake +++ b/doc/Doxygen/Allwmake @@ -2,11 +2,21 @@ cd ${0%/*} || exit 1 # run from this directory set -x +rm -rf latex man + +# remove html directory in background +mv html html-stagedRemove$$ 2> /dev/null +rm -rf html-stagedRemove$$ >/dev/null 2>&1 & + +# ensure that created files are readable by everyone umask 22 -rm -rf html latex man doxygen # fix permissions (NB: '+X' and not '+x'!) -chmod -R a+rX ./ +chmod -R a+rX html latex man 2>/dev/null + +echo +echo "Done doxygen" +echo # ----------------------------------------------------------------- end-of-file diff --git a/doc/Doxygen/tabs.css b/doc/Doxygen/tabs.css index 2acf4cd239..3c567bb529 100644 --- a/doc/Doxygen/tabs.css +++ b/doc/Doxygen/tabs.css @@ -1,101 +1,100 @@ /* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */ -DIV.tabs +div.tabs { - float : left; - width : 100%; - margin-bottom : 2px; - padding-bottom : 6px; + float : left; + width : 100%; + margin-bottom : 2px; + padding-bottom : 6px; } -DIV.tabs UL +div.tabs ul { - margin : 0px; - padding-left : 0px; - border-right : 1px solid #84B0C7; - list-style : none; + margin : 0px; + padding-left : 0px; + border-right : 1px solid #84B0C7; + list-style : none; } -DIV.tabs LI, DIV.tabs FORM +div.tabs li, div.tabs form { - display : inline; - margin : 0px; - padding : 0px; + display : inline; + margin : 0px; + padding : 0px; } -DIV.tabs FORM +div.tabs form { - float : left; - padding : 0px 9px; + float : left; + padding : 0px 9px; } -DIV.tabs A +div.tabs a { - float : left; - font-size : 12px; - font-weight : bold; - text-decoration : none; - border-right : 1px solid #000000; + float : left; + font-size : 12px; + font-weight : bold; + text-decoration : none; + border-right : 1px solid #000000; } -DIV.tabs A:hover +div.tabs a:hover { - background-position: 100% -150px; + background-position: 100% -150px; } -DIV.tabs A:link, DIV.tabs A:visited, -DIV.tabs A:active, DIV.tabs A:hover +div.tabs a:link, div.tabs a:visited, div.tabs a:active, div.tabs a:hover { - color: #000000; + color : #000000; } -DIV.tabs SPAN +div.tabs span { - float : left; - display : block; - padding : 0px 9px; - white-space : nowrap; + float : left; + display : block; + padding : 0px 9px; + white-space : nowrap; } -DIV.tabs INPUT +div.tabs input { - float : right; - display : inline; - font-size : 12px; + float : right; + display : inline; + font-size : 12px; } -DIV.tabs TD +div.tabs td { - font-size : 12px; - font-weight : bold; - text-decoration : none; + font-size : 12px; + font-weight : bold; + text-decoration : none; } -/* Commented Backslash Hack hides rule from IE5-Mac \*/ -DIV.tabs SPAN {float : none;} +/* Commented backslash hack hides rule from IE5-Mac \*/ +div.tabs span { float : none; } /* End IE5-Mac hack */ -DIV.tabs A:hover SPAN +div.tabs a:hover span { - background-position: 0% -150px; + background-position: 0% -150px; } -DIV.tabs LI#current A +div.tabs li#current a { - border-width : 0px; - border-right : 1px solid #000000; - color: #0000ff; + border-width : 0px; + border-right : 1px solid #000000; + color : #0000ff; } -DIV.tabs LI#current SPAN +div.tabs li#current span { - padding-bottom : 0px; + padding-bottom : 0px; } -DIV.nav +div.nav { - background : none; - border : none; - border-bottom : 1px solid #000000; + background : none; + border : none; + border-bottom : 1px solid #000000; } diff --git a/doc/Doxygen/tools/README b/doc/tools/README similarity index 100% rename from doc/Doxygen/tools/README rename to doc/tools/README diff --git a/doc/Doxygen/tools/find-its b/doc/tools/find-its similarity index 100% rename from doc/Doxygen/tools/find-its rename to doc/tools/find-its diff --git a/doc/Doxygen/tools/find-junkFiles b/doc/tools/find-junkFiles similarity index 100% rename from doc/Doxygen/tools/find-junkFiles rename to doc/tools/find-junkFiles diff --git a/doc/Doxygen/tools/find-longlines b/doc/tools/find-longlines similarity index 100% rename from doc/Doxygen/tools/find-longlines rename to doc/tools/find-longlines diff --git a/doc/Doxygen/tools/find-placeholderDescription b/doc/tools/find-placeholderDescription similarity index 100% rename from doc/Doxygen/tools/find-placeholderDescription rename to doc/tools/find-placeholderDescription diff --git a/doc/Doxygen/tools/find-retagged b/doc/tools/find-retagged similarity index 100% rename from doc/Doxygen/tools/find-retagged rename to doc/tools/find-retagged diff --git a/doc/Doxygen/tools/find-suspiciousTags b/doc/tools/find-suspiciousTags similarity index 100% rename from doc/Doxygen/tools/find-suspiciousTags rename to doc/tools/find-suspiciousTags diff --git a/doc/Doxygen/tools/find-templateInComments b/doc/tools/find-templateInComments similarity index 100% rename from doc/Doxygen/tools/find-templateInComments rename to doc/tools/find-templateInComments diff --git a/doc/Doxygen/tools/find-tinyDescription b/doc/tools/find-tinyDescription similarity index 100% rename from doc/Doxygen/tools/find-tinyDescription rename to doc/tools/find-tinyDescription diff --git a/doc/Doxygen/tools/fix-Class b/doc/tools/fix-Class similarity index 100% rename from doc/Doxygen/tools/fix-Class rename to doc/tools/fix-Class diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H index ddadbd538e..7d9cd8a7b9 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatch.H @@ -25,7 +25,7 @@ Class Foam::fvPatch Description - Foam::fvPatch + A finiteVolume patch using a polyPatch and a fvBoundaryMesh SourceFiles fvPatch.C @@ -121,14 +121,18 @@ public: // Constructors - //- Construct from polyPatch + //- Construct from polyPatch and fvBoundaryMesh fvPatch(const polyPatch&, const fvBoundaryMesh&); // Selectors //- Return a pointer to a new patch created on freestore from polyPatch - static autoPtr New(const polyPatch&, const fvBoundaryMesh&); + static autoPtr New + ( + const polyPatch&, + const fvBoundaryMesh& + ); //- Destructor From 6a48570c20ce1678c91bba883f9144984afe8a67 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 14 Apr 2010 09:41:52 +0200 Subject: [PATCH 06/41] STYLE: add quotes around html attributes --- doc/Doxygen/FoamHeader.html | 18 +++++++++++------- src/OpenFOAM/global/foamDoc.H | 4 ++-- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/doc/Doxygen/FoamHeader.html b/doc/Doxygen/FoamHeader.html index 3d16a4804a..e67053d4ae 100644 --- a/doc/Doxygen/FoamHeader.html +++ b/doc/Doxygen/FoamHeader.html @@ -14,7 +14,9 @@ - +
- - - - - @@ -64,6 +66,8 @@ horizontal-align: left; ">
  +   Source Guide + OpenCFD + Features + Contact + OpenFOAM
- +
diff --git a/src/OpenFOAM/global/foamDoc.H b/src/OpenFOAM/global/foamDoc.H index 076223436d..91af8ece83 100644 --- a/src/OpenFOAM/global/foamDoc.H +++ b/src/OpenFOAM/global/foamDoc.H @@ -40,8 +40,8 @@ License OpenFOAM comes with full commercial support from OpenCFD, including software support, - contracted developments - and a programme of training courses. + contracted developments + and a programme of training courses. These activities fund the development, maintenance and release of OpenFOAM to make it an extremely viable commercial open source product. From 74b6885674c499f3d0b5e982b65ac7adaf1dbd26 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Wed, 14 Apr 2010 11:39:55 +0200 Subject: [PATCH 07/41] STYLE: change "it's" to "it is" --- doc/tools/find-its | 43 +++---------------- .../pdfs/general/general.C | 2 +- 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/doc/tools/find-its b/doc/tools/find-its index 2276183628..7f8996b32b 100755 --- a/doc/tools/find-its +++ b/doc/tools/find-its @@ -1,48 +1,17 @@ -#!/usr/bin/perl -w -use strict; -use File::Find (); - +#!/bin/sh # ----------------------------------------------------------------------------- -# # Script # find-its # # Description -# Search for *.[CH] files with "it's" +# Search for files with "it's" # This contraction (== "it is") looks too much like "its" (possesive) # and confuses non-native (and some native) English speakers. # -# - print filename and lineNumber -# # ----------------------------------------------------------------------------- +set -x +cd $WM_PROJECT_DIR || exit 1 -my $re_filespec = qr{^.+\.[CH]$}; - -# for the convenience of &wanted calls, including -eval statements: -## use vars qw( *name *dir *prune ); -## *name = *File::Find::name; -## *dir = *File::Find::dir; -## *prune = *File::Find::prune; - -sub wanted { - unless ( lstat($_) and -f _ and -r _ and not -l _ and /$re_filespec/ ) { - return; - } - - local @ARGV = $_; - while (<>) { - if (m{it\'s}) { - print "$File::Find::name line=$.\n"; - } - } - - close ARGV; -} - -## Traverse desired filesystems -for my $dir (@ARGV) { - no warnings 'File::Find'; - warn "(**) checking '$dir' ...\n"; - File::Find::find( { wanted => \&wanted }, $dir ); -} +git grep -e "it's" +#------------------------------------------------------------------ end-of-file diff --git a/src/thermophysicalModels/pdfs/general/general.C b/src/thermophysicalModels/pdfs/general/general.C index e29bf1f4a4..da674ee2ad 100644 --- a/src/thermophysicalModels/pdfs/general/general.C +++ b/src/thermophysicalModels/pdfs/general/general.C @@ -99,7 +99,7 @@ Foam::scalar Foam::pdfs::general::sample() const scalar alpha = y + xy_[n-1][0]*(0.5*k*xy_[n-1][0] + d) - integral_[n-1]; scalar x = 0.0; - // if k is small it's a linear equation, otherwise it's of second order + // if k is small it is a linear equation, otherwise it is of second order if (mag(k) > SMALL) { scalar p = 2.0*d/k; From 6d71a38e6673ff1b234b71fa46dad900e2ea7902 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 15 Apr 2010 11:34:47 +0100 Subject: [PATCH 08/41] ENH: Allow tensorial K --- ...allHeatFluxTemperatureFvPatchScalarField.C | 42 ++++++++++++++++--- ...allHeatFluxTemperatureFvPatchScalarField.H | 12 ++++-- 2 files changed, 45 insertions(+), 9 deletions(-) diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C index e2b1d536d2..1a5f871d96 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.C @@ -124,6 +124,41 @@ void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::rmap } +Foam::tmp +Foam::solidWallHeatFluxTemperatureFvPatchScalarField::K() const +{ + const fvMesh& mesh = patch().boundaryMesh().mesh(); + + if (mesh.objectRegistry::foundObject(KName_)) + { + return patch().lookupPatchField(KName_); + } + else if (mesh.objectRegistry::foundObject(KName_)) + { + const symmTensorField& KWall = + patch().lookupPatchField(KName_); + + vectorField n = patch().nf(); + + return n & KWall & n; + } + else + { + FatalErrorIn + ( + "solidWallHeatFluxTemperatureFvPatchScalarField::K()" + " const" + ) << "Did not find field " << KName_ + << " on mesh " << mesh.name() << " patch " << patch().name() + << endl + << "Please set 'K' to a valid volScalarField" + << " or a valid volSymmTensorField." << exit(FatalError); + + return scalarField(0); + } +} + + void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() { if (updated()) @@ -131,12 +166,7 @@ void Foam::solidWallHeatFluxTemperatureFvPatchScalarField::updateCoeffs() return; } - const scalarField& Kw = patch().lookupPatchField - ( - KName_ - ); - - gradient() = q_/Kw; + gradient() = q_/K(); fixedGradientFvPatchScalarField::updateCoeffs(); } diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H index ffbcf52ed5..0544b2bffa 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/derivedFvPatchFields/solidWallHeatFluxTemperature/solidWallHeatFluxTemperatureFvPatchScalarField.H @@ -31,9 +31,10 @@ Description myWallPatch { type solidWallHeatFluxTemperature; - K K; // Name of K field - q uniform 1000; // Heat flux / [W/m2] - value 300.0; // Initial temperature / [K] + K K; // Name of K field + q uniform 1000; // Heat flux / [W/m2] + value uniform 300.0; // Initial temperature / [K] + gradient uniform 0.0; // Initial gradient / [K/m] } @@ -140,6 +141,11 @@ public: // Member functions + // Helper + + //- Get K field on this patch + tmp K() const; + // Evaluation functions //- Update the coefficients associated with the patch field From 1fe76fef6a9fa543ec63d346e6ec7674de522f6b Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 15 Apr 2010 11:35:43 +0100 Subject: [PATCH 09/41] BUG: Load library containing the functionObjects before using them. --- .../incompressible/pimpleFoam/t-junction/system/controlDict | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tutorials/incompressible/pimpleFoam/t-junction/system/controlDict b/tutorials/incompressible/pimpleFoam/t-junction/system/controlDict index f1c8b83674..14ca5f3091 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/system/controlDict +++ b/tutorials/incompressible/pimpleFoam/t-junction/system/controlDict @@ -53,9 +53,11 @@ functions { probes { - type probes; // Where to load it from functionObjectLibs ( "libsampling.so" ); + + type probes; + // Name of the directory for probe data name probes; From 5080bd32370d4e4438bce1b38e9a8b47c957c299 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 15 Apr 2010 11:58:33 +0100 Subject: [PATCH 10/41] STYLE: convert to new time loop structure --- .../solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C b/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C index dd05bf88aa..30a5f6fb1a 100644 --- a/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C +++ b/applications/solvers/compressible/rhoSimplecFoam/rhoSimplecFoam.C @@ -50,7 +50,7 @@ int main(int argc, char *argv[]) Info<< "\nStarting time loop\n" << endl; - for (runTime++; !runTime.end(); runTime++) + while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; From 21b283779cc9709a82f4ecd3cadc038673d15f7e Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 15 Apr 2010 11:59:31 +0100 Subject: [PATCH 11/41] STYLE: new time structure --- .../adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C index 97992e8192..a18298f826 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/adjointShapeOptimizationFoam.C @@ -78,7 +78,7 @@ int main(int argc, char *argv[]) Info<< "\nStarting time loop\n" << endl; - for (runTime++; !runTime.end(); runTime++) + while (runTime.loop()) { Info<< "Time = " << runTime.timeName() << nl << endl; From d4ca02cf7e76e7abd477cd0616899a571520fadc Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 15 Apr 2010 12:22:56 +0100 Subject: [PATCH 12/41] BUG: using Time::run() as a loop construct was not doing the functionObjects. --- src/OpenFOAM/db/Time/Time.C | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 36bccb3911..35525f65f4 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -508,19 +508,11 @@ bool Foam::Time::run() const } } - return running; -} - - -bool Foam::Time::loop() -{ - bool running = run(); - if (running) { if (!subCycling_) { - readModifiedObjects(); + const_cast(*this).readModifiedObjects(); if (timeIndex_ == startTimeIndex_) { @@ -532,14 +524,22 @@ bool Foam::Time::loop() } } - // Check update the "running" status following the "++" operation - // to take into account possible side-effects from functionObjects - running = run(); + // Update the "running" status following the + // possible side-effects from functionObjects + running = value() < (endTime_ - 0.5*deltaT_); + } - if (running) - { - operator++(); - } + return running; +} + + +bool Foam::Time::loop() +{ + bool running = run(); + + if (running) + { + operator++(); } return running; From 01aa79be546301b1a92fa3804a51d968570736be Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 15 Apr 2010 15:12:48 +0100 Subject: [PATCH 13/41] ENH: multiple faces between two cells gives problems for scotch We filter them out now when constructing the adjacency structure. --- .../decompositionMethod/decompositionMethod.C | 249 ++++++++++++------ .../decompositionMethod/decompositionMethod.H | 4 + 2 files changed, 178 insertions(+), 75 deletions(-) diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index f25f0ef448..844272e98b 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -215,6 +215,43 @@ void Foam::decompositionMethod::calcCellCells } +// Return the minimum face between two cells. Only relevant for +// cells with multiple faces inbetween. +Foam::label Foam::decompositionMethod::masterFace +( + const polyMesh& mesh, + const label own, + const label nei +) +{ + label minFaceI = labelMax; + + // Count multiple faces between own and nei only once + const cell& ownFaces = mesh.cells()[own]; + forAll(ownFaces, i) + { + label otherFaceI = ownFaces[i]; + + if (mesh.isInternalFace(otherFaceI)) + { + label nbrCellI = + ( + mesh.faceNeighbour()[otherFaceI] != own + ? mesh.faceNeighbour()[otherFaceI] + : mesh.faceOwner()[otherFaceI] + ); + + if (nbrCellI == nei) + { + minFaceI = min(minFaceI, otherFaceI); + } + } + } + + return minFaceI; +} + + void Foam::decompositionMethod::calcCSR ( const polyMesh& mesh, @@ -222,61 +259,15 @@ void Foam::decompositionMethod::calcCSR List& xadj ) { + const polyBoundaryMesh& pbm = mesh.boundaryMesh(); + // Make Metis CSR (Compressed Storage Format) storage // adjncy : contains neighbours (= edges in graph) // xadj(celli) : start of information in adjncy for celli - xadj.setSize(mesh.nCells()+1); - // Initialise the number of internal faces of the cells to twice the - // number of internal faces - label nInternalFaces = 2*mesh.nInternalFaces(); - - // Check the boundary for coupled patches and add to the number of - // internal faces - const polyBoundaryMesh& pbm = mesh.boundaryMesh(); - - forAll(pbm, patchi) - { - if (isA(pbm[patchi])) - { - nInternalFaces += pbm[patchi].size(); - } - } - - // Create the adjncy array the size of the total number of internal and - // coupled faces - adjncy.setSize(nInternalFaces); - - // Fill in xadj - // ~~~~~~~~~~~~ - label freeAdj = 0; - - for (label cellI = 0; cellI < mesh.nCells(); cellI++) - { - xadj[cellI] = freeAdj; - - const labelList& cFaces = mesh.cells()[cellI]; - - forAll(cFaces, i) - { - label faceI = cFaces[i]; - - if - ( - mesh.isInternalFace(faceI) - || isA(pbm[pbm.whichPatch(faceI)]) - ) - { - freeAdj++; - } - } - } - xadj[mesh.nCells()] = freeAdj; - - - // Fill in adjncy - // ~~~~~~~~~~~~~~ + // Count unique faces between cells + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ labelList nFacesPerCell(mesh.nCells(), 0); @@ -286,26 +277,95 @@ void Foam::decompositionMethod::calcCSR label own = mesh.faceOwner()[faceI]; label nei = mesh.faceNeighbour()[faceI]; - adjncy[xadj[own] + nFacesPerCell[own]++] = nei; - adjncy[xadj[nei] + nFacesPerCell[nei]++] = own; + if (faceI == masterFace(mesh, own, nei)) + { + nFacesPerCell[own]++; + nFacesPerCell[nei]++; + } } // Coupled faces. Only cyclics done. - forAll(pbm, patchi) + HashSet > cellPair(mesh.nFaces()-mesh.nInternalFaces()); + + forAll(pbm, patchI) { - if (isA(pbm[patchi])) + if (isA(pbm[patchI])) { - const unallocLabelList& faceCells = pbm[patchi].faceCells(); + const unallocLabelList& faceCells = pbm[patchI].faceCells(); label sizeby2 = faceCells.size()/2; - for (label facei=0; facei(pbm[patchI])) + { + const unallocLabelList& faceCells = pbm[patchI].faceCells(); + + label sizeby2 = faceCells.size()/2; + + for (label faceI=0; faceI& xadj ) { + labelHashSet nbrCells; + // Count number of internal faces label nConnections = 0; forAll(cellCells, coarseI) { - nConnections += cellCells[coarseI].size(); + nbrCells.clear(); + + const labelList& cCells = cellCells[coarseI]; + + forAll(cCells, i) + { + if (nbrCells.insert(cCells[i])) + { + nConnections++; + } + } } // Create the adjncy array as twice the size of the total number of @@ -343,11 +415,16 @@ void Foam::decompositionMethod::calcCSR { xadj[coarseI] = freeAdj; + nbrCells.clear(); + const labelList& cCells = cellCells[coarseI]; forAll(cCells, i) { - adjncy[freeAdj++] = cCells[i]; + if (nbrCells.insert(cCells[i])) + { + adjncy[freeAdj++] = cCells[i]; + } } } xadj[cellCells.size()] = freeAdj; @@ -413,15 +490,21 @@ void Foam::decompositionMethod::calcDistributedCSR // Number of faces per cell List nFacesPerCell(mesh.nCells(), 0); - // Number of coupled faces - label nCoupledFaces = 0; - for (label faceI = 0; faceI < mesh.nInternalFaces(); faceI++) { - nFacesPerCell[faceOwner[faceI]]++; - nFacesPerCell[faceNeighbour[faceI]]++; + label own = faceOwner[faceI]; + label nei = faceNeighbour[faceI]; + + if (faceI == masterFace(mesh, own, nei)) + { + nFacesPerCell[own]++; + nFacesPerCell[nei]++; + } } + // Handle coupled faces + HashSet > cellPair(mesh.nFaces()-mesh.nInternalFaces()); + forAll(patches, patchI) { const polyPatch& pp = patches[patchI]; @@ -429,11 +512,18 @@ void Foam::decompositionMethod::calcDistributedCSR if (pp.coupled()) { label faceI = pp.start(); + label bFaceI = pp.start()-mesh.nInternalFaces(); forAll(pp, i) { - nCoupledFaces++; - nFacesPerCell[faceOwner[faceI++]]++; + label own = faceOwner[faceI]; + label globalNei = globalNeighbour[bFaceI]; + if (cellPair.insert(edge(own, globalNei))) + { + nFacesPerCell[own]++; + } + faceI++; + bFaceI++; } } } @@ -459,7 +549,7 @@ void Foam::decompositionMethod::calcDistributedCSR // Fill in adjncy // ~~~~~~~~~~~~~~ - adjncy.setSize(2*mesh.nInternalFaces() + nCoupledFaces); + adjncy.setSize(freeAdj); nFacesPerCell = 0; @@ -469,10 +559,17 @@ void Foam::decompositionMethod::calcDistributedCSR label own = faceOwner[faceI]; label nei = faceNeighbour[faceI]; - adjncy[xadj[own] + nFacesPerCell[own]++] = globalCells.toGlobal(nei); - adjncy[xadj[nei] + nFacesPerCell[nei]++] = globalCells.toGlobal(own); + if (faceI == masterFace(mesh, own, nei)) + { + adjncy[xadj[own] + nFacesPerCell[own]++] = + globalCells.toGlobal(nei); + adjncy[xadj[nei] + nFacesPerCell[nei]++] = + globalCells.toGlobal(own); + } } + // For boundary faces is offsetted coupled neighbour + cellPair.clear(); forAll(patches, patchI) { const polyPatch& pp = patches[patchI]; @@ -485,9 +582,11 @@ void Foam::decompositionMethod::calcDistributedCSR forAll(pp, i) { label own = faceOwner[faceI]; - adjncy[xadj[own] + nFacesPerCell[own]++] = - globalNeighbour[bFaceI]; - + label globalNei = globalNeighbour[bFaceI]; + if (cellPair.insert(edge(own, globalNei))) + { + adjncy[xadj[own] + nFacesPerCell[own]++] = globalNei; + } faceI++; bFaceI++; } diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.H b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.H index d729fe9bd3..dabca144c8 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.H +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.H @@ -65,6 +65,10 @@ protected: labelListList& cellCells ); + //- Calculate the minimum face between two neighbouring cells + // (usually there is only one) + static label masterFace(const polyMesh&, const label, const label); + // From mesh to compact row storage format // (like CompactListList) static void calcCSR From 300ac4843cb1a25b4801d16c9f0443e7da792546 Mon Sep 17 00:00:00 2001 From: mattijs Date: Thu, 15 Apr 2010 18:15:09 +0100 Subject: [PATCH 14/41] BUG: fieldValue.C was defining duplicate IOField symbols --- .../functionObjects/field/Make/files | 2 +- .../field/fieldValues/fieldValue/fieldValue.C | 5 -- .../field/streamLine/streamLine.H | 6 --- .../field/streamLine/streamLineParticle.C | 18 ++----- .../field/streamLine/streamLineParticle.H | 5 -- .../field/streamLine/vectorIOFieldField.C | 43 ++++++++++++++++ .../field/streamLine/vectorIOFieldField.H | 49 +++++++++++++++++++ 7 files changed, 98 insertions(+), 30 deletions(-) create mode 100644 src/postProcessing/functionObjects/field/streamLine/vectorIOFieldField.C create mode 100644 src/postProcessing/functionObjects/field/streamLine/vectorIOFieldField.H diff --git a/src/postProcessing/functionObjects/field/Make/files b/src/postProcessing/functionObjects/field/Make/files index bfed281015..df93e62853 100644 --- a/src/postProcessing/functionObjects/field/Make/files +++ b/src/postProcessing/functionObjects/field/Make/files @@ -19,6 +19,6 @@ streamLine/streamLine.C streamLine/streamLineParticle.C streamLine/streamLineParticleCloud.C streamLine/streamLineFunctionObject.C - +streamLine/vectorIOFieldField.C LIB = $(FOAM_LIBBIN)/libfieldFunctionObjects diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C index 1f0f13b184..1bf513e6ea 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C @@ -32,11 +32,6 @@ License namespace Foam { defineTypeNameAndDebug(fieldValue, 0); - - defineTemplateTypeNameAndDebug(IOField, 0); - defineTemplateTypeNameAndDebug(IOField, 0); - defineTemplateTypeNameAndDebug(IOField, 0); - defineTemplateTypeNameAndDebug(IOField, 0); } diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.H b/src/postProcessing/functionObjects/field/streamLine/streamLine.H index fe4f4d287f..0b8dd20ead 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLine.H +++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.H @@ -206,12 +206,6 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -//#ifdef NoRepository -//# include "streamLineTemplates.C" -//#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - #endif // ************************************************************************* // diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C index 9174e35781..ed702f489a 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.C @@ -24,22 +24,14 @@ License \*----------------------------------------------------------------------------*/ #include "streamLineParticle.H" +#include "vectorIOFieldField.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - defineTypeNameAndDebug(streamLineParticle, 0); - defineParticleTypeNameAndDebug(streamLineParticle, 0); - - defineTemplateTypeNameAndDebugWithName - ( - IOField, - "vectorFieldField", - 0 - ); } @@ -402,13 +394,13 @@ void Foam::streamLineParticle::readFields(Cloud& c) ); c.checkFieldIOobject(c, lifeTime); - IOField sampledPositions + vectorIOFieldField sampledPositions ( c.fieldIOobject("sampledPositions", IOobject::MUST_READ) ); c.checkFieldIOobject(c, sampledPositions); -// IOField sampleVelocity +// vectorIOFieldField sampleVelocity // ( // c.fieldIOobject("sampleVelocity", IOobject::MUST_READ) // ); @@ -436,12 +428,12 @@ void Foam::streamLineParticle::writeFields(const Cloud& c) c.fieldIOobject("lifeTime", IOobject::NO_READ), np ); - IOField sampledPositions + vectorIOFieldField sampledPositions ( c.fieldIOobject("sampledPositions", IOobject::NO_READ), np ); -// IOField sampleVelocity +// vectorIOFieldField sampleVelocity // ( // c.fieldIOobject("sampleVelocity", IOobject::NO_READ), // np diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H index e2de691282..2ed481c60c 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H +++ b/src/postProcessing/functionObjects/field/streamLine/streamLineParticle.H @@ -134,11 +134,6 @@ private: public: - //- Run-time type information - TypeName("streamLineParticle"); - - - // Constructors //- Construct from components diff --git a/src/postProcessing/functionObjects/field/streamLine/vectorIOFieldField.C b/src/postProcessing/functionObjects/field/streamLine/vectorIOFieldField.C new file mode 100644 index 0000000000..7ecd4d86a2 --- /dev/null +++ b/src/postProcessing/functionObjects/field/streamLine/vectorIOFieldField.C @@ -0,0 +1,43 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Description + vectorFieldField with IO. + +\*---------------------------------------------------------------------------*/ + +#include "vectorIOFieldField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + defineTemplateTypeNameAndDebugWithName + ( + vectorIOFieldField, + "vectorFieldField", + 0 + ); +} + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/field/streamLine/vectorIOFieldField.H b/src/postProcessing/functionObjects/field/streamLine/vectorIOFieldField.H new file mode 100644 index 0000000000..b57b7813fd --- /dev/null +++ b/src/postProcessing/functionObjects/field/streamLine/vectorIOFieldField.H @@ -0,0 +1,49 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see . + +Typedef + Foam::vectorIOFieldField + +Description + vectorField with IO. + +\*---------------------------------------------------------------------------*/ + +#ifndef vectorIOFieldField_H +#define vectorIOFieldField_H + +#include "vectorField.H" +#include "IOField.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + typedef IOField vectorIOFieldField; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // From af12964ba11022f751925e645f79d434ff2663a3 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 16 Apr 2010 14:00:41 +0200 Subject: [PATCH 15/41] ENH: add gcc-4.5.0, drop gcc-4.4.2, avoid gcc lib/ on 64-bit systems --- etc/settings.csh | 42 ++++++++++++++++++++++++++---------------- etc/settings.sh | 31 +++++++++++++++++++++---------- 2 files changed, 47 insertions(+), 26 deletions(-) diff --git a/etc/settings.csh b/etc/settings.csh index d56788ee57..b895263ba8 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -75,7 +75,7 @@ _foamAddLib ${FOAM_USER_LIBBIN}:${FOAM_SITE_LIBBIN}:${FOAM_LIBBIN}:${FOAM_LIBBI # Compiler settings # ~~~~~~~~~~~~~~~~~ -unset gcc_version gmp_version mpfr_version +unset gcc_version gmp_version mpfr_version mpc_version unsetenv MPFR_ARCH_PATH @@ -92,25 +92,22 @@ case OpenFOAM: set gmp_version=gmp-5.0.1 set mpfr_version=mpfr-2.4.2 breaksw - - case Gcc442: - set gcc_version=gcc-4.4.2 - set gmp_version=gmp-4.2.4 - set mpfr_version=mpfr-2.4.1 + case Gcc45: + set gcc_version=gcc-4.5.0 + set gmp_version=gmp-5.0.1 + set mpfr_version=mpfr-2.4.2 + set mpc_version=mpc-2.4.2 breaksw - case Gcc44: - set gcc_version=gcc-4.4.2 - set gmp_version=gmp-4.2.4 - set mpfr_version=mpfr-2.4.1 + set gcc_version=gcc-4.4.3 + set gmp_version=gmp-5.0.1 + set mpfr_version=mpfr-2.4.2 breaksw - case Gcc43: set gcc_version=gcc-4.3.3 set gmp_version=gmp-4.2.4 set mpfr_version=mpfr-2.4.1 breaksw - default: echo echo "Warning in $WM_PROJECT_DIR/etc/settings.csh:" @@ -118,13 +115,13 @@ case OpenFOAM: echo " Please check your settings" echo breaksw - endsw if ( $?gcc_version ) then set gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version set gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version set mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version + set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version # Check that the compiler directory can be found if ( ! -d "$gccDir" ) then @@ -138,17 +135,30 @@ case OpenFOAM: _foamAddMan $gccDir/man _foamAddPath $gccDir/bin - _foamAddLib $gccDir/lib${WM_COMPILER_LIB_ARCH}:$gccDir/lib + + # 64-bit needs lib64, but 32-bit needs lib (not lib32) + if ( "$WM_ARCH_OPTION" = 64 ) then + then + _foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH + else + _foamAddLib $gccDir/lib + endif # add in gmp/mpfr libraries _foamAddLib $gmpDir/lib _foamAddLib $mpfrDir/lib + # add in mpc libraries (not need for older gcc) + if ( $?mpc_version ) then + then + _foamAddLib $mpcDir/lib + endif + # used by boost/CGAL: setenv MPFR_ARCH_PATH $mpfrDir endif - unset gcc_version gccDir gmp_version gmpDir mpfr_version mpfrDir - + unset gcc_version gccDir + unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir breaksw endsw diff --git a/etc/settings.sh b/etc/settings.sh index abbde906b9..37ecb1f2a1 100644 --- a/etc/settings.sh +++ b/etc/settings.sh @@ -99,7 +99,8 @@ _foamAddLib $FOAM_USER_LIBBIN:$FOAM_SITE_LIBBIN:$FOAM_LIBBIN:$FOAM_LIBBIN/dummy # Compiler settings # ~~~~~~~~~~~~~~~~~ -unset gcc_version gmp_version mpfr_version MPFR_ARCH_PATH +unset gcc_version gmp_version mpfr_version mpc_version +unset MPFR_ARCH_PATH # Select compiler installation # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -114,15 +115,16 @@ OpenFOAM) gmp_version=gmp-5.0.1 mpfr_version=mpfr-2.4.2 ;; - Gcc442) - gcc_version=gcc-4.4.2 - gmp_version=gmp-4.2.4 - mpfr_version=mpfr-2.4.1 + Gcc45) + gcc_version=gcc-4.5.0 + gmp_version=gmp-5.0.1 + mpfr_version=mpfr-2.4.2 + mpc_version=mpc-0.8.1 ;; Gcc44) - gcc_version=gcc-4.4.2 - gmp_version=gmp-4.2.4 - mpfr_version=mpfr-2.4.1 + gcc_version=gcc-4.4.3 + gmp_version=gmp-5.0.1 + mpfr_version=mpfr-2.4.2 ;; Gcc43) gcc_version=gcc-4.3.3 @@ -143,6 +145,7 @@ OpenFOAM) gccDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gcc_version gmpDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$gmp_version mpfrDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpfr_version + mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version # Check that the compiler directory can be found [ -d "$gccDir" ] || { @@ -156,22 +159,30 @@ OpenFOAM) _foamAddMan $gccDir/man _foamAddPath $gccDir/bin - _foamAddLib $gccDir/lib # 64-bit needs lib64, but 32-bit needs lib (not lib32) if [ "$WM_ARCH_OPTION" = 64 ] then _foamAddLib $gccDir/lib$WM_COMPILER_LIB_ARCH + else + _foamAddLib $gccDir/lib fi # add in gmp/mpfr libraries _foamAddLib $gmpDir/lib _foamAddLib $mpfrDir/lib + # add in mpc libraries (not need for older gcc) + if [ -n "$mpc_version" ] + then + _foamAddLib $mpcDir/lib + fi + # used by boost/CGAL: export MPFR_ARCH_PATH=$mpfrDir fi - unset gcc_version gccDir gmp_version gmpDir mpfr_version mpfrDir + unset gcc_version gccDir + unset gmp_version gmpDir mpfr_version mpfrDir mpc_version mpcDir ;; esac From dfa2c676022ea13b56149523c1299a1bd08d8817 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 16 Apr 2010 13:15:12 +0100 Subject: [PATCH 16/41] ENH: Allow specification of defaultFaces boundary type --- .../meshes/polyMesh/polyMeshFromShapeMesh.C | 63 ++++++++++++++----- 1 file changed, 49 insertions(+), 14 deletions(-) diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C index 464ed465b0..fe9b8e45a4 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshFromShapeMesh.C @@ -577,21 +577,56 @@ Foam::polyMesh::polyMesh << "Found " << nFaces - defaultPatchStart << " undefined faces in mesh; adding to default patch." << endl; - boundary_.set - ( - nAllPatches, - polyPatch::New - ( - defaultBoundaryPatchType, - defaultBoundaryPatchName, - nFaces - defaultPatchStart, - defaultPatchStart, - boundary_.size() - 1, - boundary_ - ) - ); + // Check if there already exists a defaultFaces patch as last patch + // and reuse it. + label patchI = findIndex(boundaryPatchNames, defaultBoundaryPatchName); - nAllPatches++; + if (patchI != -1) + { + if (patchI != boundaryFaces.size()-1 || boundary_[patchI].size()) + { + FatalErrorIn("polyMesh::polyMesh(... construct from shapes...)") + << "Default patch " << boundary_[patchI].name() + << " already has faces in it or is not" + << " last in list of patches." << exit(FatalError); + } + + WarningIn("polyMesh::polyMesh(... construct from shapes...)") + << "Reusing existing patch " << patchI + << " for undefined faces." << endl; + + boundary_.set + ( + patchI, + polyPatch::New + ( + boundaryPatchTypes[patchI], + boundaryPatchNames[patchI], + nFaces - defaultPatchStart, + defaultPatchStart, + patchI, + boundary_ + ) + ); + } + else + { + boundary_.set + ( + nAllPatches, + polyPatch::New + ( + defaultBoundaryPatchType, + defaultBoundaryPatchName, + nFaces - defaultPatchStart, + defaultPatchStart, + boundary_.size() - 1, + boundary_ + ) + ); + + nAllPatches++; + } } // Reset the size of the boundary From af095081b731c609ae39039eda9a05e9b459e9a1 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 16 Apr 2010 13:16:26 +0100 Subject: [PATCH 17/41] ENH: Added baffles and fan cyclic --- .../incompressible/pimpleFoam/t-junction/0/U | 19 +++++++++---- .../pimpleFoam/t-junction/0/epsilon | 16 ++++++++--- .../incompressible/pimpleFoam/t-junction/0/k | 15 +++++++++-- .../pimpleFoam/t-junction/0/nuTilda | 10 ++++++- .../pimpleFoam/t-junction/0/nut | 11 +++++++- .../incompressible/pimpleFoam/t-junction/0/p | 18 ++++++++++--- .../pimpleFoam/t-junction/Allrun | 27 +++++++++++++++++++ .../pimpleFoam/t-junction/README.txt | 3 ++- .../constant/polyMesh/blockMeshDict | 10 +++++++ .../t-junction/constant/polyMesh/boundary | 17 ++++++++++-- .../t-junction/selectBaffles.setSet | 4 +++ .../t-junction/selectCyclics.setSet | 3 +++ .../pimpleFoam/t-junction/system/controlDict | 4 ++- 13 files changed, 137 insertions(+), 20 deletions(-) create mode 100755 tutorials/incompressible/pimpleFoam/t-junction/Allrun create mode 100644 tutorials/incompressible/pimpleFoam/t-junction/selectBaffles.setSet create mode 100644 tutorials/incompressible/pimpleFoam/t-junction/selectCyclics.setSet diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/U b/tutorials/incompressible/pimpleFoam/t-junction/0/U index 937d3966b2..8b3863aff9 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/U +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/U @@ -20,27 +20,36 @@ internalField uniform (0 0 0); boundaryField { - inlet + inlet { type pressureInletOutletVelocity; value uniform (0 0 0); } - outlet1 + outlet1 { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } - outlet2 + outlet2 { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } - - defaultFaces + baffles + { + type fixedValue; + value uniform ( 0 0 0 ); + } + fan + { + type cyclic; + value uniform ( 0 0 0 ); + } + defaultFaces { type fixedValue; value uniform (0 0 0); diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/epsilon b/tutorials/incompressible/pimpleFoam/t-junction/0/epsilon index 98515b441d..35ddfed661 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/epsilon +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/epsilon @@ -27,23 +27,33 @@ boundaryField mixingLength 0.01; // 1cm - half channel height value uniform 1; } - outlet1 { type inletOutlet; inletValue uniform 1; + value uniform 1; } outlet2 { type inletOutlet; inletValue uniform 1; + value uniform 1; + } + baffles + { + type epsilonWallFunction; + value uniform 1; + } + fan + { + type cyclic; + value uniform 1; } - defaultFaces { type epsilonWallFunction; - value uniform 0; + value uniform 1; } } diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/k b/tutorials/incompressible/pimpleFoam/t-junction/0/k index 35f4e42f32..e87a5855d2 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/k +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/k @@ -27,23 +27,34 @@ boundaryField intensity 0.05; // 5% turbulent intensity value uniform 1; } - outlet1 { type inletOutlet; inletValue uniform 1; + value uniform 1; } outlet2 { type inletOutlet; inletValue uniform 1; + value uniform 1; + } + baffles + { + type kqRWallFunction; + value uniform 1; + } + fan + { + type cyclic; + value uniform 1; } defaultFaces { type kqRWallFunction; - value uniform 0; + value uniform 1; } } diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/nuTilda b/tutorials/incompressible/pimpleFoam/t-junction/0/nuTilda index fe8744b398..ff51eab08c 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/nuTilda +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/nuTilda @@ -34,7 +34,15 @@ boundaryField { type zeroGradient; } - + baffles + { + type zeroGradient; + } + fan + { + type cyclic; + value uniform 0; + } defaultFaces { type zeroGradient; diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/nut b/tutorials/incompressible/pimpleFoam/t-junction/0/nut index b4a42336aa..570f1f90ac 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/nut +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/nut @@ -38,7 +38,16 @@ boundaryField type calculated; value uniform 0; } - + baffles + { + type nutkWallFunction; + value uniform 0; + } + fan + { + type cyclic; + value uniform 0; + } defaultFaces { type nutkWallFunction; diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/p b/tutorials/incompressible/pimpleFoam/t-junction/0/p index 93170d7a0c..d9873e5b7a 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/p +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/p @@ -20,7 +20,7 @@ internalField uniform 100000; boundaryField { - inlet + inlet { //type totalPressure; //p0 uniform 100040; @@ -38,18 +38,28 @@ boundaryField value uniform 100040; } - outlet1 + outlet1 { type fixedValue; value uniform 100010; } - outlet2 + outlet2 { type fixedValue; value uniform 100000; } - + baffles + { + type zeroGradient; + } + fan + { + type fan; + patchType cyclic; + f 2 ( 50 -0.1 ); + value uniform 100000; + } defaultFaces { type zeroGradient; diff --git a/tutorials/incompressible/pimpleFoam/t-junction/Allrun b/tutorials/incompressible/pimpleFoam/t-junction/Allrun new file mode 100755 index 0000000000..54e4a04edd --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction/Allrun @@ -0,0 +1,27 @@ +#!/bin/sh + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Get application name +application=`getApplication` + +runApplication blockMesh + + +# Creating patches 'out of nothing' so willl get undefined value which +# might cause floating point error +unset FOAM_SIGFPE +unset FOAM_SETNAN + +# Add cyclic baffles for fan +runApplication setSet -batch selectCyclics.setSet +runApplication createBaffles cyclicFaces fan -overwrite + +# Add wall baffles +rm log.setSet +runApplication setSet -batch selectBaffles.setSet +rm log.createBaffles +runApplication createBaffles baffleFaces baffles -overwrite + +runApplication $application diff --git a/tutorials/incompressible/pimpleFoam/t-junction/README.txt b/tutorials/incompressible/pimpleFoam/t-junction/README.txt index 0905f8784d..fd3f970be5 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/README.txt +++ b/tutorials/incompressible/pimpleFoam/t-junction/README.txt @@ -1,2 +1,3 @@ -15/8/8 Simple T-junction. Inlet on left, one outlet at bottom, one at top. +300-04-16 T-junction with baffles and fan. +Inlet on left, one outlet at bottom, one at top. To test multiple outlets. diff --git a/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict b/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict index e0f5358021..5e97f00deb 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict @@ -100,6 +100,16 @@ patches ( (8 18 19 9) ) + + wall baffles + () + + cyclic fan + () + + wall defaultFaces + () + ); mergePatchPairs diff --git a/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/boundary b/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/boundary index 85c7a93237..24c53efd55 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/boundary +++ b/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/boundary @@ -1,7 +1,7 @@ /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | -| \\ / O peration | Version: 1.6 | +| \\ / O peration | Version: dev | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ @@ -15,7 +15,7 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -4 +6 ( inlet { @@ -35,6 +35,19 @@ FoamFile nFaces 25; startFace 10100; } + baffles + { + type wall; + nFaces 0; + startFace 10125; + } + fan + { + type cyclic; + nFaces 0; + startFace 10125; + featureCos 0.9; + } defaultFaces { type wall; diff --git a/tutorials/incompressible/pimpleFoam/t-junction/selectBaffles.setSet b/tutorials/incompressible/pimpleFoam/t-junction/selectBaffles.setSet new file mode 100644 index 0000000000..b3e31fc713 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction/selectBaffles.setSet @@ -0,0 +1,4 @@ +faceSet baffleFaces new boxToFace (0.099 -10 -10)(0.101 10 10) +# Remove the centre faces that become fan +faceSet baffleFaces delete boxToFace (0.099 -0.006 0.004)(0.101 0.006 0.016) +faceZoneSet baffleFaces new setToFaceZone baffleFaces diff --git a/tutorials/incompressible/pimpleFoam/t-junction/selectCyclics.setSet b/tutorials/incompressible/pimpleFoam/t-junction/selectCyclics.setSet new file mode 100644 index 0000000000..4dc1033bd2 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction/selectCyclics.setSet @@ -0,0 +1,3 @@ +faceSet cyclicFaces new boxToFace (0.099 -0.006 0.004)(0.101 0.006 0.016) +cellSet cyclicFacesSlaveCells new boxToCell (-10 -10 -10)(0.1 10 10) +faceZoneSet cyclicFaces new setsToFaceZone cyclicFaces cyclicFacesSlaveCells diff --git a/tutorials/incompressible/pimpleFoam/t-junction/system/controlDict b/tutorials/incompressible/pimpleFoam/t-junction/system/controlDict index 14ca5f3091..a966fe894b 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/system/controlDict +++ b/tutorials/incompressible/pimpleFoam/t-junction/system/controlDict @@ -15,6 +15,8 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +libs ("libOpenFOAM.so" "libincompressibleTurbulenceModel.so" "libincompressibleRASModels.so"); + application pimpleFoam; startFrom startTime; @@ -37,7 +39,7 @@ writeFormat ascii; writePrecision 6; -writeCompression off; +writeCompression uncompressed; timeFormat general; From a17daf7fcc9c28893bcd875c0397841125440760 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 16 Apr 2010 15:22:11 +0200 Subject: [PATCH 18/41] ENH: improve robustness and usability of Switch - add operator=(const switchType) to avoid this type of problem: Switch sw; sw = Switch::asEnum("foo", true); if (sw) ... // evaluated incorrectly - add constructor Switch(const switchType) for convenience - add valid() method to avoid using the switchType directly --- src/OpenFOAM/primitives/bools/Switch/Switch.H | 32 ++++++++++++++++--- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/src/OpenFOAM/primitives/bools/Switch/Switch.H b/src/OpenFOAM/primitives/bools/Switch/Switch.H index 2a4e22f227..d36258c8f1 100644 --- a/src/OpenFOAM/primitives/bools/Switch/Switch.H +++ b/src/OpenFOAM/primitives/bools/Switch/Switch.H @@ -141,6 +141,12 @@ public: switch_(Switch::FALSE) {} + //- Construct from enumerated value + Switch(const switchType value) + : + switch_(value) + {} + //- Construct from bool Switch(const bool value) : @@ -154,15 +160,17 @@ public: {} //- Construct from std::string, string, word - Switch(const std::string& value) + // Optionally allow bad words, and catch the error elsewhere + Switch(const std::string& value, const bool allowInvalid=false) : - switch_(asEnum(value)) + switch_(asEnum(value, allowInvalid)) {} //- Construct from character array - Switch(const char* value) + // Optionally allow bad words, and catch the error elsewhere + Switch(const char* value, const bool allowInvalid=false) : - switch_(asEnum(std::string(value))) + switch_(asEnum(std::string(value, allowInvalid))) {} //- Construct from Istream @@ -178,6 +186,15 @@ public: ); + // Member Functions + + //- Return true if the Switch has a valid value + bool valid() const + { + return switch_ <= Switch::NONE; + } + + // Member Operators //- Conversion to bool @@ -186,6 +203,13 @@ public: return (switch_ & 0x1); } + //- Assignment from enumerated value + const Switch& operator=(const switchType sw) + { + switch_ = sw; + return *this; + } + //- Assignment from bool const Switch& operator=(const bool b) { From ad1f99ff71d35250291fd911295a8f7ad3ac09a7 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 16 Apr 2010 15:43:28 +0200 Subject: [PATCH 19/41] BUG: IOstream::compressionEnum() used Switch::switchType incorrectly - use enhanced Switch constructor and the new valid() method to avoid potential pitfalls of using Switch::switchType directly. --- src/OpenFOAM/db/IOstreams/IOstreams/IOstream.C | 4 ++-- src/OpenFOAM/primitives/bools/Switch/Switch.C | 3 +-- src/OpenFOAM/primitives/bools/Switch/SwitchIO.C | 12 ++++++------ 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.C b/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.C index 478080a099..90b8613b83 100644 --- a/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.C +++ b/src/OpenFOAM/db/IOstreams/IOstreams/IOstream.C @@ -61,9 +61,9 @@ Foam::IOstream::compressionType Foam::IOstream::compressionEnum(const word& compression) { // get Switch (bool) value, but allow it to fail - Switch::switchType sw = Switch::asEnum(compression, true); + Switch sw(compression, true); - if (sw != Switch::INVALID) + if (sw.valid()) { return sw ? IOstream::COMPRESSED : IOstream::UNCOMPRESSED; } diff --git a/src/OpenFOAM/primitives/bools/Switch/Switch.C b/src/OpenFOAM/primitives/bools/Switch/Switch.C index 4def20a77c..f2f627dcbd 100644 --- a/src/OpenFOAM/primitives/bools/Switch/Switch.C +++ b/src/OpenFOAM/primitives/bools/Switch/Switch.C @@ -83,7 +83,7 @@ Foam::Switch::switchType Foam::Switch::asEnum << abort(FatalError); } - return INVALID; + return Switch::INVALID; } @@ -115,7 +115,6 @@ bool Foam::Switch::asBool return false; } - return (sw & 0x1); } diff --git a/src/OpenFOAM/primitives/bools/Switch/SwitchIO.C b/src/OpenFOAM/primitives/bools/Switch/SwitchIO.C index f55b49bc91..69614cf442 100644 --- a/src/OpenFOAM/primitives/bools/Switch/SwitchIO.C +++ b/src/OpenFOAM/primitives/bools/Switch/SwitchIO.C @@ -53,9 +53,13 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s) else if (t.isWord()) { // allow invalid values, but catch after for correct error message - Switch::switchType sw = Switch::asEnum(t.wordToken(), true); + Switch sw(t.wordToken(), true); - if (sw == Switch::INVALID) + if (sw.valid()) + { + s.switch_ = sw.switch_; + } + else { is.setBad(); FatalIOErrorIn("operator>>(Istream&, Switch&)", is) @@ -64,10 +68,6 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s) return is; } - else - { - s.switch_ = sw; - } } else { From 2599c9e1c13775fd32ff23413895f212e1fa2490 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Fri, 16 Apr 2010 16:57:14 +0200 Subject: [PATCH 20/41] ENH: make Switch implementation more opaque to protect against user mistakes --- src/OpenFOAM/primitives/bools/Switch/Switch.C | 70 +++---------- src/OpenFOAM/primitives/bools/Switch/Switch.H | 97 +++++++------------ .../primitives/bools/Switch/SwitchIO.C | 8 +- src/OpenFOAM/primitives/bools/bool/boolIO.C | 10 +- 4 files changed, 61 insertions(+), 124 deletions(-) diff --git a/src/OpenFOAM/primitives/bools/Switch/Switch.C b/src/OpenFOAM/primitives/bools/Switch/Switch.C index f2f627dcbd..0b87ca6e27 100644 --- a/src/OpenFOAM/primitives/bools/Switch/Switch.C +++ b/src/OpenFOAM/primitives/bools/Switch/Switch.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -44,23 +44,17 @@ const char* Foam::Switch::names[Foam::Switch::INVALID+1] = // * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * // -Foam::Switch::switchType Foam::Switch::asEnum(const bool b) -{ - return b ? Switch::TRUE : Switch::FALSE; -} - - Foam::Switch::switchType Foam::Switch::asEnum ( const std::string& str, const bool allowInvalid ) { - for (int sw = 0; sw < Switch::INVALID; sw++) + for (int sw = 0; sw < Switch::INVALID; ++sw) { if (str == names[sw]) { - // convert n/y to no/yes (perhaps should deprecate y/n) + // convert n/y to no/yes - perhaps should deprecate y/n if (sw == Switch::NO_1 || sw == Switch::NONE) { return Switch::NO; @@ -78,7 +72,7 @@ Foam::Switch::switchType Foam::Switch::asEnum if (!allowInvalid) { - FatalErrorIn("Switch::asEnum(const std::string&)") + FatalErrorIn("Switch::asEnum(const std::string&, const bool)") << "unknown switch word " << str << nl << abort(FatalError); } @@ -87,50 +81,6 @@ Foam::Switch::switchType Foam::Switch::asEnum } -bool Foam::Switch::asBool(const switchType sw) -{ - // relies on (INVALID & 0x1) evaluating to false - return (sw & 0x1); -} - - -bool Foam::Switch::asBool -( - const std::string& str, - const bool allowInvalid -) -{ - // allow invalid values, but catch after for correct error message - switchType sw = asEnum(str, true); - - if (sw == Switch::INVALID) - { - if (!allowInvalid) - { - FatalErrorIn("Switch::asBool(const std::string&)") - << "unknown switch word " << str << nl - << abort(FatalError); - } - - return false; - } - - return (sw & 0x1); -} - - -const char* Foam::Switch::asText(const bool b) -{ - return b ? names[Switch::TRUE] : names[Switch::FALSE]; -} - - -const char* Foam::Switch::asText(const switchType sw) -{ - return names[sw]; -} - - Foam::Switch Foam::Switch::lookupOrAddToDict ( const word& name, @@ -144,6 +94,18 @@ Foam::Switch Foam::Switch::lookupOrAddToDict // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // +bool Foam::Switch::valid() const +{ + return switch_ <= Switch::NONE; +} + + +const char* Foam::Switch::asText() const +{ + return names[switch_]; +} + + bool Foam::Switch::readIfPresent(const word& name, const dictionary& dict) { return dict.readIfPresent(name, *this); diff --git a/src/OpenFOAM/primitives/bools/Switch/Switch.H b/src/OpenFOAM/primitives/bools/Switch/Switch.H index d36258c8f1..e68be1a2de 100644 --- a/src/OpenFOAM/primitives/bools/Switch/Switch.H +++ b/src/OpenFOAM/primitives/bools/Switch/Switch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,11 +48,11 @@ namespace Foam // Forward declaration of friend functions and operators class Switch; +class dictionary; Istream& operator>>(Istream&, Switch&); Ostream& operator<<(Ostream&, const Switch&); -class dictionary; /*---------------------------------------------------------------------------*\ Class Switch Declaration @@ -60,8 +60,6 @@ class dictionary; class Switch { -private: - // Private data //- The logic and enumerated text representation stored as a single byte @@ -71,19 +69,21 @@ public: // Public data types + // avoid issues with pre-processor defines + #undef FALSE + #undef TRUE + #undef OFF + #undef ON + #undef NO + #undef YES + #undef NO_1 + #undef YES_1 + #undef NONE + #undef PLACEHOLDER + #undef INVALID + //- The various text representations for a switch value. // These also correspond to the entries in names. -# undef FALSE -# undef TRUE -# undef OFF -# undef ON -# undef NO -# undef YES -# undef NO_1 -# undef YES_1 -# undef NONE -# undef PLACEHOLDER -# undef INVALID enum switchType { FALSE = 0, TRUE = 1, @@ -94,7 +94,6 @@ public: INVALID }; - // Static data members //- The set of names corresponding to the switchType enumeration @@ -102,36 +101,15 @@ public: static const char* names[INVALID+1]; +private: + // Static Member Functions - //- Return a switchType representation of a bool - static switchType asEnum(const bool); - //- Return a switchType representation of a word - // Optionally allow bad words, and catch the error elsewhere - static switchType asEnum - ( - const std::string&, - const bool allowInvalid=false - ); + static switchType asEnum(const std::string&, const bool allowInvalid); - //- Return a bool representation of a switchType - static bool asBool(const switchType); - - //- Return a bool representation of a word - // Optionally allow bad words, and catch the error elsewhere - static bool asBool - ( - const std::string&, - const bool allowInvalid=false - ); - - //- Return a text representation of a bool value - static const char* asText(const bool); - - //- Return a text representation of a switchType - static const char* asText(const switchType); +public: // Constructors @@ -142,35 +120,35 @@ public: {} //- Construct from enumerated value - Switch(const switchType value) + Switch(const switchType sw) : - switch_(value) + switch_(sw) {} //- Construct from bool - Switch(const bool value) + Switch(const bool b) : - switch_(asEnum(value)) + switch_(b ? Switch::TRUE : Switch::FALSE) {} //- Construct from integer values (treats integer as bool value) - Switch(const int value) + Switch(const int i) : - switch_(asEnum(bool(value))) + switch_(i ? Switch::TRUE : Switch::FALSE) {} //- Construct from std::string, string, word // Optionally allow bad words, and catch the error elsewhere - Switch(const std::string& value, const bool allowInvalid=false) + Switch(const std::string& str, const bool allowInvalid=false) : - switch_(asEnum(value, allowInvalid)) + switch_(asEnum(str, allowInvalid)) {} //- Construct from character array // Optionally allow bad words, and catch the error elsewhere - Switch(const char* value, const bool allowInvalid=false) + Switch(const char* str, const bool allowInvalid=false) : - switch_(asEnum(std::string(value, allowInvalid))) + switch_(asEnum(std::string(str), allowInvalid)) {} //- Construct from Istream @@ -189,10 +167,13 @@ public: // Member Functions //- Return true if the Switch has a valid value - bool valid() const - { - return switch_ <= Switch::NONE; - } + bool valid() const; + + //- Return a text representation of the Switch + const char* asText() const; + + //- Update the value of the Switch if it is found in the dictionary + bool readIfPresent(const word&, const dictionary&); // Member Operators @@ -218,12 +199,6 @@ public: } - // Member fuctions - - //- Update the value of the Switch if it is found in the dictionary - bool readIfPresent(const word&, const dictionary&); - - // IOstream Operators friend Istream& operator>>(Istream&, Switch&); diff --git a/src/OpenFOAM/primitives/bools/Switch/SwitchIO.C b/src/OpenFOAM/primitives/bools/Switch/SwitchIO.C index 69614cf442..cf217ba468 100644 --- a/src/OpenFOAM/primitives/bools/Switch/SwitchIO.C +++ b/src/OpenFOAM/primitives/bools/Switch/SwitchIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -48,7 +48,7 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s) if (t.isLabel()) { - s.switch_ = Switch::asEnum(bool(t.labelToken())); + s = bool(t.labelToken()); } else if (t.isWord()) { @@ -57,12 +57,12 @@ Foam::Istream& Foam::operator>>(Istream& is, Switch& s) if (sw.valid()) { - s.switch_ = sw.switch_; + s = sw; } else { is.setBad(); - FatalIOErrorIn("operator>>(Istream&, Switch&)", is) + FatalIOErrorIn("operator>>(Istream&, bool/Switch&)", is) << "expected 'true/false', 'on/off' ... found " << t.wordToken() << exit(FatalIOError); diff --git a/src/OpenFOAM/primitives/bools/bool/boolIO.C b/src/OpenFOAM/primitives/bools/bool/boolIO.C index 607a2437e4..88b5139f32 100644 --- a/src/OpenFOAM/primitives/bools/bool/boolIO.C +++ b/src/OpenFOAM/primitives/bools/bool/boolIO.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 1991-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 1991-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -50,7 +50,7 @@ Foam::Istream& Foam::operator>>(Istream& is, bool& b) Foam::Ostream& Foam::operator<<(Ostream& os, const bool b) { // we could also write as text string without any difficulty - // os << Switch::asText(b); + // os << (b ? "true" : "false"); os.write(label(b)); os.check("Ostream& operator<<(Ostream&, const bool)"); return os; @@ -59,10 +59,10 @@ Foam::Ostream& Foam::operator<<(Ostream& os, const bool b) bool Foam::readBool(Istream& is) { - bool val; - is >> val; + bool b; + is >> b; - return val; + return b; } From 1c7d6c1b2cd165623af29903dee35a1955027a03 Mon Sep 17 00:00:00 2001 From: mattijs Date: Fri, 16 Apr 2010 16:51:25 +0100 Subject: [PATCH 21/41] ENH: Restored old t-junction case. Renamed baffle case to t-junction-with-baffle --- .../pimpleFoam/t-junction-with-fan/0/U | 59 +++++++++ .../pimpleFoam/t-junction-with-fan/0/epsilon | 61 +++++++++ .../pimpleFoam/t-junction-with-fan/0/k | 62 +++++++++ .../pimpleFoam/t-junction-with-fan/0/nuTilda | 52 ++++++++ .../pimpleFoam/t-junction-with-fan/0/nut | 59 +++++++++ .../pimpleFoam/t-junction-with-fan/0/p | 69 ++++++++++ .../Allrun | 0 .../pimpleFoam/t-junction-with-fan/README.txt | 3 + .../constant/RASProperties | 25 ++++ .../t-junction-with-fan/constant/p0vsTime | 4 + .../constant/polyMesh/blockMeshDict | 119 ++++++++++++++++++ .../constant/polyMesh/boundary | 0 .../constant/transportProperties | 39 ++++++ .../constant/turbulenceProperties | 20 +++ .../selectBaffles.setSet | 0 .../selectCyclics.setSet | 0 .../t-junction-with-fan/system/controlDict | 86 +++++++++++++ .../t-junction-with-fan/system/fvSchemes | 71 +++++++++++ .../t-junction-with-fan/system/fvSolution | 94 ++++++++++++++ .../incompressible/pimpleFoam/t-junction/0/U | 19 +-- .../pimpleFoam/t-junction/0/epsilon | 16 +-- .../incompressible/pimpleFoam/t-junction/0/k | 15 +-- .../pimpleFoam/t-junction/0/nuTilda | 10 +- .../pimpleFoam/t-junction/0/nut | 11 +- .../incompressible/pimpleFoam/t-junction/0/p | 18 +-- .../pimpleFoam/t-junction/README.txt | 3 +- .../constant/polyMesh/blockMeshDict | 6 - 27 files changed, 840 insertions(+), 81 deletions(-) create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/U create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/epsilon create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/k create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/nuTilda create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/nut create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/p rename tutorials/incompressible/pimpleFoam/{t-junction => t-junction-with-fan}/Allrun (100%) create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/README.txt create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/RASProperties create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/p0vsTime create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/polyMesh/blockMeshDict rename tutorials/incompressible/pimpleFoam/{t-junction => t-junction-with-fan}/constant/polyMesh/boundary (100%) create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/transportProperties create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/turbulenceProperties rename tutorials/incompressible/pimpleFoam/{t-junction => t-junction-with-fan}/selectBaffles.setSet (100%) rename tutorials/incompressible/pimpleFoam/{t-junction => t-junction-with-fan}/selectCyclics.setSet (100%) create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/controlDict create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/fvSchemes create mode 100644 tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/fvSolution diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/U b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/U new file mode 100644 index 0000000000..8b3863aff9 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/U @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volVectorField; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + inlet + { + type pressureInletOutletVelocity; + value uniform (0 0 0); + } + + outlet1 + { + type inletOutlet; + inletValue uniform (0 0 0); + value uniform (0 0 0); + } + + outlet2 + { + type inletOutlet; + inletValue uniform (0 0 0); + value uniform (0 0 0); + } + baffles + { + type fixedValue; + value uniform ( 0 0 0 ); + } + fan + { + type cyclic; + value uniform ( 0 0 0 ); + } + defaultFaces + { + type fixedValue; + value uniform (0 0 0); + } +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/epsilon b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/epsilon new file mode 100644 index 0000000000..35ddfed661 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/epsilon @@ -0,0 +1,61 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -3 0 0 0 0 ]; + +internalField uniform 1; + +boundaryField +{ + inlet + { + type turbulentMixingLengthDissipationRateInlet; + mixingLength 0.01; // 1cm - half channel height + value uniform 1; + } + outlet1 + { + type inletOutlet; + inletValue uniform 1; + value uniform 1; + } + + outlet2 + { + type inletOutlet; + inletValue uniform 1; + value uniform 1; + } + baffles + { + type epsilonWallFunction; + value uniform 1; + } + fan + { + type cyclic; + value uniform 1; + } + defaultFaces + { + type epsilonWallFunction; + value uniform 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/k b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/k new file mode 100644 index 0000000000..e87a5855d2 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/k @@ -0,0 +1,62 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -2 0 0 0 0 ]; + +internalField uniform 1; + +boundaryField +{ + inlet + { + type turbulentIntensityKineticEnergyInlet; + intensity 0.05; // 5% turbulent intensity + value uniform 1; + } + outlet1 + { + type inletOutlet; + inletValue uniform 1; + value uniform 1; + } + + outlet2 + { + type inletOutlet; + inletValue uniform 1; + value uniform 1; + } + baffles + { + type kqRWallFunction; + value uniform 1; + } + fan + { + type cyclic; + value uniform 1; + } + + defaultFaces + { + type kqRWallFunction; + value uniform 1; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/nuTilda b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/nuTilda new file mode 100644 index 0000000000..ff51eab08c --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/nuTilda @@ -0,0 +1,52 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object nuTilda; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -1 0 0 0 0]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet1 + { + type zeroGradient; + } + + outlet2 + { + type zeroGradient; + } + baffles + { + type zeroGradient; + } + fan + { + type cyclic; + value uniform 0; + } + defaultFaces + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/nut b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/nut new file mode 100644 index 0000000000..570f1f90ac --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/nut @@ -0,0 +1,59 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + location "0"; + object nut; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [ 0 2 -1 0 0 0 0 ]; + +internalField uniform 0; + +boundaryField +{ + inlet + { + type calculated; + value uniform 0; + } + + outlet1 + { + type calculated; + value uniform 0; + } + + outlet2 + { + type calculated; + value uniform 0; + } + baffles + { + type nutkWallFunction; + value uniform 0; + } + fan + { + type cyclic; + value uniform 0; + } + defaultFaces + { + type nutkWallFunction; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/p b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/p new file mode 100644 index 0000000000..d9873e5b7a --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/0/p @@ -0,0 +1,69 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class volScalarField; + object p; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform 100000; + +boundaryField +{ + inlet + { + //type totalPressure; + //p0 uniform 100040; + + type timeVaryingTotalPressure; + p0 100040; // only used for restarts + outOfBounds clamp; + fileName "$FOAM_CASE/constant/p0vsTime"; + + U U; + phi phi; + rho none; + psi none; + gamma 1; + value uniform 100040; + } + + outlet1 + { + type fixedValue; + value uniform 100010; + } + + outlet2 + { + type fixedValue; + value uniform 100000; + } + baffles + { + type zeroGradient; + } + fan + { + type fan; + patchType cyclic; + f 2 ( 50 -0.1 ); + value uniform 100000; + } + defaultFaces + { + type zeroGradient; + } +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction/Allrun b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/Allrun similarity index 100% rename from tutorials/incompressible/pimpleFoam/t-junction/Allrun rename to tutorials/incompressible/pimpleFoam/t-junction-with-fan/Allrun diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/README.txt b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/README.txt new file mode 100644 index 0000000000..fd3f970be5 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/README.txt @@ -0,0 +1,3 @@ +300-04-16 T-junction with baffles and fan. +Inlet on left, one outlet at bottom, one at top. +To test multiple outlets. diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/RASProperties b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/RASProperties new file mode 100644 index 0000000000..81b1ec9115 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/RASProperties @@ -0,0 +1,25 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object RASProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +RASModel kEpsilon; + +turbulence on; + +printCoeffs on; + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/p0vsTime b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/p0vsTime new file mode 100644 index 0000000000..a9ee6bb3e7 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/p0vsTime @@ -0,0 +1,4 @@ +( + (0 100010) + (1 100040) +) diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/polyMesh/blockMeshDict b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000..5e97f00deb --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/polyMesh/blockMeshDict @@ -0,0 +1,119 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + object blockMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// outlet1 +// +-+ +// | | +// | | +// | | +// | | +// +-----------+ | +// |inlet | +// +-----------+ | +// | | +// | | +// | | +// | | +// +-+ +// outlet2 + +convertToMeters 1; + +vertices +( + (0.0 -0.01 0) //0 + (0.2 -0.01 0) + (0.2 0.01 0) //2 + (0.0 0.01 0) + + (0.22 -0.01 0) //4 + (0.22 0.01 0) + + (0.2 -0.21 0) //6 + (0.22 -0.21 0) + + (0.2 0.21 0) //8 + (0.22 0.21 0) + + // Z + (0.0 -0.01 0.02) //0 + (0.2 -0.01 0.02) + (0.2 0.01 0.02) //2 + (0.0 0.01 0.02) + + (0.22 -0.01 0.02) //4 + (0.22 0.01 0.02) + + (0.2 -0.21 0.02) //6 + (0.22 -0.21 0.02) + + (0.2 0.21 0.02) //8 + (0.22 0.21 0.02) + +); + +blocks +( + // inlet block + hex (0 1 2 3 10 11 12 13) (50 5 5) simpleGrading (1 1 1) + + // central block + hex (1 4 5 2 11 14 15 12) (5 5 5) simpleGrading (1 1 1) + + // bottom block + hex (6 7 4 1 16 17 14 11) (5 50 5) simpleGrading (1 1 1) + + // top block + hex (2 5 9 8 12 15 19 18) (5 50 5) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + patch inlet + ( + (0 10 13 3) + ) + + patch outlet1 + ( + (6 7 17 16) + ) + + patch outlet2 + ( + (8 18 19 9) + ) + + wall baffles + () + + cyclic fan + () + + wall defaultFaces + () + +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/boundary b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/polyMesh/boundary similarity index 100% rename from tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/boundary rename to tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/polyMesh/boundary diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/transportProperties b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/transportProperties new file mode 100644 index 0000000000..36e9669391 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/transportProperties @@ -0,0 +1,39 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object transportProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +transportModel Newtonian; + +nu nu [ 0 2 -1 0 0 0 0 ] 1e-05; + +CrossPowerLawCoeffs +{ + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + m m [ 0 0 1 0 0 0 0 ] 1; + n n [ 0 0 0 0 0 0 0 ] 1; +} + +BirdCarreauCoeffs +{ + nu0 nu0 [ 0 2 -1 0 0 0 0 ] 1e-06; + nuInf nuInf [ 0 2 -1 0 0 0 0 ] 1e-06; + k k [ 0 0 1 0 0 0 0 ] 0; + n n [ 0 0 0 0 0 0 0 ] 1; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/turbulenceProperties b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/turbulenceProperties new file mode 100644 index 0000000000..70e87dd27b --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/constant/turbulenceProperties @@ -0,0 +1,20 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "constant"; + object turbulenceProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +simulationType RASModel; + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction/selectBaffles.setSet b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/selectBaffles.setSet similarity index 100% rename from tutorials/incompressible/pimpleFoam/t-junction/selectBaffles.setSet rename to tutorials/incompressible/pimpleFoam/t-junction-with-fan/selectBaffles.setSet diff --git a/tutorials/incompressible/pimpleFoam/t-junction/selectCyclics.setSet b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/selectCyclics.setSet similarity index 100% rename from tutorials/incompressible/pimpleFoam/t-junction/selectCyclics.setSet rename to tutorials/incompressible/pimpleFoam/t-junction-with-fan/selectCyclics.setSet diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/controlDict b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/controlDict new file mode 100644 index 0000000000..a966fe894b --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/controlDict @@ -0,0 +1,86 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +libs ("libOpenFOAM.so" "libincompressibleTurbulenceModel.so" "libincompressibleRASModels.so"); + +application pimpleFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 1; + +deltaT 0.001; + +writeControl adjustableRunTime; + +writeInterval 0.1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep yes; + +maxCo 5; + +functions +{ + probes + { + // Where to load it from + functionObjectLibs ( "libsampling.so" ); + + type probes; + + // Name of the directory for probe data + name probes; + + // Write at same frequency as fields + outputControl outputTime; + outputInterval 1; + + // Fields to be probed + fields + ( + p U + ); + + probeLocations + ( + ( 1e-06 0 0.01 ) // at inlet + ( 0.21 -0.20999 0.01 ) // at outlet1 + ( 0.21 0.20999 0.01 ) // at outlet2 + ( 0.21 0 0.01 ) // at central block + ); + } +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/fvSchemes b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/fvSchemes new file mode 100644 index 0000000000..6b14062252 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/fvSchemes @@ -0,0 +1,71 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; + grad(U) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss limitedLinearV 1; + div(phi,k) Gauss limitedLinear 1; + div(phi,epsilon) Gauss limitedLinear 1; + div(phi,R) Gauss limitedLinear 1; + div(R) Gauss linear; + div(phi,nuTilda) Gauss limitedLinear 1; + div((nuEff*dev(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default none; + laplacian(nuEff,U) Gauss linear corrected; + laplacian((1|A(U)),p) Gauss linear corrected; + laplacian(DkEff,k) Gauss linear corrected; + laplacian(DepsilonEff,epsilon) Gauss linear corrected; + laplacian(DREff,R) Gauss linear corrected; + laplacian(DnuTildaEff,nuTilda) Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; + interpolate(U) linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p ; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/fvSolution b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/fvSolution new file mode 100644 index 0000000000..5a9f970576 --- /dev/null +++ b/tutorials/incompressible/pimpleFoam/t-junction-with-fan/system/fvSolution @@ -0,0 +1,94 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-06; + relTol 0.01; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + pFinal + { + solver GAMG; + tolerance 1e-06; + relTol 0; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } + + U + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0.1; + } + + UFinal + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + k + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } + + epsilon + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-05; + relTol 0; + } +} + +PIMPLE +{ + nOuterCorrectors 2; + nCorrectors 2; + nNonOrthogonalCorrectors 0; + pRefCell 0; + pRefValue 0; +} + +relaxationFactors +{ + U 1; + k 1; + epsilon 1; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/U b/tutorials/incompressible/pimpleFoam/t-junction/0/U index 8b3863aff9..937d3966b2 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/U +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/U @@ -20,36 +20,27 @@ internalField uniform (0 0 0); boundaryField { - inlet + inlet { type pressureInletOutletVelocity; value uniform (0 0 0); } - outlet1 + outlet1 { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } - outlet2 + outlet2 { type inletOutlet; inletValue uniform (0 0 0); value uniform (0 0 0); } - baffles - { - type fixedValue; - value uniform ( 0 0 0 ); - } - fan - { - type cyclic; - value uniform ( 0 0 0 ); - } - defaultFaces + + defaultFaces { type fixedValue; value uniform (0 0 0); diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/epsilon b/tutorials/incompressible/pimpleFoam/t-junction/0/epsilon index 35ddfed661..98515b441d 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/epsilon +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/epsilon @@ -27,33 +27,23 @@ boundaryField mixingLength 0.01; // 1cm - half channel height value uniform 1; } + outlet1 { type inletOutlet; inletValue uniform 1; - value uniform 1; } outlet2 { type inletOutlet; inletValue uniform 1; - value uniform 1; - } - baffles - { - type epsilonWallFunction; - value uniform 1; - } - fan - { - type cyclic; - value uniform 1; } + defaultFaces { type epsilonWallFunction; - value uniform 1; + value uniform 0; } } diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/k b/tutorials/incompressible/pimpleFoam/t-junction/0/k index e87a5855d2..35f4e42f32 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/k +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/k @@ -27,34 +27,23 @@ boundaryField intensity 0.05; // 5% turbulent intensity value uniform 1; } + outlet1 { type inletOutlet; inletValue uniform 1; - value uniform 1; } outlet2 { type inletOutlet; inletValue uniform 1; - value uniform 1; - } - baffles - { - type kqRWallFunction; - value uniform 1; - } - fan - { - type cyclic; - value uniform 1; } defaultFaces { type kqRWallFunction; - value uniform 1; + value uniform 0; } } diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/nuTilda b/tutorials/incompressible/pimpleFoam/t-junction/0/nuTilda index ff51eab08c..fe8744b398 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/nuTilda +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/nuTilda @@ -34,15 +34,7 @@ boundaryField { type zeroGradient; } - baffles - { - type zeroGradient; - } - fan - { - type cyclic; - value uniform 0; - } + defaultFaces { type zeroGradient; diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/nut b/tutorials/incompressible/pimpleFoam/t-junction/0/nut index 570f1f90ac..b4a42336aa 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/nut +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/nut @@ -38,16 +38,7 @@ boundaryField type calculated; value uniform 0; } - baffles - { - type nutkWallFunction; - value uniform 0; - } - fan - { - type cyclic; - value uniform 0; - } + defaultFaces { type nutkWallFunction; diff --git a/tutorials/incompressible/pimpleFoam/t-junction/0/p b/tutorials/incompressible/pimpleFoam/t-junction/0/p index d9873e5b7a..93170d7a0c 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/0/p +++ b/tutorials/incompressible/pimpleFoam/t-junction/0/p @@ -20,7 +20,7 @@ internalField uniform 100000; boundaryField { - inlet + inlet { //type totalPressure; //p0 uniform 100040; @@ -38,28 +38,18 @@ boundaryField value uniform 100040; } - outlet1 + outlet1 { type fixedValue; value uniform 100010; } - outlet2 + outlet2 { type fixedValue; value uniform 100000; } - baffles - { - type zeroGradient; - } - fan - { - type fan; - patchType cyclic; - f 2 ( 50 -0.1 ); - value uniform 100000; - } + defaultFaces { type zeroGradient; diff --git a/tutorials/incompressible/pimpleFoam/t-junction/README.txt b/tutorials/incompressible/pimpleFoam/t-junction/README.txt index fd3f970be5..0905f8784d 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/README.txt +++ b/tutorials/incompressible/pimpleFoam/t-junction/README.txt @@ -1,3 +1,2 @@ -300-04-16 T-junction with baffles and fan. -Inlet on left, one outlet at bottom, one at top. +15/8/8 Simple T-junction. Inlet on left, one outlet at bottom, one at top. To test multiple outlets. diff --git a/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict b/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict index 5e97f00deb..7f78827df0 100644 --- a/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/pimpleFoam/t-junction/constant/polyMesh/blockMeshDict @@ -101,12 +101,6 @@ patches (8 18 19 9) ) - wall baffles - () - - cyclic fan - () - wall defaultFaces () From 9707e5c100f1de7370633c23fcecb59769b2829b Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Mon, 19 Apr 2010 10:54:23 +0200 Subject: [PATCH 22/41] ENH: "wmake all" makes 'libso' instead of 'exe' where appropriate - adds more DWIM (do what I mean) intelligence to wmake ENH: use ~/.OpenFOAM/.wmake instead of ~/.wmakeScheduler for the lock dir - keeps more of the OpenFOAM bits together --- wmake/wclean | 34 ++++++++++++++----------------- wmake/wmake | 44 +++++++++++++++++++++-------------------- wmake/wmakeLnIncludeAll | 6 +++--- wmake/wmakeScheduler | 3 +-- 4 files changed, 42 insertions(+), 45 deletions(-) diff --git a/wmake/wclean b/wmake/wclean index 80c189dbb3..6595352a98 100755 --- a/wmake/wclean +++ b/wmake/wclean @@ -46,12 +46,10 @@ Clean up the wmake control directory Make/\$WM_OPTIONS and remove the lnInclude directories generated for libraries. The targets correspond to a subset of the 'wmake' special targets: - all all subdirectories - (NB: any Allwclean or Allclean files will be used if they exist) - exe clean dir/Make - lib clean dir/Make and dir/lnInclude - libo clean dir/Make and dir/lnInclude - libso clean dir/Make and dir/lnInclude + all all subdirectories, uses any Allwclean or Allclean + files if they exist + exe | lib | libo | libso + clean Make, any *.dep files and lnInclude directories USAGE exit 1 @@ -122,20 +120,21 @@ then exit 0 fi - # This is the end of the recursion down the application directories tree - # so remove the "all" option so that the call to make builds the application - makeOption= fi +# makeOption is not needed beyond this point +unset makeOption + + #------------------------------------------------------------------------------ -# Check the existance of the Make directory +# Require the existence of the 'Make' directory #------------------------------------------------------------------------------ -if [ ! -d $MakeDir ] -then +[ -d $MakeDir ] || { echo "$Script error: '$MakeDir' directory does not exist" 1>&2 exit 1 -fi +} + # ----------------------------------------------------------------------------- @@ -143,13 +142,10 @@ rm -rf $MakeDir/$WM_OPTIONS $MakeDir/classes 2>/dev/null find . -name "*.dep" -exec rm {} \; -case "$makeOption" in -lib | libo | libso ) - rm -rf lnInclude 2>/dev/null - ;; -esac +# always safe to remove lnInclude +rm -rf lnInclude 2>/dev/null rm -rf ii_files Templates.DB 2>/dev/null -rm -f so_locations +rm -f so_locations 2>/dev/null #------------------------------------------------------------------------------ diff --git a/wmake/wmake b/wmake/wmake index 4086453554..faa6871340 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -44,16 +44,15 @@ options: A general, easy-to-use make system for multi-platform development The 'target' is a Makefile target: - e.g., Make/linux64GccDPOpt/fvMesh.o + e.g., Make/linux64GccDPOpt/fvMesh.o or a special target: - all all subdirectories - (NB: any Allwmake files will be used if they exist) - exe build statically linked executable - lib build statically linked archive lib (.a) - libo build statically linked lib (.o) - libso build dynamically linked lib (.so) - jar build Java jar + all all subdirectories, uses any Allwmake files if they exist + exe build statically linked executable + lib build statically linked archive lib (.a) + libo build statically linked lib (.o) + libso build dynamically linked lib (.so) + jar build Java jar USAGE exit 1 @@ -104,7 +103,7 @@ if [ "$WM_NCOMPPROCS" ] then if [ "$WM_NCOMPPROCS" -gt 1 -a ! "$MAKEFLAGS" ] then - lockDir=$HOME/.wmakeScheduler + lockDir=$HOME/.$WM_PROJECT/.wmake if [ -d $lockDir ] then @@ -168,16 +167,11 @@ then $make -k -f $WM_DIR/MakefileApps FOAM_APPS="$FOAM_APPS" exit $? fi - - # This is the end of the recursion down the application directories tree - # so remove the "all" option so that the call to make builds the application - makeOption= fi #------------------------------------------------------------------------------ -# Check the existance of the Make directory and files file -# If both exist, make the wmake derived files +# Require the existence of the 'Make' directory and 'files' file #------------------------------------------------------------------------------ [ -d $MakeDir ] || { @@ -190,6 +184,18 @@ fi exit 1 } +# transform "all" option to "libso" if that looks appropriate or remove it +# so that the call to make builds the application +if [ "$makeOption" = all ] +then + unset makeOption + if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1 + then + makeOption=libso + fi +fi + + # Spawn a sub-shell and unset MAKEFLAGS in that sub-shell to avoid # files and options being built in parallel ( @@ -227,12 +233,8 @@ esac $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontIncludeDeps $OBJECTS_DIR/dependencies -retVal=$? -if [ $retVal -ne 0 ] -then - exit $retVal -fi - +rc=$? +[ $rc -eq 0 ] || exit $rc #------------------------------------------------------------------------------ # make the object files and link diff --git a/wmake/wmakeLnIncludeAll b/wmake/wmakeLnIncludeAll index cfcb6dab78..208c59ad12 100755 --- a/wmake/wmakeLnIncludeAll +++ b/wmake/wmakeLnIncludeAll @@ -78,12 +78,12 @@ do continue fi - find $checkDir -depth -type d -name Make -print | while read makeDir + find $checkDir -depth -type d -name Make -print | while read MakeDir do - topDir=${makeDir%/Make} # trim /Make from the end + topDir=${MakeDir%/Make} # trim /Make from the end if [ -d "$topDir" ] then - if grep -e '^ *LIB *=' "$makeDir/files" >/dev/null 2>&1 + if grep -e '^ *LIB *=' "$MakeDir/files" >/dev/null 2>&1 then wmakeLnInclude -f $topDir elif [ -d "$topDir/lnInclude" ] diff --git a/wmake/wmakeScheduler b/wmake/wmakeScheduler index b4b5ce1b80..be5f4ba58b 100755 --- a/wmake/wmakeScheduler +++ b/wmake/wmakeScheduler @@ -48,8 +48,7 @@ # eg, export WM_NCOMPPROCS=$(wmakeScheduler -count) # #------------------------------------------------------------------------------- -lockDir=$HOME/.wmakeScheduler - +lockDir=$HOME/.$WM_PROJECT/.wmake # fallback - 1 core on current host : ${WM_HOSTS:=$HOST:1} From 4437361674e47e9e574569b4bdc1377675933a81 Mon Sep 17 00:00:00 2001 From: henry Date: Mon, 19 Apr 2010 12:05:25 +0100 Subject: [PATCH 23/41] thermodynamicProperties: Added comment to explain the "normalisedGas" used. --- .../forwardStep/constant/thermophysicalProperties | 5 ++++- .../forwardStep/constant/thermodynamicProperties | 4 +++- .../laminar/forwardStep/constant/thermophysicalProperties | 7 +++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties index e2ad38ed54..89911f12d8 100644 --- a/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties +++ b/tutorials/compressible/rhoCentralFoam/forwardStep/constant/thermophysicalProperties @@ -15,8 +15,11 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType ePsiThermo>>>>; +// Note: these are the properties for a "normalised" inviscid gas +// for which the speed of sound is 1 m/s at a temperature of 1K +// and gamma = 7/5 mixture normalisedGas 1 11640.3 2.5 0 0 1; diff --git a/tutorials/compressible/rhoSonicFoam/forwardStep/constant/thermodynamicProperties b/tutorials/compressible/rhoSonicFoam/forwardStep/constant/thermodynamicProperties index 1d7d089e31..d014c6739f 100644 --- a/tutorials/compressible/rhoSonicFoam/forwardStep/constant/thermodynamicProperties +++ b/tutorials/compressible/rhoSonicFoam/forwardStep/constant/thermodynamicProperties @@ -15,8 +15,10 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// Note: these are the properties for a "normalised" inviscid gas +// for which the speed of sound is 1 m/s at a temperature of 1K +// and gamma = 7/5 Cv Cv [ 0 2 -2 -1 0 0 0 ] 1.78571; - R R [ 0 2 -2 -1 0 0 0 ] 0.714286; diff --git a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties b/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties index c504181d21..6558fda69e 100644 --- a/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties +++ b/tutorials/compressible/sonicFoam/laminar/forwardStep/constant/thermophysicalProperties @@ -15,9 +15,12 @@ FoamFile } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -thermoType ePsiThermo>>>>; +thermoType ePsiThermo>>>>; -mixture air 1 11640.31 1.78571 0 0 0.7; +// Note: these are the properties for a "normalised" inviscid gas +// for which the speed of sound is 1 m/s at a temperature of 1K +// and gamma = 7/5 +mixture normalisedGas 1 11640.31 2.5 0 0 1; // ************************************************************************* // From 5cfa97624eedd60d0d15fef4b9bfb685ababba44 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 20 Apr 2010 17:13:35 +0200 Subject: [PATCH 24/41] STYLE: more consistent New methods, use unregistered IOobject where appropriate --- .../dragModels/PDRDragModel/PDRDragModelNew.C | 14 ++- .../XiEqModels/XiEqModel/XiEqModelNew.C | 16 ++- .../XiModels/XiGModels/XiGModel/XiGModelNew.C | 16 ++- .../PDRFoam/XiModels/XiModel/XiModelNew.C | 16 ++- .../combustionModel/combustionModelNew.C | 18 +-- .../coalChemistryFoam/createFields.H | 2 +- .../createFields.H | 2 +- .../reactingParcelFilmFoam/createFields.H | 2 +- .../reactingParcelFoam/createFields.H | 2 +- .../phaseChangeTwoPhaseMixtureNew.C | 31 +++-- .../multiphase/settlingFoam/createFields.H | 2 +- .../dragModels/dragModel/dragModelNew.C | 24 ++-- .../conductivityModel/conductivityModelNew.C | 28 +++-- .../frictionalStressModelNew.C | 29 +++-- .../granularPressureModelNew.C | 28 +++-- .../radialModel/radialModel/radialModelNew.C | 29 +++-- .../viscosityModel/viscosityModelNew.C | 25 ++-- .../phaseModel/phaseModel/phaseModel.C | 3 +- .../star3ToFoam/createBoundaryFaces.C | 4 +- .../extrudeModel/extrudeModelNew.C | 24 ++-- .../mesh/manipulation/cellSet/cellSet.C | 5 +- .../mesh/manipulation/faceSet/faceSet.C | 5 +- .../mesh/manipulation/pointSet/pointSet.C | 5 +- .../mesh/manipulation/refineMesh/refineMesh.C | 2 +- .../decomposePar/decomposePar.C | 12 +- .../foamToFieldview9/calcFaceAddressing.C | 7 +- .../foamToGMV/readConversionProperties.H | 6 +- .../adiabaticFlameT/adiabaticFlameT.C | 2 +- .../equilibriumFlameT/equilibriumFlameT.C | 4 +- etc/codeTemplates/source/_Template.C | 3 +- src/ODE/ODESolvers/ODESolver/ODESolverNew.C | 7 +- src/OpenFOAM/db/IOobject/IOobjectReadHeader.C | 2 +- src/OpenFOAM/db/IOstreams/token/token.C | 3 +- src/OpenFOAM/db/Time/Time.C | 2 +- src/OpenFOAM/db/Time/TimeIO.C | 2 +- src/OpenFOAM/db/dictionary/dictionaryIO.C | 3 +- src/OpenFOAM/db/dictionary/entry/entryIO.C | 3 +- .../functionEntry/functionEntry.C | 4 +- .../functionObject/functionObject.C | 5 +- .../pointPatchField/pointPatchFieldNew.C | 32 +++-- src/OpenFOAM/graph/graph.C | 41 +++---- .../LUscalarMatrix/procLduInterface.C | 3 +- .../lduMatrix/lduMatrix/lduMatrixSmoother.C | 3 +- .../lduMatrix/lduMatrix/lduMatrixSolver.C | 5 +- .../GAMGAgglomeration/GAMGAgglomeration.C | 4 +- .../GAMGInterfaceFieldNew.C | 8 +- .../GAMGInterface/GAMGInterfaceNew.C | 5 +- src/OpenFOAM/matrices/tolerances/tolerances.C | 2 +- .../facePointPatch/facePointPatchNew.C | 14 +-- .../polyPatches/polyPatch/polyPatchNew.C | 16 +-- .../polyMesh/zones/cellZone/cellZoneNew.C | 11 +- .../polyMesh/zones/faceZone/faceZoneNew.C | 11 +- .../polyMesh/zones/pointZone/pointZoneNew.C | 11 +- .../meshes/primitiveShapes/plane/plane.C | 2 +- src/conversion/ensight/part/ensightPart.C | 8 +- .../dynamicFvMesh/dynamicFvMeshNew.C | 17 ++- .../solidBodyMotionFunctionNew.C | 18 +-- .../meshCut/cellLooper/cellLooper.C | 24 ++-- .../meshCut/directions/directions.C | 10 +- src/dynamicMesh/motionSolver/motionSolver.C | 11 +- .../polyMeshModifier/polyMeshModifierNew.C | 19 +-- .../engineMesh/engineMesh/engineMeshNew.C | 29 ++--- .../SRF/SRFModel/SRFModel/SRFModelNew.C | 44 +++---- .../fvPatchField/fvPatchFieldNew.C | 10 +- .../fvsPatchField/fvsPatchFieldNew.C | 10 +- .../convectionScheme/convectionScheme.C | 8 +- .../d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C | 4 +- .../ddtSchemes/ddtScheme/ddtScheme.C | 4 +- .../divSchemes/divScheme/divScheme.C | 5 +- .../gradSchemes/gradScheme/gradScheme.C | 4 +- .../laplacianScheme/laplacianScheme.C | 4 +- .../snGradSchemes/snGradScheme/snGradScheme.C | 6 +- .../fvMesh/fvPatches/fvPatch/fvPatchNew.C | 5 +- .../limitedSurfaceInterpolationScheme.C | 12 +- .../multivariateSurfaceInterpolationScheme.C | 4 +- .../surfaceInterpolationScheme.C | 12 +- .../motionDiffusivity/motionDiffusivity.C | 14 +-- src/lagrangian/basic/Cloud/CloudIO.C | 8 +- .../injector/injectorType/injectorType.C | 17 +-- src/lagrangian/dieselSpray/spray/spray.C | 5 +- .../atomizationModel/atomizationModelNew.C | 33 ++--- .../breakupModel/breakupModelNew.C | 30 ++--- .../collisionModel/collisionModelNew.C | 35 ++---- .../dispersionModel/dispersionModelNew.C | 35 ++---- .../dragModel/dragModel/dragModelNew.C | 28 ++--- .../evaporationModel/evaporationModelNew.C | 10 +- .../heatTransferModel/heatTransferModelNew.C | 27 ++-- .../injectorModel/Chomiak/Chomiak.C | 3 +- .../blobsSwirl/blobsSwirlInjector.C | 3 +- .../injectorModel/injectorModelNew.C | 27 ++-- .../wallModel/wallModel/wallModelNew.C | 27 ++-- .../BinaryCollisionModelNew.C | 21 ++-- .../InflowBoundaryModelNew.C | 19 +-- .../WallInteractionModelNew.C | 20 +-- .../IO/DataEntry/DataEntry/DataEntryNew.C | 14 ++- .../DispersionModel/DispersionModelNew.C | 19 +-- .../DragModel/DragModel/DragModelNew.C | 19 +-- .../InjectionModel/InjectionModel.C | 2 +- .../InjectionModel/InjectionModelNew.C | 16 +-- .../PatchInteractionModelNew.C | 20 +-- .../PostProcessingModelNew.C | 19 +-- .../SurfaceFilmModel/SurfaceFilmModelNew.C | 17 +-- .../CompositionModel/CompositionModelNew.C | 16 +-- .../PhaseChangeModel/PhaseChangeModelNew.C | 19 +-- .../DevolatilisationModelNew.C | 20 +-- .../SurfaceReactionModelNew.C | 20 +-- .../HeatTransferModel/HeatTransferModelNew.C | 19 +-- .../molecule/moleculeCloud/moleculeCloud.C | 11 +- .../basic/energyScalingFunctionNew.C | 21 ++-- .../pairPotential/basic/pairPotentialNew.C | 24 ++-- .../potential/potential/potential.C | 28 ++--- .../potential/potential/potential.H | 2 +- .../basic/tetherPotentialNew.C | 29 ++--- src/mesh/blockMesh/curvedEdges/curvedEdge.C | 8 +- .../coordinateRotation/coordinateRotation.C | 6 +- .../coordinateSystems/coordinateSystemNew.C | 15 ++- .../searchableSurface/searchableSurface.C | 16 +-- .../sets/topoSetSource/topoSetSource.C | 74 +++++------ src/meshTools/sets/topoSets/topoSet.C | 78 ++++++------ .../decompositionMethod/decompositionMethod.C | 30 +++-- .../hierarchGeomDecomp/hierarchGeomDecomp.C | 2 +- .../foamCalcFunctions/calcType/calcTypeNew.C | 8 +- .../sixDoFRigidBodyMotionConstraintNew.C | 17 ++- .../sixDoFRigidBodyMotionRestraintNew.C | 17 ++- .../tabulatedAxialAngularSpring.C | 4 +- .../sampledSet/sampledSet/sampledSet.C | 16 ++- src/sampling/sampledSet/writers/writer.C | 7 +- .../sampledSurface/sampledSurface.C | 9 +- .../injectionModel/injectionModelNew.C | 5 +- .../phaseChangeModel/phaseChangeModelNew.C | 5 +- .../surfaceFilmModel/surfaceFilmModelNew.C | 14 +-- .../barotropicCompressibilityModelNew.C | 11 +- .../basicPsiThermo/basicPsiThermoNew.C | 30 +++-- .../basicRhoThermo/basicRhoThermoNew.C | 31 +++-- .../psiChemistryModel/psiChemistryModelNew.C | 54 ++++---- .../rhoChemistryModel/rhoChemistryModelNew.C | 62 +++++----- .../chemistrySolver/chemistrySolver.C | 7 -- .../chemistrySolver/chemistrySolverNew.C | 12 +- .../laminarFlameSpeed/laminarFlameSpeedNew.C | 16 +-- .../liquidMixture/liquidMixture.C | 3 +- .../liquids/liquid/liquid.C | 16 +-- src/thermophysicalModels/pdfs/pdf/pdfNew.C | 14 ++- .../radiationModel/radiationModelNew.C | 40 ++---- .../absorptionEmissionModelNew.C | 17 +-- .../scatterModel/scatterModelNew.C | 19 +-- .../chemistryReader/chemistryReader.C | 4 +- .../hCombustionThermo/hCombustionThermoNew.C | 111 ++++++++--------- .../hhuCombustionThermoNew.C | 40 +++--- .../hsCombustionThermoNew.C | 114 ++++++++--------- .../hReactionThermo/hReactionThermoNew.C | 116 +++++++++--------- .../hsReactionThermo/hsReactionThermoNew.C | 106 ++++++++-------- .../solidMixture/solidMixture/solidMixture.C | 4 +- .../solids/solid/solidNew.C | 12 +- .../reaction/Reactions/Reaction/Reaction.C | 42 +++---- .../thermalPorousZone/thermalPorousZone.C | 2 +- .../thermophysicalFunction.C | 19 ++- .../transportModel/transportModel.C | 14 +-- .../viscosityModel/viscosityModelNew.C | 26 ++-- .../LES/LESdeltas/LESdelta/LESdelta.C | 24 ++-- .../LES/LESfilters/LESfilter/LESfilter.C | 25 ++-- .../compressible/LES/LESModel/LESModel.C | 31 +++-- .../compressible/RAS/RASModel/RASModel.C | 31 +++-- .../turbulenceModel/turbulenceModel.C | 31 +++-- .../incompressible/LES/LESModel/LESModel.C | 31 +++-- .../incompressible/RAS/RASModel/RASModel.C | 31 +++-- .../turbulenceModel/turbulenceModel.C | 31 +++-- 166 files changed, 1498 insertions(+), 1540 deletions(-) diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C index 3208681241..869f9da12e 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C +++ b/applications/solvers/combustion/PDRFoam/PDRModels/dragModels/PDRDragModel/PDRDragModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::PDRDragModel::New +Foam::autoPtr +Foam::PDRDragModel::New ( const dictionary& PDRProperties, const compressible::RASModel& turbulence, @@ -36,12 +37,15 @@ Foam::autoPtr Foam::PDRDragModel::New const surfaceScalarField& phi ) { - word PDRDragModelTypeName = PDRProperties.lookup("PDRDragModel"); + const word modelType + ( + PDRProperties.lookup("PDRDragModel") + ); - Info<< "Selecting flame-wrinkling model " << PDRDragModelTypeName << endl; + Info<< "Selecting flame-wrinkling model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(PDRDragModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -49,7 +53,7 @@ Foam::autoPtr Foam::PDRDragModel::New ( "PDRDragModel::New" ) << "Unknown PDRDragModel type " - << PDRDragModelTypeName << endl << endl + << modelType << nl << nl << "Valid PDRDragModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C index b785c5b8e0..90a5d60787 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/XiEqModel/XiEqModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::XiEqModel::New +Foam::autoPtr +Foam::XiEqModel::New ( const dictionary& XiEqProperties, const hhuCombustionThermo& thermo, @@ -35,12 +36,15 @@ Foam::autoPtr Foam::XiEqModel::New const volScalarField& Su ) { - word XiEqModelTypeName = XiEqProperties.lookup("XiEqModel"); + const word modelType + ( + XiEqProperties.lookup("XiEqModel") + ); - Info<< "Selecting flame-wrinkling model " << XiEqModelTypeName << endl; + Info<< "Selecting flame-wrinkling model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(XiEqModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -53,8 +57,8 @@ Foam::autoPtr Foam::XiEqModel::New " const volScalarField& Su" ")" ) << "Unknown XiEqModel type " - << XiEqModelTypeName << endl << endl - << "Valid XiEqModels are : " << endl + << modelType << nl << nl + << "Valid XiEqModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C index 728bce124b..9f229740cc 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiGModels/XiGModel/XiGModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::XiGModel::New +Foam::autoPtr +Foam::XiGModel::New ( const dictionary& XiGProperties, const hhuCombustionThermo& thermo, @@ -35,12 +36,15 @@ Foam::autoPtr Foam::XiGModel::New const volScalarField& Su ) { - word XiGModelTypeName = XiGProperties.lookup("XiGModel"); + const word modelType + ( + XiGProperties.lookup("XiGModel") + ); - Info<< "Selecting flame-wrinkling model " << XiGModelTypeName << endl; + Info<< "Selecting flame-wrinkling model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(XiGModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -53,8 +57,8 @@ Foam::autoPtr Foam::XiGModel::New " const volScalarField& Su" ")" ) << "Unknown XiGModel type " - << XiGModelTypeName << endl << endl - << "Valid XiGModels are : " << endl + << modelType << nl << nl + << "Valid XiGModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C index dfd748265c..ae3d5b4988 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiModel/XiModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::XiModel::New +Foam::autoPtr +Foam::XiModel::New ( const dictionary& XiProperties, const hhuCombustionThermo& thermo, @@ -38,12 +39,15 @@ Foam::autoPtr Foam::XiModel::New const surfaceScalarField& phi ) { - word XiModelTypeName = XiProperties.lookup("XiModel"); + const word modelType + ( + XiProperties.lookup("XiModel") + ); - Info<< "Selecting flame-wrinkling model " << XiModelTypeName << endl; + Info<< "Selecting flame-wrinkling model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(XiModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,8 +55,8 @@ Foam::autoPtr Foam::XiModel::New ( "XiModel::New" ) << "Unknown XiModel type " - << XiModelTypeName << endl << endl - << "Valid XiModels are : " << endl + << modelType << nl << nl + << "Valid XiModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C index 40f2bb2e2f..09291807c3 100644 --- a/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C +++ b/applications/solvers/combustion/fireFoam/combustionModels/combustionModel/combustionModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::combustionModel::New +Foam::autoPtr +Foam::combustionModel::New ( const dictionary& combustionProperties, const hsCombustionThermo& thermo, @@ -36,15 +37,18 @@ Foam::autoPtr Foam::combustionModel::New const volScalarField& rho ) { - word combustionModelTypeName = combustionProperties.lookup + const word modelType ( - "combustionModel" + combustionProperties.lookup + ( + "combustionModel" + ) ); - Info<< "Selecting combustion model " << combustionModelTypeName << endl; + Info<< "Selecting combustion model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(combustionModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,8 +56,8 @@ Foam::autoPtr Foam::combustionModel::New ( "combustionModel::New" ) << "Unknown combustionModel type " - << combustionModelTypeName << endl << endl - << "Valid combustionModels are : " << endl + << modelType << nl << nl + << "Valid combustionModels are : " << endl << dictionaryConstructorTablePtr_->toc() << exit(FatalError); } diff --git a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H index 65be09775c..ea325dabe0 100644 --- a/applications/solvers/lagrangian/coalChemistryFoam/createFields.H +++ b/applications/solvers/lagrangian/coalChemistryFoam/createFields.H @@ -11,7 +11,7 @@ basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); - word inertSpecie(thermo.lookup("inertSpecie")); + const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { diff --git a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H index cf3f484bdb..3ad06c22b3 100644 --- a/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/porousExplicitSourceReactingParcelFoam/createFields.H @@ -11,7 +11,7 @@ basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); - word inertSpecie(thermo.lookup("inertSpecie")); + const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H index 9c196e2905..8048acd648 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/createFields.H @@ -11,7 +11,7 @@ basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); - word inertSpecie(thermo.lookup("inertSpecie")); + const word inertSpecie(thermo.lookup("inertSpecie")); volScalarField& p = thermo.p(); volScalarField& hs = thermo.hs(); diff --git a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H index e071ac8b3d..0fd631fb7f 100644 --- a/applications/solvers/lagrangian/reactingParcelFoam/createFields.H +++ b/applications/solvers/lagrangian/reactingParcelFoam/createFields.H @@ -11,7 +11,7 @@ basicMultiComponentMixture& composition = thermo.composition(); PtrList& Y = composition.Y(); - word inertSpecie(thermo.lookup("inertSpecie")); + const word inertSpecie(thermo.lookup("inertSpecie")); if (!composition.contains(inertSpecie)) { diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C index c45a772e4a..b78b018880 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C +++ b/applications/solvers/multiphase/interPhaseChangeFoam/phaseChangeTwoPhaseMixtures/phaseChangeTwoPhaseMixture/phaseChangeTwoPhaseMixtureNew.C @@ -36,22 +36,21 @@ Foam::phaseChangeTwoPhaseMixture::New const word& alpha1Name ) { - IOdictionary transportPropertiesDict + // get model name, but do not register the dictionary + const word phaseChangeTwoPhaseMixtureTypeName ( - IOobject + IOdictionary ( - "transportProperties", - U.time().constant(), - U.db(), - IOobject::MUST_READ, - IOobject::NO_WRITE, - false - ) - ); - - word phaseChangeTwoPhaseMixtureTypeName - ( - transportPropertiesDict.lookup("phaseChangeTwoPhaseMixture") + IOobject + ( + "transportProperties", + U.time().constant(), + U.db(), + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) + ).lookup("phaseChangeTwoPhaseMixture") ); Info<< "Selecting phaseChange model " @@ -67,8 +66,8 @@ Foam::phaseChangeTwoPhaseMixture::New ( "phaseChangeTwoPhaseMixture::New" ) << "Unknown phaseChangeTwoPhaseMixture type " - << phaseChangeTwoPhaseMixtureTypeName << endl << endl - << "Valid phaseChangeTwoPhaseMixtures are : " << endl + << phaseChangeTwoPhaseMixtureTypeName << nl << nl + << "Valid phaseChangeTwoPhaseMixture types are : " << endl << componentsConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/applications/solvers/multiphase/settlingFoam/createFields.H b/applications/solvers/multiphase/settlingFoam/createFields.H index 6833c90ec9..c8e05c4209 100644 --- a/applications/solvers/multiphase/settlingFoam/createFields.H +++ b/applications/solvers/multiphase/settlingFoam/createFields.H @@ -159,7 +159,7 @@ Info<< "Selecting Drift-Flux model " << endl; - word VdjModel(transportProperties.lookup("VdjModel")); + const word VdjModel(transportProperties.lookup("VdjModel")); Info<< tab << VdjModel << " selected\n" << endl; diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C index 2f147a0dee..773a6c70f9 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/interfacialModels/dragModels/dragModel/dragModelNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::dragModel::New +Foam::autoPtr +Foam::dragModel::New ( const dictionary& interfaceDict, const volScalarField& alpha, @@ -35,7 +36,7 @@ Foam::autoPtr Foam::dragModel::New const phaseModel& phaseb ) { - word dragModelType + const word modelType ( interfaceDict.lookup("dragModel" + phasea.name()) ); @@ -43,20 +44,21 @@ Foam::autoPtr Foam::dragModel::New Info<< "Selecting dragModel for phase " << phasea.name() << ": " - << dragModelType << endl; + << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "dragModel::New : " << endl - << " unknown dragModelType type " - << dragModelType - << ", constructor not in hash table" << endl << endl - << " Valid dragModel types are : " << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "dragModel::New(...)" + ) << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types are : " << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return cstrIter()(interfaceDict, alpha, phasea, phaseb); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C index 74b2a1fbcc..66c851a48d 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/conductivityModel/conductivityModel/conductivityModelNew.C @@ -27,28 +27,32 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::conductivityModel::New +Foam::autoPtr +Foam::conductivityModel::New ( const dictionary& dict ) { - word conductivityModelType(dict.lookup("conductivityModel")); + const word modelType + ( + dict.lookup("conductivityModel") + ); - Info<< "Selecting conductivityModel " - << conductivityModelType << endl; + Info<< "Selecting conductivityModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(conductivityModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "conductivityModel::New(const dictionary&) : " << endl - << " unknown conductivityModelType type " - << conductivityModelType - << ", constructor not in hash table" << endl << endl - << " Valid conductivityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "conductivityModel::New(const dictionary&)" + ) << "Unknown conductivityModel type " + << modelType << nl << nl + << "Valid conductivityModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C index 391737f16b..7ce2ce03fc 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/frictionalStressModel/frictionalStressModel/frictionalStressModelNew.C @@ -27,28 +27,33 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::frictionalStressModel::New +Foam::autoPtr +Foam::frictionalStressModel::New ( const dictionary& dict ) { - word frictionalStressModelType(dict.lookup("frictionalStressModel")); + const word modelType + ( + dict.lookup("frictionalStressModel") + ); - Info<< "Selecting frictionalStressModel " - << frictionalStressModelType << endl; + Info<< "Selecting frictionalStressModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(frictionalStressModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "frictionalStressModel::New(const dictionary&) : " << endl - << " unknown frictionalStressModelType type " - << frictionalStressModelType - << ", constructor not in hash table" << endl << endl - << " Valid frictionalStressModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "frictionalStressModel::New(const dictionary&)" + ) + << "Unknown frictionalStressModel type " + << modelType << nl << nl + << "Valid frictionalStressModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C index f9697eca51..d7f4d745f6 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/granularPressureModel/granularPressureModel/granularPressureModelNew.C @@ -27,28 +27,32 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::granularPressureModel::New +Foam::autoPtr +Foam::granularPressureModel::New ( const dictionary& dict ) { - word granularPressureModelType(dict.lookup("granularPressureModel")); + const word modelType + ( + dict.lookup("granularPressureModel") + ); - Info<< "Selecting granularPressureModel " - << granularPressureModelType << endl; + Info<< "Selecting granularPressureModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(granularPressureModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "granularPressureModel::New(const dictionary&) : " << endl - << " unknown granularPressureModelType type " - << granularPressureModelType - << ", constructor not in hash table" << endl << endl - << " Valid granularPressureModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "granularPressureModel::New(const dictionary&)" + ) << "Unknown granularPressureModel type " + << modelType << nl << nl + << "Valid granularPressureModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C index f2a46d79c4..3e729140ce 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/radialModel/radialModel/radialModelNew.C @@ -27,28 +27,33 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::radialModel::New +Foam::autoPtr +Foam::radialModel::New ( const dictionary& dict ) { - word radialModelType(dict.lookup("radialModel")); + const word modelType + ( + dict.lookup("radialModel") + ); - Info<< "Selecting radialModel " - << radialModelType << endl; + Info<< "Selecting radialModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(radialModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "radialModel::New(const dictionary&) : " << endl - << " unknown radialModelType type " - << radialModelType - << ", constructor not in hash table" << endl << endl - << " Valid radialModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "radialModel::New(const dictionary&)" + ) + << "Unknown radialModel type " + << modelType << nl << nl + << "Valid radialModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C index 8998c45053..32e3dc7fe1 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/viscosityModel/viscosityModel/viscosityModelNew.C @@ -33,23 +33,26 @@ Foam::kineticTheoryModels::viscosityModel::New const dictionary& dict ) { - word viscosityModelType(dict.lookup("viscosityModel")); + const word modelType + ( + dict.lookup("viscosityModel") + ); - Info<< "Selecting viscosityModel " - << viscosityModelType << endl; + Info<< "Selecting viscosityModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(viscosityModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "viscosityModel::New(const dictionary&) : " << endl - << " unknown viscosityModelType type " - << viscosityModelType - << ", constructor not in hash table" << endl << endl - << " Valid viscosityModelType types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "viscosityModel::New(const dictionary&)" + ) << "Unknown viscosityModel type " + << modelType << nl << nl + << "Valid viscosityModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict)); diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C index 805cd23845..055cbb2773 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -134,7 +134,8 @@ Foam::phaseModel::phaseModel } -Foam::autoPtr Foam::phaseModel::New +Foam::autoPtr +Foam::phaseModel::New ( const fvMesh& mesh, const dictionary& transportProperties, diff --git a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C index 5f6c995929..341b2b8e26 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/createBoundaryFaces.C @@ -166,7 +166,9 @@ void starMesh::markBoundaryFaces() } } - FatalError << " $ bset,add,vset,all" << abort(FatalError); + FatalError + << " $ bset,add,vset,all" + << abort(FatalError); } } } diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C index e242e5fada..1e91ed4c0d 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/extrudeModel/extrudeModelNew.C @@ -27,25 +27,30 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::extrudeModel::New +Foam::autoPtr +Foam::extrudeModel::New ( const dictionary& dict ) { - word extrudeModelType(dict.lookup("extrudeModel")); + const word modelType + ( + dict.lookup("extrudeModel") + ); - Info<< "Selecting extrudeModel " << extrudeModelType << endl; + Info<< "Selecting extrudeModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(extrudeModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("extrudeModel::New(const dictionary&)") - << "Unknown extrudeModelType type " - << extrudeModelType - << ", constructor not in hash table" << nl << nl - << " Valid extrudeModel types are :" << nl + FatalErrorIn + ( + "extrudeModel::New(const dictionary&)" + ) << "Unknown extrudeModel type " + << modelType << nl << nl + << "Valid extrudeModel types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } @@ -55,4 +60,3 @@ Foam::autoPtr Foam::extrudeModel::New // ************************************************************************* // - diff --git a/applications/utilities/mesh/manipulation/cellSet/cellSet.C b/applications/utilities/mesh/manipulation/cellSet/cellSet.C index 276614687a..3eafef872b 100644 --- a/applications/utilities/mesh/manipulation/cellSet/cellSet.C +++ b/applications/utilities/mesh/manipulation/cellSet/cellSet.C @@ -59,9 +59,8 @@ int main(int argc, char *argv[]) ); - word setName(cellSetDict.lookup("name")); - - word actionName(cellSetDict.lookup("action")); + const word setName(cellSetDict.lookup("name")); + const word actionName(cellSetDict.lookup("action")); topoSetSource::setAction action = topoSetSource::toAction(actionName); diff --git a/applications/utilities/mesh/manipulation/faceSet/faceSet.C b/applications/utilities/mesh/manipulation/faceSet/faceSet.C index 63e7a68c66..7c97b95ef5 100644 --- a/applications/utilities/mesh/manipulation/faceSet/faceSet.C +++ b/applications/utilities/mesh/manipulation/faceSet/faceSet.C @@ -59,9 +59,8 @@ int main(int argc, char *argv[]) ); - word setName(faceSetDict.lookup("name")); - - word actionName(faceSetDict.lookup("action")); + const word setName(faceSetDict.lookup("name")); + const word actionName(faceSetDict.lookup("action")); topoSetSource::setAction action = topoSetSource::toAction(actionName); diff --git a/applications/utilities/mesh/manipulation/pointSet/pointSet.C b/applications/utilities/mesh/manipulation/pointSet/pointSet.C index 79ed4fae71..8219ec41b6 100644 --- a/applications/utilities/mesh/manipulation/pointSet/pointSet.C +++ b/applications/utilities/mesh/manipulation/pointSet/pointSet.C @@ -59,9 +59,8 @@ int main(int argc, char *argv[]) ); - word setName(pointSetDict.lookup("name")); - - word actionName(pointSetDict.lookup("action")); + const word setName(pointSetDict.lookup("name")); + const word actionName(pointSetDict.lookup("action")); topoSetSource::setAction action = topoSetSource::toAction(actionName); diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index b3a8efdc79..783848d09b 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -331,7 +331,7 @@ int main(int argc, char *argv[]) ) ); - word setName(refineDict.lookup("set")); + const word setName(refineDict.lookup("set")); cellSet cells(mesh, setName); diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 321fd92ff3..f63026e3f0 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -154,9 +154,9 @@ int main(int argc, char *argv[]) } // get requested numberOfSubdomains - label nDomains = 0; - { - IOdictionary decompDict + const label nDomains = readLabel + ( + IOdictionary ( IOobject ( @@ -168,10 +168,8 @@ int main(int argc, char *argv[]) IOobject::NO_WRITE, false ) - ); - - decompDict.lookup("numberOfSubdomains") >> nDomains; - } + ).lookup("numberOfSubdomains") + ); if (decomposeFieldsOnly) { diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/calcFaceAddressing.C b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/calcFaceAddressing.C index 1546fcdea5..0aa65dc1b5 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/calcFaceAddressing.C +++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/calcFaceAddressing.C @@ -72,14 +72,17 @@ labelList calcFaceAddressing << " face labels:" << faces << endl << " cellI:" << cellI << endl; - FatalError << "Faces consist of vertices:" << endl; + FatalError + << "Faces consist of vertices:" << endl; + forAll(faces, faceI) { FatalError << " face:" << faces[faceI] << allFaces[faces[faceI]] << endl; } - FatalError << exit(FatalError); + FatalError + << exit(FatalError); } } return shapeToMesh; diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H b/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H index c1a0cd7c78..b19e03ab19 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H +++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/readConversionProperties.H @@ -28,7 +28,8 @@ word format if ((format != "ascii") && (format != "ieeei4r8")) { - FatalError << "format type: " << format << " unknown." + FatalError + << "format type: " << format << " unknown." << " Valid options are: ascii ieeei4r8" << abort(FatalError); @@ -44,6 +45,7 @@ if (cells != "hex") ) { - FatalError << "cells type: " << cells << " unknown." + FatalError + << "cells type: " << cells << " unknown." << abort(FatalError); } diff --git a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C index d7d282ec9b..5139b8c499 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C +++ b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C @@ -70,7 +70,7 @@ int main(int argc, char *argv[]) scalar T0(readScalar(control.lookup("T0"))); - word fuelName(control.lookup("fuel")); + const word fuelName(control.lookup("fuel")); scalar n(readScalar(control.lookup("n"))); scalar m(readScalar(control.lookup("m"))); diff --git a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C index 0549688e34..2990cc81dc 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C +++ b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C @@ -71,7 +71,7 @@ int main(int argc, char *argv[]) scalar P(readScalar(control.lookup("P"))); - word fuel(control.lookup("fuel")); + const word fuelName(control.lookup("fuel")); scalar n(readScalar(control.lookup("n"))); scalar m(readScalar(control.lookup("m"))); @@ -97,7 +97,7 @@ int main(int argc, char *argv[]) Info<< nl << "Reading Burcat data for relevant species" << nl << endl; // Reactants - thermo FUEL(thermoData.lookup(fuel)); + thermo FUEL(thermoData.lookup(fuelName)); thermo O2(thermoData.lookup("O2")); thermo N2(thermoData.lookup("N2")); diff --git a/etc/codeTemplates/source/_Template.C b/etc/codeTemplates/source/_Template.C index 43c2dc7253..ed2b7283af 100644 --- a/etc/codeTemplates/source/_Template.C +++ b/etc/codeTemplates/source/_Template.C @@ -64,7 +64,8 @@ Foam::CLASSNAME::CLASSNAME(const CLASSNAME&) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::CLASSNAME::New() +Foam::autoPtr +Foam::CLASSNAME::New() { return autoPtr(new CLASSNAME); } diff --git a/src/ODE/ODESolvers/ODESolver/ODESolverNew.C b/src/ODE/ODESolvers/ODESolver/ODESolverNew.C index 03b1578017..add1e02b05 100644 --- a/src/ODE/ODESolvers/ODESolver/ODESolverNew.C +++ b/src/ODE/ODESolvers/ODESolver/ODESolverNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::ODESolver::New +Foam::autoPtr +Foam::ODESolver::New ( const Foam::word& ODESolverTypeName, const Foam::ODE& ode @@ -44,8 +45,8 @@ Foam::autoPtr Foam::ODESolver::New ( "ODESolver::New(const word& ODESolverTypeName, const ODE& ode)" ) << "Unknown ODESolver type " - << ODESolverTypeName << endl << endl - << "Valid ODESolvers are : " << endl + << ODESolverTypeName << nl << nl + << "Valid ODESolvers are : " << endl << ODEConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C index 3fb364d9bb..fc85d5fa26 100644 --- a/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C +++ b/src/OpenFOAM/db/IOobject/IOobjectReadHeader.C @@ -72,7 +72,7 @@ bool Foam::IOobject::readHeader(Istream& is) is.format(headerDict.lookup("format")); headerClassName_ = word(headerDict.lookup("class")); - word headerObject(headerDict.lookup("object")); + const word headerObject(headerDict.lookup("object")); if (IOobject::debug && headerObject != name()) { IOWarningIn("IOobject::readHeader(Istream&)", is) diff --git a/src/OpenFOAM/db/IOstreams/token/token.C b/src/OpenFOAM/db/IOstreams/token/token.C index 50c0d80f3c..487f903839 100644 --- a/src/OpenFOAM/db/IOstreams/token/token.C +++ b/src/OpenFOAM/db/IOstreams/token/token.C @@ -52,7 +52,8 @@ Foam::token::compound::~compound() // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::token::compound::New +Foam::autoPtr +Foam::token::compound::New ( const word& compoundType, Istream& is diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 35525f65f4..0afa8d69b3 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -95,7 +95,7 @@ void Foam::Time::adjustDeltaT() void Foam::Time::setControls() { // default is to resume calculation from "latestTime" - word startFrom = controlDict_.lookupOrDefault + const word startFrom = controlDict_.lookupOrDefault ( "startFrom", "latestTime" diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index d16b4c8014..11031875df 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -94,7 +94,7 @@ void Foam::Time::readDict() if (controlDict_.found("timeFormat")) { - word formatName(controlDict_.lookup("timeFormat")); + const word formatName(controlDict_.lookup("timeFormat")); if (formatName == "general") { diff --git a/src/OpenFOAM/db/dictionary/dictionaryIO.C b/src/OpenFOAM/db/dictionary/dictionaryIO.C index 1c452bafaf..4ee2af5750 100644 --- a/src/OpenFOAM/db/dictionary/dictionaryIO.C +++ b/src/OpenFOAM/db/dictionary/dictionaryIO.C @@ -118,7 +118,8 @@ Foam::dictionary::dictionary(Istream& is) } -Foam::autoPtr Foam::dictionary::New(Istream& is) +Foam::autoPtr +Foam::dictionary::New(Istream& is) { return autoPtr(new dictionary(is)); } diff --git a/src/OpenFOAM/db/dictionary/entry/entryIO.C b/src/OpenFOAM/db/dictionary/entry/entryIO.C index cbe2179172..ea1f91a495 100644 --- a/src/OpenFOAM/db/dictionary/entry/entryIO.C +++ b/src/OpenFOAM/db/dictionary/entry/entryIO.C @@ -191,7 +191,8 @@ bool Foam::entry::New(dictionary& parentDict, Istream& is) } -Foam::autoPtr Foam::entry::New(Istream& is) +Foam::autoPtr +Foam::entry::New(Istream& is) { is.fatalCheck("entry::New(Istream&)"); diff --git a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C index dfd4a27417..e19c807bf8 100644 --- a/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C +++ b/src/OpenFOAM/db/dictionary/functionEntries/functionEntry/functionEntry.C @@ -82,7 +82,7 @@ bool Foam::functionEntry::execute "(const word& functionName, dictionary& parentDict, Istream&)" ) << "Unknown functionEntry '" << functionName << "' in " << is.name() << " near line " << is.lineNumber() - << endl << endl + << nl << nl << "Valid functionEntries are :" << endl << executedictionaryIstreamMemberFunctionTablePtr_->toc() << exit(FatalError); @@ -128,7 +128,7 @@ bool Foam::functionEntry::execute "(const word&, const dictionary&, primitiveEntry&, Istream&)" ) << "Unknown functionEntry '" << functionName << "' in " << is.name() << " near line " << is.lineNumber() - << endl << endl + << nl << nl << "Valid functionEntries are :" << endl << executeprimitiveEntryIstreamMemberFunctionTablePtr_->toc() << exit(FatalError); diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index 79bfcdb3b2..35a20392ef 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -43,14 +43,15 @@ Foam::functionObject::functionObject(const word& name) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::functionObject::New +Foam::autoPtr +Foam::functionObject::New ( const word& name, const Time& t, const dictionary& functionDict ) { - word functionType(functionDict.lookup("type")); + const word functionType(functionDict.lookup("type")); if (debug) { diff --git a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C index 749511b2cf..0eace332cc 100644 --- a/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C +++ b/src/OpenFOAM/fields/pointPatchFields/pointPatchField/pointPatchFieldNew.C @@ -26,7 +26,8 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -Foam::autoPtr > Foam::pointPatchField::New +Foam::autoPtr< Foam::pointPatchField > +Foam::pointPatchField::New ( const word& patchFieldType, const word& actualPatchType, @@ -53,8 +54,7 @@ Foam::autoPtr > Foam::pointPatchField::New "PointPatchField::New" "(const word&, const word&, const pointPatch&, const Field&)" ) << "Unknown patchFieldType type " - << patchFieldType - << endl << endl + << patchFieldType << nl << nl << "Valid patchField types are :" << endl << pointPatchConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -96,7 +96,8 @@ Foam::autoPtr > Foam::pointPatchField::New template -Foam::autoPtr > Foam::pointPatchField::New +Foam::autoPtr< Foam::pointPatchField > +Foam::pointPatchField::New ( const word& patchFieldType, const pointPatch& p, @@ -108,7 +109,8 @@ Foam::autoPtr > Foam::pointPatchField::New template -Foam::autoPtr > Foam::pointPatchField::New +Foam::autoPtr< Foam::pointPatchField > +Foam::pointPatchField::New ( const pointPatch& p, const DimensionedField& iF, @@ -143,7 +145,7 @@ Foam::autoPtr > Foam::pointPatchField::New "New(const pointPatch&, const Field&, const dictionary&)", dict ) << "Unknown patchField type " << patchFieldType - << " for patch type " << p.type() << endl << endl + << " for patch type " << p.type() << nl << nl << "Valid patchField types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -194,7 +196,8 @@ Foam::autoPtr > Foam::pointPatchField::New // Return a pointer to a new patch created on freestore from // a given pointPatchField mapped onto a new patch template -Foam::autoPtr > Foam::pointPatchField::New +Foam::autoPtr< Foam::pointPatchField > +Foam::pointPatchField::New ( const pointPatchField& ptf, const pointPatch& p, @@ -219,12 +222,15 @@ Foam::autoPtr > Foam::pointPatchField::New { FatalErrorIn ( - "PointPatchField::" - "New(const pointPatchField&, " - "const pointPatch&, const Field&, " - "const pointPatchFieldMapper&)" - ) << "unknown patchTypefield type " - << ptf.type() << endl << endl + "PointPatchField::New" + "(" + "const pointPatchField&, " + "const pointPatch&, " + "const DimensionedField&, " + "const pointPatchFieldMapper&" + ")" + ) << "Unknown patchField type " + << ptf.type() << nl << nl << "Valid patchField types are :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/OpenFOAM/graph/graph.C b/src/OpenFOAM/graph/graph.C index 1257377608..930badb76d 100644 --- a/src/OpenFOAM/graph/graph.C +++ b/src/OpenFOAM/graph/graph.C @@ -28,19 +28,18 @@ License #include "IOmanip.H" #include "Pair.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineTypeNameAndDebug(graph::writer, 0); + defineRunTimeSelectionTable(graph::writer, word); +} -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(graph::writer, 0); -defineRunTimeSelectionTable(graph::writer, word); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void graph::readCurves(Istream& is) +void Foam::graph::readCurves(Istream& is) { List xyData(is); @@ -59,7 +58,7 @@ void graph::readCurves(Istream& is) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -graph::graph +Foam::graph::graph ( const string& title, const string& xName, @@ -74,7 +73,7 @@ graph::graph {} -graph::graph +Foam::graph::graph ( const string& title, const string& xName, @@ -92,7 +91,7 @@ graph::graph } -graph::graph +Foam::graph::graph ( const string& title, const string& xName, @@ -108,7 +107,7 @@ graph::graph } -graph::graph(Istream& is) +Foam::graph::graph(Istream& is) : title_(is), xName_(is), @@ -118,7 +117,7 @@ graph::graph(Istream& is) } -const scalarField& graph::y() const +const Foam::scalarField& Foam::graph::y() const { if (size() != 1) { @@ -130,7 +129,8 @@ const scalarField& graph::y() const return *begin()(); } -scalarField& graph::y() + +Foam::scalarField& Foam::graph::y() { if (size() != 1) { @@ -143,7 +143,8 @@ scalarField& graph::y() } -autoPtr graph::writer::New(const word& graphFormat) +Foam::autoPtr +Foam::graph::writer::New(const word& graphFormat) { if (!wordConstructorTablePtr_) { @@ -173,7 +174,7 @@ autoPtr graph::writer::New(const word& graphFormat) } -void graph::writer::writeXY +void Foam::graph::writer::writeXY ( const scalarField& x, const scalarField& y, @@ -187,7 +188,7 @@ void graph::writer::writeXY } -void graph::writeTable(Ostream& os) const +void Foam::graph::writeTable(Ostream& os) const { forAll(x_, xi) { @@ -202,13 +203,13 @@ void graph::writeTable(Ostream& os) const } -void graph::write(Ostream& os, const word& format) const +void Foam::graph::write(Ostream& os, const word& format) const { writer::New(format)().write(*this, os); } -void graph::write(const fileName& fName, const word& format) const +void Foam::graph::write(const fileName& fName, const word& format) const { autoPtr graphWriter(writer::New(format)); @@ -227,7 +228,7 @@ void graph::write(const fileName& fName, const word& format) const } -Ostream& operator<<(Ostream& os, const graph& g) +Foam::Ostream& Foam::operator<<(Ostream& os, const graph& g) { g.writeTable(os); os.check("Ostream& operator<<(Ostream&, const graph&)"); @@ -235,8 +236,4 @@ Ostream& operator<<(Ostream& os, const graph& g) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.C b/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.C index e374ea0f76..a66d777dc7 100644 --- a/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.C +++ b/src/OpenFOAM/matrices/LUscalarMatrix/procLduInterface.C @@ -58,7 +58,8 @@ Foam::procLduInterface::procLduInterface ( "procLduInterface::procLduInterface" "(const lduInterfaceField&, const scalarField&" - ) << "unknown lduInterface type " << interface.interface().type() + ) << "Unknown lduInterface type " + << interface.interface().type() << exit(FatalError); } } diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C index da2406d66a..c5864b52b9 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSmoother.C @@ -58,7 +58,8 @@ Foam::lduMatrix::smoother::getName } -Foam::autoPtr Foam::lduMatrix::smoother::New +Foam::autoPtr +Foam::lduMatrix::smoother::New ( const word& fieldName, const lduMatrix& matrix, diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C index f34e5334dc..edbd8e4226 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrixSolver.C @@ -37,7 +37,8 @@ namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::lduMatrix::solver::New +Foam::autoPtr +Foam::lduMatrix::solver::New ( const word& fieldName, const lduMatrix& matrix, @@ -47,7 +48,7 @@ Foam::autoPtr Foam::lduMatrix::solver::New const dictionary& solverControls ) { - word name(solverControls.lookup("solver")); + const word name(solverControls.lookup("solver")); if (matrix.diagonal()) { diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index 4431db24df..9196ad0a12 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -102,7 +102,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New ) ) { - word agglomeratorType(controlDict.lookup("agglomerator")); + const word agglomeratorType(controlDict.lookup("agglomerator")); dlLibraryTable::open ( @@ -157,7 +157,7 @@ const Foam::GAMGAgglomeration& Foam::GAMGAgglomeration::New ) ) { - word agglomeratorType(controlDict.lookup("agglomerator")); + const word agglomeratorType(controlDict.lookup("agglomerator")); dlLibraryTable::open ( diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C index c5d1cebda6..e1e06c965f 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaceFields/GAMGInterfaceField/GAMGInterfaceFieldNew.C @@ -27,13 +27,14 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::GAMGInterfaceField::New +Foam::autoPtr +Foam::GAMGInterfaceField::New ( const GAMGInterface& GAMGCp, const lduInterfaceField& fineInterface ) { - word coupleType(fineInterface.interfaceFieldType()); + const word coupleType(fineInterface.interfaceFieldType()); lduInterfaceConstructorTable::iterator cstrIter = lduInterfaceConstructorTablePtr_->find(coupleType); @@ -45,7 +46,8 @@ Foam::autoPtr Foam::GAMGInterfaceField::New "GAMGInterfaceField::New" "(const GAMGInterface& GAMGCp, " "const lduInterfaceField& fineInterface)" - ) << "Unknown GAMGInterfaceField type " << coupleType << ".\n" + ) << "Unknown GAMGInterfaceField type " + << coupleType << nl << "Valid GAMGInterfaceField types are :" << lduInterfaceConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C index ddbd89eea2..fac2aea8a5 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/interfaces/GAMGInterface/GAMGInterfaceNew.C @@ -29,14 +29,15 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::GAMGInterface::New +Foam::autoPtr +Foam::GAMGInterface::New ( const lduInterface& fineInterface, const labelField& localRestrictAddressing, const labelField& neighbourRestrictAddressing ) { - word coupleType(fineInterface.type()); + const word coupleType(fineInterface.type()); lduInterfaceConstructorTable::iterator cstrIter = lduInterfaceConstructorTablePtr_->find(coupleType); diff --git a/src/OpenFOAM/matrices/tolerances/tolerances.C b/src/OpenFOAM/matrices/tolerances/tolerances.C index 487d8ec1a7..dead8a2490 100644 --- a/src/OpenFOAM/matrices/tolerances/tolerances.C +++ b/src/OpenFOAM/matrices/tolerances/tolerances.C @@ -62,7 +62,7 @@ bool tolerances::read() { if (regIOobject::read()) { - word toleranceSetName(lookup("toleranceSet")); + const word toleranceSetName(lookup("toleranceSet")); const dictionary& toleranceSet(subDict(toleranceSetName)); if (toleranceSet.found("relaxationFactors")) diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C index 718bbab1bf..a05b8d37a9 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatchNew.C @@ -27,12 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr facePointPatch::New +Foam::autoPtr +Foam::facePointPatch::New ( const polyPatch& patch, const pointBoundaryMesh& bm @@ -57,7 +53,7 @@ autoPtr facePointPatch::New "const pointBoundaryMesh&) : " ) << "Unknown facePointPatch type " << patch.type() - << endl << endl + << nl << nl << "Valid facePointPatch types are :" << endl << polyPatchConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -67,8 +63,4 @@ autoPtr facePointPatch::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C index 2e821e9036..d2ea21bd0a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C +++ b/src/OpenFOAM/meshes/polyMesh/polyPatches/polyPatch/polyPatchNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::polyPatch::New +Foam::autoPtr +Foam::polyPatch::New ( const word& patchType, const word& name, @@ -55,8 +56,8 @@ Foam::autoPtr Foam::polyPatch::New ( "polyPatch::New(const word&, const word&, const label, " "const label, const label, const polyBoundaryMesh&) " - ) << "Unknown polyPatch type " << patchType << " for patch " << name - << endl << endl + ) << "Unknown polyPatch type " + << patchType << " for patch " << name << nl << nl << "Valid polyPatch types are :" << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -66,7 +67,8 @@ Foam::autoPtr Foam::polyPatch::New } -Foam::autoPtr Foam::polyPatch::New +Foam::autoPtr +Foam::polyPatch::New ( const word& name, const dictionary& dict, @@ -82,7 +84,6 @@ Foam::autoPtr Foam::polyPatch::New } word patchType(dict.lookup("type")); - dict.readIfPresent("geometricType", patchType); dictionaryConstructorTable::iterator cstrIter = @@ -102,9 +103,8 @@ Foam::autoPtr Foam::polyPatch::New "polyPatch::New(const word&, const dictionary&, " "const label, const polyBoundaryMesh&)", dict - ) << "Unknown polyPatch type " << patchType - << " for patch " << name - << endl << endl + ) << "Unknown polyPatch type " + << patchType << " for patch " << name << nl << nl << "Valid polyPatch types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C index 3c1efbb1a2..a5ec479f68 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/cellZone/cellZoneNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::cellZone::New +Foam::autoPtr +Foam::cellZone::New ( const word& name, const dictionary& dict, @@ -43,7 +44,10 @@ Foam::autoPtr Foam::cellZone::New << endl; } - word zoneType(dict.lookup("type")); + const word zoneType + ( + dict.lookup("type") + ); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); @@ -55,7 +59,8 @@ Foam::autoPtr Foam::cellZone::New "cellZone::New(const word&, const dictionary&, " "const label, const cellZoneMesh&)", dict - ) << "Unknown cellZone type " << zoneType << endl << endl + ) << "Unknown cellZone type " + << zoneType << nl << nl << "Valid cellZone types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C index 8948833404..f8e41d8947 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZoneNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::faceZone::New +Foam::autoPtr +Foam::faceZone::New ( const word& name, const dictionary& dict, @@ -43,7 +44,10 @@ Foam::autoPtr Foam::faceZone::New << endl; } - word zoneType(dict.lookup("type")); + const word zoneType + ( + dict.lookup("type") + ); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); @@ -55,7 +59,8 @@ Foam::autoPtr Foam::faceZone::New "faceZone::New(const word&, const dictionary&, " "const label, const faceZoneMesh&)", dict - ) << "Unknown faceZone type " << zoneType << endl << endl + ) << "Unknown faceZone type " + << zoneType << nl << nl << "Valid faceZone types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C index bac22f1e18..e1ce962d50 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/pointZone/pointZoneNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::pointZone::New +Foam::autoPtr +Foam::pointZone::New ( const word& name, const dictionary& dict, @@ -43,7 +44,10 @@ Foam::autoPtr Foam::pointZone::New << endl; } - word zoneType(dict.lookup("type")); + const word zoneType + ( + dict.lookup("type") + ); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(zoneType); @@ -55,7 +59,8 @@ Foam::autoPtr Foam::pointZone::New "pointZone::New(const word&, const dictionary&, " "const label, const pointZoneMesh&)", dict - ) << "Unknown pointZone type " << zoneType << endl << endl + ) << "Unknown pointZone type " + << zoneType << nl << nl << "Valid pointZone types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C index 9fadac3ca5..5cdc5e9d89 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C +++ b/src/OpenFOAM/meshes/primitiveShapes/plane/plane.C @@ -189,7 +189,7 @@ Foam::plane::plane(const dictionary& dict) unitVector_(vector::zero), basePoint_(point::zero) { - word planeType(dict.lookup("planeType")); + const word planeType(dict.lookup("planeType")); if (planeType == "planeEquation") { diff --git a/src/conversion/ensight/part/ensightPart.C b/src/conversion/ensight/part/ensightPart.C index 2321946d3a..aa1eacd628 100644 --- a/src/conversion/ensight/part/ensightPart.C +++ b/src/conversion/ensight/part/ensightPart.C @@ -126,9 +126,10 @@ Foam::ensightPart::ensightPart(const ensightPart& part) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::ensightPart::New(Istream& is) +Foam::autoPtr +Foam::ensightPart::New(Istream& is) { - word partType(is); + const word partType(is); istreamConstructorTable::iterator cstrIter = istreamConstructorTablePtr_->find(partType); @@ -139,7 +140,8 @@ Foam::autoPtr Foam::ensightPart::New(Istream& is) ( "ensightPart::New(Istream&)", is - ) << "unknown ensightPart type " << partType << endl << endl + ) << "unknown ensightPart type " + << partType << nl << nl << "Valid ensightPart types are :" << endl << istreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C index 536c397923..57311b38dd 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C @@ -29,12 +29,11 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::dynamicFvMesh::New(const IOobject& io) +Foam::autoPtr +Foam::dynamicFvMesh::New(const IOobject& io) { - // Enclose the creation of the dynamicMesh to ensure it is - // deleted before the dynamicFvMesh is created otherwise the dictionary - // is entered in the database twice - IOdictionary dynamicMeshDict + // do not register the dictionary + IOdictionary dict ( IOobject ( @@ -47,13 +46,13 @@ Foam::autoPtr Foam::dynamicFvMesh::New(const IOobject& io) ) ); - word dynamicFvMeshTypeName(dynamicMeshDict.lookup("dynamicFvMesh")); + const word dynamicFvMeshTypeName(dict.lookup("dynamicFvMesh")); Info<< "Selecting dynamicFvMesh " << dynamicFvMeshTypeName << endl; dlLibraryTable::open ( - dynamicMeshDict, + dict, "dynamicFvMeshLibs", IOobjectConstructorTablePtr_ ); @@ -75,8 +74,8 @@ Foam::autoPtr Foam::dynamicFvMesh::New(const IOobject& io) FatalErrorIn ( "dynamicFvMesh::New(const IOobject&)" - ) << "Unknown dynamicFvMesh type " << dynamicFvMeshTypeName - << endl << endl + ) << "Unknown dynamicFvMesh type " + << dynamicFvMeshTypeName << nl << nl << "Valid dynamicFvMesh types are :" << endl << IOobjectConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C index 3619122c6b..9b996ff876 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/solidBodyMotionFunction/solidBodyMotionFunctionNew.C @@ -27,20 +27,22 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::solidBodyMotionFunction::New +Foam::autoPtr +Foam::solidBodyMotionFunction::New ( const dictionary& SBMFCoeffs, const Time& runTime ) { - word solidBodyMotionFunctionTypeName = - SBMFCoeffs.lookup("solidBodyMotionFunction"); + const word motionType + ( + SBMFCoeffs.lookup("solidBodyMotionFunction") + ); - Info<< "Selecting solid-body motion function " - << solidBodyMotionFunctionTypeName << endl; + Info<< "Selecting solid-body motion function " << motionType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(solidBodyMotionFunctionTypeName); + dictionaryConstructorTablePtr_->find(motionType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,8 +54,8 @@ Foam::autoPtr Foam::solidBodyMotionFunction::New " const Time& runTime" ")" ) << "Unknown solidBodyMotionFunction type " - << solidBodyMotionFunctionTypeName << endl << endl - << "Valid solidBodyMotionFunctions are : " << endl + << motionType << nl << nl + << "Valid solidBodyMotionFunctions are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C index 0dbb3e7377..aadb0781d6 100644 --- a/src/dynamicMesh/meshCut/cellLooper/cellLooper.C +++ b/src/dynamicMesh/meshCut/cellLooper/cellLooper.C @@ -28,36 +28,34 @@ License #include "ListOps.H" #include "meshTools.H" - +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(cellLooper, 0); -defineRunTimeSelectionTable(cellLooper, word); + defineTypeNameAndDebug(cellLooper, 0); + defineRunTimeSelectionTable(cellLooper, word); +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Construct named object from given arguments -autoPtr cellLooper::New +Foam::autoPtr +Foam::cellLooper::New ( const word& type, const polyMesh& mesh ) { wordConstructorTable::iterator cstrIter = - wordConstructorTablePtr_ - ->find(type); + wordConstructorTablePtr_->find(type); if (cstrIter == wordConstructorTablePtr_->end()) { FatalErrorIn ( "cellLooper::New(const word&, const polyMesh&)" - ) << "Unknown set type " << type - << endl << endl + ) << "Unknown set type " + << type << nl << nl << "Valid cellLooper types : " << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -66,7 +64,6 @@ autoPtr cellLooper::New return autoPtr(cstrIter()(mesh)); } -} // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -207,7 +204,6 @@ Foam::label Foam::cellLooper::getMisAlignedEdge // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::cellLooper::cellLooper(const polyMesh& mesh) : edgeVertex(mesh) diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C index 0ea45f5f04..b49dc435dc 100644 --- a/src/dynamicMesh/meshCut/directions/directions.C +++ b/src/dynamicMesh/meshCut/directions/directions.C @@ -303,7 +303,7 @@ Foam::directions::directions label nDirs = 0; - word coordSystem(dict.lookup("coordinateSystem")); + const word coordSystem(dict.lookup("coordinateSystem")); if (coordSystem == "global") { @@ -341,7 +341,7 @@ Foam::directions::directions { const dictionary& patchDict = dict.subDict("patchLocalCoeffs"); - word patchName(patchDict.lookup("patch")); + const word patchName(patchDict.lookup("patch")); label patchI = mesh.boundaryMesh().findPatchID(patchName); @@ -352,7 +352,8 @@ Foam::directions::directions "directions::directions(const polyMesh&, const dictionary&," "const twoDPointCorrector*" ) << "Cannot find patch " - << patchName << exit(FatalError); + << patchName + << exit(FatalError); } // Take zeroth face on patch @@ -440,7 +441,8 @@ Foam::directions::directions "const twoDPointCorrector*" ) << "Unknown coordinate system " << coordSystem << endl - << "Known types are global and patchLocal" << exit(FatalError); + << "Known types are global and patchLocal" + << exit(FatalError); } } diff --git a/src/dynamicMesh/motionSolver/motionSolver.C b/src/dynamicMesh/motionSolver/motionSolver.C index 764ad193ad..2979d1fe06 100644 --- a/src/dynamicMesh/motionSolver/motionSolver.C +++ b/src/dynamicMesh/motionSolver/motionSolver.C @@ -58,7 +58,8 @@ Foam::motionSolver::motionSolver(const polyMesh& mesh) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::motionSolver::New(const polyMesh& mesh) +Foam::autoPtr +Foam::motionSolver::New(const polyMesh& mesh) { IOdictionary solverDict ( @@ -75,7 +76,7 @@ Foam::autoPtr Foam::motionSolver::New(const polyMesh& mesh) Istream& msData = solverDict.lookup("solver"); - word solverTypeName(msData); + const word solverTypeName(msData); Info<< "Selecting motion solver: " << solverTypeName << endl; @@ -103,9 +104,9 @@ Foam::autoPtr Foam::motionSolver::New(const polyMesh& mesh) FatalErrorIn ( "motionSolver::New(const polyMesh& mesh)" - ) << "Unknown solver type " << solverTypeName - << endl << endl - << "Valid solver types are: " << endl + ) << "Unknown solver type " + << solverTypeName << nl << nl + << "Valid solver types are:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C index f900853459..f7b74a432e 100644 --- a/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C +++ b/src/dynamicMesh/polyTopoChange/polyMeshModifier/polyMeshModifierNew.C @@ -26,14 +26,10 @@ License #include "polyMeshModifier.H" #include "dictionary.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -autoPtr polyMeshModifier::New +Foam::autoPtr +Foam::polyMeshModifier::New ( const word& name, const dictionary& dict, @@ -49,10 +45,10 @@ autoPtr polyMeshModifier::New << endl; } - word patchType(dict.lookup("type")); + const word modifierType(dict.lookup("type")); dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(patchType); + dictionaryConstructorTablePtr_->find(modifierType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -61,7 +57,8 @@ autoPtr polyMeshModifier::New "polyMeshModifier::New(const word&, const dictionary&, " "const label, const polyMesh&)", dict - ) << "Unknown polyMeshModifier type " << patchType << endl << endl + ) << "Unknown polyMeshModifier type " + << modifierType << nl << nl << "Valid polyMeshModifier types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -71,8 +68,4 @@ autoPtr polyMeshModifier::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/engine/engineMesh/engineMesh/engineMeshNew.C b/src/engine/engineMesh/engineMesh/engineMeshNew.C index 16db348f1f..d34011d279 100644 --- a/src/engine/engineMesh/engineMesh/engineMeshNew.C +++ b/src/engine/engineMesh/engineMesh/engineMeshNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::engineMesh::New +Foam::autoPtr +Foam::engineMesh::New ( const Foam::IOobject& io ) { - word engineMeshTypeName; - - // Enclose the creation of the engineGeometry to ensure it is - // deleted before the engineMesh is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary engineGeometryDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -50,23 +49,21 @@ Foam::autoPtr Foam::engineMesh::New IOobject::NO_WRITE, false ) - ); + ).lookup("engineMesh") + ); - engineGeometryDict.lookup("engineMesh") >> engineMeshTypeName; - } - - Info<< "Selecting engineMesh " << engineMeshTypeName << endl; + Info<< "Selecting engineMesh " << modelType << endl; IOobjectConstructorTable::iterator cstrIter = - IOobjectConstructorTablePtr_->find(engineMeshTypeName); + IOobjectConstructorTablePtr_->find(modelType); if (cstrIter == IOobjectConstructorTablePtr_->end()) { FatalErrorIn ( "engineMesh::New(const IOobject&)" - ) << "Unknown engineMesh type " << engineMeshTypeName - << endl << endl + ) << "Unknown engineMesh type " + << modelType << nl << nl << "Valid engineMesh types are :" << endl << IOobjectConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C index d181f56835..db5a422ad1 100644 --- a/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C +++ b/src/finiteVolume/cfdTools/general/SRF/SRFModel/SRFModel/SRFModelNew.C @@ -25,27 +25,19 @@ License #include "SRFModel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace SRF -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr SRFModel::New +Foam::autoPtr +Foam::SRF::SRFModel::New ( const volVectorField& Urel ) { - word SRFModelTypeName; - - // Enclose the creation of the SRFPropertiesDict to ensure it is - // deleted before the SRFModel is created - otherwise the dictionary - // is entered in the database twice - { - IOdictionary SRFPropertiesDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -53,25 +45,24 @@ autoPtr SRFModel::New Urel.time().constant(), Urel.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("SRFModel") + ); - SRFPropertiesDict.lookup("SRFModel") >> SRFModelTypeName; - } - - Info<< "Selecting SRFModel " << SRFModelTypeName << endl; + Info<< "Selecting SRFModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(SRFModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( "SRFModel::New(const fvMesh&)" - ) << "Unknown SRFModel type " << SRFModelTypeName - << nl << nl + ) << "Unknown SRFModel type " + << modelType << nl << nl << "Valid SRFModel types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -81,9 +72,4 @@ autoPtr SRFModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace SRF -} // End namespace Foam - // ************************************************************************* // diff --git a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C index 86884666a9..0e119e7d32 100644 --- a/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C +++ b/src/finiteVolume/fields/fvPatchFields/fvPatchField/fvPatchFieldNew.C @@ -52,8 +52,8 @@ Foam::tmp > Foam::fvPatchField::New ( "fvPatchField::New(const word&, const word&, const fvPatch&, " "const DimensionedField&)" - ) << "Unknown patchTypefield type " << patchFieldType - << endl << endl + ) << "Unknown patchField type " + << patchFieldType << nl << nl << "Valid patchField types are :" << endl << patchConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -104,7 +104,7 @@ Foam::tmp > Foam::fvPatchField::New const dictionary& dict ) { - word patchFieldType(dict.lookup("type")); + const word patchFieldType(dict.lookup("type")); if (debug) { @@ -133,7 +133,7 @@ Foam::tmp > Foam::fvPatchField::New "const dictionary&)", dict ) << "Unknown patchField type " << patchFieldType - << " for patch type " << p.type() << endl << endl + << " for patch type " << p.type() << nl << nl << "Valid patchField types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -200,7 +200,7 @@ Foam::tmp > Foam::fvPatchField::New "fvPatchField::New(const fvPatchField&, " "const fvPatch&, const DimensionedField&, " "const fvPatchFieldMapper&)" - ) << "unknown patchTypefield type " << ptf.type() << endl << endl + ) << "Unknown patchField type " << ptf.type() << nl << nl << "Valid patchField types are :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C index b8ad302fdd..dd9b25f1a4 100644 --- a/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C +++ b/src/finiteVolume/fields/fvsPatchFields/fvsPatchField/fvsPatchFieldNew.C @@ -56,8 +56,8 @@ tmp > fvsPatchField::New ( "fvsPatchField::New(const word&, const word&, const fvPatch&" ", const Field&)" - ) << "Unknown patchTypefield type " << patchFieldType - << endl << endl + ) << "Unknown patchField type " + << patchFieldType << nl << nl << "Valid patchField types are :" << endl << patchConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -116,7 +116,7 @@ tmp > fvsPatchField::New << endl; } - word patchFieldType(dict.lookup("type")); + const word patchFieldType(dict.lookup("type")); typename dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(patchFieldType); @@ -136,7 +136,7 @@ tmp > fvsPatchField::New "const dictionary&)", dict ) << "Unknown patchField type " << patchFieldType - << " for patch type " << p.type() << endl << endl + << " for patch type " << p.type() << nl << nl << "Valid patchField types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -204,7 +204,7 @@ tmp > fvsPatchField::New "fvsPatchField::New(const fvsPatchField&, " "const fvPatch&, const Field&, " "const fvPatchFieldMapper&)" - ) << "unknown patchTypefield type " << ptf.type() << endl << endl + ) << "Unknown patchField type " << ptf.type() << nl << nl << "Valid patchField types are :" << endl << patchMapperConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C index 225aea40c2..f072f57001 100644 --- a/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C +++ b/src/finiteVolume/finiteVolume/convectionSchemes/convectionScheme/convectionScheme.C @@ -82,7 +82,7 @@ tmp > convectionScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -94,7 +94,7 @@ tmp > convectionScheme::New "convectionScheme::New" "(const fvMesh&, const surfaceScalarField&, Istream&)", schemeData - ) << "unknown convection scheme " << schemeName << endl << endl + ) << "Unknown convection scheme " << schemeName << nl << nl << "Valid convection schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -139,7 +139,7 @@ tmp > convectionScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename MultivariateConstructorTable::iterator cstrIter = MultivariateConstructorTablePtr_->find(schemeName); @@ -153,7 +153,7 @@ tmp > convectionScheme::New "const typename multivariateSurfaceInterpolationScheme" "::fieldTable&, const surfaceScalarField&, Istream&)", schemeData - ) << "unknown convection scheme " << schemeName << endl << endl + ) << "Unknown convection scheme " << schemeName << nl << nl << "Valid convection schemes are :" << endl << MultivariateConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C index 858e6ecd9a..72c3b907cf 100644 --- a/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C +++ b/src/finiteVolume/finiteVolume/d2dt2Schemes/d2dt2Scheme/d2dt2Scheme.C @@ -67,7 +67,7 @@ tmp > d2dt2Scheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -78,7 +78,7 @@ tmp > d2dt2Scheme::New ( "d2dt2Scheme::New(const fvMesh&, Istream&)", schemeData - ) << "unknown d2dt2 scheme " << schemeName << endl << endl + ) << "Unknown d2dt2 scheme " << schemeName << nl << nl << "Valid d2dt2 schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C index 71022e571f..260eaec08f 100644 --- a/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C +++ b/src/finiteVolume/finiteVolume/ddtSchemes/ddtScheme/ddtScheme.C @@ -65,7 +65,7 @@ tmp > ddtScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -76,7 +76,7 @@ tmp > ddtScheme::New ( "ddtScheme::New(const fvMesh&, Istream&)", schemeData - ) << "unknown ddt scheme " << schemeName << endl << endl + ) << "Unknown ddt scheme " << schemeName << nl << nl << "Valid ddt schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C index 51502b701a..9045e8b509 100644 --- a/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C +++ b/src/finiteVolume/finiteVolume/divSchemes/divScheme/divScheme.C @@ -68,7 +68,7 @@ tmp > divScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -79,7 +79,8 @@ tmp > divScheme::New ( "divScheme::New(const fvMesh&, Istream&)", schemeData - ) << "unknown div scheme " << schemeName << endl << endl + ) << "unknown div scheme " + << schemeName << nl << nl << "Valid div schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C index 7667e6325f..faba3c984d 100644 --- a/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C +++ b/src/finiteVolume/finiteVolume/gradSchemes/gradScheme/gradScheme.C @@ -57,7 +57,7 @@ Foam::tmp > Foam::fv::gradScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -69,7 +69,7 @@ Foam::tmp > Foam::fv::gradScheme::New "gradScheme::New" "(const fvMesh& mesh, Istream& schemeData)", schemeData - ) << "unknown grad scheme " << schemeName << endl << endl + ) << "Unknown grad scheme " << schemeName << nl << nl << "Valid grad schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C index 6ee704dbe4..fa55b32dbd 100644 --- a/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C +++ b/src/finiteVolume/finiteVolume/laplacianSchemes/laplacianScheme/laplacianScheme.C @@ -66,7 +66,7 @@ tmp > laplacianScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(schemeName); @@ -77,7 +77,7 @@ tmp > laplacianScheme::New ( "laplacianScheme::New(const fvMesh&, Istream&)", schemeData - ) << "unknown laplacian scheme " << schemeName << endl << endl + ) << "Unknown laplacian scheme " << schemeName << nl << nl << "Valid laplacian schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C index 9ebba2a0f1..4c0cf42e7f 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/snGradScheme/snGradScheme.C @@ -68,7 +68,7 @@ tmp > snGradScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename MeshConstructorTable::iterator constructorIter = MeshConstructorTablePtr_->find(schemeName); @@ -79,8 +79,8 @@ tmp > snGradScheme::New ( "snGradScheme::New(const fvMesh&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C index 4a7facee23..b371396989 100644 --- a/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C +++ b/src/finiteVolume/fvMesh/fvPatches/fvPatch/fvPatchNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::fvPatch::New +Foam::autoPtr +Foam::fvPatch::New ( const polyPatch& patch, const fvBoundaryMesh& bm @@ -47,7 +48,7 @@ Foam::autoPtr Foam::fvPatch::New if (cstrIter == polyPatchConstructorTablePtr_->end()) { FatalErrorIn("fvPatch::New(const polyPatch&, const fvBoundaryMesh&)") - << "Unknown fvPatch type " << patch.type() << ".\n" + << "Unknown fvPatch type " << patch.type() << nl << "Valid fvPatch types are :" << polyPatchConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C index 2618a1a570..313f6ad1d8 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/limitedSchemes/limitedSurfaceInterpolationScheme/limitedSurfaceInterpolationScheme.C @@ -65,7 +65,7 @@ limitedSurfaceInterpolationScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename MeshConstructorTable::iterator constructorIter = MeshConstructorTablePtr_->find(schemeName); @@ -77,8 +77,8 @@ limitedSurfaceInterpolationScheme::New "limitedSurfaceInterpolationScheme::" "New(const fvMesh&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -120,7 +120,7 @@ limitedSurfaceInterpolationScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); typename MeshFluxConstructorTable::iterator constructorIter = MeshFluxConstructorTablePtr_->find(schemeName); @@ -132,8 +132,8 @@ limitedSurfaceInterpolationScheme::New "limitedSurfaceInterpolationScheme::New" "(const fvMesh&, const surfaceScalarField&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshFluxConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C index aa349204a8..c7d3cfb451 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/multivariateSchemes/multivariateSurfaceInterpolationScheme/multivariateSurfaceInterpolationScheme.C @@ -76,7 +76,7 @@ multivariateSurfaceInterpolationScheme::New << endl; } - word schemeName(schemeData); + const word schemeName(schemeData); typename IstreamConstructorTable::iterator constructorIter = IstreamConstructorTablePtr_->find(schemeName); @@ -89,7 +89,7 @@ multivariateSurfaceInterpolationScheme::New "(const fvMesh& mesh, const fieldTable&, " "const surfaceScalarField&, Istream&)", schemeData - ) << "unknown discretisation scheme " << schemeName << endl << endl + ) << "Unknown discretisation scheme " << schemeName << nl << nl << "Valid schemes are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C index 0a51f574f1..43f52f271b 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/surfaceInterpolationScheme/surfaceInterpolationScheme.C @@ -59,7 +59,7 @@ tmp > surfaceInterpolationScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); if (surfaceInterpolation::debug || surfaceInterpolationScheme::debug) { @@ -79,8 +79,8 @@ tmp > surfaceInterpolationScheme::New ( "surfaceInterpolationScheme::New(const fvMesh&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -113,7 +113,7 @@ tmp > surfaceInterpolationScheme::New << exit(FatalIOError); } - word schemeName(schemeData); + const word schemeName(schemeData); if (surfaceInterpolation::debug || surfaceInterpolationScheme::debug) { @@ -134,8 +134,8 @@ tmp > surfaceInterpolationScheme::New "surfaceInterpolationScheme::New" "(const fvMesh&, const surfaceScalarField&, Istream&)", schemeData - ) << "Unknown discretisation scheme " << schemeName - << endl << endl + ) << "Unknown discretisation scheme " + << schemeName << nl << nl << "Valid schemes are :" << endl << MeshFluxConstructorTablePtr_->sortedToc() << exit(FatalIOError); diff --git a/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C index aad5896b41..3f3b570fff 100644 --- a/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/motionDiffusivity/motionDiffusivity.C @@ -30,7 +30,6 @@ License namespace Foam { defineTypeNameAndDebug(motionDiffusivity, 0); - defineRunTimeSelectionTable(motionDiffusivity, Istream); } @@ -45,18 +44,19 @@ Foam::motionDiffusivity::motionDiffusivity(const fvMotionSolver& mSolver) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::motionDiffusivity::New +Foam::autoPtr +Foam::motionDiffusivity::New ( const fvMotionSolver& mSolver, Istream& mdData ) { - word diffTypeName(mdData); + const word motionType(mdData); - Info<< "Selecting motion diffusion: " << diffTypeName << endl; + Info<< "Selecting motion diffusion: " << motionType << endl; IstreamConstructorTable::iterator cstrIter = - IstreamConstructorTablePtr_->find(diffTypeName); + IstreamConstructorTablePtr_->find(motionType); if (cstrIter == IstreamConstructorTablePtr_->end()) { @@ -64,8 +64,8 @@ Foam::autoPtr Foam::motionDiffusivity::New ( "motionDiffusivity::New(const tetPolyMesh& tetMesh, " "const Istream& dict)" - ) << "Unknown diffusion type " << diffTypeName - << endl << endl + ) << "Unknown diffusion type " + << motionType << nl << nl << "Valid diffusion types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/lagrangian/basic/Cloud/CloudIO.C b/src/lagrangian/basic/Cloud/CloudIO.C index d607a3a068..067378c3cf 100644 --- a/src/lagrangian/basic/Cloud/CloudIO.C +++ b/src/lagrangian/basic/Cloud/CloudIO.C @@ -39,7 +39,7 @@ Foam::word Foam::Cloud::cloudPropertiesName("cloudProperties"); template void Foam::Cloud::readCloudUniformProperties() { - IOobject uniformPropsDictHeader + IOobject dictObj ( cloudPropertiesName, time().timeName(), @@ -50,11 +50,11 @@ void Foam::Cloud::readCloudUniformProperties() false ); - if (uniformPropsDictHeader.headerOk()) + if (dictObj.headerOk()) { - const IOdictionary uniformPropsDict(uniformPropsDictHeader); + const IOdictionary uniformPropsDict(dictObj); - word procName("processor" + Foam::name(Pstream::myProcNo())); + const word procName("processor" + Foam::name(Pstream::myProcNo())); if (uniformPropsDict.found(procName)) { uniformPropsDict.subDict(procName).lookup("particleCount") diff --git a/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C b/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C index a78356f9d5..83c9207c4b 100644 --- a/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C +++ b/src/lagrangian/dieselSpray/injector/injectorType/injectorType.C @@ -46,26 +46,29 @@ Foam::injectorType::injectorType // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::injectorType::New +Foam::autoPtr +Foam::injectorType::New ( const Time& t, const dictionary& dict ) { - word injectorTypeName(dict.lookup("injectorType")); + const word modelType + ( + dict.lookup("injectorType") + ); - Info<< "Selecting injectorType " << injectorTypeName << endl; + Info<< "Selecting injectorType " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(injectorTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("injectorType::New(const dictionary&)") << "Unknown injectorType type " - << injectorTypeName - << ", constructor not in hash table" << nl << nl - << " Valid injector types are:" << nl + << modelType << nl << nl + << "Valid injectorTypes are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/lagrangian/dieselSpray/spray/spray.C b/src/lagrangian/dieselSpray/spray/spray.C index 925a6335c3..e21063b569 100644 --- a/src/lagrangian/dieselSpray/spray/spray.C +++ b/src/lagrangian/dieselSpray/spray/spray.C @@ -51,7 +51,6 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::spray::spray ( const volVectorField& U, @@ -340,8 +339,8 @@ Foam::spray::spray Info<< specieName << endl; } - FatalError<< - "The liquid component " << liquidName + FatalError + << "The liquid component " << liquidName << " does not exist in the species composition.Y() list.\n" << "(Probably not defined in )" << abort(FatalError); diff --git a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C index 1772cace2b..6dda97beae 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/atomizationModel/atomizationModel/atomizationModelNew.C @@ -28,47 +28,40 @@ License #include "LISA.H" #include "noAtomization.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr atomizationModel::New +Foam::autoPtr +Foam::atomizationModel::New ( const dictionary& dict, spray& sm ) { - word atomizationModelType + const word modelType ( dict.lookup("atomizationModel") ); - Info<< "Selecting atomizationModel " - << atomizationModelType << endl; + Info<< "Selecting atomizationModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(atomizationModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "atomizationModel::New(const dictionary&, const spray&) : " << endl - << " unknown atomizationModelType type " - << atomizationModelType - << ", constructor not in hash table" << endl << endl - << " Valid atomizationModel types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "atomizationModel::New(const dictionary&, const spray&)" + ) << "Unknown atomizationModel type " + << modelType << nl << nl + << "Valid atomizationModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict, sm)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C index 42376b3352..a1e04ffe38 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/breakupModel/breakupModel/breakupModelNew.C @@ -29,41 +29,37 @@ License #include "reitzDiwakar.H" #include "reitzKHRT.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr breakupModel::New +Foam::autoPtr +Foam::breakupModel::New ( const dictionary& dict, spray& sm ) { - word breakupModelType(dict.lookup("breakupModel")); + const word modelType + ( + dict.lookup("breakupModel") + ); - Info<< "Selecting breakupModel " << breakupModelType << endl; + Info<< "Selecting breakupModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(breakupModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("breakupModel::New(const dictionary&, const spray&)") - << " unknown breakupModelType type " << breakupModelType - << ", constructor not in hash table" << nl << nl - << " Valid breakupModel types are :" << nl - << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + << "Unknown breakupModel type " + << modelType << nl << nl + << "Valid breakupModel types are :" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict, sm)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C index ffed012ff4..e0d86aa903 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/collisionModel/collisionModel/collisionModelNew.C @@ -30,43 +30,36 @@ License #include "ORourkeCollisionModel.H" #include "trajectoryModel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr collisionModel::New +Foam::autoPtr +Foam::collisionModel::New ( const dictionary& dict, spray& sm, Random& rndGen ) { - word collisionModelType + const word modelType ( dict.lookup("collisionModel") ); - Info<< "Selecting collisionModel " - << collisionModelType << endl; - + Info<< "Selecting collisionModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(collisionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "collisionModel::New(const dictionary&, const spray&) : " - << endl - << " unknown collisionModelType type " - << collisionModelType - << ", constructor not in hash table" << endl << endl - << " Valid collisionModel types are :" - << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() + FatalErrorIn + ( + "collisionModel::New(const dictionary&, const spray&)" + ) << "Unknown collisionModel type " + << modelType << nl << nl + << "Valid collisionModel types are :" << nl + << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -74,8 +67,4 @@ autoPtr collisionModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C index 9cb0ae8f0e..f5fc96605a 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/dispersionModel/dispersionModel/dispersionModelNew.C @@ -28,48 +28,39 @@ License #include "dispersionModel.H" #include "noDispersion.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr dispersionModel::New +Foam::autoPtr +Foam::dispersionModel::New ( const dictionary& dict, spray& sm ) { - word dispersionModelType + const word modelType ( dict.lookup("dispersionModel") ); - Info<< "Selecting dispersionModel " - << dispersionModelType << endl; + Info<< "Selecting dispersionModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dispersionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalError - << "dispersionModel::New(const dictionary&, const spray&) : " - << endl - << " unknown dispersionModelType type " - << dispersionModelType - << ", constructor not in hash table" << endl << endl - << " Valid dispersionModel types are :" << endl; - Info<< dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); + FatalErrorIn + ( + "dispersionModel::New(const dictionary&, const spray&)" + ) << "Unknown dispersionModel type " + << modelType << nl << nl + << "Valid dispersionModel types are :" << endl + << dictionaryConstructorTablePtr_->sortedToc() + << abort(FatalError); } return autoPtr(cstrIter()(dict, sm)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C index cfa4cd8493..4bc7e5f898 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/dragModel/dragModel/dragModelNew.C @@ -30,27 +30,25 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam +Foam::autoPtr +Foam::dragModel::New(const dictionary& dict) { + const word modelType + ( + dict.lookup("dragModel") + ); -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr dragModel::New(const dictionary& dict) -{ - word dragModelType(dict.lookup("dragModel")); - - Info<< "Selecting dragModel " - << dragModelType << endl; + Info<< "Selecting dragModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(dragModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("dragModel::New(const dictionary&)") - << "Unknown dragModelType type " << dragModelType - << ", constructor not in hash table" << nl << nl - << " Valid dragModel types are:" << nl + << "Unknown dragModel type " + << modelType << nl << nl + << "Valid dragModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -59,8 +57,4 @@ autoPtr dragModel::New(const dictionary& dict) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C index 57d0c0157b..59e80075ff 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/evaporationModel/evaporationModel/evaporationModelNew.C @@ -34,7 +34,10 @@ License Foam::autoPtr Foam::evaporationModel::New(const dictionary& dict) { - word modelType(dict.lookup("evaporationModel")); + const word modelType + ( + dict.lookup("evaporationModel") + ); Info<< "Selecting evaporationModel " << modelType << endl; @@ -44,9 +47,8 @@ Foam::evaporationModel::New(const dictionary& dict) if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("evaporationModel::New(const dictionary&)") - << "Unknown evaporationModelType type " << modelType - << ", constructor not in hash table" << nl << nl - << " Valid evaporationModel types are: " << nl + << "Unknown evaporationModel type " + << modelType << nl << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } diff --git a/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C index e1b8c42336..3c691edfac 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/heatTransferModel/heatTransferModel/heatTransferModelNew.C @@ -28,32 +28,31 @@ License #include "heatTransferModel.H" #include "noHeatTransfer.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr heatTransferModel::New +Foam::autoPtr +Foam::heatTransferModel::New ( const dictionary& dict ) { - word heatTransferModelType(dict.lookup("heatTransferModel")); + const word modelType + ( + dict.lookup("heatTransferModel") + ); - Info<< "Selecting heatTransferModel " << heatTransferModelType << endl; + Info<< "Selecting heatTransferModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(heatTransferModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("heatTransferModel::New(const dictionary&)") - << "Unknown heatTransferModelType type " - << heatTransferModelType - << ", constructor not in hash table" << nl << nl - << " Valid heatTransferModel types are:" << nl + << "Unknown heatTransferModel type " + << modelType << nl << nl + << "Valid heatTransferModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -62,8 +61,4 @@ autoPtr heatTransferModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C index 343d01a311..7ab341a38e 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/Chomiak/Chomiak.C @@ -65,7 +65,8 @@ Foam::ChomiakInjector::ChomiakInjector if (sm.injectors().size() != maxSprayAngle_.size()) { - FatalError << "ChomiakInjector::ChomiakInjector" + FatalError + << "ChomiakInjector::ChomiakInjector" << "(const dictionary& dict, spray& sm)\n" << "Wrong number of entries in maxSprayAngle" << abort(FatalError); diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C index 52c24b17f8..de57c436e6 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/blobsSwirl/blobsSwirlInjector.C @@ -68,7 +68,8 @@ Foam::blobsSwirlInjector::blobsSwirlInjector if (sm.injectors().size() != coneAngle_.size()) { - FatalError << "blobsSwirlInjector::blobsSwirlInjector" + FatalError + << "blobsSwirlInjector::blobsSwirlInjector" << "(const dictionary& dict, spray& sm)\n" << "Wrong number of entries in innerAngle" << abort(FatalError); diff --git a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C index e92af2e29a..616b0d243a 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/injectorModel/injectorModel/injectorModelNew.C @@ -28,33 +28,32 @@ License #include "injectorModel.H" #include "volFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr injectorModel::New +Foam::autoPtr +Foam::injectorModel::New ( const dictionary& dict, spray& sm ) { - word injectorModelType(dict.lookup("injectorModel")); + const word modelType + ( + dict.lookup("injectorModel") + ); - Info<< "Selecting injectorModel " - << injectorModelType << endl; + Info<< "Selecting injectorModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(injectorModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("injectorModel::New(const dictionary&, spray&)") - << "Unknown injectorModelType type " << injectorModelType - << ", constructor not in hash table" << nl << nl - << " Valid injectorModel types are:" << nl + << "Unknown injectorModel type " + << modelType << nl << nl + << "Valid injectorModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -63,8 +62,4 @@ autoPtr injectorModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C b/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C index 75a390123a..d281e6a58e 100644 --- a/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C +++ b/src/lagrangian/dieselSpray/spraySubModels/wallModel/wallModel/wallModelNew.C @@ -27,33 +27,32 @@ License #include "wallModel.H" #include "removeParcel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr wallModel::New +Foam::autoPtr +Foam::wallModel::New ( const dictionary& dict, const volVectorField& U, spray& sm ) { - word wallModelType(dict.lookup("wallModel")); + const word modelType + ( + dict.lookup("wallModel") + ); - Info<< "Selecting wallModel " << wallModelType << endl; + Info<< "Selecting wallModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(wallModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("wallModel::New(const dictionary&, const spray&)") - << "Unknown wallModelType type " << wallModelType - << ", constructor not in hash table" << nl << nl - << " Valid wallModel types are:" << nl + << "Unknown wallModel type " + << modelType << nl << nl + << "Valid wallModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << abort(FatalError); } @@ -62,8 +61,4 @@ autoPtr wallModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C index 1746dc608c..24196871fd 100644 --- a/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C +++ b/src/lagrangian/dsmc/submodels/BinaryCollisionModel/BinaryCollisionModel/BinaryCollisionModelNew.C @@ -35,14 +35,15 @@ Foam::BinaryCollisionModel::New CloudType& owner ) { - word BinaryCollisionModelType(dict.lookup("BinaryCollisionModel")); + const word modelType + ( + dict.lookup("BinaryCollisionModel") + ); - Info<< "Selecting BinaryCollisionModel " - << BinaryCollisionModelType - << endl; + Info<< "Selecting BinaryCollisionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(BinaryCollisionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +52,11 @@ Foam::BinaryCollisionModel::New "BinaryCollisionModel::New" "(const dictionary&, CloudType&)" ) - << "Unknown BinaryCollisionModelType type " - << BinaryCollisionModelType - << ", constructor not in hash table" << nl << nl - << " Valid BinaryCollisionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown BinaryCollisionModel type " + << modelType << nl << nl + << "Valid BinaryCollisionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr > diff --git a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C index 27388eb389..8a682da17e 100644 --- a/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C +++ b/src/lagrangian/dsmc/submodels/InflowBoundaryModel/InflowBoundaryModel/InflowBoundaryModelNew.C @@ -35,12 +35,15 @@ Foam::InflowBoundaryModel::New CloudType& owner ) { - word InflowBoundaryModelType(dict.lookup("InflowBoundaryModel")); + const word modelType + ( + dict.lookup("InflowBoundaryModel") + ); - Info<< "Selecting InflowBoundaryModel " << InflowBoundaryModelType << endl; + Info<< "Selecting InflowBoundaryModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(InflowBoundaryModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -48,11 +51,11 @@ Foam::InflowBoundaryModel::New ( "InflowBoundaryModel::New" "(const dictionary&, CloudType&)" - ) << "Unknown InflowBoundaryModelType type " - << InflowBoundaryModelType - << ", constructor not in hash table" << nl << nl - << " Valid InflowBoundaryModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown InflowBoundaryModel type " + << modelType << nl << nl + << "Valid InflowBoundaryModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C index b7cc575c25..bd421e2d56 100644 --- a/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C +++ b/src/lagrangian/dsmc/submodels/WallInteractionModel/WallInteractionModel/WallInteractionModelNew.C @@ -35,13 +35,15 @@ Foam::WallInteractionModel::New CloudType& owner ) { - word WallInteractionModelType(dict.lookup("WallInteractionModel")); + const word modelType + ( + dict.lookup("WallInteractionModel") + ); - Info<< "Selecting WallInteractionModel " << WallInteractionModelType - << endl; + Info<< "Selecting WallInteractionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(WallInteractionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -50,11 +52,11 @@ Foam::WallInteractionModel::New "WallInteractionModel::New" "(const dictionary&, CloudType&)" ) - << "Unknown WallInteractionModelType type " - << WallInteractionModelType - << ", constructor not in hash table" << nl << nl - << " Valid WallInteractionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << "Unknown WallInteractionModel type " + << modelType << nl << nl + << "Valid WallInteractionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C index 8cb18924cc..7110b8b7be 100644 --- a/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C +++ b/src/lagrangian/intermediate/submodels/IO/DataEntry/DataEntry/DataEntryNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::autoPtr > Foam::DataEntry::New +Foam::autoPtr< Foam::DataEntry > +Foam::DataEntry::New ( const word& entryName, const dictionary& dict @@ -43,10 +44,13 @@ Foam::autoPtr > Foam::DataEntry::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("DataEntry::New(Istream&)") - << "Unknown DataEntry type " << DataEntryType << " for DataEntry " - << entryName << ". Constructor not in hash table" << nl << nl - << " Valid DataEntry types are:" << nl + FatalErrorIn + ( + "DataEntry::New(Istream&)" + ) << "Unknown DataEntry type " + << DataEntryType << " for DataEntry " + << entryName << nl << nl + << "Valid DataEntry types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C index e81b6f021d..c503ba60f0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DispersionModel/DispersionModel/DispersionModelNew.C @@ -35,12 +35,15 @@ Foam::DispersionModel::New CloudType& owner ) { - word DispersionModelType(dict.lookup("DispersionModel")); + const word modelType + ( + dict.lookup("DispersionModel") + ); - Info<< "Selecting DispersionModel " << DispersionModelType << endl; + Info<< "Selecting DispersionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(DispersionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +54,11 @@ Foam::DispersionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown DispersionModelType type " - << DispersionModelType - << ", constructor not in hash table" << nl << nl - << " Valid DispersionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown DispersionModel type " + << modelType << nl << nl + << "Valid DispersionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C index b7028737f6..429f60378c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/DragModel/DragModel/DragModelNew.C @@ -28,18 +28,22 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template -Foam::autoPtr > Foam::DragModel::New +Foam::autoPtr > +Foam::DragModel::New ( const dictionary& dict, CloudType& owner ) { - word DragModelType(dict.lookup("DragModel")); + const word modelType + ( + dict.lookup("DragModel") + ); - Info<< "Selecting DragModel " << DragModelType << endl; + Info<< "Selecting DragModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(DragModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -50,10 +54,9 @@ Foam::autoPtr > Foam::DragModel::New "const dictionary&," "CloudType&" ")" - ) << "Unknown DragModelType type " - << DragModelType - << ", constructor not in hash table" << nl << nl - << " Valid DragModel types are:" << nl + ) << "Unknown DragModel type " + << modelType << nl << nl + << "Valid DragModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C index f7436f5ada..52a64faa82 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModel.C @@ -319,7 +319,7 @@ Foam::InjectionModel::InjectionModel Info<< " Constructing " << owner.mesh().nGeometricD() << "-D injection" << endl; - word parcelBasisType = coeffDict_.lookup("parcelBasisType"); + const word parcelBasisType = coeffDict_.lookup("parcelBasisType"); if (parcelBasisType == "mass") { parcelBasis_ = pbMass; diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C index 6624718248..552a0cc67c 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/InjectionModel/InjectionModelNew.C @@ -35,12 +35,15 @@ Foam::InjectionModel::New CloudType& owner ) { - word InjectionModelType(dict.lookup("InjectionModel")); + const word modelType + ( + dict.lookup("InjectionModel") + ); - Info<< "Selecting InjectionModel " << InjectionModelType << endl; + Info<< "Selecting InjectionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(InjectionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,10 +54,9 @@ Foam::InjectionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown InjectionModelType type " - << InjectionModelType - << ", constructor not in hash table" << nl << nl - << " Valid InjectionModel types are:" << nl + ) << "Unknown InjectionModel type " + << modelType << nl << nl + << "Valid InjectionModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C index a894432e23..07751da5e0 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PatchInteractionModel/PatchInteractionModel/PatchInteractionModelNew.C @@ -35,13 +35,15 @@ Foam::PatchInteractionModel::New CloudType& owner ) { - word PatchInteractionModelType(dict.lookup("PatchInteractionModel")); + const word modelType + ( + dict.lookup("PatchInteractionModel") + ); - Info<< "Selecting PatchInteractionModel " << PatchInteractionModelType - << endl; + Info<< "Selecting PatchInteractionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(PatchInteractionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,11 +54,11 @@ Foam::PatchInteractionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown PatchInteractionModelType type " - << PatchInteractionModelType - << ", constructor not in hash table" << nl << nl - << " Valid PatchInteractionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown PatchInteractionModel type " + << modelType << nl << nl + << "Valid PatchInteractionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C index bde423cfc4..d4df99d7e8 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PostProcessingModel/PostProcessingModelNew.C @@ -35,12 +35,15 @@ Foam::PostProcessingModel::New CloudType& owner ) { - word PostProcessingModelType(dict.lookup("PostProcessingModel")); + const word modelType + ( + dict.lookup("PostProcessingModel") + ); - Info<< "Selecting PostProcessingModel " << PostProcessingModelType << endl; + Info<< "Selecting PostProcessingModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(PostProcessingModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +54,11 @@ Foam::PostProcessingModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown PostProcessingModelType type " - << PostProcessingModelType - << ", constructor not in hash table" << nl << nl - << " Valid PostProcessingModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown PostProcessingModel type " + << modelType << nl << nl + << "Valid PostProcessingModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C index 97ced9e959..001972fcad 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/SurfaceFilmModel/SurfaceFilmModel/SurfaceFilmModelNew.C @@ -36,12 +36,15 @@ Foam::SurfaceFilmModel::New const dimensionedVector& g ) { - word SurfaceFilmModelType(dict.lookup("SurfaceFilmModel")); + const word modelType + ( + dict.lookup("SurfaceFilmModel") + ); - Info<< "Selecting SurfaceFilmModel " << SurfaceFilmModelType << endl; + Info<< "Selecting SurfaceFilmModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(SurfaceFilmModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -53,10 +56,10 @@ Foam::SurfaceFilmModel::New "CloudType&" ")" ) << "Unknown SurfaceFilmModel type " - << SurfaceFilmModelType - << ", constructor not in hash table" << nl << nl - << " Valid SurfaceFilmModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + << modelType << nl << nl + << "Valid SurfaceFilmModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner, g)); diff --git a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C index fc3f5e8f06..8e08d54321 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C +++ b/src/lagrangian/intermediate/submodels/Reacting/CompositionModel/CompositionModel/CompositionModelNew.C @@ -35,12 +35,15 @@ Foam::CompositionModel::New CloudType& owner ) { - word CompositionModelType(dict.lookup("CompositionModel")); + const word modelType + ( + dict.lookup("CompositionModel") + ); - Info<< "Selecting CompositionModel " << CompositionModelType << endl; + Info<< "Selecting CompositionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(CompositionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,10 +54,9 @@ Foam::CompositionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown CompositionModelType type " - << CompositionModelType - << ", constructor not in hash table" << nl << nl - << " Valid CompositionModel types are:" << nl + ) << "Unknown CompositionModel type " + << modelType << nl << nl + << "Valid CompositionModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C index 9f2fa34969..8b8987157d 100644 --- a/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C +++ b/src/lagrangian/intermediate/submodels/Reacting/PhaseChangeModel/PhaseChangeModel/PhaseChangeModelNew.C @@ -35,12 +35,15 @@ Foam::PhaseChangeModel::New CloudType& owner ) { - word PhaseChangeModelType(dict.lookup("PhaseChangeModel")); + const word modelType + ( + dict.lookup("PhaseChangeModel") + ); - Info<< "Selecting PhaseChangeModel " << PhaseChangeModelType << endl; + Info<< "Selecting PhaseChangeModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(PhaseChangeModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +54,11 @@ Foam::PhaseChangeModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown PhaseChangeModelType type " - << PhaseChangeModelType - << ", constructor not in hash table" << nl << nl - << " Valid PhaseChangeModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown PhaseChangeModel type " + << modelType << nl << nl + << "Valid PhaseChangeModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C index d5a24aecf6..0609c7b1b7 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/DevolatilisationModel/DevolatilisationModel/DevolatilisationModelNew.C @@ -35,13 +35,15 @@ Foam::DevolatilisationModel::New CloudType& owner ) { - word DevolatilisationModelType(dict.lookup("DevolatilisationModel")); + const word modelType + ( + dict.lookup("DevolatilisationModel") + ); - Info<< "Selecting DevolatilisationModel " << DevolatilisationModelType - << endl; + Info<< "Selecting DevolatilisationModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(DevolatilisationModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,11 +54,11 @@ Foam::DevolatilisationModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown DevolatilisationModelType type " - << DevolatilisationModelType - << ", constructor not in hash table" << nl << nl - << " Valid DevolatilisationModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown DevolatilisationModel type " + << modelType << nl << nl + << "Valid DevolatilisationModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C index a5211728a7..caca8de814 100644 --- a/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C +++ b/src/lagrangian/intermediate/submodels/ReactingMultiphase/SurfaceReactionModel/SurfaceReactionModel/SurfaceReactionModelNew.C @@ -35,13 +35,15 @@ Foam::SurfaceReactionModel::New CloudType& owner ) { - word SurfaceReactionModelType(dict.lookup("SurfaceReactionModel")); + const word modelType + ( + dict.lookup("SurfaceReactionModel") + ); - Info<< "Selecting SurfaceReactionModel " << SurfaceReactionModelType - << endl; + Info<< "Selecting SurfaceReactionModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(SurfaceReactionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,11 +54,11 @@ Foam::SurfaceReactionModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown SurfaceReactionModelType type " - << SurfaceReactionModelType - << ", constructor not in hash table" << nl << nl - << " Valid SurfaceReactionModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown SurfaceReactionModel type " + << modelType << nl << nl + << "Valid SurfaceReactionModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C index 3daef016a0..55719729b1 100644 --- a/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C +++ b/src/lagrangian/intermediate/submodels/Thermodynamic/HeatTransferModel/HeatTransferModel/HeatTransferModelNew.C @@ -35,12 +35,15 @@ Foam::HeatTransferModel::New CloudType& owner ) { - word HeatTransferModelType(dict.lookup("HeatTransferModel")); + const word modelType + ( + dict.lookup("HeatTransferModel") + ); - Info<< "Selecting HeatTransferModel " << HeatTransferModelType << endl; + Info<< "Selecting HeatTransferModel " << modelType << endl; typename dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(HeatTransferModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,11 +54,11 @@ Foam::HeatTransferModel::New "const dictionary&, " "CloudType&" ")" - ) << "Unknown HeatTransferModelType type " - << HeatTransferModelType - << ", constructor not in hash table" << nl << nl - << " Valid HeatTransferModel types are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); + ) << "Unknown HeatTransferModel type " + << modelType << nl << nl + << "Valid HeatTransferModel types are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() + << exit(FatalError); } return autoPtr >(cstrIter()(dict, owner)); diff --git a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C index b6d93b721d..b329a9a45a 100644 --- a/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C +++ b/src/lagrangian/molecularDynamics/molecule/moleculeCloud/moleculeCloud.C @@ -64,9 +64,8 @@ void Foam::moleculeCloud::buildConstProps() forAll(idList, i) { - const word& id(idList[i]); - - const dictionary& molDict(moleculePropertiesDict.subDict(id)); + const word& id = idList[i]; + const dictionary& molDict = moleculePropertiesDict.subDict(id); List siteIdNames = molDict.lookup("siteIds"); @@ -1162,9 +1161,9 @@ void Foam::moleculeCloud::applyConstraintsAndThermostats void Foam::moleculeCloud::writeXYZ(const fileName& fName) const { - OFstream str(fName); + OFstream os(fName); - str << nSites() << nl << "moleculeCloud site positions in angstroms" << nl; + os << nSites() << nl << "moleculeCloud site positions in angstroms" << nl; forAllConstIter(moleculeCloud, *this, mol) { @@ -1174,7 +1173,7 @@ void Foam::moleculeCloud::writeXYZ(const fileName& fName) const { const point& sP = mol().sitePositions()[i]; - str << pot_.siteIdList()[cP.siteIds()[i]] + os << pot_.siteIdList()[cP.siteIds()[i]] << ' ' << sP.x()*1e10 << ' ' << sP.y()*1e10 << ' ' << sP.z()*1e10 diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C index c6348ccf55..66d8b4d636 100644 --- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C +++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunctionNew.C @@ -25,31 +25,28 @@ License #include "energyScalingFunction.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr energyScalingFunction::New +Foam::autoPtr +Foam::energyScalingFunction::New ( const word& name, const dictionary& energyScalingFunctionProperties, const pairPotential& pairPot ) { - word energyScalingFunctionTypeName + const word scalingType ( energyScalingFunctionProperties.lookup("energyScalingFunction") ); Info<< "Selecting energy scaling function " - << energyScalingFunctionTypeName << " for " + << scalingType << " for " << name << " potential energy." << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(energyScalingFunctionTypeName); + dictionaryConstructorTablePtr_->find(scalingType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -57,8 +54,8 @@ autoPtr energyScalingFunction::New ( "energyScalingFunction::New()" ) << "Unknown energyScalingFunction type " - << energyScalingFunctionTypeName << nl << nl - << "Valid energyScalingFunctions are: " << nl + << scalingType << nl << nl + << "Valid energyScalingFunctions are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -68,8 +65,4 @@ autoPtr energyScalingFunction::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C index 468c728777..acbec90e29 100644 --- a/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C +++ b/src/lagrangian/molecularDynamics/potential/pairPotential/basic/pairPotentialNew.C @@ -25,27 +25,27 @@ License #include "pairPotential.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -autoPtr pairPotential::New +Foam::autoPtr +Foam::pairPotential::New ( const word& name, const dictionary& pairPotentialProperties ) { - word pairPotentialTypeName(pairPotentialProperties.lookup("pairPotential")); + const word potentialType + ( + pairPotentialProperties.lookup("pairPotential") + ); Info<< nl << "Selecting intermolecular pair potential " - << pairPotentialTypeName << " for " + << potentialType << " for " << name << " interaction." << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(pairPotentialTypeName); + dictionaryConstructorTablePtr_->find(potentialType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -53,8 +53,8 @@ autoPtr pairPotential::New ( "pairPotential::New()" ) << "Unknown pairPotential type " - << pairPotentialTypeName << nl << nl - << "Valid pairPotentials are: " << nl + << potentialType << nl << nl + << "Valid pairPotentials are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -64,8 +64,4 @@ autoPtr pairPotential::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.C b/src/lagrangian/molecularDynamics/potential/potential/potential.C index d84013236f..4b3475f66c 100644 --- a/src/lagrangian/molecularDynamics/potential/potential/potential.C +++ b/src/lagrangian/molecularDynamics/potential/potential/potential.C @@ -27,10 +27,9 @@ License // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict) +void Foam::potential::setSiteIdList(const dictionary& moleculePropertiesDict) { DynamicList siteIdList; - DynamicList pairPotentialSiteIdList; forAll(idList_, i) @@ -39,7 +38,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict) if (!moleculePropertiesDict.found(id)) { - FatalErrorIn("potential::setSiteIdList(const IOdictionary&)") + FatalErrorIn("potential::setSiteIdList(const dictionary&)") << id << " molecule subDict not found" << nl << abort(FatalError); } @@ -66,7 +65,7 @@ void Foam::potential::setSiteIdList(const IOdictionary& moleculePropertiesDict) if (findIndex(siteIdNames, siteId) == -1) { - FatalErrorIn("potential::setSiteIdList(const IOdictionary&)") + FatalErrorIn("potential::setSiteIdList(const dictionary&)") << siteId << " in pairPotentialSiteIds is not in siteIds: " << siteIdNames << nl << abort(FatalError); } @@ -112,21 +111,22 @@ void Foam::potential::potential::readPotentialDict() idList_ = List(idListDict.lookup("idList")); - IOdictionary moleculePropertiesDict + setSiteIdList ( - IOobject + IOdictionary ( - "moleculeProperties", - mesh_.time().constant(), - mesh_, - IOobject::MUST_READ, - IOobject::NO_WRITE, - false + IOobject + ( + "moleculeProperties", + mesh_.time().constant(), + mesh_, + IOobject::MUST_READ, + IOobject::NO_WRITE, + false + ) ) ); - setSiteIdList(moleculePropertiesDict); - List pairPotentialSiteIdList ( SubList(siteIdList_, nPairPotIds_) diff --git a/src/lagrangian/molecularDynamics/potential/potential/potential.H b/src/lagrangian/molecularDynamics/potential/potential/potential.H index 8ea0043784..1ebf03a428 100644 --- a/src/lagrangian/molecularDynamics/potential/potential/potential.H +++ b/src/lagrangian/molecularDynamics/potential/potential/potential.H @@ -76,7 +76,7 @@ class potential // Private Member Functions - void setSiteIdList(const IOdictionary& moleculePropertiesDict); + void setSiteIdList(const dictionary& moleculePropertiesDict); void readPotentialDict(); diff --git a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C index 2950c4578d..917d2ad209 100644 --- a/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C +++ b/src/lagrangian/molecularDynamics/potential/tetherPotential/basic/tetherPotentialNew.C @@ -27,29 +27,24 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr tetherPotential::New +Foam::autoPtr +Foam::tetherPotential::New ( const word& name, const dictionary& tetherPotentialProperties ) { - word - tetherPotentialTypeName - ( - tetherPotentialProperties.lookup("tetherPotential") - ); + const word potentialType + ( + tetherPotentialProperties.lookup("tetherPotential") + ); Info<< nl << "Selecting tether potential " - << tetherPotentialTypeName << " for " + << potentialType << " for " << name << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(tetherPotentialTypeName); + dictionaryConstructorTablePtr_->find(potentialType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -57,8 +52,8 @@ autoPtr tetherPotential::New ( "tetherPotential::New()" ) << "Unknown tetherPotential type " - << tetherPotentialTypeName << nl << nl - << "Valid tetherPotentials are: " << nl + << potentialType << nl << nl + << "Valid tetherPotentials are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -68,8 +63,4 @@ autoPtr tetherPotential::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/mesh/blockMesh/curvedEdges/curvedEdge.C b/src/mesh/blockMesh/curvedEdges/curvedEdge.C index 85b2921fcc..84d2aa3460 100644 --- a/src/mesh/blockMesh/curvedEdges/curvedEdge.C +++ b/src/mesh/blockMesh/curvedEdges/curvedEdge.C @@ -74,7 +74,8 @@ Foam::autoPtr Foam::curvedEdge::clone() const } -Foam::autoPtr Foam::curvedEdge::New +Foam::autoPtr +Foam::curvedEdge::New ( const pointField& points, Istream& is @@ -87,7 +88,7 @@ Foam::autoPtr Foam::curvedEdge::New << endl; } - word edgeType(is); + const word edgeType(is); IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(edgeType); @@ -95,7 +96,8 @@ Foam::autoPtr Foam::curvedEdge::New if (cstrIter == IstreamConstructorTablePtr_->end()) { FatalErrorIn("curvedEdge::New(const pointField&, Istream&)") - << "Unknown curvedEdge type " << edgeType << endl << endl + << "Unknown curvedEdge type " + << edgeType << nl << nl << "Valid curvedEdge types are" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); diff --git a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C index 18f6148270..54d8b2d895 100644 --- a/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C +++ b/src/meshTools/coordinateSystems/coordinateRotation/coordinateRotation.C @@ -127,7 +127,8 @@ Foam::coordinateRotation::coordinateRotation // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::coordinateRotation::New +Foam::autoPtr +Foam::coordinateRotation::New ( const dictionary& dict ) @@ -159,7 +160,8 @@ Foam::autoPtr Foam::coordinateRotation::New ( "coordinateRotation::New(const dictionary&)", dict - ) << "Unknown coordinateRotation type " << rotType << nl << nl + ) << "Unknown coordinateRotation type " + << rotType << nl << nl << "Valid coordinateRotation types are :" << nl << "[default: axes " << typeName_() << "]" << dictionaryConstructorTablePtr_->sortedToc() diff --git a/src/meshTools/coordinateSystems/coordinateSystemNew.C b/src/meshTools/coordinateSystems/coordinateSystemNew.C index 2ee1df3253..87af596881 100644 --- a/src/meshTools/coordinateSystems/coordinateSystemNew.C +++ b/src/meshTools/coordinateSystems/coordinateSystemNew.C @@ -28,7 +28,8 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::coordinateSystem::New +Foam::autoPtr +Foam::coordinateSystem::New ( const word& name, const dictionary& dict @@ -62,7 +63,8 @@ Foam::autoPtr Foam::coordinateSystem::New ( "coordinateSystem::New(const word&, const dictionary&)", dict - ) << "Unknown coordinateSystem type " << coordType << nl << nl + ) << "Unknown coordinateSystem type " + << coordType << nl << nl << "Valid coordinateSystem types are :" << nl << "[default: " << typeName_() << "]" << dictionaryConstructorTablePtr_->sortedToc() @@ -73,7 +75,8 @@ Foam::autoPtr Foam::coordinateSystem::New } -Foam::autoPtr Foam::coordinateSystem::New +Foam::autoPtr +Foam::coordinateSystem::New ( const word& coordType, const word& name, @@ -99,7 +102,8 @@ Foam::autoPtr Foam::coordinateSystem::New "coordinateSystem::New(const word&, const word&, " "const point&, const coordinateRotation&) : " "constructing coordinateSystem" - ) << "Unknown coordinateSystem type " << coordType << nl << nl + ) << "Unknown coordinateSystem type " + << coordType << nl << nl << "Valid coordinateSystem types are :" << nl << origRotationConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -109,7 +113,8 @@ Foam::autoPtr Foam::coordinateSystem::New } -Foam::autoPtr Foam::coordinateSystem::New +Foam::autoPtr +Foam::coordinateSystem::New ( Istream& is ) diff --git a/src/meshTools/searchableSurface/searchableSurface.C b/src/meshTools/searchableSurface/searchableSurface.C index 5d6f6eb7eb..8c2deab0c3 100644 --- a/src/meshTools/searchableSurface/searchableSurface.C +++ b/src/meshTools/searchableSurface/searchableSurface.C @@ -30,13 +30,16 @@ License namespace Foam { - -defineTypeNameAndDebug(searchableSurface, 0); -defineRunTimeSelectionTable(searchableSurface, dict); + defineTypeNameAndDebug(searchableSurface, 0); + defineRunTimeSelectionTable(searchableSurface, dict); +} -// Construct named object from dictionary -autoPtr searchableSurface::New +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +Foam::autoPtr +Foam::searchableSurface::New ( const word& searchableSurfaceType, const IOobject& io, @@ -78,7 +81,4 @@ Foam::searchableSurface::~searchableSurface() {} -} // End namespace Foam - - // ************************************************************************* // diff --git a/src/meshTools/sets/topoSetSource/topoSetSource.C b/src/meshTools/sets/topoSetSource/topoSetSource.C index bddeca6e29..1830364750 100644 --- a/src/meshTools/sets/topoSetSource/topoSetSource.C +++ b/src/meshTools/sets/topoSetSource/topoSetSource.C @@ -31,13 +31,43 @@ License namespace Foam { + defineTypeNameAndDebug(topoSetSource, 0); + defineRunTimeSelectionTable(topoSetSource, word); + defineRunTimeSelectionTable(topoSetSource, istream); +} -defineTypeNameAndDebug(topoSetSource, 0); -defineRunTimeSelectionTable(topoSetSource, word); -defineRunTimeSelectionTable(topoSetSource, istream); -// Construct named object from dictionary -autoPtr topoSetSource::New +Foam::HashTable* Foam::topoSetSource::usageTablePtr_ = NULL; + +template<> +const char* Foam::NamedEnum::names[] = +{ + "clear", + "new", + "invert", + "add", + "delete", + "subset", + "list", + "remove" +}; + + +const Foam::NamedEnum + Foam::topoSetSource::actionNames_; + + +const Foam::string Foam::topoSetSource::illegalSource_ +( + "Illegal topoSetSource name" +); + + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::topoSetSource::New ( const word& topoSetSourceType, const polyMesh& mesh, @@ -65,8 +95,8 @@ autoPtr topoSetSource::New } -// Construct named object from Istream -autoPtr topoSetSource::New +Foam::autoPtr +Foam::topoSetSource::New ( const word& topoSetSourceType, const polyMesh& mesh, @@ -94,35 +124,6 @@ autoPtr topoSetSource::New } -} // End namespace Foam - - -Foam::HashTable* Foam::topoSetSource::usageTablePtr_ = NULL; - -template<> -const char* Foam::NamedEnum::names[] = -{ - "clear", - "new", - "invert", - "add", - "delete", - "subset", - "list", - "remove" -}; - - -const Foam::NamedEnum - Foam::topoSetSource::actionNames_; - - -const Foam::string Foam::topoSetSource::illegalSource_ -( - "Illegal topoSetSource name" -); - - Foam::Istream& Foam::topoSetSource::checkIs(Istream& is) { if (is.good() && !is.eof()) @@ -161,7 +162,6 @@ void Foam::topoSetSource::addOrDelete // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::topoSetSource::topoSetSource(const polyMesh& mesh) : mesh_(mesh) diff --git a/src/meshTools/sets/topoSets/topoSet.C b/src/meshTools/sets/topoSets/topoSet.C index c578771759..6e4bc3e885 100644 --- a/src/meshTools/sets/topoSets/topoSet.C +++ b/src/meshTools/sets/topoSets/topoSet.C @@ -29,21 +29,21 @@ License #include "boundBox.H" #include "Time.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(topoSet, 0); -defineRunTimeSelectionTable(topoSet, word); -defineRunTimeSelectionTable(topoSet, size); -defineRunTimeSelectionTable(topoSet, set); + defineTypeNameAndDebug(topoSet, 0); + defineRunTimeSelectionTable(topoSet, word); + defineRunTimeSelectionTable(topoSet, size); + defineRunTimeSelectionTable(topoSet, set); +} -// Construct named object from existing set. -autoPtr topoSet::New +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr +Foam::topoSet::New ( const word& setType, const polyMesh& mesh, @@ -73,8 +73,8 @@ autoPtr topoSet::New } -// Construct named object from size (non-existing set). -autoPtr topoSet::New +Foam::autoPtr +Foam::topoSet::New ( const word& setType, const polyMesh& mesh, @@ -104,8 +104,8 @@ autoPtr topoSet::New } -// Construct named object from existing set. -autoPtr topoSet::New +Foam::autoPtr +Foam::topoSet::New ( const word& setType, const polyMesh& mesh, @@ -135,7 +135,7 @@ autoPtr topoSet::New } -Foam::fileName topoSet::topoSet::localPath +Foam::fileName Foam::topoSet::topoSet::localPath ( const polyMesh& mesh, const word& name @@ -149,7 +149,7 @@ Foam::fileName topoSet::topoSet::localPath // Update stored cell numbers using map. // Do in two passes to prevent allocation if nothing changed. -void topoSet::topoSet::updateLabels(const labelList& map) +void Foam::topoSet::topoSet::updateLabels(const labelList& map) { // Iterate over map to see if anything changed bool changed = false; @@ -197,7 +197,7 @@ void topoSet::topoSet::updateLabels(const labelList& map) } -void topoSet::topoSet::check(const label maxLabel) +void Foam::topoSet::topoSet::check(const label maxLabel) { forAllConstIter(topoSet, *this, iter) { @@ -214,7 +214,7 @@ void topoSet::topoSet::check(const label maxLabel) // Write maxElem elements, starting at iter. Updates iter and elemI. -void topoSet::writeDebug +void Foam::topoSet::writeDebug ( Ostream& os, const label maxElem, @@ -239,7 +239,7 @@ void topoSet::writeDebug // Write maxElem elements, starting at iter. Updates iter and elemI. -void topoSet::writeDebug +void Foam::topoSet::writeDebug ( Ostream& os, const pointField& coords, @@ -264,7 +264,7 @@ void topoSet::writeDebug } -void topoSet::writeDebug +void Foam::topoSet::writeDebug ( Ostream& os, const pointField& coords, @@ -308,7 +308,7 @@ void topoSet::writeDebug // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -topoSet::topoSet(const IOobject& obj, const word& wantedType) +Foam::topoSet::topoSet(const IOobject& obj, const word& wantedType) : regIOobject(obj) { @@ -331,7 +331,7 @@ topoSet::topoSet(const IOobject& obj, const word& wantedType) } -topoSet::topoSet +Foam::topoSet::topoSet ( const polyMesh& mesh, const word& wantedType, @@ -378,7 +378,7 @@ topoSet::topoSet } -topoSet::topoSet +Foam::topoSet::topoSet ( const polyMesh& mesh, const word& name, @@ -408,7 +408,7 @@ topoSet::topoSet {} -topoSet::topoSet +Foam::topoSet::topoSet ( const polyMesh& mesh, const word& name, @@ -438,14 +438,14 @@ topoSet::topoSet {} -topoSet::topoSet(const IOobject& obj, const label size) +Foam::topoSet::topoSet(const IOobject& obj, const label size) : regIOobject(obj), labelHashSet(size) {} -topoSet::topoSet(const IOobject& obj, const labelHashSet& set) +Foam::topoSet::topoSet(const IOobject& obj, const labelHashSet& set) : regIOobject(obj), labelHashSet(set) @@ -455,13 +455,13 @@ topoSet::topoSet(const IOobject& obj, const labelHashSet& set) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -topoSet::~topoSet() +Foam::topoSet::~topoSet() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void topoSet::invert(const label maxLen) +void Foam::topoSet::invert(const label maxLen) { // Keep copy of current set. labelHashSet currentSet(*this); @@ -480,7 +480,7 @@ void topoSet::invert(const label maxLen) } -void topoSet::subset(const topoSet& set) +void Foam::topoSet::subset(const topoSet& set) { // Keep copy of current set. labelHashSet currentSet(*this); @@ -499,7 +499,7 @@ void topoSet::subset(const topoSet& set) } -void topoSet::addSet(const topoSet& set) +void Foam::topoSet::addSet(const topoSet& set) { forAllConstIter(topoSet, set, iter) { @@ -508,7 +508,7 @@ void topoSet::addSet(const topoSet& set) } -void topoSet::deleteSet(const topoSet& set) +void Foam::topoSet::deleteSet(const topoSet& set) { forAllConstIter(topoSet, set, iter) { @@ -517,13 +517,13 @@ void topoSet::deleteSet(const topoSet& set) } -void topoSet::sync(const polyMesh&) +void Foam::topoSet::sync(const polyMesh&) { notImplemented("topoSet::sync(const polyMesh&)"); } -void topoSet::writeDebug(Ostream& os, const label maxLen) const +void Foam::topoSet::writeDebug(Ostream& os, const label maxLen) const { label n = 0; @@ -554,7 +554,7 @@ void topoSet::writeDebug(Ostream& os, const label maxLen) const } -//void topoSet::writeDebug +//void Foam::topoSet::writeDebug //( // Ostream&, // const primitiveMesh&, @@ -568,13 +568,13 @@ void topoSet::writeDebug(Ostream& os, const label maxLen) const //} -bool topoSet::writeData(Ostream& os) const +bool Foam::topoSet::writeData(Ostream& os) const { return (os << *this).good(); } -void topoSet::updateMesh(const mapPolyMesh&) +void Foam::topoSet::updateMesh(const mapPolyMesh&) { notImplemented("topoSet::updateMesh(const mapPolyMesh&)"); } @@ -590,14 +590,10 @@ void topoSet::updateMesh(const mapPolyMesh&) // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -void topoSet::operator=(const topoSet& rhs) +void Foam::topoSet::operator=(const topoSet& rhs) { labelHashSet::operator=(rhs); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C index 844272e98b..adc86641a8 100644 --- a/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C +++ b/src/parallel/decompose/decompositionMethods/decompositionMethod/decompositionMethod.C @@ -42,18 +42,21 @@ namespace Foam // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::decompositionMethod::New +Foam::autoPtr +Foam::decompositionMethod::New ( const dictionary& decompositionDict ) { - word decompositionMethodTypeName(decompositionDict.lookup("method")); + const word methodType + ( + decompositionDict.lookup("method") + ); - Info<< "Selecting decompositionMethod " - << decompositionMethodTypeName << endl; + Info<< "Selecting decompositionMethod " << methodType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(decompositionMethodTypeName); + dictionaryConstructorTablePtr_->find(methodType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -62,7 +65,7 @@ Foam::autoPtr Foam::decompositionMethod::New "decompositionMethod::New" "(const dictionary& decompositionDict)" ) << "Unknown decompositionMethod " - << decompositionMethodTypeName << endl << endl + << methodType << nl << nl << "Valid decompositionMethods are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -72,19 +75,22 @@ Foam::autoPtr Foam::decompositionMethod::New } -Foam::autoPtr Foam::decompositionMethod::New +Foam::autoPtr +Foam::decompositionMethod::New ( const dictionary& decompositionDict, const polyMesh& mesh ) { - word decompositionMethodTypeName(decompositionDict.lookup("method")); + const word methodType + ( + decompositionDict.lookup("method") + ); - Info<< "Selecting decompositionMethod " - << decompositionMethodTypeName << endl; + Info<< "Selecting decompositionMethod " << methodType << endl; dictionaryMeshConstructorTable::iterator cstrIter = - dictionaryMeshConstructorTablePtr_->find(decompositionMethodTypeName); + dictionaryMeshConstructorTablePtr_->find(methodType); if (cstrIter == dictionaryMeshConstructorTablePtr_->end()) { @@ -94,7 +100,7 @@ Foam::autoPtr Foam::decompositionMethod::New "(const dictionary& decompositionDict, " "const polyMesh& mesh)" ) << "Unknown decompositionMethod " - << decompositionMethodTypeName << endl << endl + << methodType << nl << nl << "Valid decompositionMethods are : " << endl << dictionaryMeshConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C b/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C index 1c3619a17e..98f8081608 100644 --- a/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C +++ b/src/parallel/decompose/decompositionMethods/hierarchGeomDecomp/hierarchGeomDecomp.C @@ -53,7 +53,7 @@ namespace Foam void Foam::hierarchGeomDecomp::setDecompOrder() { - word order(geomDecomDict_.lookup("order")); + const word order(geomDecomDict_.lookup("order")); if (order.size() != 3) { diff --git a/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C b/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C index e95a314581..ef2930b759 100644 --- a/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C +++ b/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::calcType::New +Foam::autoPtr +Foam::calcType::New ( const word& calcTypeName ) @@ -40,9 +41,8 @@ Foam::autoPtr Foam::calcType::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("calcType::New()") - << " unknown calcType type " << calcTypeName - << ", constructor not in hash table" << nl << nl - << " Valid calcType selections are: " << nl + << "Unknown calcType type " << calcTypeName + << "Valid calcType selections are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << nl << abort(FatalError); } diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C index 37a60039f6..19d639eaf2 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraint/sixDoFRigidBodyMotionConstraintNew.C @@ -30,17 +30,16 @@ License Foam::autoPtr Foam::sixDoFRigidBodyMotionConstraint::New(const dictionary& sDoFRBMCDict) { - word sixDoFRigidBodyMotionConstraintTypeName = - sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint"); + const word constraintType + ( + sDoFRBMCDict.lookup("sixDoFRigidBodyMotionConstraint") + ); // Info<< "Selecting sixDoFRigidBodyMotionConstraint function " - // << sixDoFRigidBodyMotionConstraintTypeName << endl; + // << constraintType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find - ( - sixDoFRigidBodyMotionConstraintTypeName - ); + dictionaryConstructorTablePtr_->find(constraintType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,8 +50,8 @@ Foam::sixDoFRigidBodyMotionConstraint::New(const dictionary& sDoFRBMCDict) "const dictionary& sDoFRBMCDict" ")" ) << "Unknown sixDoFRigidBodyMotionConstraint type " - << sixDoFRigidBodyMotionConstraintTypeName << endl << endl - << "Valid sixDoFRigidBodyMotionConstraints are : " << endl + << constraintType << nl << nl + << "Valid sixDoFRigidBodyMotionConstraints are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C index 71eb61ea3b..05b575e946 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraint/sixDoFRigidBodyMotionRestraintNew.C @@ -30,17 +30,16 @@ License Foam::autoPtr Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict) { - word sixDoFRigidBodyMotionRestraintTypeName = - sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint"); + const word restraintType + ( + sDoFRBMRDict.lookup("sixDoFRigidBodyMotionRestraint") + ); // Info<< "Selecting sixDoFRigidBodyMotionRestraint function " - // << sixDoFRigidBodyMotionRestraintTypeName << endl; + // << restraintType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find - ( - sixDoFRigidBodyMotionRestraintTypeName - ); + dictionaryConstructorTablePtr_->find(restraintType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -51,8 +50,8 @@ Foam::sixDoFRigidBodyMotionRestraint::New(const dictionary& sDoFRBMRDict) "const dictionary& sDoFRBMRDict" ")" ) << "Unknown sixDoFRigidBodyMotionRestraint type " - << sixDoFRigidBodyMotionRestraintTypeName << endl << endl - << "Valid sixDoFRigidBodyMotionRestraints are : " << endl + << restraintType << nl << nl + << "Valid sixDoFRigidBodyMotionRestraint types are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C index 285eb7ac10..d24ac8d366 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyMotion/sixDoFRigidBodyMotionRestraint/tabulatedAxialAngularSpring/tabulatedAxialAngularSpring.C @@ -193,7 +193,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::read moment_ = interpolationTable(sDoFRBMRCoeffs_); - word angleFormat = sDoFRBMRCoeffs_.lookup("angleFormat"); + const word angleFormat = sDoFRBMRCoeffs_.lookup("angleFormat"); if (angleFormat == "degrees" || angleFormat == "degree") { @@ -210,7 +210,7 @@ bool Foam::sixDoFRigidBodyMotionRestraints::tabulatedAxialAngularSpring::read "Foam::sixDoFRigidBodyMotionRestraints::" "tabulatedAxialAngularSpring::read" "(" - "const dictionary& sDoFRBMCDict" + "const dictionary&" ")" ) << "angleFormat must be degree, degrees, radian or radians" diff --git a/src/sampling/sampledSet/sampledSet/sampledSet.C b/src/sampling/sampledSet/sampledSet/sampledSet.C index 152016b7a3..fa867d813f 100644 --- a/src/sampling/sampledSet/sampledSet/sampledSet.C +++ b/src/sampling/sampledSet/sampledSet/sampledSet.C @@ -406,7 +406,8 @@ Foam::sampledSet::~sampledSet() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::autoPtr Foam::sampledSet::New +Foam::autoPtr +Foam::sampledSet::New ( const word& name, const polyMesh& mesh, @@ -414,7 +415,10 @@ Foam::autoPtr Foam::sampledSet::New const dictionary& dict ) { - word sampleType(dict.lookup("type")); + const word sampleType + ( + dict.lookup("type") + ); wordConstructorTable::iterator cstrIter = wordConstructorTablePtr_->find(sampleType); @@ -423,10 +427,10 @@ Foam::autoPtr Foam::sampledSet::New { FatalErrorIn ( - "sampledSet::New(const word&, " - "const polyMesh&, meshSearch&, const dictionary&)" - ) << "Unknown sample type " << sampleType - << endl << endl + "sampledSet::New" + "(const word&, const polyMesh&, meshSearch&, const dictionary&)" + ) << "Unknown sample type " + << sampleType << nl << nl << "Valid sample types : " << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/sampling/sampledSet/writers/writer.C b/src/sampling/sampledSet/writers/writer.C index e4a4b5f032..5accc37a0d 100644 --- a/src/sampling/sampledSet/writers/writer.C +++ b/src/sampling/sampledSet/writers/writer.C @@ -31,7 +31,8 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // template -Foam::autoPtr > Foam::writer::New +Foam::autoPtr< Foam::writer > +Foam::writer::New ( const word& writeType ) @@ -45,8 +46,8 @@ Foam::autoPtr > Foam::writer::New FatalErrorIn ( "writer::New(const word&)" - ) << "Unknown write type " << writeType - << endl << endl + ) << "Unknown write type " + << writeType << nl << nl << "Valid write types : " << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C index 21e6ac7e96..8422825104 100644 --- a/src/sampling/sampledSurface/sampledSurface/sampledSurface.C +++ b/src/sampling/sampledSurface/sampledSurface/sampledSurface.C @@ -122,7 +122,10 @@ Foam::sampledSurface::New const dictionary& dict ) { - word sampleType(dict.lookup("type")); + const word sampleType + ( + dict.lookup("type") + ); if (debug) { Info<< "Selecting sampledType " << sampleType << endl; @@ -137,8 +140,8 @@ Foam::sampledSurface::New ( "sampledSurface::New" "(const word&, const polyMesh&, const dictionary&)" - ) << "Unknown sample type " << sampleType - << endl << endl + ) << "Unknown sample type " + << sampleType << nl << nl << "Valid sample types : " << endl << wordConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C index 7bddebcc8e..ff382bb6c3 100644 --- a/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C +++ b/src/surfaceFilmModels/submodels/kinematic/injectionModel/injectionModel/injectionModelNew.C @@ -34,7 +34,10 @@ Foam::surfaceFilmModels::injectionModel::New const dictionary& dict ) { - word modelType(dict.lookup("injectionModel")); + const word modelType + ( + dict.lookup("injectionModel") + ); Info<< " Selecting injectionModel " << modelType << endl; diff --git a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C index 7cc04c0027..4ac8687971 100644 --- a/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C +++ b/src/surfaceFilmModels/submodels/thermo/phaseChangeModel/phaseChangeModel/phaseChangeModelNew.C @@ -34,7 +34,10 @@ Foam::surfaceFilmModels::phaseChangeModel::New const dictionary& dict ) { - word modelType(dict.lookup("phaseChangeModel")); + const word modelType + ( + dict.lookup("phaseChangeModel") + ); Info<< " Selecting phaseChangeModel " << modelType << endl; diff --git a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C index fb9d7e3bb6..78ac50b30f 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C +++ b/src/surfaceFilmModels/surfaceFilmModel/surfaceFilmModel/surfaceFilmModelNew.C @@ -36,10 +36,10 @@ Foam::surfaceFilmModels::surfaceFilmModel::New const dimensionedVector& g ) { - word modelType; - - { - IOdictionary surfaceFilmPropertiesDict + // get model name, but do not register the dictionary + const word modelType + ( + IOdictionary ( IOobject ( @@ -50,10 +50,8 @@ Foam::surfaceFilmModels::surfaceFilmModel::New IOobject::NO_WRITE, false ) - ); - - surfaceFilmPropertiesDict.lookup("surfaceFilmModel") >> modelType; - } + ).lookup("surfaceFilmModel") + ); Info<< "Selecting surfaceFilmModel " << modelType << endl; diff --git a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C index 9d323327b8..bf22d0cb73 100644 --- a/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C +++ b/src/thermophysicalModels/barotropicCompressibilityModel/barotropicCompressibilityModel/barotropicCompressibilityModelNew.C @@ -35,16 +35,15 @@ Foam::barotropicCompressibilityModel::New const word& psiName ) { - word bcModelTypeName + const word modelType ( compressibilityProperties.lookup("barotropicCompressibilityModel") ); - Info<< "Selecting compressibility model " - << bcModelTypeName << endl; + Info<< "Selecting compressibility model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(bcModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -52,8 +51,8 @@ Foam::barotropicCompressibilityModel::New ( "barotropicCompressibilityModel::New(const volScalarField&)" ) << "Unknown barotropicCompressibilityModel type " - << bcModelTypeName << endl << endl - << "Valid barotropicCompressibilityModels are : " << endl + << modelType << nl << nl + << "Valid barotropicCompressibilityModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C index 4fe563c9e6..81013626c8 100644 --- a/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C +++ b/src/thermophysicalModels/basic/psiThermo/basicPsiThermo/basicPsiThermoNew.C @@ -27,18 +27,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::basicPsiThermo::New +Foam::autoPtr +Foam::basicPsiThermo::New ( const fvMesh& mesh ) { - word thermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -46,22 +45,21 @@ Foam::autoPtr Foam::basicPsiThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> thermoTypeName; - } - - Info<< "Selecting thermodynamics package " << thermoTypeName << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(thermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("basicPsiThermo::New(const fvMesh&)") - << "Unknown basicPsiThermo type " << thermoTypeName << nl << nl + << "Unknown basicPsiThermo type " << modelType << nl << nl << "Valid basicPsiThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); diff --git a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C index 101f05d4fe..19ec52d434 100644 --- a/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C +++ b/src/thermophysicalModels/basic/rhoThermo/basicRhoThermo/basicRhoThermoNew.C @@ -27,18 +27,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::basicRhoThermo::New +Foam::autoPtr +Foam::basicRhoThermo::New ( const fvMesh& mesh ) { - word thermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -46,22 +45,22 @@ Foam::autoPtr Foam::basicRhoThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> thermoTypeName; - } - - Info<< "Selecting thermodynamics package " << thermoTypeName << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(thermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("basicRhoThermo::New(const fvMesh&)") - << "Unknown basicRhoThermo type " << thermoTypeName << nl << nl + << "Unknown basicRhoThermo type " + << modelType << nl << nl << "Valid basicRhoThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C index 85784a6ad5..8ba8a2b7e3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/psiChemistryModel/psiChemistryModelNew.C @@ -27,20 +27,17 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::psiChemistryModel::New +Foam::autoPtr +Foam::psiChemistryModel::New ( const fvMesh& mesh ) { - word psiChemistryModelType; - word thermoTypeName; - word userModel; - - // Enclose the creation of the chemistrtyProperties to ensure it is - // deleted before the chemistrtyProperties is created otherwise the - // dictionary is entered in the database twice - { - IOdictionary chemistryPropertiesDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word userModel + ( + IOdictionary ( IOobject ( @@ -48,27 +45,26 @@ Foam::autoPtr Foam::psiChemistryModel::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("psiChemistryModel") + ); - chemistryPropertiesDict.lookup("psiChemistryModel") >> userModel; + // construct chemistry model type name by inserting first template argument + const label tempOpen = userModel.find('<'); + const label tempClose = userModel.find('>'); - // construct chemistry model type name by inserting first template - // argument - label tempOpen = userModel.find('<'); - label tempClose = userModel.find('>'); + const word className = userModel(0, tempOpen); + const word thermoTypeName = + userModel(tempOpen + 1, tempClose - tempOpen - 1); - word className = userModel(0, tempOpen); - thermoTypeName = userModel(tempOpen + 1, tempClose - tempOpen - 1); - - psiChemistryModelType = - className + '<' + typeName + ',' + thermoTypeName + '>'; - } + const word modelType = + className + '<' + typeName + ',' + thermoTypeName + '>'; if (debug) { - Info<< "Selecting psiChemistryModel " << psiChemistryModelType << endl; + Info<< "Selecting psiChemistryModel " << modelType << endl; } else { @@ -76,16 +72,18 @@ Foam::autoPtr Foam::psiChemistryModel::New } fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(psiChemistryModelType); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { if (debug) { FatalErrorIn("psiChemistryModelBase::New(const mesh&)") - << "Unknown psiChemistryModel type " << psiChemistryModelType - << nl << nl << "Valid psiChemistryModel types are:" << nl - << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); + << "Unknown psiChemistryModel type " + << modelType << nl << nl + << "Valid psiChemistryModel types are:" << nl + << fvMeshConstructorTablePtr_->sortedToc() << nl + << exit(FatalError); } else { diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C index 6f3b6c4b7c..049549a2e3 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/rhoChemistryModel/rhoChemistryModelNew.C @@ -27,20 +27,17 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::rhoChemistryModel::New +Foam::autoPtr +Foam::rhoChemistryModel::New ( const fvMesh& mesh ) { - word rhoChemistryModelType; - word thermoTypeName; - word userModel; - - // Enclose the creation of the chemistrtyProperties to ensure it is - // deleted before the chemistrtyProperties is created otherwise the - // dictionary is entered in the database twice - { - IOdictionary chemistryPropertiesDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word userModel + ( + IOdictionary ( IOobject ( @@ -48,27 +45,26 @@ Foam::autoPtr Foam::rhoChemistryModel::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("rhoChemistryModel") + ); - chemistryPropertiesDict.lookup("rhoChemistryModel") >> userModel; + // construct chemistry model type name by inserting first template argument + const label tempOpen = userModel.find('<'); + const label tempClose = userModel.find('>'); - // construct chemistry model type name by inserting first template - // argument - label tempOpen = userModel.find('<'); - label tempClose = userModel.find('>'); + const word className = userModel(0, tempOpen); + const word thermoTypeName = + userModel(tempOpen + 1, tempClose - tempOpen - 1); - word className = userModel(0, tempOpen); - thermoTypeName = userModel(tempOpen + 1, tempClose - tempOpen - 1); - - rhoChemistryModelType = - className + '<' + typeName + ',' + thermoTypeName + '>'; - } + const word modelType = + className + '<' + typeName + ',' + thermoTypeName + '>'; if (debug) { - Info<< "Selecting rhoChemistryModel " << rhoChemistryModelType << endl; + Info<< "Selecting rhoChemistryModel " << modelType << endl; } else { @@ -76,16 +72,18 @@ Foam::autoPtr Foam::rhoChemistryModel::New } fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(rhoChemistryModelType); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { if (debug) { FatalErrorIn("rhoChemistryModelBase::New(const mesh&)") - << "Unknown rhoChemistryModel type " << rhoChemistryModelType - << nl << nl << "Valid rhoChemistryModel types are:" << nl - << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); + << "Unknown rhoChemistryModel type " + << modelType << nl << nl + << "Valid rhoChemistryModel types are:" << nl + << fvMeshConstructorTablePtr_->sortedToc() << nl + << exit(FatalError); } else { @@ -96,9 +94,11 @@ Foam::autoPtr Foam::rhoChemistryModel::New } FatalErrorIn("rhoChemistryModelBase::New(const mesh&)") - << "Unknown rhoChemistryModel type " << userModel - << nl << nl << "Valid rhoChemistryModel types are:" << nl - << models << nl << exit(FatalError); + << "Unknown rhoChemistryModel type " + << userModel << nl << nl + << "Valid rhoChemistryModel types are:" << nl + << models << nl + << exit(FatalError); } } diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C index 44551e14cd..38c7f9d8a8 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolver.C @@ -25,9 +25,6 @@ License #include "chemistrySolver.H" -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template @@ -49,8 +46,4 @@ Foam::chemistrySolver::~chemistrySolver() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C index f7d7a36a39..625c5b3b69 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/chemistrySolver/chemistrySolverNew.C @@ -36,9 +36,12 @@ Foam::chemistrySolver::New const word& thermoTypeName ) { - word modelName(model.lookup("chemistrySolver")); + const word modelName + ( + model.lookup("chemistrySolver") + ); - word chemistrySolverType = + const word chemistrySolverType = modelName + '<' + compTypeName + ',' + thermoTypeName + '>'; Info<< "Selecting chemistrySolver " << modelName << endl; @@ -66,8 +69,9 @@ Foam::chemistrySolver::New "const word&, " "const word&" ")" - ) << "Unknown chemistrySolver type " << modelName - << nl << nl << "Valid chemistrySolver types are:" << nl + ) << "Unknown chemistrySolver type " + << modelName << nl << nl + << "Valid chemistrySolver types are:" << nl << models << nl << exit(FatalError); } diff --git a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C index 4ed4165d0a..990f84d591 100644 --- a/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C +++ b/src/thermophysicalModels/laminarFlameSpeed/laminarFlameSpeed/laminarFlameSpeedNew.C @@ -27,12 +27,14 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::laminarFlameSpeed::New +Foam::autoPtr +Foam::laminarFlameSpeed::New ( const hhuCombustionThermo& ct ) { - IOdictionary laminarFlameSpeedDict + // do not register the dictionary + IOdictionary propDict ( IOobject ( @@ -45,9 +47,9 @@ Foam::autoPtr Foam::laminarFlameSpeed::New ) ); - word laminarFlameSpeedType + const word laminarFlameSpeedType ( - laminarFlameSpeedDict.lookup("laminarFlameSpeedCorrelation") + propDict.lookup("laminarFlameSpeedCorrelation") ); Info<< "Selecting laminar flame speed correlation " @@ -61,15 +63,15 @@ Foam::autoPtr Foam::laminarFlameSpeed::New FatalIOErrorIn ( "laminarFlameSpeed::New(const hhuCombustionThermo&)", - laminarFlameSpeedDict + propDict ) << "Unknown laminarFlameSpeed type " - << laminarFlameSpeedType << endl << endl + << laminarFlameSpeedType << nl << nl << "Valid laminarFlameSpeed types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalIOError); } - return autoPtr(cstrIter()(laminarFlameSpeedDict, ct)); + return autoPtr(cstrIter()(propDict, ct)); } diff --git a/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C b/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C index 19b88994d6..c3d7ded785 100644 --- a/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C +++ b/src/thermophysicalModels/liquidMixture/liquidMixture/liquidMixture.C @@ -73,7 +73,8 @@ Foam::liquidMixture::liquidMixture // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::liquidMixture::New +Foam::autoPtr +Foam::liquidMixture::New ( const dictionary& thermophysicalProperties ) diff --git a/src/thermophysicalModels/liquids/liquid/liquid.C b/src/thermophysicalModels/liquids/liquid/liquid.C index 6d84424375..2d9b234859 100644 --- a/src/thermophysicalModels/liquids/liquid/liquid.C +++ b/src/thermophysicalModels/liquids/liquid/liquid.C @@ -39,7 +39,8 @@ namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr Foam::liquid::New(Istream& is) +Foam::autoPtr +Foam::liquid::New(Istream& is) { if (debug) { @@ -48,9 +49,8 @@ Foam::autoPtr Foam::liquid::New(Istream& is) << endl; } - word liquidType(is); - - word coeffs(is); + const word liquidType(is); + const word coeffs(is); if (coeffs == "defaultCoeffs") { @@ -60,8 +60,8 @@ Foam::autoPtr Foam::liquid::New(Istream& is) if (cstrIter == ConstructorTablePtr_->end()) { FatalErrorIn("liquid::New(Istream&)") - << "Unknown liquid type " << liquidType - << nl << nl + << "Unknown liquid type " + << liquidType << nl << nl << "Valid liquid types are:" << nl << ConstructorTablePtr_->sortedToc() << abort(FatalError); @@ -77,8 +77,8 @@ Foam::autoPtr Foam::liquid::New(Istream& is) if (cstrIter == IstreamConstructorTablePtr_->end()) { FatalErrorIn("liquid::New(Istream&)") - << "Unknown liquid type " << liquidType - << endl << endl + << "Unknown liquid type " + << liquidType << nl << nl << "Valid liquid types are:" << nl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); diff --git a/src/thermophysicalModels/pdfs/pdf/pdfNew.C b/src/thermophysicalModels/pdfs/pdf/pdfNew.C index 0ba75a59f0..ca7b5c3e63 100644 --- a/src/thermophysicalModels/pdfs/pdf/pdfNew.C +++ b/src/thermophysicalModels/pdfs/pdf/pdfNew.C @@ -27,23 +27,27 @@ License // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::pdfs::pdf::New +Foam::autoPtr +Foam::pdfs::pdf::New ( const dictionary& dict, Random& rndGen ) { - word pdfType(dict.lookup("pdfType")); + const word modelType + ( + dict.lookup("pdfType") + ); - Info<< "Selecting pdfType " << pdfType << endl; + Info<< "Selecting pdfType " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(pdfType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn("pdfs::pdf::New(const dictionary&, Random&)") - << "unknown pdf type " << pdfType << nl << nl + << "Unknown pdf type " << modelType << nl << nl << "Valid pdf types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); diff --git a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C index b179864876..1437b9195d 100644 --- a/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C +++ b/src/thermophysicalModels/radiation/radiationModel/radiationModel/radiationModelNew.C @@ -26,26 +26,18 @@ License #include "error.H" #include "radiationModel.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace radiation -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr radiationModel::New +Foam::autoPtr +Foam::radiation::radiationModel::New ( const volScalarField& T ) { - word radiationModelTypeName; - - // Note: no need to register/keep radiationProperties since models read - // it themselves. - { - IOdictionary radiationPropertiesDict + // get model name, but do not register the dictionary + const word modelType + ( + IOdictionary ( IOobject ( @@ -56,24 +48,21 @@ autoPtr radiationModel::New IOobject::NO_WRITE, false ) - ); + ).lookup("radiationModel") + ); - radiationPropertiesDict.lookup("radiationModel") - >> radiationModelTypeName; - } - - Info<< "Selecting radiationModel " << radiationModelTypeName << endl; + Info<< "Selecting radiationModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(radiationModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( "radiationModel::New(const volScalarField&)" - ) << "Unknown radiationModel type " << radiationModelTypeName - << nl << nl + ) << "Unknown radiationModel type " + << modelType << nl << nl << "Valid radiationModel types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -83,9 +72,4 @@ autoPtr radiationModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End radiation -} // End namespace Foam - // ************************************************************************* // diff --git a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C index 65ea51c018..827c9f2a62 100644 --- a/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/absorptionEmissionModel/absorptionEmissionModel/absorptionEmissionModelNew.C @@ -35,23 +35,24 @@ Foam::radiation::absorptionEmissionModel::New const fvMesh& mesh ) { - word absorptionEmissionModelType(dict.lookup("absorptionEmissionModel")); + const word modelType + ( + dict.lookup("absorptionEmissionModel") + ); - Info<< "Selecting absorptionEmissionModel " - << absorptionEmissionModelType << endl; + Info<< "Selecting absorptionEmissionModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(absorptionEmissionModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( "absorptionEmissionModel::New(const dictionary&, const fvMesh&)" - ) << "Unknown absorptionEmissionModelType type " - << absorptionEmissionModelType - << ", constructor not in hash table" << nl << nl - << " Valid absorptionEmissionModel types are :" << nl + ) << "Unknown absorptionEmissionModel type " + << modelType << nl << nl + << "Valid absorptionEmissionModel types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C b/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C index 64d4bb567b..83ddcb58c2 100644 --- a/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C +++ b/src/thermophysicalModels/radiation/submodels/scatterModel/scatterModel/scatterModelNew.C @@ -28,28 +28,31 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::autoPtr Foam::radiation::scatterModel::New +Foam::autoPtr +Foam::radiation::scatterModel::New ( const dictionary& dict, const fvMesh& mesh ) { - word scatterModelType(dict.lookup("scatterModel")); + const word modelType + ( + dict.lookup("scatterModel") + ); - Info<< "Selecting scatterModel " << scatterModelType << endl; + Info<< "Selecting scatterModel " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(scatterModelType); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { FatalErrorIn ( "scatterModel::New(const dictionary&, const fvMesh&)" - ) << "Unknown scatterModelType type " - << scatterModelType - << ", constructor not in hash table" << nl << nl - << " Valid scatterModel types are :" << nl + ) << "Unknown scatterModel type " + << modelType << nl << nl + << "Valid scatterModel types are :" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C index 14733bf69f..fca68606a0 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemistryReader/chemistryReader.C @@ -35,7 +35,7 @@ Foam::chemistryReader::New ) { // Let the chemistry reader type default to CHEMKIN - // for backward compatability + // for backward compatibility word chemistryReaderTypeName("chemkinReader"); // otherwise use the specified reader @@ -53,7 +53,7 @@ Foam::chemistryReader::New "chemistryReader::New(const dictionary& thermoDict)" ) << "Unknown chemistryReader type " << chemistryReaderTypeName << nl << nl - << "Valid chemistryReaders are: " << nl + << "Valid chemistryReader types are:" << nl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C index b19ab43654..309d4d2702 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hCombustionThermo/hCombustionThermoNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hCombustionThermo::New +Foam::autoPtr +Foam::hCombustionThermo::New ( const fvMesh& mesh ) { - word hCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -47,24 +46,22 @@ Foam::autoPtr Foam::hCombustionThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hCombustionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " << hCombustionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hCombustionThermo::New(const fvMesh&)") << "Unknown hCombustionThermo type " - << hCombustionThermoTypeName << nl << nl + << modelType << nl << nl << "Valid hCombustionThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); @@ -74,19 +71,18 @@ Foam::autoPtr Foam::hCombustionThermo::New } -Foam::autoPtr Foam::hCombustionThermo::NewType +Foam::autoPtr +Foam::hCombustionThermo::NewType ( const fvMesh& mesh, const word& thermoType ) { - word hCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -94,50 +90,55 @@ Foam::autoPtr Foam::hCombustionThermo::NewType mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hCombustionThermoTypeName; - if (hCombustionThermoTypeName.find(thermoType) == string::npos) + if (modelType.find(thermoType) == string::npos) + { + wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); + DynamicList validModels; + forAll(allModels, i) { - wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); - DynamicList validModels; - forAll(allModels, i) + if (allModels[i].find(thermoType) != string::npos) { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } + validModels.append(allModels[i]); } - - FatalErrorIn - ( - "autoPtr hCombustionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << hCombustionThermoTypeName << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); } + + FatalErrorIn + ( + "autoPtr hCombustionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Inconsistent thermo package selected:" << nl << nl + << modelType << nl << nl << "Please select a " + << "thermo package based on " << thermoType + << ". Valid options include:" << nl << validModels << nl + << exit(FatalError); } - Info<< "Selecting thermodynamics package " << hCombustionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hCombustionThermo::New(const fvMesh&)") - << "Unknown hCombustionThermo type " - << hCombustionThermoTypeName << nl << nl + FatalErrorIn + ( + "autoPtr hCombustionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Unknown hCombustionThermo type " + << modelType << nl << nl << "Valid hCombustionThermo types are:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C index 8353ee1a2d..805f44449a 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hhuCombustionThermo/hhuCombustionThermoNew.C @@ -28,20 +28,14 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam +Foam::autoPtr +Foam::hhuCombustionThermo::New(const fvMesh& mesh) { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr hhuCombustionThermo::New(const fvMesh& mesh) -{ - word hhuCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -49,24 +43,22 @@ autoPtr hhuCombustionThermo::New(const fvMesh& mesh) mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hhuCombustionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " - << hhuCombustionThermoTypeName << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hhuCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hhuCombustionThermo::New(const fvMesh&)") << "Unknown hhuCombustionThermo type " - << hhuCombustionThermoTypeName << endl << endl + << modelType << nl << nl << "Valid hhuCombustionThermo types are :" << endl << fvMeshConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -76,8 +68,4 @@ autoPtr hhuCombustionThermo::New(const fvMesh& mesh) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C index eae3805982..c7b94d1ace 100644 --- a/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/combustionThermo/hsCombustionThermo/hsCombustionThermoNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hsCombustionThermo::New +Foam::autoPtr +Foam::hsCombustionThermo::New ( const fvMesh& mesh ) { - word hsCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -47,25 +46,23 @@ Foam::autoPtr Foam::hsCombustionThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hsCombustionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " << hsCombustionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hsCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hsCombustionThermo::New(const fvMesh&)") << "Unknown hsCombustionThermo type " - << hsCombustionThermoTypeName << nl << nl - << "Valid hsCombustionThermo types are:" << nl + << modelType << nl << nl + << "Valid hsCombustionThermo types:" << nl << fvMeshConstructorTablePtr_->toc() << nl << exit(FatalError); } @@ -74,19 +71,18 @@ Foam::autoPtr Foam::hsCombustionThermo::New } -Foam::autoPtr Foam::hsCombustionThermo::NewType +Foam::autoPtr +Foam::hsCombustionThermo::NewType ( const fvMesh& mesh, const word& thermoType ) { - word hsCombustionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -94,50 +90,54 @@ Foam::autoPtr Foam::hsCombustionThermo::NewType mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hsCombustionThermoTypeName; - - if (hsCombustionThermoTypeName.find(thermoType) == string::npos) + if (modelType.find(thermoType) == string::npos) + { + wordList allModels = fvMeshConstructorTablePtr_->toc(); + DynamicList validModels; + forAll(allModels, i) { - wordList allModels = fvMeshConstructorTablePtr_->toc(); - DynamicList validModels; - forAll(allModels, i) + if (allModels[i].find(thermoType) != string::npos) { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } + validModels.append(allModels[i]); } - - FatalErrorIn - ( - "autoPtr hsCombustionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << hsCombustionThermoTypeName << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); } + + FatalErrorIn + ( + "autoPtr hsCombustionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Inconsistent thermo package selected:" << nl << nl + << modelType << nl << nl << "Please select a " + << "thermo package based on " << thermoType + << ". Valid options include:" << nl << validModels << nl + << exit(FatalError); } - Info<< "Selecting thermodynamics package " << hsCombustionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hsCombustionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hsCombustionThermo::New(const fvMesh&)") - << "Unknown hsCombustionThermo type " - << hsCombustionThermoTypeName << nl << nl + FatalErrorIn + ( + "autoPtr hsCombustionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Unknown hsCombustionThermo type " + << modelType << nl << nl << "Valid hsCombustionThermo types are:" << nl << fvMeshConstructorTablePtr_->toc() << nl << exit(FatalError); diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C index 64808fb72b..6afa8d33e6 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hReactionThermo/hReactionThermoNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hReactionThermo::New +Foam::autoPtr +Foam::hReactionThermo::New ( const fvMesh& mesh ) { - word hReactionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -47,25 +46,23 @@ Foam::autoPtr Foam::hReactionThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hReactionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " << hReactionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hReactionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hReactionThermo::New(const fvMesh&)") << "Unknown hReactionThermo type " - << hReactionThermoTypeName << nl << nl - << "Valid hReactionThermo types are:" << nl + << modelType << nl << nl + << "Valid hReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } @@ -74,19 +71,18 @@ Foam::autoPtr Foam::hReactionThermo::New } -Foam::autoPtr Foam::hReactionThermo::NewType +Foam::autoPtr +Foam::hReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType ) { - word hReactionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -94,51 +90,55 @@ Foam::autoPtr Foam::hReactionThermo::NewType mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hReactionThermoTypeName; - - if (hReactionThermoTypeName.find(thermoType) == string::npos) + if (modelType.find(thermoType) == string::npos) + { + wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); + DynamicList validModels; + forAll(allModels, i) { - wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); - DynamicList validModels; - forAll(allModels, i) + if (allModels[i].find(thermoType) != string::npos) { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } + validModels.append(allModels[i]); } - - FatalErrorIn - ( - "autoPtr hReactionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << hReactionThermoTypeName << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); } + + FatalErrorIn + ( + "autoPtr hReactionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Inconsistent thermo package selected:" << nl << nl + << modelType << nl << nl << "Please select a " + << "thermo package based on " << thermoType + << ". Valid options include:" << nl << validModels << nl + << exit(FatalError); } - Info<< "Selecting thermodynamics package " << hReactionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hReactionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { - FatalErrorIn("hReactionThermo::New(const fvMesh&)") - << "Unknown hReactionThermo type " - << hReactionThermoTypeName << nl << nl - << "Valid hReactionThermo types are:" << nl + FatalErrorIn + ( + "autoPtr hReactionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Unknown hReactionThermo type " + << modelType << nl << nl + << "Valid hReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C index e834777291..f8518cd45f 100644 --- a/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C +++ b/src/thermophysicalModels/reactionThermo/reactionThermo/hsReactionThermo/hsReactionThermoNew.C @@ -28,18 +28,17 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::hsReactionThermo::New +Foam::autoPtr +Foam::hsReactionThermo::New ( const fvMesh& mesh ) { - word hsReactionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -47,25 +46,23 @@ Foam::autoPtr Foam::hsReactionThermo::New mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hsReactionThermoTypeName; - } - - Info<< "Selecting thermodynamics package " << hsReactionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hsReactionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hsReactionThermo::New(const fvMesh&)") << "Unknown hsReactionThermo type " - << hsReactionThermoTypeName << nl << nl - << "Valid hsReactionThermo types are:" << nl + << modelType << nl << nl + << "Valid hsReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } @@ -74,19 +71,18 @@ Foam::autoPtr Foam::hsReactionThermo::New } -Foam::autoPtr Foam::hsReactionThermo::NewType +Foam::autoPtr +Foam::hsReactionThermo::NewType ( const fvMesh& mesh, const word& thermoType ) { - word hsReactionThermoTypeName; - - // Enclose the creation of the thermophysicalProperties to ensure it is - // deleted before the turbulenceModel is created otherwise the dictionary - // is entered in the database twice - { - IOdictionary thermoDict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -94,51 +90,51 @@ Foam::autoPtr Foam::hsReactionThermo::NewType mesh.time().constant(), mesh, IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("thermoType") + ); - thermoDict.lookup("thermoType") >> hsReactionThermoTypeName; + Info<< "Selecting thermodynamics package " << modelType << endl; - if (hsReactionThermoTypeName.find(thermoType) == string::npos) + if (modelType.find(thermoType) == string::npos) + { + wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); + DynamicList validModels; + forAll(allModels, i) { - wordList allModels = fvMeshConstructorTablePtr_->sortedToc(); - DynamicList validModels; - forAll(allModels, i) + if (allModels[i].find(thermoType) != string::npos) { - if (allModels[i].find(thermoType) != string::npos) - { - validModels.append(allModels[i]); - } + validModels.append(allModels[i]); } - - FatalErrorIn - ( - "autoPtr hsReactionThermo::NewType" - "(" - "const fvMesh&, " - "const word&" - ")" - ) << "Inconsistent thermo package selected:" << nl << nl - << hsReactionThermoTypeName << nl << nl << "Please select a " - << "thermo package based on " << thermoType - << ". Valid options include:" << nl << validModels << nl - << exit(FatalError); } + + FatalErrorIn + ( + "autoPtr hsReactionThermo::NewType" + "(" + "const fvMesh&, " + "const word&" + ")" + ) << "Inconsistent thermo package selected:" << nl << nl + << modelType << nl << nl << "Please select a " + << "thermo package based on " << thermoType + << ". Valid options include:" << nl << validModels << nl + << exit(FatalError); } - Info<< "Selecting thermodynamics package " << hsReactionThermoTypeName - << endl; + Info<< "Selecting thermodynamics package " << modelType << endl; fvMeshConstructorTable::iterator cstrIter = - fvMeshConstructorTablePtr_->find(hsReactionThermoTypeName); + fvMeshConstructorTablePtr_->find(modelType); if (cstrIter == fvMeshConstructorTablePtr_->end()) { FatalErrorIn("hsReactionThermo::New(const fvMesh&)") << "Unknown hsReactionThermo type " - << hsReactionThermoTypeName << nl << nl - << "Valid hsReactionThermo types are:" << nl + << modelType << nl << nl + << "Valid hsReactionThermo types:" << nl << fvMeshConstructorTablePtr_->sortedToc() << nl << exit(FatalError); } diff --git a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C index ab62e053bb..a69ddb4bf3 100644 --- a/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C +++ b/src/thermophysicalModels/solidMixture/solidMixture/solidMixture.C @@ -27,7 +27,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::solidMixture::solidMixture ( const dictionary& thermophysicalProperties @@ -50,7 +49,8 @@ Foam::solidMixture::solidMixture // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::solidMixture::New +Foam::autoPtr +Foam::solidMixture::New ( const dictionary& thermophysicalProperties ) diff --git a/src/thermophysicalModels/solids/solid/solidNew.C b/src/thermophysicalModels/solids/solid/solidNew.C index 9e690b4cae..c3695cec9e 100644 --- a/src/thermophysicalModels/solids/solid/solidNew.C +++ b/src/thermophysicalModels/solids/solid/solidNew.C @@ -27,7 +27,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -Foam::autoPtr Foam::solid::New(Istream& is) +Foam::autoPtr +Foam::solid::New(Istream& is) { if (debug) { @@ -36,9 +37,8 @@ Foam::autoPtr Foam::solid::New(Istream& is) << endl; } - word solidType(is); - - word coeffs(is); + const word solidType(is); + const word coeffs(is); if (coeffs == "defaultCoeffs") { @@ -49,7 +49,7 @@ Foam::autoPtr Foam::solid::New(Istream& is) { FatalErrorIn("solid::New(Istream&)") << "Unknown solid type " << solidType << nl << nl - << "Valid solid types are:" << endl + << "Valid solid types are :" << endl << ConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -65,7 +65,7 @@ Foam::autoPtr Foam::solid::New(Istream& is) { FatalErrorIn("solid::New(Istream&)") << "Unknown solid type " << solidType << nl << nl - << "Valid solid types are:" << endl + << "Valid solid types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C index bf1c77931f..8a8700d29e 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C @@ -26,15 +26,10 @@ License #include "Reaction.H" #include "DynamicList.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template -void Reaction::setThermo +void Foam::Reaction::setThermo ( const HashPtrTable& thermoDatabase ) @@ -62,9 +57,8 @@ void Reaction::setThermo } -// Construct from components template -Reaction::Reaction +Foam::Reaction::Reaction ( const speciesTable& species, const List& lhs, @@ -81,9 +75,8 @@ Reaction::Reaction } -// Construct as copy given new speciesTable template -Reaction::Reaction +Foam::Reaction::Reaction ( const Reaction& r, const speciesTable& species @@ -97,7 +90,7 @@ Reaction::Reaction template -Reaction::specieCoeffs::specieCoeffs +Foam::Reaction::specieCoeffs::specieCoeffs ( const speciesTable& species, Istream& is @@ -146,7 +139,7 @@ Reaction::specieCoeffs::specieCoeffs template -void Reaction::setLRhs(Istream& is) +void Foam::Reaction::setLRhs(Istream& is) { DynamicList dlrhs; @@ -187,9 +180,8 @@ void Reaction::setLRhs(Istream& is) } -//- Construct from Istream template -Reaction::Reaction +Foam::Reaction::Reaction ( const speciesTable& species, const HashPtrTable& thermoDatabase, @@ -207,7 +199,8 @@ Reaction::Reaction // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // template -autoPtr > Reaction::New +Foam::autoPtr > +Foam::Reaction::New ( const speciesTable& species, const HashPtrTable& thermoDatabase, @@ -221,13 +214,13 @@ autoPtr > Reaction::New "Reaction::New(const speciesTable& species," " const HashPtrTable& thermoDatabase, Istream&)", is - ) << "Reaction type not specified" << endl << endl + ) << "Reaction type not specified" << nl << nl << "Valid Reaction types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); } - word reactionTypeName(is); + const word reactionTypeName(is); typename IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(reactionTypeName); @@ -239,7 +232,8 @@ autoPtr > Reaction::New "Reaction::New(const speciesTable& species," " const HashPtrTable& thermoDatabase, Istream&)", is - ) << "Unknown reaction type " << reactionTypeName << endl << endl + ) << "Unknown reaction type " + << reactionTypeName << nl << nl << "Valid reaction types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << exit(FatalIOError); @@ -255,7 +249,7 @@ autoPtr > Reaction::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template -void Reaction::write(Ostream& os) const +void Foam::Reaction::write(Ostream& os) const { os << type() << nl << " "; @@ -310,7 +304,7 @@ void Reaction::write(Ostream& os) const template -scalar Reaction::kf +Foam::scalar Foam::Reaction::kf ( const scalar T, const scalar p, @@ -322,7 +316,7 @@ scalar Reaction::kf template -scalar Reaction::kr +Foam::scalar Foam::Reaction::kr ( const scalar kfwd, const scalar T, @@ -334,7 +328,7 @@ scalar Reaction::kr } template -scalar Reaction::kr +Foam::scalar Foam::Reaction::kr ( const scalar T, const scalar p, @@ -345,8 +339,4 @@ scalar Reaction::kr } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C index 08fecc77a0..322260c643 100644 --- a/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C +++ b/src/thermophysicalModels/thermalPorousZone/thermalPorousZone/thermalPorousZone.C @@ -42,7 +42,7 @@ Foam::thermalPorousZone::thermalPorousZone { if (const dictionary* dictPtr = dict.subDictPtr("thermalModel")) { - word thermalModel(dictPtr->lookup("type")); + const word thermalModel(dictPtr->lookup("type")); if (thermalModel == "fixedTemperature") { diff --git a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C index ad75ccb1ce..6497b05131 100644 --- a/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C +++ b/src/thermophysicalModels/thermophysicalFunctions/thermophysicalFunction/thermophysicalFunction.C @@ -32,15 +32,15 @@ License namespace Foam { + defineTypeNameAndDebug(thermophysicalFunction, 0); + defineRunTimeSelectionTable(thermophysicalFunction, Istream); +} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(thermophysicalFunction, 0); -defineRunTimeSelectionTable(thermophysicalFunction, Istream); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -autoPtr thermophysicalFunction::New(Istream& is) +Foam::autoPtr +Foam::thermophysicalFunction::New(Istream& is) { if (debug) { @@ -49,7 +49,7 @@ autoPtr thermophysicalFunction::New(Istream& is) << endl; } - word thermophysicalFunctionType(is); + const word thermophysicalFunctionType(is); IstreamConstructorTable::iterator cstrIter = IstreamConstructorTablePtr_->find(thermophysicalFunctionType); @@ -59,7 +59,7 @@ autoPtr thermophysicalFunction::New(Istream& is) FatalErrorIn("thermophysicalFunction::New(Istream&)") << "Unknown thermophysicalFunction type " << thermophysicalFunctionType - << endl << endl + << nl << nl << "Valid thermophysicalFunction types are :" << endl << IstreamConstructorTablePtr_->sortedToc() << abort(FatalError); @@ -68,9 +68,4 @@ autoPtr thermophysicalFunction::New(Istream& is) return autoPtr(cstrIter()(is)); } - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/transportModels/incompressible/transportModel/transportModel.C b/src/transportModels/incompressible/transportModel/transportModel.C index d1b6ddc97f..c9a0c8e20d 100644 --- a/src/transportModels/incompressible/transportModel/transportModel.C +++ b/src/transportModels/incompressible/transportModel/transportModel.C @@ -27,14 +27,10 @@ License #include "viscosityModel.H" #include "volFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -transportModel::transportModel +Foam::transportModel::transportModel ( const volVectorField& U, const surfaceScalarField& phi @@ -56,20 +52,16 @@ transportModel::transportModel // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // -transportModel::~transportModel() +Foam::transportModel::~transportModel() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -bool transportModel::read() +bool Foam::transportModel::read() { return regIOobject::read(); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C index 974cc2c5bd..d2424513c7 100644 --- a/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C +++ b/src/transportModels/incompressible/viscosityModels/viscosityModel/viscosityModelNew.C @@ -29,12 +29,8 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -autoPtr viscosityModel::New +Foam::autoPtr +Foam::viscosityModel::New ( const word& name, const dictionary& viscosityProperties, @@ -42,13 +38,15 @@ autoPtr viscosityModel::New const surfaceScalarField& phi ) { - word viscosityModelTypeName(viscosityProperties.lookup("transportModel")); + const word modelType + ( + viscosityProperties.lookup("transportModel") + ); - Info<< "Selecting incompressible transport model " - << viscosityModelTypeName << endl; + Info<< "Selecting incompressible transport model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(viscosityModelTypeName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -57,8 +55,8 @@ autoPtr viscosityModel::New "viscosityModel::New(const volVectorField&, " "const surfaceScalarField&)" ) << "Unknown viscosityModel type " - << viscosityModelTypeName << endl << endl - << "Valid viscosityModels are : " << endl + << modelType << nl << nl + << "Valid viscosityModels are : " << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } @@ -68,8 +66,4 @@ autoPtr viscosityModel::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C index 1d9ca4172c..39efc1ee49 100644 --- a/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C +++ b/src/turbulenceModels/LES/LESdeltas/LESdelta/LESdelta.C @@ -26,19 +26,17 @@ License #include "LESdelta.H" #include "calculatedFvPatchFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(LESdelta, 0); -defineRunTimeSelectionTable(LESdelta, dictionary); + defineTypeNameAndDebug(LESdelta, 0); + defineRunTimeSelectionTable(LESdelta, dictionary); +} // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -LESdelta::LESdelta(const word& name, const fvMesh& mesh) +Foam::LESdelta::LESdelta(const word& name, const fvMesh& mesh) : mesh_(mesh), delta_ @@ -60,14 +58,15 @@ LESdelta::LESdelta(const word& name, const fvMesh& mesh) // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -autoPtr LESdelta::New +Foam::autoPtr +Foam::LESdelta::New ( const word& name, const fvMesh& mesh, const dictionary& dict ) { - word deltaType(dict.lookup("delta")); + const word deltaType(dict.lookup("delta")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(deltaType); @@ -77,7 +76,8 @@ autoPtr LESdelta::New FatalErrorIn ( "LESdelta::New(const fvMesh&, const dictionary&)" - ) << "Unknown LESdelta type " << deltaType << endl << endl + ) << "Unknown LESdelta type " + << deltaType << nl << nl << "Valid LESdelta types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -87,8 +87,4 @@ autoPtr LESdelta::New } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C index e865914a8a..56a503f8cd 100644 --- a/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C +++ b/src/turbulenceModels/LES/LESfilters/LESfilter/LESfilter.C @@ -24,29 +24,27 @@ License \*---------------------------------------------------------------------------*/ #include "error.H" - #include "LESfilter.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(LESfilter, 0); -defineRunTimeSelectionTable(LESfilter, dictionary); +namespace Foam +{ + defineTypeNameAndDebug(LESfilter, 0); + defineRunTimeSelectionTable(LESfilter, dictionary); +} // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // -autoPtr LESfilter::New +Foam::autoPtr +Foam::LESfilter::New ( const fvMesh& mesh, const dictionary& dict ) { - word filterType(dict.lookup("filter")); + const word filterType(dict.lookup("filter")); dictionaryConstructorTable::iterator cstrIter = dictionaryConstructorTablePtr_->find(filterType); @@ -56,7 +54,8 @@ autoPtr LESfilter::New FatalErrorIn ( "LESfilter::New(const fvMesh&, const dictionary&)" - ) << "Unknown LESfilter type " << filterType << endl << endl + ) << "Unknown LESfilter type " + << filterType << nl << nl << "Valid LESfilter types are :" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); @@ -65,9 +64,5 @@ autoPtr LESfilter::New return autoPtr(cstrIter()(mesh, dict)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - - -} // End namespace Foam // ************************************************************************* // diff --git a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C index da5925f6a3..e95f9def5c 100644 --- a/src/turbulenceModels/compressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/compressible/LES/LESModel/LESModel.C @@ -100,13 +100,11 @@ autoPtr LESModel::New const basicThermo& thermoPhysicalModel ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -114,17 +112,16 @@ autoPtr LESModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("LESModel") + ); - dict.lookup("LESModel") >> modelName; - } - - Info<< "Selecting LES turbulence model " << modelName << endl; + Info<< "Selecting LES turbulence model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -136,9 +133,9 @@ autoPtr LESModel::New "const surfaceScalarField&, " "const basicThermo&" ")" - ) << "Unknown LESModel type " << modelName - << endl << endl - << "Valid LESModel types are :" << endl + ) << "Unknown LESModel type " + << modelType << nl << nl + << "Valid LESModel types:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C index f24a953e63..755318a1d8 100644 --- a/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/compressible/RAS/RASModel/RASModel.C @@ -106,13 +106,11 @@ autoPtr RASModel::New const basicThermo& thermophysicalModel ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -120,17 +118,16 @@ autoPtr RASModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("RASModel") + ); - dict.lookup("RASModel") >> modelName; - } - - Info<< "Selecting RAS turbulence model " << modelName << endl; + Info<< "Selecting RAS turbulence model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -143,9 +140,9 @@ autoPtr RASModel::New "const surfaceScalarField&, " "basicThermo&" ")" - ) << "Unknown RASModel type " << modelName - << endl << endl - << "Valid RASModel types are :" << endl + ) << "Unknown RASModel type " + << modelType << nl << nl + << "Valid RASModel types:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C index 2a9b567e65..5c936fa28e 100644 --- a/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.C @@ -69,13 +69,11 @@ autoPtr turbulenceModel::New const basicThermo& thermophysicalModel ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -83,17 +81,16 @@ autoPtr turbulenceModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("simulationType") + ); - dict.lookup("simulationType") >> modelName; - } - - Info<< "Selecting turbulence model type " << modelName << endl; + Info<< "Selecting turbulence model type " << modelType << endl; turbulenceModelConstructorTable::iterator cstrIter = - turbulenceModelConstructorTablePtr_->find(modelName); + turbulenceModelConstructorTablePtr_->find(modelType); if (cstrIter == turbulenceModelConstructorTablePtr_->end()) { @@ -102,9 +99,9 @@ autoPtr turbulenceModel::New "turbulenceModel::New(const volScalarField&, " "const volVectorField&, const surfaceScalarField&, " "basicThermo&)" - ) << "Unknown turbulenceModel type " << modelName - << endl << endl - << "Valid turbulenceModel types are :" << endl + ) << "Unknown turbulenceModel type " + << modelType << nl << nl + << "Valid turbulenceModel types:" << endl << turbulenceModelConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C index 7b08a32e72..574e387f1c 100644 --- a/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C +++ b/src/turbulenceModels/incompressible/LES/LESModel/LESModel.C @@ -97,13 +97,11 @@ autoPtr LESModel::New transportModel& transport ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -111,17 +109,16 @@ autoPtr LESModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("LESModel") + ); - dict.lookup("LESModel") >> modelName; - } - - Info<< "Selecting LES turbulence model " << modelName << endl; + Info<< "Selecting LES turbulence model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -133,9 +130,9 @@ autoPtr LESModel::New "const surfaceScalarField& ," "transportModel&" ")" - ) << "Unknown LESModel type " << modelName - << endl << endl - << "Valid LESModel types are :" << endl + ) << "Unknown LESModel type " + << modelType << nl << nl + << "Valid LESModel types:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C index dd921835cd..87d50dedd7 100644 --- a/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C +++ b/src/turbulenceModels/incompressible/RAS/RASModel/RASModel.C @@ -104,13 +104,11 @@ autoPtr RASModel::New transportModel& transport ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -118,17 +116,16 @@ autoPtr RASModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("RASModel") + ); - dict.lookup("RASModel") >> modelName; - } - - Info<< "Selecting RAS turbulence model " << modelName << endl; + Info<< "Selecting RAS turbulence model " << modelType << endl; dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(modelName); + dictionaryConstructorTablePtr_->find(modelType); if (cstrIter == dictionaryConstructorTablePtr_->end()) { @@ -140,9 +137,9 @@ autoPtr RASModel::New "const surfaceScalarField&, " "transportModel&" ")" - ) << "Unknown RASModel type " << modelName - << endl << endl - << "Valid RASModel types are :" << endl + ) << "Unknown RASModel type " + << modelType << nl << nl + << "Valid RASModel types:" << endl << dictionaryConstructorTablePtr_->sortedToc() << exit(FatalError); } diff --git a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C index 445b9924d8..1aeea66fd3 100644 --- a/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C +++ b/src/turbulenceModels/incompressible/turbulenceModel/turbulenceModel.C @@ -66,13 +66,11 @@ autoPtr turbulenceModel::New transportModel& transport ) { - word modelName; - - // Enclose the creation of the dictionary to ensure it is deleted - // before the turbulenceModel is created otherwise the dictionary is - // entered in the database twice - { - IOdictionary dict + // get model name, but do not register the dictionary + // otherwise it is registered in the database twice + const word modelType + ( + IOdictionary ( IOobject ( @@ -80,17 +78,16 @@ autoPtr turbulenceModel::New U.time().constant(), U.db(), IOobject::MUST_READ, - IOobject::NO_WRITE + IOobject::NO_WRITE, + false ) - ); + ).lookup("simulationType") + ); - dict.lookup("simulationType") >> modelName; - } - - Info<< "Selecting turbulence model type " << modelName << endl; + Info<< "Selecting turbulence model type " << modelType << endl; turbulenceModelConstructorTable::iterator cstrIter = - turbulenceModelConstructorTablePtr_->find(modelName); + turbulenceModelConstructorTablePtr_->find(modelType); if (cstrIter == turbulenceModelConstructorTablePtr_->end()) { @@ -98,9 +95,9 @@ autoPtr turbulenceModel::New ( "turbulenceModel::New(const volVectorField&, " "const surfaceScalarField&, transportModel&)" - ) << "Unknown turbulenceModel type " << modelName - << endl << endl - << "Valid turbulenceModel types are :" << endl + ) << "Unknown turbulenceModel type " + << modelType << nl << nl + << "Valid turbulenceModel types:" << endl << turbulenceModelConstructorTablePtr_->sortedToc() << exit(FatalError); } From 470b30b58cdbb3ce7a276cb0c7f5472bcf6789d9 Mon Sep 17 00:00:00 2001 From: Mark Olesen Date: Tue, 20 Apr 2010 19:14:42 +0200 Subject: [PATCH 25/41] ENH: avoid possibly non-portable 'find' with '-printf' --- wmake/wclean | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/wmake/wclean b/wmake/wclean index 6595352a98..84459694bc 100755 --- a/wmake/wclean +++ b/wmake/wclean @@ -113,13 +113,12 @@ then exit $? elif [ ! -d $MakeDir ] then - for dir in `find . \( -type d -a -name Make \) -printf "%h "` + for dir in `find . \( -type d -a -name Make \)` do - $0 $dir + $0 ${dir%/Make} # parent directory - trim /Make from the end done exit 0 fi - fi # makeOption is not needed beyond this point From 5f0538eccaed55d339753b3aca63aa2e5319c533 Mon Sep 17 00:00:00 2001 From: andy Date: Wed, 21 Apr 2010 12:22:22 +0100 Subject: [PATCH 26/41] ENH: Added active flag to KinematicParcel - used during parcel calc() function to flag whether the parcel should be tracked - if false, parcel not tracked, but sub-models are still active - useful, e.g. for particle 'stick' condition - NOTE: stored as a bool, but read/written as a label for restarts/post-processing --- .../KinematicParcel/KinematicParcel.C | 6 +++++- .../KinematicParcel/KinematicParcel.H | 11 ++++++++++- .../KinematicParcel/KinematicParcelI.H | 18 +++++++++++++++++- .../KinematicParcel/KinematicParcelIO.C | 19 ++++++++++++++++--- .../LocalInteraction/LocalInteraction.C | 4 ++++ .../LocalInteraction/LocalInteraction.H | 1 + .../PatchInteractionModel.H | 1 + .../PatchInteractionModel/Rebound/Rebound.C | 2 ++ .../PatchInteractionModel/Rebound/Rebound.H | 1 + .../StandardWallInteraction.C | 4 ++++ .../StandardWallInteraction.H | 1 + 11 files changed, 62 insertions(+), 6 deletions(-) diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C index e17e7138d6..b11d693d95 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.C @@ -258,7 +258,10 @@ bool Foam::KinematicParcel::move(TrackData& td) // face is hit label cellI = p.cell(); - dt *= p.trackToFace(p.position() + dt*U_, td); + if (p.active()) + { + dt *= p.trackToFace(p.position() + dt*U_, td); + } tEnd -= dt; p.stepFraction() = 1.0 - tEnd/deltaT; @@ -322,6 +325,7 @@ bool Foam::KinematicParcel::hitPatch pp, this->face(), td.keepParticle, + active_, U_ ); } diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H index 5316ea2280..a154bac88b 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcel.H @@ -194,6 +194,9 @@ protected: // Parcel properties + //- Active flag - tracking inactive when active = false + bool active_; + //- Parcel type id label typeId_; @@ -308,6 +311,9 @@ public: // Access + //- Return const access to active flag + inline bool active() const; + //- Return const access to type id inline label typeId() const; @@ -332,8 +338,11 @@ public: // Edit + //- Return const access to active flag + inline bool& active(); + //- Return access to type id - inline label typeId(); + inline label& typeId(); //- Return access to number of particles inline scalar& nParticle(); diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H index 7c4b759760..6eca153546 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelI.H @@ -75,6 +75,7 @@ inline Foam::KinematicParcel::KinematicParcel ) : Particle(owner, position, cellI), + active_(false), typeId_(owner.parcelTypeId()), nParticle_(0), d_(0.0), @@ -102,6 +103,7 @@ inline Foam::KinematicParcel::KinematicParcel ) : Particle(owner, position, cellI), + active_(true), typeId_(typeId), nParticle_(nParticle0), d_(d0), @@ -201,6 +203,13 @@ Foam::KinematicParcel::trackData::g() const // * * * * * * * * * * KinematicParcel Member Functions * * * * * * * * * * // +template +inline bool Foam::KinematicParcel::active() const +{ + return active_; +} + + template inline Foam::label Foam::KinematicParcel::typeId() const { @@ -251,7 +260,14 @@ inline const Foam::vector& Foam::KinematicParcel::UTurb() const template -inline Foam::label Foam::KinematicParcel::typeId() +inline bool& Foam::KinematicParcel::active() +{ + return active_; +} + + +template +inline Foam::label& Foam::KinematicParcel::typeId() { return typeId_; } diff --git a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C index bbf5d46412..a334e8b880 100644 --- a/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C +++ b/src/lagrangian/intermediate/parcels/Templates/KinematicParcel/KinematicParcelIO.C @@ -33,6 +33,7 @@ License template Foam::string Foam::KinematicParcel::propHeader = Particle::propHeader + + " active" + " typeId" + " nParticle" + " d" @@ -53,6 +54,7 @@ Foam::KinematicParcel::KinematicParcel ) : Particle(cloud, is, readFields), + active_(false), typeId_(0), nParticle_(0.0), d_(0.0), @@ -68,6 +70,7 @@ Foam::KinematicParcel::KinematicParcel { if (is.format() == IOstream::ASCII) { + active_ = readBool(is); typeId_ = readLabel(is); nParticle_ = readScalar(is); d_ = readScalar(is); @@ -81,7 +84,8 @@ Foam::KinematicParcel::KinematicParcel is.read ( reinterpret_cast(&typeId_), - sizeof(typeId_) + sizeof(active_) + + sizeof(typeId_) + sizeof(nParticle_) + sizeof(d_) + sizeof(U_) @@ -111,6 +115,9 @@ void Foam::KinematicParcel::readFields(Cloud& c) Particle::readFields(c); + IOField