diff --git a/applications/solvers/combustion/dieselEngineFoam/createSpray.H b/applications/solvers/combustion/dieselEngineFoam/createSpray.H index b86b3684c2..ac473957e5 100644 --- a/applications/solvers/combustion/dieselEngineFoam/createSpray.H +++ b/applications/solvers/combustion/dieselEngineFoam/createSpray.H @@ -32,7 +32,5 @@ if (dieselSpray.twoD()) gasMass0 *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge(); } -reduce(gasMass0, sumOp()); - gasMass0 -= dieselSpray.injectedMass(runTime.value()) - dieselSpray.liquidMass(); diff --git a/applications/solvers/combustion/dieselEngineFoam/spraySummary.H b/applications/solvers/combustion/dieselEngineFoam/spraySummary.H index 907784b438..5b251e2290 100644 --- a/applications/solvers/combustion/dieselEngineFoam/spraySummary.H +++ b/applications/solvers/combustion/dieselEngineFoam/spraySummary.H @@ -23,8 +23,6 @@ gasMass *= 2.0*mathematicalConstant::pi/dieselSpray.angleOfWedge(); } - reduce(gasMass, sumOp()); - scalar addedMass = gasMass - gasMass0; Info<< "Added gas mass................. | " << 1e6*addedMass << " mg" diff --git a/applications/solvers/dsmc/dsmcFoam/Make/files b/applications/solvers/discreteMethods/dsmc/dsmcFoam/Make/files similarity index 100% rename from applications/solvers/dsmc/dsmcFoam/Make/files rename to applications/solvers/discreteMethods/dsmc/dsmcFoam/Make/files diff --git a/applications/solvers/dsmc/dsmcFoam/Make/options b/applications/solvers/discreteMethods/dsmc/dsmcFoam/Make/options similarity index 100% rename from applications/solvers/dsmc/dsmcFoam/Make/options rename to applications/solvers/discreteMethods/dsmc/dsmcFoam/Make/options diff --git a/applications/solvers/dsmc/dsmcFoam/createFields.H b/applications/solvers/discreteMethods/dsmc/dsmcFoam/createFields.H similarity index 100% rename from applications/solvers/dsmc/dsmcFoam/createFields.H rename to applications/solvers/discreteMethods/dsmc/dsmcFoam/createFields.H diff --git a/applications/solvers/dsmc/dsmcFoam/dsmcFoam.C b/applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C similarity index 100% rename from applications/solvers/dsmc/dsmcFoam/dsmcFoam.C rename to applications/solvers/discreteMethods/dsmc/dsmcFoam/dsmcFoam.C diff --git a/applications/solvers/molecularDynamics/mdEquilibrationFoam/Make/files b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/Make/files similarity index 100% rename from applications/solvers/molecularDynamics/mdEquilibrationFoam/Make/files rename to applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/Make/files diff --git a/applications/solvers/molecularDynamics/mdEquilibrationFoam/Make/options b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/Make/options similarity index 100% rename from applications/solvers/molecularDynamics/mdEquilibrationFoam/Make/options rename to applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/Make/options diff --git a/applications/solvers/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C similarity index 100% rename from applications/solvers/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C rename to applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/mdEquilibrationFoam.C diff --git a/applications/solvers/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H b/applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H similarity index 100% rename from applications/solvers/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H rename to applications/solvers/discreteMethods/molecularDynamics/mdEquilibrationFoam/readmdEquilibrationDict.H diff --git a/applications/solvers/molecularDynamics/mdFoam/Make/files b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/files similarity index 100% rename from applications/solvers/molecularDynamics/mdFoam/Make/files rename to applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/files diff --git a/applications/solvers/molecularDynamics/mdFoam/Make/options b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/options similarity index 100% rename from applications/solvers/molecularDynamics/mdFoam/Make/options rename to applications/solvers/discreteMethods/molecularDynamics/mdFoam/Make/options diff --git a/applications/solvers/molecularDynamics/mdFoam/mdFoam.C b/applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C similarity index 100% rename from applications/solvers/molecularDynamics/mdFoam/mdFoam.C rename to applications/solvers/discreteMethods/molecularDynamics/mdFoam/mdFoam.C diff --git a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H index 3c257d249d..8d97ad9048 100644 --- a/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H +++ b/applications/solvers/heatTransfer/buoyantSimpleFoam/pEqn.H @@ -59,7 +59,8 @@ rho = thermo->rho(); rho.relax(); - Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() << endl; + Info<< "rho max/min : " << max(rho).value() << " " << min(rho).value() + << endl; pd == p - (rho*gh + pRef); } diff --git a/applications/solvers/incompressible/pimpleDyMFoam/createFields.H b/applications/solvers/incompressible/pimpleDyMFoam/createFields.H index ff3f9c5169..bc798ba988 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/createFields.H +++ b/applications/solvers/incompressible/pimpleDyMFoam/createFields.H @@ -1,4 +1,3 @@ - Info<< "Reading field p\n" << endl; volScalarField p ( @@ -33,7 +32,7 @@ label pRefCell = 0; scalar pRefValue = 0.0; - setRefCell(p, mesh.solutionDict().subDict("PISO"), pRefCell, pRefValue); + setRefCell(p, mesh.solutionDict().subDict("PIMPLE"), pRefCell, pRefValue); singlePhaseTransportModel laminarTransport(U, phi); diff --git a/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C b/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C index b705d2bbb7..66692cc4a8 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C +++ b/applications/solvers/incompressible/pimpleDyMFoam/pimpleDyMFoam.C @@ -23,7 +23,7 @@ License Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Application - turbDyMFoam + pimpleDyMFoam.C Description Transient solver for incompressible, flow of Newtonian fluids @@ -47,7 +47,7 @@ int main(int argc, char *argv[]) # include "createTime.H" # include "createDynamicFvMesh.H" -# include "readPISOControls.H" +# include "readPIMPLEControls.H" # include "initContinuityErrs.H" # include "createFields.H" # include "readTimeControls.H" diff --git a/applications/solvers/incompressible/pimpleDyMFoam/readControls.H b/applications/solvers/incompressible/pimpleDyMFoam/readControls.H index 9336616a1b..3bd20c5c5c 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/readControls.H +++ b/applications/solvers/incompressible/pimpleDyMFoam/readControls.H @@ -1,14 +1,14 @@ # include "readTimeControls.H" -# include "readPISOControls.H" +# include "readPIMPLEControls.H" bool correctPhi = false; - if (piso.found("correctPhi")) + if (pimple.found("correctPhi")) { - correctPhi = Switch(piso.lookup("correctPhi")); + correctPhi = Switch(pimple.lookup("correctPhi")); } bool checkMeshCourantNo = false; - if (piso.found("checkMeshCourantNo")) + if (pimple.found("checkMeshCourantNo")) { - checkMeshCourantNo = Switch(piso.lookup("checkMeshCourantNo")); + checkMeshCourantNo = Switch(pimple.lookup("checkMeshCourantNo")); } diff --git a/applications/test/UIndirectListTest/UIndirectListTest.C b/applications/test/UIndirectListTest/UIndirectListTest.C index 575173c51e..9c619a4b99 100644 --- a/applications/test/UIndirectListTest/UIndirectListTest.C +++ b/applications/test/UIndirectListTest/UIndirectListTest.C @@ -28,6 +28,8 @@ Description #include "UIndirectList.H" #include "IOstreams.H" +#include "ListOps.H" +#include "OFstream.H" using namespace Foam; @@ -52,29 +54,32 @@ int main(int argc, char *argv[]) UIndirectList idl(completeList, addresses); - forAll(idl, i) - { - Info<< idl[i] << token::SPACE; - } - - Info<< endl; + Info<< idl << "\n"; idl[1] = -666; - Info<< "idl[1] changed:" << idl() << endl; + Info<< "idl[1] changed:" << idl << endl; idl = -999; - Info<< "idl changed:" << idl() << endl; + Info<< "idl changed:" << idl << endl; UIndirectList idl2(idl); - Info<< "idl2:" << idl2() << endl; + Info<< "idl2: " << idl2 << endl; - idl = idl2(); - Info<< "idl assigned from UList:" << idl() << endl; + { + List ident(idl.size()); + forAll(ident, i) + { + ident[i] = ident.size() - i; + } + idl = ident; + } + + Info<< "idl assigned from UList:" << idl << endl; List realList = UIndirectList(completeList, addresses); diff --git a/applications/test/string/stringTest.C b/applications/test/string/stringTest.C index b8442102f3..2ed59bf88f 100644 --- a/applications/test/string/stringTest.C +++ b/applications/test/string/stringTest.C @@ -70,6 +70,28 @@ int main(int argc, char *argv[]) string test2("~OpenFOAM/controlDict"); Info<< test2 << " => " << test2.expand() << endl; + // replace controlDict with "newName" + { + string::size_type i = test2.rfind('/'); + + if (i == string::npos) + { + test2 = "newName"; + } + else + { + // this uses the std::string::replace + test2.replace(i+1, string::npos, "newName"); + } + Info<< "after replace: " << test2 << endl; + + // do another replace + // this uses the Foam::string::replace + test2.replace("OpenFOAM", "openfoam"); + + Info<< "after replace: " << test2 << endl; + } + string s; Sin.getLine(s); @@ -78,8 +100,7 @@ int main(int argc, char *argv[]) cout<< "output string with " << s2.length() << " characters\n"; cout<< "ostream<< >" << s2 << "<\n"; Info<< "Ostream<< >" << s2 << "<\n"; - Info<< "hash:" << unsigned(string::hash()(s2)) << endl; - + Info<< "hash:" << hex << string::hash()(s2) << endl; Info << "End\n" << endl; diff --git a/applications/test/volPointInterpolation/volPointInterpolationTest.C b/applications/test/volPointInterpolation/volPointInterpolationTest.C index 07329ac349..d44dcf9fa4 100644 --- a/applications/test/volPointInterpolation/volPointInterpolationTest.C +++ b/applications/test/volPointInterpolation/volPointInterpolationTest.C @@ -68,8 +68,7 @@ int main(int argc, char *argv[]) mesh ); - pointMesh pMesh(mesh); - volPointInterpolation pInterp(mesh, pMesh); + const volPointInterpolation& pInterp = volPointInterpolation::New(mesh); pointScalarField pp(pInterp.interpolate(p)); pp.write(); diff --git a/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C b/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C index c90594ff24..9fb3a646d6 100644 --- a/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C +++ b/applications/utilities/errorEstimation/estimateScalarError/estimateScalarError.C @@ -39,24 +39,17 @@ Description int main(int argc, char *argv[]) { + timeSelector::addOptions(); -# include "addTimeOptions.H" # include "setRootCase.H" - - Info<< "\nEstimating error in scalar transport equation\n" << endl; - # include "createTime.H" - // Get times list - instantList Times = runTime.times(); - -# include "checkTimeOptions.H" - - runTime.setTime(Times[startTime], startTime); + instantList timeDirs = timeSelector::select0(runTime, args); # include "createMesh.H" - Info<< "Reading transportProperties\n" << endl; + Info<< "\nEstimating error in scalar transport equation\n" + << "Reading transportProperties\n" << endl; IOdictionary transportProperties ( @@ -79,9 +72,9 @@ int main(int argc, char *argv[]) ); - for (label i=startTime; i - addArcEdgeIstreamConstructorToTable_; + addToRunTimeSelectionTable(curvedEdge, arcEdge, Istream); } diff --git a/applications/utilities/mesh/generation/blockMesh/curvedEdges/curvedEdge.C b/applications/utilities/mesh/generation/blockMesh/curvedEdges/curvedEdge.C index c9d31ef6a1..6a2d41a83e 100644 --- a/applications/utilities/mesh/generation/blockMesh/curvedEdges/curvedEdge.C +++ b/applications/utilities/mesh/generation/blockMesh/curvedEdges/curvedEdge.C @@ -41,26 +41,7 @@ namespace Foam // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(curvedEdge, 0); - -// Define the constructor function hash tables -HashTable* - curvedEdge::IstreamConstructorTablePtr_; - - -// Hash table Constructor called from the table add functions. - -void curvedEdge::constructTables() -{ - static bool constructed = false; - - if (!constructed) - { - curvedEdge::IstreamConstructorTablePtr_ - = new HashTable; - - constructed = true; - } -} +defineRunTimeSelectionTable(curvedEdge, Istream); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -117,10 +98,11 @@ autoPtr curvedEdge::New(const pointField& points, Istream& is) word curvedEdgeType(is); - HashTable::iterator curvedEdgeConstructorIter = - IstreamConstructorTablePtr_->find(curvedEdgeType); + IstreamConstructorTable::iterator cstrIter = + IstreamConstructorTablePtr_ + ->find(curvedEdgeType); - if (curvedEdgeConstructorIter == IstreamConstructorTablePtr_->end()) + if (cstrIter == IstreamConstructorTablePtr_->end()) { FatalErrorIn("curvedEdge::New(const pointField&, Istream&)") << "Unknown curvedEdge type " << curvedEdgeType << endl << endl @@ -129,7 +111,7 @@ autoPtr curvedEdge::New(const pointField& points, Istream& is) << abort(FatalError); } - return autoPtr(curvedEdgeConstructorIter()(points, is)); + return autoPtr(cstrIter()(points, is)); } @@ -177,7 +159,6 @@ Ostream& operator<<(Ostream& os, const curvedEdge& p) } - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/applications/utilities/mesh/generation/blockMesh/curvedEdges/curvedEdge.H b/applications/utilities/mesh/generation/blockMesh/curvedEdges/curvedEdge.H index c568180d73..5ecf489d38 100644 --- a/applications/utilities/mesh/generation/blockMesh/curvedEdges/curvedEdge.H +++ b/applications/utilities/mesh/generation/blockMesh/curvedEdges/curvedEdge.H @@ -63,51 +63,23 @@ protected: public: - // Constructor Hash tables - - //- Construct from Istream function pointer type - typedef autoPtr (*IstreamConstructorPtr_) - (const pointField&, Istream&); - - //- Construct from Istream function pointer table pointer - static HashTable* - IstreamConstructorTablePtr_; + //- Runtime type information + TypeName("curvedEdge"); - // Hash table constructor classes and functions + // Declare run-time constructor selection tables - //- Hash table Constructor. - // Must be called from the table add functions below. - static void constructTables(); - - - //- Class to add constructor from Istream to Hash table - template - class addIstreamConstructorToTable - { - public: - - static autoPtr New + declareRunTimeSelectionTable + ( + autoPtr, + curvedEdge, + Istream, ( const pointField& points, Istream& is - ) - { - return autoPtr(new curvedEdgeType(points, is)); - } - - addIstreamConstructorToTable() - { - curvedEdge::constructTables(); - - curvedEdge::IstreamConstructorTablePtr_ - ->insert(curvedEdgeType::typeName, New); - } - }; - - - //- Runtime type information - TypeName("curvedEdge"); + ), + (points, is) + ); // Constructors diff --git a/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.C b/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.C index f4581ed338..7263f71843 100644 --- a/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.C +++ b/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.C @@ -26,6 +26,7 @@ License #include "polySplineEdge.H" #include "BSpline.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -34,8 +35,7 @@ namespace Foam defineTypeNameAndDebug(polySplineEdge, 0); // Add the curvedEdge constructor functions to the hash tables - curvedEdge::addIstreamConstructorToTable - addPolySplineEdgeIstreamConstructorToTable_; + addToRunTimeSelectionTable(curvedEdge, polySplineEdge, Istream); } diff --git a/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.H b/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.H index d71685782d..1f59d5bf8e 100644 --- a/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.H +++ b/applications/utilities/mesh/generation/blockMesh/curvedEdges/polySplineEdge.H @@ -92,7 +92,7 @@ public: ); //- Construct from Istream setting pointsList - polySplineEdge(const pointField& points,Istream& is); + polySplineEdge(const pointField& points, Istream& is); // Destructor diff --git a/applications/utilities/mesh/generation/blockMesh/curvedEdges/simpleSplineEdge.C b/applications/utilities/mesh/generation/blockMesh/curvedEdges/simpleSplineEdge.C index 8fe13aefe0..b45f0ea3c2 100644 --- a/applications/utilities/mesh/generation/blockMesh/curvedEdges/simpleSplineEdge.C +++ b/applications/utilities/mesh/generation/blockMesh/curvedEdges/simpleSplineEdge.C @@ -27,9 +27,8 @@ Description \*---------------------------------------------------------------------------*/ -#include "error.H" - #include "simpleSplineEdge.H" +#include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -39,10 +38,8 @@ namespace Foam // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // defineTypeNameAndDebug(simpleSplineEdge, 0); +addToRunTimeSelectionTable(curvedEdge, simpleSplineEdge, Istream); -// Add the curvedEdge constructor functions to the hash tables -curvedEdge::addIstreamConstructorToTable - addSimpleSplineEdgeIstreamConstructorToTable_; // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index 0bb37f6727..37860e27b2 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -52,19 +52,18 @@ using namespace Foam; int main(int argc, char *argv[]) { -# include "setRoots.H" -# include "createTimeExtruded.H" + #include "setRoots.H" + #include "createTimeExtruded.H" - - if (args.options().found("sourceRoot") == args.options().found("surface")) + if (args.options().found("sourceCase") == args.options().found("surface")) { FatalErrorIn(args.executable()) - << "Need to specify either -sourceRoot/Case/Patch or -surface" - << " option to specify the source of the patch to extrude" + << "Specify either -sourceCase and -sourcePatch" + " or -surface options\n" + " to specify the source of the patch to extrude" << exit(FatalError); } - autoPtr meshPtr(NULL); autoPtr model @@ -84,23 +83,24 @@ int main(int argc, char *argv[]) ) ); - if (args.options().found("sourceRoot")) + if (args.options().found("sourceCase")) { - fileName rootDirSource(args.options()["sourceRoot"]); - fileName caseDirSource(args.options()["sourceCase"]); - fileName patchName(args.options()["sourcePatch"]); + fileName sourceCasePath(args.options()["sourceCase"]); + fileName sourceRootDir = sourceCasePath.path(); + fileName sourceCaseDir = sourceCasePath.name(); + word patchName(args.options()["sourcePatch"]); Info<< "Extruding patch " << patchName - << " on mesh " << rootDirSource << ' ' << caseDirSource << nl + << " on mesh " << sourceCasePath << nl << endl; Time runTime ( Time::controlDictName, - rootDirSource, - caseDirSource + sourceRootDir, + sourceCaseDir ); -# include "createPolyMesh.H" + #include "createPolyMesh.H" label patchID = mesh.boundaryMesh().findPatchID(patchName); @@ -171,7 +171,7 @@ int main(int argc, char *argv[]) fMesh, model() ) - ); + ); } extrudedMesh& mesh = meshPtr(); @@ -180,7 +180,7 @@ int main(int argc, char *argv[]) const vector span = bb.span(); const scalar mergeDim = 1E-4 * bb.minDim(); - Pout<< "Mesh bounding box:" << bb << nl + Info<< "Mesh bounding box:" << bb << nl << " with span:" << span << nl << "Merge distance :" << mergeDim << nl << endl; @@ -201,7 +201,7 @@ int main(int argc, char *argv[]) // ~~~~~~~~~~~~~~ { - Pout<< "Collapsing edges < " << mergeDim << " ..." << nl << endl; + Info<< "Collapsing edges < " << mergeDim << " ..." << nl << endl; // Edge collapsing engine edgeCollapser collapser(mesh); @@ -217,7 +217,7 @@ int main(int argc, char *argv[]) if (d < mergeDim) { - Pout<< "Merging edge " << e << " since length " << d + Info<< "Merging edge " << e << " since length " << d << " << " << mergeDim << nl; // Collapse edge to e[0] @@ -252,8 +252,8 @@ int main(int argc, char *argv[]) if (args.options().found("mergeFaces")) { - Pout<< "Assuming full 360 degree axisymmetric case;" - << " stitching faces on patches " + Info<< "Assuming full 360 degree axisymmetric case;" + << " stitching faces on patches " << patches[origPatchID].name() << " and " << patches[otherPatchID].name() << " together ..." << nl << endl; diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C index 27dec921b7..6da971a1bf 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.C @@ -48,7 +48,7 @@ wedge::wedge(const dictionary& dict) : extrudeModel(typeName, dict), axisPt_(coeffDict_.lookup("axisPt")), - axisNormal_(coeffDict_.lookup("axisNormal")), + axis_(coeffDict_.lookup("axis")), angle_ ( readScalar(coeffDict_.lookup("angle")) @@ -96,7 +96,7 @@ point wedge::operator() // of surface point and surface normal. point d = surfacePoint - axisPt_; - d -= (axisNormal_ & d)*axisNormal_; + d -= (axis_ & d)*axis_; scalar dMag = mag(d); @@ -107,7 +107,7 @@ point wedge::operator() if (dMag > VSMALL) { - vector n = (d/dMag) ^ axisNormal_; + vector n = (d/dMag) ^ axis_; rotatedPoint += + cos(sliceAngle)*d @@ -124,4 +124,3 @@ point wedge::operator() } // End namespace Foam // ************************************************************************* // - diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.H b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.H index 38b862630d..39c4b4a2d3 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.H +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeModel/wedge/wedge.H @@ -60,13 +60,13 @@ class wedge { // Private data - //- point on axis + //- Point on axis const point axisPt_; - //- normalized direction of axis - const vector axisNormal_; + //- Normalized direction of axis + const vector axis_; - //- overall angle (radians) + //- Overall angle (radians) const scalar angle_; @@ -80,6 +80,7 @@ public: //- Construct from components wedge(const dictionary& dict); + //- Destrcuctor ~wedge(); diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties b/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties index c9b7977508..ecbe160a15 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeProperties @@ -24,7 +24,7 @@ nLayers 1; wedgeCoeffs { axisPt (0 0 0); - axisNormal (0 -1 0); + axis (0 -1 0); angle 2.0; } @@ -47,4 +47,3 @@ sigmaRadialCoeffs // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - diff --git a/applications/utilities/mesh/generation/extrudeMesh/setRoots.H b/applications/utilities/mesh/generation/extrudeMesh/setRoots.H index 255949426b..9c13db28d1 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/setRoots.H +++ b/applications/utilities/mesh/generation/extrudeMesh/setRoots.H @@ -1,7 +1,6 @@ argList::validArgs.clear(); argList::noParallel(); - argList::validOptions.insert("sourceRoot", "source root"); argList::validOptions.insert("sourceCase", "source case"); argList::validOptions.insert("sourcePatch", "source patch"); @@ -15,4 +14,3 @@ { FatalError.exit(); } - diff --git a/applications/utilities/mesh/generation/snappyHexMesh/Make/options b/applications/utilities/mesh/generation/snappyHexMesh/Make/options index d9eb36aa34..1c74c3aff5 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/Make/options +++ b/applications/utilities/mesh/generation/snappyHexMesh/Make/options @@ -1,6 +1,6 @@ EXE_INC = \ /* -g -DFULLDEBUG -O0 */ \ - -I$(LIB_SRC)/decompositionAgglomeration/decompositionMethods/lnInclude \ + -I$(LIB_SRC)/decompositionMethods/decompositionMethods/lnInclude \ -I$(LIB_SRC)/autoMesh/lnInclude \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/triSurface/lnInclude \ @@ -9,7 +9,6 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude EXE_LIBS = \ - -L$(FOAM_MPI_LIBBIN) -lparMetisDecompositionMethod \ -lfiniteVolume \ -ldecompositionMethods \ -lmeshTools \ diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C index 74ab53432a..d226008f5c 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C @@ -31,7 +31,9 @@ Description \*---------------------------------------------------------------------------*/ #include "argList.H" +#include "timeSelector.H" #include "Time.H" + #include "polyMesh.H" #include "globalMeshData.H" @@ -45,48 +47,34 @@ using namespace Foam; int main(int argc, char *argv[]) { + timeSelector::addOptions(false); // no constant # include "addRegionOption.H" - -# include "addTimeOptionsNoConstant.H" - argList::validOptions.insert("noTopology", ""); argList::validOptions.insert("allGeometry", ""); argList::validOptions.insert("allTopology", ""); # include "setRootCase.H" +# include "createTime.H" + instantList timeDirs = timeSelector::select0(runTime, args); +# include "createNamedPolyMesh.H" - const bool noTopology = args.options().found("noTopology"); + const bool noTopology = args.options().found("noTopology"); const bool allGeometry = args.options().found("allGeometry"); const bool allTopology = args.options().found("allTopology"); -# include "createTime.H" - - // Get times list - instantList Times = runTime.times(); - -# include "checkTimeOptionsNoConstant.H" - - runTime.setTime(Times[startTime], startTime); - -# include "createNamedPolyMesh.H" - - bool firstCheck = true; - - for (label i=startTime; i pointLabels(set.toc()); label zoneID = mesh.pointZones().findZoneID(set.name()); if (zoneID == -1) @@ -120,7 +122,7 @@ int main(int argc, char *argv[]) new pointZone ( set.name(), //name - set.toc(), //addressing + pointLabels, //addressing sz, //index mesh.pointZones() //pointZoneMesh ) @@ -131,7 +133,7 @@ int main(int argc, char *argv[]) { Info<< "Overwriting contents of existing pointZone " << zoneID << " with that of set " << set.name() << "." << endl; - mesh.pointZones()[zoneID] = set.toc(); + mesh.pointZones()[zoneID] = pointLabels; mesh.pointZones().writeOpt() = IOobject::AUTO_WRITE; } } @@ -150,6 +152,7 @@ int main(int argc, char *argv[]) { // Not in memory. Load it. cellSet set(*iter()); + SortableList