diff --git a/applications/solvers/combustion/dieselEngineFoam/YEqn.H b/applications/solvers/combustion/dieselEngineFoam/YEqn.H index 9d46c0d6111aa2e759816f385277f8371c3ab538..f6251d1c30424a1cbe145a8f0b9b5e96ea5bc23e 100644 --- a/applications/solvers/combustion/dieselEngineFoam/YEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/YEqn.H @@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i<Y.size(); i++) + forAll(Y, i) { if (Y[i].name() != inertSpecie) { diff --git a/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H b/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H index 2dc57de4a15d78226b07b0b1154e39535d096539..4ec16056d23f50c95adad73202843f91bbd49e04 100644 --- a/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H +++ b/applications/solvers/combustion/dieselEngineFoam/rhoEqn.H @@ -43,7 +43,7 @@ volScalarField Sevap dimensionedScalar("zero", dimensionSet(1, -3, -1, 0, 0), 0.0) ); -for (label i=0; i<Y.size(); i++) +forAll(Y, i) { if (dieselSpray.isLiquidFuel()[i]) { diff --git a/applications/solvers/combustion/reactingFoam/YEqn.H b/applications/solvers/combustion/reactingFoam/YEqn.H index cda24ec2f72efc49c797a83bbcbb4ba2be6007b5..76d8253795a028a9610293b0e3b9cbef06c76f67 100644 --- a/applications/solvers/combustion/reactingFoam/YEqn.H +++ b/applications/solvers/combustion/reactingFoam/YEqn.H @@ -13,7 +13,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i<Y.size(); i++) + forAll(Y, i) { if (Y[i].name() != inertSpecie) { diff --git a/applications/solvers/combustion/rhoReactingFoam/YEqn.H b/applications/solvers/combustion/rhoReactingFoam/YEqn.H index cda24ec2f72efc49c797a83bbcbb4ba2be6007b5..76d8253795a028a9610293b0e3b9cbef06c76f67 100644 --- a/applications/solvers/combustion/rhoReactingFoam/YEqn.H +++ b/applications/solvers/combustion/rhoReactingFoam/YEqn.H @@ -13,7 +13,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i<Y.size(); i++) + forAll(Y, i) { if (Y[i].name() != inertSpecie) { diff --git a/applications/solvers/electromagnetics/magneticFoam/createFields.H b/applications/solvers/electromagnetics/magneticFoam/createFields.H index 1a5b7095a94fad3a24d42dfad1ed17fddfe4a1a1..a3712c19aa1d7baaa5c2a03572b22938d30d6cbc 100644 --- a/applications/solvers/electromagnetics/magneticFoam/createFields.H +++ b/applications/solvers/electromagnetics/magneticFoam/createFields.H @@ -63,8 +63,7 @@ << exit(FatalIOError); } - const labelList& faces = - mesh.faceZones()[magnetZonei]; + const labelList& faces = mesh.faceZones()[magnetZonei]; const scalar muri = magnets[i].mur(); const scalar Mri = magnets[i].Mr().value(); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/createSolidFields.H index 3361a89add381ed2f43d39b602b2b945040453cf..8f109a3f8293ea88e9cd38b72d43632ae37a28a2 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/createSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionSimpleFoam/solid/createSolidFields.H @@ -1,7 +1,6 @@ // Initialise solid field pointer lists PtrList<volScalarField> rhos(solidRegions.size()); PtrList<volScalarField> cps(solidRegions.size()); - PtrList<volScalarField> rhosCps(solidRegions.size()); PtrList<volScalarField> Ks(solidRegions.size()); PtrList<volScalarField> Ts(solidRegions.size()); @@ -47,12 +46,6 @@ ) ); - rhosCps.set - ( - i, - new volScalarField("rhosCps", rhos[i]*cps[i]) - ); - Info<< " Adding to Ks\n" << endl; Ks.set ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H index 3361a89add381ed2f43d39b602b2b945040453cf..8f109a3f8293ea88e9cd38b72d43632ae37a28a2 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/createSolidFields.H @@ -1,7 +1,6 @@ // Initialise solid field pointer lists PtrList<volScalarField> rhos(solidRegions.size()); PtrList<volScalarField> cps(solidRegions.size()); - PtrList<volScalarField> rhosCps(solidRegions.size()); PtrList<volScalarField> Ks(solidRegions.size()); PtrList<volScalarField> Ts(solidRegions.size()); @@ -47,12 +46,6 @@ ) ); - rhosCps.set - ( - i, - new volScalarField("rhosCps", rhos[i]*cps[i]) - ); - Info<< " Adding to Ks\n" << endl; Ks.set ( diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H index c2e5668a684d16cf09256550d3da8e67a271c587..4b09671de2ef040980f62cbbcb10054fb5ba8cb9 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/solid/solidRegionDiffusionNo.H @@ -8,7 +8,7 @@ ( solidRegions[regionI], runTime, - rhosCps[regionI], + rhos[regionI]*cps[regionI], Ks[regionI] ), DiNum diff --git a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H index dd2f6416ee4db07dddb4474aad05b89da70aee59..0c8c1bd1157e6d1266f2a66cc1d55d88581b2a4e 100644 --- a/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H +++ b/applications/solvers/incompressible/adjointShapeOptimizationFoam/createFields.H @@ -1,4 +1,4 @@ - Info << "Reading field p\n" << endl; + Info<< "Reading field p\n" << endl; volScalarField p ( IOobject @@ -12,7 +12,7 @@ mesh ); - Info << "Reading field U\n" << endl; + Info<< "Reading field U\n" << endl; volVectorField U ( IOobject @@ -34,7 +34,7 @@ setRefCell(p, mesh.solutionDict().subDict("SIMPLE"), pRefCell, pRefValue); - Info << "Reading field pa\n" << endl; + Info<< "Reading field pa\n" << endl; volScalarField pa ( IOobject @@ -48,7 +48,7 @@ mesh ); - Info << "Reading field Ua\n" << endl; + Info<< "Reading field Ua\n" << endl; volVectorField Ua ( IOobject @@ -84,10 +84,8 @@ dimensionedScalar lambda(laminarTransport.lookup("lambda")); dimensionedScalar alphaMax(laminarTransport.lookup("alphaMax")); - const labelList& inletCells = - mesh.boundary()[mesh.boundaryMesh().findPatchID("inlet")].faceCells(); - //const labelList& outletCells = - // mesh.boundary()[mesh.boundaryMesh().findPatchID("outlet")].faceCells(); + const labelList& inletCells = mesh.boundary()["inlet"].faceCells(); + //const labelList& outletCells = mesh.boundary()["outlet"].faceCells(); volScalarField alpha ( diff --git a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H b/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H index f1651d8df391de08305885cf6fdc884ec7ea24bc..f137c0027fa022172b368ab7af9d5f2bc3cd4c6f 100644 --- a/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H +++ b/applications/solvers/incompressible/pimpleDyMFoam/correctPhi.H @@ -27,7 +27,7 @@ zeroGradientFvPatchScalarField::typeName ); - for (label i=0; i<p.boundaryField().size(); i++) + forAll(p.boundaryField(), i) { if (p.boundaryField()[i].fixesValue()) { diff --git a/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/incompressibleUncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/incompressibleUncoupledKinematicParcelFoam.C index bc87b5118f24860a1c4d037a1d4cfc17ffab7a77..8d3f2279bc3568a6120406c25ab923fe4cd679bc 100644 --- a/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/incompressibleUncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/incompressibleUncoupledKinematicParcelFoam/incompressibleUncoupledKinematicParcelFoam.C @@ -41,7 +41,12 @@ Description int main(int argc, char *argv[]) { - argList::addOption("cloudName", "cloud name"); + argList::addOption + ( + "cloudName", + "name", + "specify alternative cloud name. default is 'kinematicCloud'" + ); #include "setRootCase.H" #include "createTime.H" diff --git a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H index 5cf44cb09fef5500b0813c099abc57c433cee9cc..c687f2035ba3fb4bb6d48efcd631d052eb189fce 100644 --- a/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H +++ b/applications/solvers/lagrangian/reactingParcelFilmFoam/YEqn.H @@ -14,7 +14,7 @@ tmp<fv::convectionScheme<scalar> > mvConvection label inertIndex = -1; volScalarField Yt = 0.0*Y[0]; - for (label i=0; i<Y.size(); i++) + forAll(Y, i) { if (Y[i].name() != inertSpecie) { diff --git a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C index 13757df7ba87dfa1785c19da57057346a4fff7ce..1fdc783a4f703002201d8fcb8971cd60916da84b 100644 --- a/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C +++ b/applications/solvers/lagrangian/uncoupledKinematicParcelFoam/uncoupledKinematicParcelFoam.C @@ -41,7 +41,12 @@ Description int main(int argc, char *argv[]) { - argList::addOption("cloudName", "cloud name"); + argList::addOption + ( + "cloudName", + "name", + "specify alternative cloud name. default is 'kinematicCloud'" + ); #include "setRootCase.H" #include "createTime.H" diff --git a/applications/solvers/multiphase/bubbleFoam/createPhia.H b/applications/solvers/multiphase/bubbleFoam/createPhia.H index 703587bfd5a807322ade63084f956c129ab75588..ac0418c5dc93bb35f67f4c730356a89e480ae8d2 100644 --- a/applications/solvers/multiphase/bubbleFoam/createPhia.H +++ b/applications/solvers/multiphase/bubbleFoam/createPhia.H @@ -36,7 +36,7 @@ calculatedFvPatchScalarField::typeName ); - for (label i=0; i<Ua.boundaryField().size(); i++) + forAll(Ua.boundaryField(), i) { if (isA<fixedValueFvPatchVectorField>(Ua.boundaryField()[i])) { diff --git a/applications/solvers/multiphase/bubbleFoam/createPhib.H b/applications/solvers/multiphase/bubbleFoam/createPhib.H index 77bb467063daf235d77dd64caa94d5a2db6ce5f9..bdf4c46bcc44fc78cedc9c8a7e34d57c3b3839b1 100644 --- a/applications/solvers/multiphase/bubbleFoam/createPhib.H +++ b/applications/solvers/multiphase/bubbleFoam/createPhib.H @@ -36,7 +36,7 @@ calculatedFvPatchScalarField::typeName ); - for (label i=0; i<Ub.boundaryField().size(); i++) + forAll(Ub.boundaryField(), i) { if (isA<fixedValueFvPatchVectorField>(Ub.boundaryField()[i])) { diff --git a/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H index 3da1b5e9c19d85ba9dede2bcdb85f346a5610c9e..9d3be93d0e56e5cf1f2a9e82d7ddf3fb23122762 100644 --- a/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H +++ b/applications/solvers/multiphase/compressibleInterDyMFoam/createFields.H @@ -135,7 +135,7 @@ zeroGradientFvPatchScalarField::typeName ); - for (label i=0; i<p.boundaryField().size(); i++) + forAll(p.boundaryField(), i) { if (p.boundaryField()[i].fixesValue()) { diff --git a/applications/solvers/multiphase/interDyMFoam/createFields.H b/applications/solvers/multiphase/interDyMFoam/createFields.H index 905ba0d64656e7be4b5fa0acdcefd6710d31999f..843931df10419d182446282fd20db677bdd4fc4a 100644 --- a/applications/solvers/multiphase/interDyMFoam/createFields.H +++ b/applications/solvers/multiphase/interDyMFoam/createFields.H @@ -98,7 +98,7 @@ zeroGradientFvPatchScalarField::typeName ); - for (label i=0; i<p.boundaryField().size(); i++) + forAll(p.boundaryField(), i) { if (p.boundaryField()[i].fixesValue()) { diff --git a/applications/solvers/multiphase/interFoam/correctPhi.H b/applications/solvers/multiphase/interFoam/correctPhi.H index a41332ce9bdd6811eaaa1342eedc02defb1c1d1f..0b5cd3ff5954bbc0c7d410522a2e76b17f67b242 100644 --- a/applications/solvers/multiphase/interFoam/correctPhi.H +++ b/applications/solvers/multiphase/interFoam/correctPhi.H @@ -7,7 +7,7 @@ zeroGradientFvPatchScalarField::typeName ); - for (label i=0; i<p.boundaryField().size(); i++) + forAll(p.boundaryField(), i) { if (p.boundaryField()[i].fixesValue()) { diff --git a/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H b/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H index 2547dac96630aa59a6b11dc00230f5f13599e715..30e5c542e918b0f3df2b83f22c72062ff6f319ad 100644 --- a/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H +++ b/applications/solvers/multiphase/interPhaseChangeFoam/correctPhi.H @@ -7,7 +7,7 @@ zeroGradientFvPatchScalarField::typeName ); - for (label i=0; i<p.boundaryField().size(); i++) + forAll(p.boundaryField(), i) { if (p.boundaryField()[i].fixesValue()) { diff --git a/applications/solvers/multiphase/settlingFoam/pmhEqn.H b/applications/solvers/multiphase/settlingFoam/pmhEqn.H index 5a9b01a6f28802b06f566285fef230df5f7274c0..642479b8d0374fe3945d790bbbbe0cf6504f7cf6 100644 --- a/applications/solvers/multiphase/settlingFoam/pmhEqn.H +++ b/applications/solvers/multiphase/settlingFoam/pmhEqn.H @@ -17,7 +17,7 @@ phi = surfaceScalarField phiU("phiU", phi); phi -= ghf*fvc::snGrad(rho)*rUAf*mesh.magSf(); -for(int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) +for (int nonOrth=0; nonOrth<=nNonOrthCorr; nonOrth++) { fvScalarMatrix pmhEqn ( diff --git a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C index 805cd2384558bcf40a0b9eaf9db91f755562b6d0..4d6025a256ed29df9e110eada0d0dcb9c29c8e55 100644 --- a/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C +++ b/applications/solvers/multiphase/twoPhaseEulerFoam/phaseModel/phaseModel/phaseModel.C @@ -106,7 +106,7 @@ Foam::phaseModel::phaseModel calculatedFvPatchScalarField::typeName ); - for (label i=0; i<U_.boundaryField().size(); i++) + forAll(U_.boundaryField(), i) { if (isA<fixedValueFvPatchVectorField>(U_.boundaryField()[i])) { diff --git a/applications/test/FixedList/FixedListTest.C b/applications/test/FixedList/FixedListTest.C index 79abb4a34a22a1eff7e2d438655d9bc1f0405cb9..208ff277b1772e16059af7fedc9bd9a5ee8f9a36 100644 --- a/applications/test/FixedList/FixedListTest.C +++ b/applications/test/FixedList/FixedListTest.C @@ -43,7 +43,6 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList args(argc, argv); FixedList<label, 4> list; diff --git a/applications/test/ODETest/ODETest.C b/applications/test/ODETest/ODETest.C index e8d29553e14eb6df81541d29ba8e897cfd099400..2a3b8357b9684810fc5f9e646adeb14ced24529e 100644 --- a/applications/test/ODETest/ODETest.C +++ b/applications/test/ODETest/ODETest.C @@ -104,7 +104,6 @@ public: int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList::validArgs.append("ODESolver"); argList args(argc, argv); diff --git a/applications/test/prefixOSstream/prefixOSstreamTest.C b/applications/test/prefixOSstream/prefixOSstreamTest.C index 98bcee40c4f877f78a80e55946f4c7e2b8d1f954..093c540e9603689699e539f21b3e3a67f27f705b 100644 --- a/applications/test/prefixOSstream/prefixOSstreamTest.C +++ b/applications/test/prefixOSstream/prefixOSstreamTest.C @@ -45,7 +45,6 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList args(argc, argv); //Pout.prefix() = '[' + name(Pstream::myProcNo()) + "] "; diff --git a/applications/test/primitivePatch/testPrimitivePatch.C b/applications/test/primitivePatch/testPrimitivePatch.C index e2336530e6c39fa20d6554eeaa8137491ea99e3f..f85b65435b0ccda5943097387784a1ce29d585b9 100644 --- a/applications/test/primitivePatch/testPrimitivePatch.C +++ b/applications/test/primitivePatch/testPrimitivePatch.C @@ -220,10 +220,7 @@ int main(int argc, char *argv[]) # include "createPolyMesh.H" const word patchName = args[1]; - - label patchI = mesh.boundaryMesh().findPatchID(patchName); - - const polyPatch& patch = mesh.boundaryMesh()[patchI]; + const polyPatch& patch = mesh.boundaryMesh()[patchName]; Info<< "Patch:" << patch.name() << endl; diff --git a/applications/test/readCHEMKINIII/readCHEMKINIII.C b/applications/test/readCHEMKINIII/readCHEMKINIII.C index 9165f84839c044859f20456738550c61ab81e868..7005f935924ede47b1aed6f3899fe68fc9fd5fdd 100644 --- a/applications/test/readCHEMKINIII/readCHEMKINIII.C +++ b/applications/test/readCHEMKINIII/readCHEMKINIII.C @@ -35,7 +35,6 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList::validArgs.append("CHEMKINIIIFile"); argList::addOption("thermo", "fileName"); argList args(argc, argv); diff --git a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C index c3d671d232ad5ba44038db1d835e77ec44a93b3a..56ea5e124f47d1d4ea52c414e2ad93e76c357e33 100644 --- a/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C +++ b/applications/utilities/mesh/advanced/combinePatchFaces/combinePatchFaces.C @@ -38,7 +38,7 @@ Description E.g. to allow all faces on same patch to be merged: - combinePatchFaces .. cavity 180 -concaveAngle 90 + combinePatchFaces 180 -concaveAngle 90 \*---------------------------------------------------------------------------*/ @@ -429,15 +429,18 @@ int main(int argc, char *argv[]) { # include "addOverwriteOption.H" - argList::validArgs.append("feature angle [0..180]"); + argList::validArgs.append("featureAngle [0..180]"); argList::addOption ( "concaveAngle", - "[0..180]", - "specify concave angle [0..180] degrees (default: 30.0 degrees)" + "degrees", + "specify concave angle [0..180] (default: 30 degrees)" + ); + argList::addBoolOption + ( + "snapMesh", + "use system/snapMeshDict" ); - - argList::addBoolOption("snapMesh"); # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C index 5e0ce9248ff6a51dc095b34403b31dcc88c67b0e..4a1a9b5a0810b7df7872396443935ab6e6f57cfd 100644 --- a/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C +++ b/applications/utilities/mesh/advanced/refineWallLayer/refineWallLayer.C @@ -46,12 +46,18 @@ using namespace Foam; int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" + #include "addOverwriteOption.H" argList::noParallel(); argList::validArgs.append("patchName"); argList::validArgs.append("edgeWeight"); - argList::addOption("useSet", "cellSet"); + argList::addOption + ( + "useSet", + "name", + "restrict cells to refine based on specified cellSet name" + ); + # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C index acaa9bf48d91203bfc31ab12b089337d975d0a9c..0224943836224379884129077523213de16baa7b 100644 --- a/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C +++ b/applications/utilities/mesh/advanced/refinementLevel/refinementLevel.C @@ -96,11 +96,15 @@ bool limitRefinementLevel int main(int argc, char *argv[]) { - argList::addBoolOption("readLevel"); + argList::addBoolOption + ( + "readLevel", + "read level from refinementLevel file" + ); -# include "setRootCase.H" -# include "createTime.H" -# include "createPolyMesh.H" + #include "setRootCase.H" + #include "createTime.H" + #include "createPolyMesh.H" Info<< "Dividing cells into bins depending on cell volume.\nThis will" << " correspond to refinement levels for a mesh with only 2x2x2" @@ -109,7 +113,7 @@ int main(int argc, char *argv[]) << " to allow for some truncation error." << nl << endl; - bool readLevel = args.optionFound("readLevel"); + const bool readLevel = args.optionFound("readLevel"); const scalarField& vols = mesh.cellVolumes(); diff --git a/applications/utilities/mesh/advanced/splitCells/splitCells.C b/applications/utilities/mesh/advanced/splitCells/splitCells.C index 19828287bc5bd93fac891746a2f5e8197b826765..3967a515167eba5726b77820f20f99e0b5297f35 100644 --- a/applications/utilities/mesh/advanced/splitCells/splitCells.C +++ b/applications/utilities/mesh/advanced/splitCells/splitCells.C @@ -517,17 +517,35 @@ void collectCuts int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" + argList::addNote + ( + "split cells with flat faces" + ); + #include "addOverwriteOption.H" argList::noParallel(); - argList::addOption("set", "cellSet name"); - argList::addBoolOption("geometry"); - argList::addOption("tol", "edge snap tolerance"); - argList::validArgs.append("edge angle [0..360]"); + argList::validArgs.append("edgeAngle [0..360]"); + + argList::addOption + ( + "set", + "name", + "split cells from specified cellSet only" + ); + argList::addBoolOption + ( + "geometry", + "use geometric cut for hexes as well" + ); + argList::addOption + ( + "tol", + "scalar", "edge snap tolerance (default 0.2)" + ); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createPolyMesh.H" + #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); const scalar featureAngle = args.argRead<scalar>(1); @@ -538,7 +556,7 @@ int main(int argc, char *argv[]) const bool geometry = args.optionFound("geometry"); const bool overwrite = args.optionFound("overwrite"); - scalar edgeTol = args.optionLookupOrDefault("tol", 0.2); + const scalar edgeTol = args.optionLookupOrDefault("tol", 0.2); Info<< "Trying to split cells with internal angles > feature angle\n" << nl << "featureAngle : " << featureAngle << nl diff --git a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L index 2fb1c7704325d58c9465550e93e47c2b284af7df..16e3b9efe319d6a9c8e58ed77a246bb42feb0346 100644 --- a/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L +++ b/applications/utilities/mesh/conversion/ansysToFoam/ansysToFoam.L @@ -235,7 +235,12 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("ANSYS input file"); - argList::addOption("scale", "scale factor"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); argList args(argc, argv); @@ -244,8 +249,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = 1.0; - args.optionReadIfPresent("scale", scaleFactor); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C index 02b758b5698a2c25e16c0ad3e1739764d4943024..2de1b840e9109fa0188157b5ced5e5198b89d57e 100644 --- a/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C +++ b/applications/utilities/mesh/conversion/cfx4ToFoam/cfx4ToFoam.C @@ -49,7 +49,12 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("CFX geom file"); - argList::addOption("scale", "scale factor"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); argList args(argc, argv); @@ -58,8 +63,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = 1.0; - args.optionReadIfPresent("scale", scaleFactor); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L index 02da5e6829724c7e6b29f97d7d484fab4ff94035..6c3a0c315a58bb4862da289a8767dae71be71b2c 100644 --- a/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluent3DMeshToFoam/fluent3DMeshToFoam.L @@ -761,10 +761,30 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("Fluent mesh file"); - argList::addOption("scale", "scale factor"); - argList::addOption("ignoreCellGroups", "cell group names"); - argList::addOption("ignoreFaceGroups", "face group names"); - argList::addBoolOption("cubit"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); + argList::addOption + ( + "ignoreCellGroups", + "names", + "specify cell groups to ignore" + ); + argList::addOption + ( + "ignoreFaceGroups", + "names", + "specify face groups to ignore" + ); + + argList::addBoolOption + ( + "cubit", + "special parsing of (incorrect) cubit files" + ); argList args(argc, argv); diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt b/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt index 1dcfe05a8ea4fd6cba73e7f5499323d2ef6b9ca7..43c096374648f28f58f345a77752df0c18872ff9 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/README.txt @@ -20,8 +20,7 @@ Notes for fluentMeshToFoam with zone preservation with the cellZones(), faceZones() and pointZones() member functions - Example (Members from polyMesh.H and ZoneMesh.H): - label thisCellZoneID = mesh.cellZones().findZoneID("thisZoneName"); - const labelList& thisCellZone = mesh.cellZones()[thisCellZoneID]; + const labelList& thisCellZone = mesh.cellZones()["thisZoneName"]; - Zone integrity is preserved during mesh modification and decompomposition. diff --git a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L index 8c954cd1cb8f1ec1bfcbd275f4e6521124f0387e..619374396ffc78da2130b8789eff6ffece805cb3 100644 --- a/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L +++ b/applications/utilities/mesh/conversion/fluentMeshToFoam/fluentMeshToFoam.L @@ -866,9 +866,22 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("Fluent mesh file"); - argList::addOption("scale", "scale factor"); - argList::addBoolOption("writeSets"); - argList::addBoolOption("writeZones"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); + argList::addBoolOption + ( + "writeSets", + "write cell zones and patches as sets" + ); + argList::addBoolOption + ( + "writeZones", + "write cell zones as zones" + ); argList args(argc, argv); @@ -877,8 +890,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = 1.0; - args.optionReadIfPresent("scale", scaleFactor); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); const bool writeSets = args.optionFound("writeSets"); const bool writeZones = args.optionFound("writeZones"); @@ -1554,7 +1566,7 @@ int main(int argc, char *argv[]) // interior boundaries are handled via faceSets // cell zones will only be written if there is more than one - if (writeZones && cellGroupZoneID.size()>1) + if (writeZones && cellGroupZoneID.size() > 1) { Info<< "Adding Zones" << endl; List<pointZone*> pz(0); diff --git a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C index fbb2c3b12fa9be8fe5133a3f0e70499d85478cbc..09e34235e5fda8fcb6820b6a4f0cdbf8b31ed0f3 100644 --- a/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C +++ b/applications/utilities/mesh/conversion/foamToStarMesh/foamToStarMesh.C @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) ( "scale", "factor", - "specify geometry scaling factor - default is 1000 ([m] to [mm])" + "geometry scaling factor - default is 1000 ([m] to [mm])" ); argList::addBoolOption ( diff --git a/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C b/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C index 1616173a83e2051eab65fd8d56763ec879aef311..28ced25e87c78fbf25ad2d12f89e139531f74b30 100644 --- a/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C +++ b/applications/utilities/mesh/conversion/foamToSurface/foamToSurface.C @@ -61,8 +61,8 @@ int main(int argc, char *argv[]) argList::addOption ( "scale", - "scale", - "specify geometry scaling factor" + "factor", + "geometry scaling factor - default is 1" ); argList::addBoolOption ( diff --git a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L index 5e3b62bec58df9e7948de1f71efb6bf491f29772..c1d2b44e829805db413afbaec3e6fde7b775791c 100644 --- a/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L +++ b/applications/utilities/mesh/conversion/gambitToFoam/gambitToFoam.L @@ -628,7 +628,12 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("GAMBIT file"); - argList::addOption("scale", "scale factor"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); argList args(argc, argv); @@ -637,8 +642,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = 1.0; - args.optionReadIfPresent("scale", scaleFactor); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C index 1bcc998ae96a668b54e4f61dffce19e917050de5..a3f607ba0b04e809439c4fb585a8724c24acd2f6 100644 --- a/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C +++ b/applications/utilities/mesh/conversion/gmshToFoam/gmshToFoam.C @@ -716,7 +716,11 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append(".msh file"); - argList::addBoolOption("keepOrientation"); + argList::addBoolOption + ( + "keepOrientation", + "retain raw orientation for prisms/hexs" + ); # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C index 5adeb6823624ecbf17edbeefe624519361ef7fb1..ab764547a3582a9900246754f22ebf967da1a3a5 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C +++ b/applications/utilities/mesh/conversion/kivaToFoam/kivaToFoam.C @@ -46,7 +46,7 @@ Description using namespace Foam; -// Supported KIVA versions +//- Supported KIVA versions enum kivaVersions { kiva3, @@ -59,37 +59,51 @@ enum kivaVersions int main(int argc, char *argv[]) { argList::noParallel(); - argList::addOption("file", "fileName"); - argList::addOption("version", "[kiva3|kiva3v]"); - argList::addOption("zHeadMin", "scalar"); + argList::addOption + ( + "file", + "name", + "specify alternative input file name - default is otape17" + ); + argList::addOption + ( + "version", + "version", + "specify kiva version [kiva3|kiva3v] - default is '3v'" + ); + argList::addOption + ( + "zHeadMin", + "scalar", + "minimum z-height for transferring liner faces to cylinder-head" + ); # include "setRootCase.H" # include "createTime.H" - fileName kivaFileName("otape17"); - args.optionReadIfPresent("file", kivaFileName); + const fileName kivaFileName = + args.optionLookupOrDefault<fileName>("file", "otape17"); kivaVersions kivaVersion = kiva3v; if (args.optionFound("version")) { - const word kivaVersionName = args["version"]; + const word versionName = args["version"]; - if (kivaVersionName == "kiva3") + if (versionName == "kiva3") { kivaVersion = kiva3; } - else if (kivaVersionName == "kiva3v") + else if (versionName == "kiva3v") { kivaVersion = kiva3v; } else { FatalErrorIn("main(int argc, char *argv[])") - << "KIVA file version " << kivaVersionName << " not supported" + << "KIVA file version " << versionName << " not supported" << exit(FatalError); args.printUsage(); - FatalError.exit(1); } } diff --git a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H index 6c50c02fcde098aa6ee40450cf9838fc6173be7d..d4356c2cdcc1fd12ecffd32f9f780130acc3f938 100644 --- a/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H +++ b/applications/utilities/mesh/conversion/kivaToFoam/readKivaGrid.H @@ -315,7 +315,7 @@ for (label i=0; i<nPoints; i++) } } -// Tranfer liner faces that are above the minimum cylinder-head z height +// Transfer liner faces that are above the minimum cylinder-head z height // into the cylinder-head region if ( diff --git a/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C b/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C index 46ac3ce080d6293cdad55958a5674e56f9e074cf..2d2c53e447e7b2d2d079c3a044b74291dd6f5108 100644 --- a/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C +++ b/applications/utilities/mesh/conversion/mshToFoam/mshToFoam.C @@ -56,7 +56,11 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append(".msh file"); - argList::addBoolOption("hex"); + argList::addBoolOption + ( + "hex", + "treat input as containing hex instead of tet cells" + ); # include "setRootCase.H" # include "createTime.H" @@ -69,11 +73,11 @@ int main(int argc, char *argv[]) if (readHex) { - Info<< "Trying to read " << nCells << " hexes." << endl << endl; + Info<< "Trying to read " << nCells << " hexes." << nl << endl; } else { - Info<< "Trying to read " << nCells << " tets." << endl << endl; + Info<< "Trying to read " << nCells << " tets." << nl << endl; } cellShapeList cells(nCells); diff --git a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C index a24cf8bc1bd364853d79231b62c54f124344bda6..40db7f47b57530d20ca0207686be62d15b4853dd 100644 --- a/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C +++ b/applications/utilities/mesh/conversion/plot3dToFoam/plot3dToFoam.C @@ -57,10 +57,28 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("PLOT3D geom file"); - argList::addOption("scale", "scale factor"); - argList::addBoolOption("noBlank"); - argList::addBoolOption("singleBlock"); - argList::addOption("2D", "thickness"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); + argList::addBoolOption + ( + "noBlank", + "skip blank items" + ); + argList::addBoolOption + ( + "singleBlock", + "input is a single block" + ); + argList::addOption + ( + "2D", + "thickness", + "use when converting a 2-D geometry" + ); argList args(argc, argv); @@ -69,8 +87,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = 1.0; - args.optionReadIfPresent("scale", scaleFactor); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); bool readBlank = !args.optionFound("noBlank"); bool singleBlock = args.optionFound("singleBlock"); diff --git a/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C b/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C index 9f75b415665fb086d388cec1e381a2a18fc8bec1..f3c8246f818ae9faea306b20c29e390ed2a83460 100644 --- a/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C +++ b/applications/utilities/mesh/conversion/polyDualMesh/polyDualMeshApp.C @@ -356,7 +356,7 @@ int main(int argc, char *argv[]) argList::noParallel(); timeSelector::addOptions(true, false); - argList::validArgs.append("feature angle[0-180]"); + argList::validArgs.append("featureAngle [0-180]"); argList::addBoolOption ( "splitAllFaces", diff --git a/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C b/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C index 82064e0b13c2c09fe64948a5570bd67d0bcd8b7d..6eafe96a9416024e6772e5a31e1f8e494334b292 100644 --- a/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C +++ b/applications/utilities/mesh/conversion/sammToFoam/sammToFoam.C @@ -40,7 +40,12 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("SAMM mesh file prefix"); - argList::addOption("scale", "scale factor"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); argList args(argc, argv); @@ -49,7 +54,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/star3ToFoam/star3ToFoam.C b/applications/utilities/mesh/conversion/star3ToFoam/star3ToFoam.C index f0011304bbfb3d697b66f632f7bf75792db6fe10..de32c0f5b3daecc5e08e86de08a041266e86dd8e 100644 --- a/applications/utilities/mesh/conversion/star3ToFoam/star3ToFoam.C +++ b/applications/utilities/mesh/conversion/star3ToFoam/star3ToFoam.C @@ -40,7 +40,12 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validArgs.append("STAR mesh file prefix"); - argList::addOption("scale", "scale factor"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); argList args(argc, argv); @@ -49,7 +54,7 @@ int main(int argc, char *argv[]) FatalError.exit(); } - scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); + const scalar scaleFactor = args.optionLookupOrDefault("scale", 1.0); # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C b/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C index 6523bb49f9799e3c7c6e59690b15baa2232c4602..fc956582b3e0ca50d99b6f8fcbd591fa8c9ec329 100644 --- a/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C +++ b/applications/utilities/mesh/conversion/star4ToFoam/star4ToFoam.C @@ -69,7 +69,7 @@ int main(int argc, char *argv[]) argList::addOption ( "scale", - "scale", + "factor", "geometry scaling factor - default is 0.001 ([mm] to [m])" ); argList::addBoolOption diff --git a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C index fedbe4061072735ba149eb5a80249e7360e703e1..f4eacb29141766e30f1baed2494771ed3fee5940 100644 --- a/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C +++ b/applications/utilities/mesh/conversion/tetgenToFoam/tetgenToFoam.C @@ -97,7 +97,11 @@ label findFace(const primitiveMesh& mesh, const face& f) int main(int argc, char *argv[]) { argList::validArgs.append("file prefix"); - argList::addBoolOption("noFaceFile"); + argList::addBoolOption + ( + "noFaceFile", + "skip reading .face file for boundary information" + ); # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C index 2d37090daa61b18648085f96bb68931031947088..a6014b0592905294d05e217823d6b34a175082be 100644 --- a/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C +++ b/applications/utilities/mesh/conversion/writeMeshObj/writeMeshObj.C @@ -371,27 +371,65 @@ void writePointCells int main(int argc, char *argv[]) { + argList::addNote + ( + "for mesh debugging: write mesh as separate OBJ files" + ); + timeSelector::addOptions(); - argList::addBoolOption("patchFaces"); - argList::addBoolOption("patchEdges"); - argList::addOption("cell", "cellI"); - argList::addOption("face", "faceI"); - argList::addOption("point", "pointI"); - argList::addOption("cellSet", "setName"); - argList::addOption("faceSet", "setName"); -# include "addRegionOption.H" - -# include "setRootCase.H" -# include "createTime.H" + argList::addBoolOption + ( + "patchFaces", + "write patch faces edges" + ); + argList::addBoolOption + ( + "patchEdges", + "write patch boundary edges" + ); + argList::addOption + ( + "cell", + "int", + "write points for the specified cell" + ); + argList::addOption + ( + "face", + "int", + "write specified face" + ); + argList::addOption + ( + "point", + "int", + "write specified point" + ); + argList::addOption + ( + "cellSet", + "name", + "write points for specified cellSet" + ); + argList::addOption + ( + "faceSet", + "name", + "write points for specified faceSet" + ); + #include "addRegionOption.H" + + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); - bool patchFaces = args.optionFound("patchFaces"); - bool patchEdges = args.optionFound("patchEdges"); - bool doCell = args.optionFound("cell"); - bool doPoint = args.optionFound("point"); - bool doFace = args.optionFound("face"); - bool doCellSet = args.optionFound("cellSet"); - bool doFaceSet = args.optionFound("faceSet"); + const bool patchFaces = args.optionFound("patchFaces"); + const bool patchEdges = args.optionFound("patchEdges"); + const bool doCell = args.optionFound("cell"); + const bool doPoint = args.optionFound("point"); + const bool doFace = args.optionFound("face"); + const bool doCellSet = args.optionFound("cellSet"); + const bool doFaceSet = args.optionFound("faceSet"); Info<< "Writing mesh objects as .obj files such that the object" @@ -401,7 +439,7 @@ int main(int argc, char *argv[]) instantList timeDirs = timeSelector::select0(runTime, args); -# include "createNamedPolyMesh.H" + #include "createNamedPolyMesh.H" forAll(timeDirs, timeI) { @@ -465,7 +503,6 @@ int main(int argc, char *argv[]) << endl; writePoints(mesh, cells.toc(), runTime.timeName()); - } if (doFaceSet) { diff --git a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C index 56ab0a35cda68a2d87ee054f471647737aa41aa9..b896cb30335bab051d94cf45343c7a1013794ca5 100644 --- a/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C +++ b/applications/utilities/mesh/generation/blockMesh/blockMeshApp.C @@ -42,7 +42,7 @@ Usage Specify an alternative mesh region. @param -dict \<filename\> \n - Specify an alternative dictionary for the block mesh description. + Specify alternative dictionary for the block mesh description. \*---------------------------------------------------------------------------*/ @@ -80,7 +80,7 @@ int main(int argc, char *argv[]) ( "dict", "file", - "specify an alternative dictionary for the blockMesh description" + "specify alternative dictionary for the blockMesh description" ); # include "addRegionOption.H" diff --git a/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H b/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H index c8a25abeec781b83f3c8f487fd90d91cde82d04b..fa25d815eab6e3a873ec6288a48adcd84c81b43b 100644 --- a/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H +++ b/applications/utilities/mesh/generation/blockMesh/mergePatchPairs.H @@ -27,10 +27,7 @@ // Master patch const word masterPatchName(mergePatchPairs[pairI].first()); const polyPatch& masterPatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(masterPatchName) - ]; + mesh.boundaryMesh()[masterPatchName]; labelList isf(masterPatch.size()); @@ -51,10 +48,7 @@ // Slave patch const word slavePatchName(mergePatchPairs[pairI].second()); const polyPatch& slavePatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(slavePatchName) - ]; + mesh.boundaryMesh()[slavePatchName]; labelList osf(slavePatch.size()); diff --git a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C index d325f159f9d152711c8836669487a039a981e142..1d0ce53e738dbca14b26132551ef01904b74d590 100644 --- a/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C +++ b/applications/utilities/mesh/generation/extrudeMesh/extrudeMesh.C @@ -123,7 +123,7 @@ void createDummyFvMeshFiles(const polyMesh& mesh, const word& regionName) label findPatchID(const polyBoundaryMesh& patches, const word& name) { - label patchID = patches.findPatchID(name); + const label patchID = patches.findPatchID(name); if (patchID == -1) { diff --git a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C index dfcfb914711b8020d5a19939a93174e8dc22cc15..6a3b7dd7eadd0a926c8dabc1b9823be7d101caeb 100644 --- a/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -632,7 +632,7 @@ int main(int argc, char *argv[]) argList::validArgs.append("thickness"); #include "addRegionOption.H" - argList::validOptions.insert("overwrite", ""); + #include "addOverwriteOption.H" #include "setRootCase.H" #include "createTime.H" #include "createNamedMesh.H" @@ -849,8 +849,7 @@ int main(int argc, char *argv[]) nExtrudeFaces = 0; forAll(zoneNames, i) { - label zoneI = faceZones.findZoneID(zoneNames[i]); - const faceZone& fz = faceZones[zoneI]; + const faceZone& fz = faceZones[zoneNames[i]]; forAll(fz, j) { extrudeTopPatchID[nExtrudeFaces] = interRegionTopPatch[i]; diff --git a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict index 957010dc1090b9416fe439d07208b84d622c4a3c..788b154a6e977549523ea8ba179779f791f8cd3c 100644 --- a/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict +++ b/applications/utilities/mesh/generation/snappyHexMesh/snappyHexMeshDict @@ -143,11 +143,19 @@ castellatedMeshControls } } - // Optional angle to detect small-large cell situation perpendicular - // to the surface. Is the angle of face w.r.t the local surface - // normal. Use on flat(ish) surfaces only. Otherwise - // leave out or set to negative number. + //- Optional angle to detect small-large cell situation + // perpendicular to the surface. Is the angle of face w.r.t. + // the local surface normal. Use on flat(ish) surfaces only. + // Otherwise leave out or set to negative number. //perpendicularAngle 10; + + + //- Optional faceZone and (for closed surface) cellZone with + // how to select the cells that are in the cellZone + // (inside / outside / specified insidePoint) + //faceZone sphere; + //cellZone sphere; + //cellZoneInside inside; //outside/insidePoint } } diff --git a/applications/utilities/mesh/manipulation/cellSet/Make/files b/applications/utilities/mesh/manipulation/cellSet/Make/files deleted file mode 100644 index f8143495484956c58075cd80860a4f8f465f68a5..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/cellSet/Make/files +++ /dev/null @@ -1,4 +0,0 @@ -cellSet.C - -EXE = $(FOAM_APPBIN)/cellSet - diff --git a/applications/utilities/mesh/manipulation/cellSet/cellSet.C b/applications/utilities/mesh/manipulation/cellSet/cellSet.C deleted file mode 100644 index 3eafef872ba9216cbad5da68118410441e26779b..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/cellSet/cellSet.C +++ /dev/null @@ -1,196 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / 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 <http://www.gnu.org/licenses/>. - -Description - Selects a cell set through a dictionary. - -\*---------------------------------------------------------------------------*/ - -#include "argList.H" -#include "Time.H" -#include "polyMesh.H" -#include "topoSetSource.H" -#include "cellSet.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Main program: - -int main(int argc, char *argv[]) -{ -# include "setRootCase.H" -# include "createTime.H" -# include "createPolyMesh.H" - - Info<< "Reading cellSetDict\n" << endl; - - IOdictionary cellSetDict - ( - IOobject - ( - "cellSetDict", - runTime.system(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - - const word setName(cellSetDict.lookup("name")); - const word actionName(cellSetDict.lookup("action")); - - topoSetSource::setAction action = topoSetSource::toAction(actionName); - - - // Create topoSetSources - PtrList<topoSetSource> topoSetSources - ( - cellSetDict.lookup("topoSetSources"), - topoSetSource::iNew(mesh) - ); - - - // Load set to work - autoPtr<topoSet> currentSetPtr(NULL); - IOobject::readOption r; - - if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR)) - { - r = IOobject::NO_READ; - - currentSetPtr.reset - ( - new cellSet - ( - mesh, - setName, - mesh.nCells()/10+1 // Reasonable size estimate. - ) - ); - } - else - { - r = IOobject::MUST_READ; - - currentSetPtr.reset - ( - new cellSet - ( - mesh, - setName, - r - ) - ); - } - - topoSet& currentSet = currentSetPtr(); - - Info<< "Set:" << currentSet.name() - << " Size:" << currentSet.size() - << " Action:" << actionName - << endl; - - if ((r == IOobject::MUST_READ) && (action != topoSetSource::LIST)) - { - // currentSet has been read so can make copy. - //backup(mesh, setName, currentSet, setName + "_old"); - } - - if (action == topoSetSource::CLEAR) - { - // Already handled above by not reading - } - else if (action == topoSetSource::INVERT) - { - currentSet.invert(currentSet.maxSize(mesh)); - } - else if (action == topoSetSource::LIST) - { - currentSet.writeDebug(Info, mesh, 100); - Info<< endl; - } - else if (action == topoSetSource::SUBSET) - { - // Apply topoSetSources to it to handle new/add/delete - forAll(topoSetSources, topoSetSourceI) - { - // Backup current set. - autoPtr<topoSet> oldSet - ( - topoSet::New - ( - currentSet.type(), - mesh, - currentSet.name() + "_old2", - currentSet - ) - ); - - currentSet.clear(); - - topoSetSources[topoSetSourceI].applyToSet - ( - topoSetSource::NEW, - currentSet - ); - - // Combine new value of currentSet with old one. - currentSet.subset(oldSet); - } - } - else - { - // Apply topoSetSources to it to handle new/add/delete - forAll(topoSetSources, topoSetSourceI) - { - topoSetSources[topoSetSourceI].applyToSet(action, currentSet); - } - } - - - if (action != topoSetSource::LIST) - { - // Set has changed. - - // Sync across coupled patches. - currentSet.sync(mesh); - - Info<< "Writing " << currentSet.name() - << " (size " << currentSet.size() << ") to " - << currentSet.instance()/currentSet.local() - /currentSet.name() - << endl << endl; - - currentSet.write(); - } - - Info<< "\nEnd\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/utilities/mesh/manipulation/cellSet/cellSetDict b/applications/utilities/mesh/manipulation/cellSet/cellSetDict deleted file mode 100644 index 1108d6c3d9da9bd27324c20ac1f5a7aa3fbbf444..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/cellSet/cellSetDict +++ /dev/null @@ -1,149 +0,0 @@ -/*--------------------------------*- 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 cellSetDict; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Name of set to operate on -name c0; - -// One of clear/new/invert/add/delete|subset/list -action new; - -// Actions to apply to cellSet. These are all the topoSetSource's ending -// in ..ToCell (see the meshTools library). - -topoSetSources -( - // Select by explicitly providing cell labels - labelToCell - { - value (12 13 56); // labels of cells - } - - // Copy elements from cellSet - cellToCell - { - set c1; - } - - // Cells in cell zone - zoneToCell - { - name ".*Zone"; // Name of cellZone, regular expressions allowed - } - - // Cells on master or slave side of faceZone - faceZoneToCell - { - name ".*Zone"; // Name of faceZone, regular expressions allowed - option master; // master/slave - } - - // Select based on faceSet - faceToCell - { - set f0; // Name of faceSet - - //option neighbour; // cell with neighbour in faceSet - //option owner; // ,, owner - option any; // cell with any face in faceSet - //option all; // cell with all faces in faceSet - } - - // Select based on pointSet - pointToCell - { - set p0; - option any; // cell with any point in pointSet - //option all; // cell with all points in pointSet - } - - // Select based on cellShape - shapeToCell - { - type hex; // hex/wedge/prism/pyr/tet/tetWedge/splitHex - } - - // Cells with cell centre within box - boxToCell - { - box (0 0 0) (1 1 1); - } - - // Cells with cell centre within box - // Is skewed, rotated box. Given as origin and three spanning vectors. - rotatedBoxToCell - { - origin (0.2 0.2 -10); - i (0.2 0.2 0); - j (-0.2 0.2 0); - k (10 10 10); - } - - // Cells with centre within cylinder - cylinderToCell - { - p1 (0.2 0.2 -10); // start point on cylinder axis - p2 (0.2 0.2 0); // end point on cylinder axis - radius 5.0; - } - - // Cells with centre within sphere - sphereToCell - { - centre (0.2 0.2 -10); - radius 5.0; - } - - // Cells with cellCentre nearest to coordinates - nearestToCell - { - points ((0 0 0) (1 1 1)(2 2 2)); - } - - // Select based on surface - surfaceToCell - { - file "www.avl.com-geometry.stl"; - outsidePoints ((-99 -99 -59)); // definition of outside - includeCut false; // cells cut by surface - includeInside false; // cells not on outside of surf - includeOutside false; // cells on outside of surf - nearDistance -1; // cells with centre near surf - // (set to -1 if not used) - curvature 0.9; // cells within nearDistance - // and near surf curvature - // (set to -100 if not used) - } - - // values of field within certain range - fieldToCell - { - fieldName U; // Note: uses mag(U) since volVectorField - min 0.1; - max 0.5; - } - - // Mesh region (non-face connected part of (subset of)mesh) - regionToCell - { - set c0; // name of cellSet giving mesh subset - insidePoint (1 2 3); // point inside region to select - } - -); - - -// ************************************************************************* // diff --git a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C index c426128e31950154e7edd178f471297f67777cd6..8662f404c160eb8d49b6ac14e2b79120dc6a34a1 100644 --- a/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C +++ b/applications/utilities/mesh/manipulation/checkMesh/checkMesh.C @@ -48,9 +48,21 @@ int main(int argc, char *argv[]) { timeSelector::addOptions(); # include "addRegionOption.H" - argList::addBoolOption("noTopology"); - argList::addBoolOption("allGeometry"); - argList::addBoolOption("allTopology"); + argList::addBoolOption + ( + "noTopology", + "skip checking the mesh topology" + ); + argList::addBoolOption + ( + "allGeometry", + "include bounding box checks" + ); + argList::addBoolOption + ( + "allTopology", + "include extra topology checks" + ); # include "setRootCase.H" # include "createTime.H" diff --git a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C index e02d0e14206a2cbb5ad22d186ce62f7df328dbcd..22720cbf65a0b20b8e71c7edc43f89ab7a84ac34 100644 --- a/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C +++ b/applications/utilities/mesh/manipulation/createBaffles/createBaffles.C @@ -107,7 +107,7 @@ void modifyOrAddFace label findPatchID(const polyMesh& mesh, const word& name) { - label patchI = mesh.boundaryMesh().findPatchID(name); + const label patchI = mesh.boundaryMesh().findPatchID(name); if (patchI == -1) { @@ -124,18 +124,35 @@ label findPatchID(const polyMesh& mesh, const word& name) int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" -# include "addRegionOption.H" + argList::addNote + ( + "Makes internal faces into boundary faces.\n" + "Does not duplicate points, unlike mergeOrSplitBaffles." + ); + + #include "addOverwriteOption.H" + #include "addRegionOption.H" argList::validArgs.append("faceZone"); argList::validArgs.append("patch"); - argList::addOption("additionalPatches", "(patch2 .. patchN)"); - argList::addBoolOption("internalFacesOnly"); -# include "setRootCase.H" -# include "createTime.H" + argList::addOption + ( + "additionalPatches", + "(patch2 .. patchN)", + "specify additional patches for creating baffles" + ); + argList::addBoolOption + ( + "internalFacesOnly", + "do not convert boundary faces" + ); + + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createNamedMesh.H" + #include "createNamedMesh.H" + const word oldInstance = mesh.pointsInstance(); const polyBoundaryMesh& patches = mesh.boundaryMesh(); diff --git a/applications/utilities/mesh/manipulation/createPatch/createPatch.C b/applications/utilities/mesh/manipulation/createPatch/createPatch.C index 5e186a6d0a34d8b4b5be4ae7cd58dc303a0652c8..8ec77b011125354929c2a85703a10450b581f95b 100644 --- a/applications/utilities/mesh/manipulation/createPatch/createPatch.C +++ b/applications/utilities/mesh/manipulation/createPatch/createPatch.C @@ -681,17 +681,17 @@ int main(int argc, char *argv[]) { const dictionary& dict = patchSources[addedI]; - word patchName(dict.lookup("name")); - + const word patchName(dict.lookup("name")); label destPatchI = patches.findPatchID(patchName); if (destPatchI == -1) { - FatalErrorIn(args.executable()) << "patch " << patchName - << " not added. Problem." << abort(FatalError); + FatalErrorIn(args.executable()) + << "patch " << patchName << " not added. Problem." + << abort(FatalError); } - word sourceType(dict.lookup("constructFrom")); + const word sourceType(dict.lookup("constructFrom")); if (sourceType == "patches") { @@ -719,7 +719,7 @@ int main(int argc, char *argv[]) } else if (sourceType == "set") { - word setName(dict.lookup("set")); + const word setName(dict.lookup("set")); faceSet faces(mesh, setName); diff --git a/applications/utilities/mesh/manipulation/faceSet/Make/files b/applications/utilities/mesh/manipulation/faceSet/Make/files deleted file mode 100644 index 13398e10714a0b68072ff03b4f6ef45e0ee1f757..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/faceSet/Make/files +++ /dev/null @@ -1,4 +0,0 @@ -faceSet.C - -EXE = $(FOAM_APPBIN)/faceSet - diff --git a/applications/utilities/mesh/manipulation/faceSet/Make/options b/applications/utilities/mesh/manipulation/faceSet/Make/options deleted file mode 100644 index 54c035b8f55d183c1ad02bc372398feceaf31718..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/faceSet/Make/options +++ /dev/null @@ -1,5 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/meshTools/lnInclude - -EXE_LIBS = \ - -lmeshTools diff --git a/applications/utilities/mesh/manipulation/faceSet/faceSet.C b/applications/utilities/mesh/manipulation/faceSet/faceSet.C deleted file mode 100644 index 7c97b95ef5d63cf2621d50cb876e8572d87d439f..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/faceSet/faceSet.C +++ /dev/null @@ -1,196 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / 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 <http://www.gnu.org/licenses/>. - -Description - Selects a face set through a dictionary. - -\*---------------------------------------------------------------------------*/ - -#include "argList.H" -#include "Time.H" -#include "polyMesh.H" -#include "topoSetSource.H" -#include "faceSet.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Main program: - -int main(int argc, char *argv[]) -{ -# include "setRootCase.H" -# include "createTime.H" -# include "createPolyMesh.H" - - Info<< "Reading faceSetDict\n" << endl; - - IOdictionary faceSetDict - ( - IOobject - ( - "faceSetDict", - runTime.system(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - - const word setName(faceSetDict.lookup("name")); - const word actionName(faceSetDict.lookup("action")); - - topoSetSource::setAction action = topoSetSource::toAction(actionName); - - - // Create topoSetSources - PtrList<topoSetSource> topoSetSources - ( - faceSetDict.lookup("topoSetSources"), - topoSetSource::iNew(mesh) - ); - - - // Load set to work - autoPtr<topoSet> currentSetPtr(NULL); - IOobject::readOption r; - - if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR)) - { - r = IOobject::NO_READ; - - currentSetPtr.reset - ( - new faceSet - ( - mesh, - setName, - mesh.nFaces()/10+1 // Reasonable size estimate. - ) - ); - } - else - { - r = IOobject::MUST_READ; - - currentSetPtr.reset - ( - new faceSet - ( - mesh, - setName, - r - ) - ); - } - - topoSet& currentSet = currentSetPtr(); - - Info<< "Set:" << currentSet.name() - << " Size:" << currentSet.size() - << " Action:" << actionName - << endl; - - if ((r == IOobject::MUST_READ) && (action != topoSetSource::LIST)) - { - // currentSet has been read so can make copy. - //backup(mesh, setName, currentSet, setName + "_old"); - } - - if (action == topoSetSource::CLEAR) - { - // Already handled above by not reading - } - else if (action == topoSetSource::INVERT) - { - currentSet.invert(currentSet.maxSize(mesh)); - } - else if (action == topoSetSource::LIST) - { - currentSet.writeDebug(Info, mesh, 100); - Info<< endl; - } - else if (action == topoSetSource::SUBSET) - { - // Apply topoSetSources to it to handle new/add/delete - forAll(topoSetSources, topoSetSourceI) - { - // Backup current set. - autoPtr<topoSet> oldSet - ( - topoSet::New - ( - currentSet.type(), - mesh, - currentSet.name() + "_old2", - currentSet - ) - ); - - currentSet.clear(); - - topoSetSources[topoSetSourceI].applyToSet - ( - topoSetSource::NEW, - currentSet - ); - - // Combine new value of currentSet with old one. - currentSet.subset(oldSet); - } - } - else - { - // Apply topoSetSources to it to handle new/add/delete - forAll(topoSetSources, topoSetSourceI) - { - topoSetSources[topoSetSourceI].applyToSet(action, currentSet); - } - } - - - if (action != topoSetSource::LIST) - { - // Set has changed. - - // Sync across coupled patches. - currentSet.sync(mesh); - - Info<< "Writing " << currentSet.name() - << " (size " << currentSet.size() << ") to " - << currentSet.instance()/currentSet.local() - /currentSet.name() - << endl << endl; - - currentSet.write(); - } - - Info<< "\nEnd\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/utilities/mesh/manipulation/faceSet/faceSetDict b/applications/utilities/mesh/manipulation/faceSet/faceSetDict deleted file mode 100644 index fd0ea0c09d1e291f3f4166ebc933ac9835dab7f0..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/faceSet/faceSetDict +++ /dev/null @@ -1,82 +0,0 @@ -/*--------------------------------*- 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 faceSetDict; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Name of set to operate on -name f0; - -// One of clear/new/invert/add/delete|subset/list -action new; - -// Actions to apply to pointSet. These are all the topoSetSource's ending -// in ..ToFace (see the meshTools library). -topoSetSources -( - // Copy elements from faceSet - faceToFace - { - set f1; - } - - // Select based on cellSet - cellToFace - { - set c0; - option all; // All faces of cells - //option both; // Only faces whose owner&neighbour are in cellSet - } - - // Select based on pointSet - pointToFace - { - set p0; - option any; // Faces using any point in pointSet - //option all // Faces with all points in pointSet - } - - // Select by explicitly providing face labels - labelToFace - { - value (12 13 56); // labels of faces - } - - // All faces of patch - patchToFace - { - name ".*Wall"; // Name of patch, regular expressions allowed - } - - // All faces of faceZone - zoneToFace - { - name ".*Zone1"; // Name of faceZone, regular expressions allowed - } - - // Faces with face centre within box - boxToFace - { - box (0 0 0) (1 1 1); - } - - // Faces with normal to within certain angle aligned with vector. - normalToFace - { - normal (0 0 1); // Vector - cos 0.01; // Tolerance (max cos of angle) - } -); - -// ************************************************************************* // diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H b/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H index 4098a89e6ea521326925fe17d111d41b7518471f..01f173f10c09e657d0a6a693503c023b4a56204a 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H +++ b/applications/utilities/mesh/manipulation/mergeMeshes/createTimes.H @@ -1,15 +1,22 @@ Info<< nl << "Create Times" << endl; + const fileName masterCasePath = masterCase.path(); + const fileName masterCaseName = masterCase.name(); + Time runTimeMaster ( Time::controlDictName, - rootDirMaster, - caseDirMaster + masterCasePath, + masterCaseName ); + const fileName addCasePath = addCase.path(); + const fileName addCaseName = addCase.name(); + Time runTimeToAdd ( Time::controlDictName, - rootDirToAdd, - caseDirToAdd + addCasePath, + addCaseName ); + diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C index 502f1b7dd68a407afa21eba549d780a1b33f731b..af09f079337b586c89f11cae0f8694077ab7cd6d 100644 --- a/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C +++ b/applications/utilities/mesh/manipulation/mergeMeshes/mergeMeshes.C @@ -32,16 +32,74 @@ Description using namespace Foam; +void getRootCase(fileName& casePath) +{ + casePath.clean(); + + if (casePath.empty() || casePath == ".") + { + // handle degenerate form and '.' + casePath = cwd(); + } + else if (casePath[0] != '/' && casePath.name() == "..") + { + // avoid relative cases ending in '..' - makes for very ugly names + casePath = cwd()/casePath; + casePath.clean(); + } +} + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // Main program: int main(int argc, char *argv[]) { + argList::addNote + ( + "merge two meshes" + ); + argList::noParallel(); -# include "setRoots.H" -# include "createTimes.H" + argList::validArgs.append("masterCase"); + argList::addOption + ( + "masterRegion", + "name", + "specify alternative mesh region for the master mesh" + ); + + argList::validArgs.append("addCase"); + argList::addOption + ( + "addRegion", + "name", + "specify alternative mesh region for the additional mesh" + ); + + argList args(argc, argv); + if (!args.check()) + { + FatalError.exit(); + } + + fileName masterCase = args[1]; + word masterRegion = polyMesh::defaultRegion; + args.optionReadIfPresent("masterRegion", masterRegion); + + fileName addCase = args[2]; + word addRegion = polyMesh::defaultRegion; + args.optionReadIfPresent("addRegion", addRegion); + + getRootCase(masterCase); + getRootCase(addCase); + + Info<< "Master: " << masterCase << " region " << masterRegion << nl + << "mesh to add: " << addCase << " region " << addRegion << endl; + + #include "createTimes.H" - Info<< "Reading master mesh for time = " << runTimeMaster.timeName() << endl; + Info<< "Reading master mesh for time = " << runTimeMaster.timeName() << nl; Info<< "Create mesh\n" << endl; mergePolyMesh masterMesh @@ -55,7 +113,7 @@ int main(int argc, char *argv[]) ); - Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << endl; + Info<< "Reading mesh to add for time = " << runTimeToAdd.timeName() << nl; Info<< "Create mesh\n" << endl; polyMesh meshToAdd diff --git a/applications/utilities/mesh/manipulation/mergeMeshes/setRoots.H b/applications/utilities/mesh/manipulation/mergeMeshes/setRoots.H deleted file mode 100644 index 3d1fdd0132b050324b56971beb69950c9e3a933e..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/mergeMeshes/setRoots.H +++ /dev/null @@ -1,32 +0,0 @@ - argList::validArgs.clear(); - - argList::validArgs.append("master root"); - argList::validArgs.append("master case"); - argList::addOption("masterRegion", "name"); - - argList::validArgs.append("root to add"); - argList::validArgs.append("case to add"); - argList::addOption("addRegion", "name"); - - argList args(argc, argv); - - if (!args.check()) - { - FatalError.exit(); - } - - fileName rootDirMaster = args[1]; - fileName caseDirMaster = args[2]; - word masterRegion = polyMesh::defaultRegion; - args.optionReadIfPresent("masterRegion", masterRegion); - - fileName rootDirToAdd = args[3]; - fileName caseDirToAdd = args[4]; - word addRegion = polyMesh::defaultRegion; - args.optionReadIfPresent("addRegion", addRegion); - - Info<< "Master: " << rootDirMaster << " " << caseDirMaster - << " region " << masterRegion << nl - << "mesh to add: " << rootDirToAdd << " " << caseDirToAdd - << " region " << addRegion << endl; - diff --git a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C index d7a24a2bf9785119435028b4f8b4b30713589825..399fcb0421227959e9f164e9f06fe926b6184035 100644 --- a/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C +++ b/applications/utilities/mesh/manipulation/mergeOrSplitBaffles/mergeOrSplitBaffles.C @@ -221,15 +221,30 @@ labelList findBaffles(const polyMesh& mesh, const labelList& boundaryFaces) int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" -# include "addRegionOption.H" - argList::addBoolOption("split"); - argList::addBoolOption("detectOnly"); + argList::addNote + ( + "Detect faces that share points (baffles).\n" + "Merge them or duplicate the points." + ); + + #include "addOverwriteOption.H" + #include "addRegionOption.H" + argList::addBoolOption + ( + "detectOnly", + "find baffles only, but do not merge or split them" + ); + argList::addBoolOption + ( + "split", + "topologically split duplicate surfaces" + ); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createNamedMesh.H" + #include "createNamedMesh.H" + const word oldInstance = mesh.pointsInstance(); const bool split = args.optionFound("split"); @@ -248,12 +263,10 @@ int main(int argc, char *argv[]) if (detectOnly) { findBaffles(mesh, boundaryFaces); - return 0; } - // Read objects in time directory IOobjectList objects(mesh, runTime.timeName()); diff --git a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C index 2cb7ef6c5bcb38ccd676a6542480588e0ab04361..55a2238757ceb278e18a0f71fd14d6a489feae8c 100644 --- a/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C +++ b/applications/utilities/mesh/manipulation/objToVTK/objToVTK.C @@ -110,7 +110,6 @@ labelList parseVertices(const string& line) int main(int argc, char *argv[]) { argList::noParallel(); - argList::validArgs.clear(); argList::validArgs.append("OBJ file"); argList::validArgs.append("output VTK file"); argList args(argc, argv); diff --git a/applications/utilities/mesh/manipulation/pointSet/Make/files b/applications/utilities/mesh/manipulation/pointSet/Make/files deleted file mode 100644 index 321ed23bf4b0b3e5e480732fa5227fe73d6a11d2..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/pointSet/Make/files +++ /dev/null @@ -1,4 +0,0 @@ -pointSet.C - -EXE = $(FOAM_APPBIN)/pointSet - diff --git a/applications/utilities/mesh/manipulation/pointSet/Make/options b/applications/utilities/mesh/manipulation/pointSet/Make/options deleted file mode 100644 index 54c035b8f55d183c1ad02bc372398feceaf31718..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/pointSet/Make/options +++ /dev/null @@ -1,5 +0,0 @@ -EXE_INC = \ - -I$(LIB_SRC)/meshTools/lnInclude - -EXE_LIBS = \ - -lmeshTools diff --git a/applications/utilities/mesh/manipulation/pointSet/pointSet.C b/applications/utilities/mesh/manipulation/pointSet/pointSet.C deleted file mode 100644 index 8219ec41b6c3539ded7b67e378b014d70b1b5b16..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/pointSet/pointSet.C +++ /dev/null @@ -1,196 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / 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 <http://www.gnu.org/licenses/>. - -Description - Selects a point set through a dictionary. - -\*---------------------------------------------------------------------------*/ - -#include "argList.H" -#include "Time.H" -#include "polyMesh.H" -#include "topoSetSource.H" -#include "pointSet.H" - -using namespace Foam; - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Main program: - -int main(int argc, char *argv[]) -{ -# include "setRootCase.H" -# include "createTime.H" -# include "createPolyMesh.H" - - Info<< "Reading pointSetDict\n" << endl; - - IOdictionary pointSetDict - ( - IOobject - ( - "pointSetDict", - runTime.system(), - mesh, - IOobject::MUST_READ, - IOobject::NO_WRITE - ) - ); - - - const word setName(pointSetDict.lookup("name")); - const word actionName(pointSetDict.lookup("action")); - - topoSetSource::setAction action = topoSetSource::toAction(actionName); - - - // Create topoSetSources - PtrList<topoSetSource> topoSetSources - ( - pointSetDict.lookup("topoSetSources"), - topoSetSource::iNew(mesh) - ); - - - // Load set to work - autoPtr<topoSet> currentSetPtr(NULL); - IOobject::readOption r; - - if ((action == topoSetSource::NEW) || (action == topoSetSource::CLEAR)) - { - r = IOobject::NO_READ; - - currentSetPtr.reset - ( - new pointSet - ( - mesh, - setName, - mesh.nPoints()/10+1 // Reasonable size estimate. - ) - ); - } - else - { - r = IOobject::MUST_READ; - - currentSetPtr.reset - ( - new pointSet - ( - mesh, - setName, - r - ) - ); - } - - topoSet& currentSet = currentSetPtr(); - - Info<< "Set:" << currentSet.name() - << " Size:" << currentSet.size() - << " Action:" << actionName - << endl; - - if ((r == IOobject::MUST_READ) && (action != topoSetSource::LIST)) - { - // currentSet has been read so can make copy. - //backup(mesh, setName, currentSet, setName + "_old"); - } - - if (action == topoSetSource::CLEAR) - { - // Already handled above by not reading - } - else if (action == topoSetSource::INVERT) - { - currentSet.invert(currentSet.maxSize(mesh)); - } - else if (action == topoSetSource::LIST) - { - currentSet.writeDebug(Info, mesh, 100); - Info<< endl; - } - else if (action == topoSetSource::SUBSET) - { - // Apply topoSetSources to it to handle new/add/delete - forAll(topoSetSources, topoSetSourceI) - { - // Backup current set. - autoPtr<topoSet> oldSet - ( - topoSet::New - ( - currentSet.type(), - mesh, - currentSet.name() + "_old2", - currentSet - ) - ); - - currentSet.clear(); - - topoSetSources[topoSetSourceI].applyToSet - ( - topoSetSource::NEW, - currentSet - ); - - // Combine new value of currentSet with old one. - currentSet.subset(oldSet); - } - } - else - { - // Apply topoSetSources to it to handle new/add/delete - forAll(topoSetSources, topoSetSourceI) - { - topoSetSources[topoSetSourceI].applyToSet(action, currentSet); - } - } - - - if (action != topoSetSource::LIST) - { - // Set has changed. - - // Sync across coupled patches. - currentSet.sync(mesh); - - Info<< "Writing " << currentSet.name() - << " (size " << currentSet.size() << ") to " - << currentSet.instance()/currentSet.local() - /currentSet.name() - << endl << endl; - - currentSet.write(); - } - - Info<< "\nEnd\n" << endl; - - return 0; -} - - -// ************************************************************************* // diff --git a/applications/utilities/mesh/manipulation/pointSet/pointSetDict b/applications/utilities/mesh/manipulation/pointSet/pointSetDict deleted file mode 100644 index 7d4dd656ae87fdb50d79a22b939b08da2b5db8ac..0000000000000000000000000000000000000000 --- a/applications/utilities/mesh/manipulation/pointSet/pointSetDict +++ /dev/null @@ -1,84 +0,0 @@ -/*--------------------------------*- 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 pointSetDict; -} - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -// Name of set to operate on -name p0; - -// One of clear/new/invert/add/delete|subset/list -action new; - -// Actions to apply to pointSet. These are all the topoSetSource's ending -// in ..ToPoint (see the meshTools library). -topoSetSources -( - // Copy elements from pointSet - pointToPoint - { - set p1; - } - - // Select based on cellSet - cellToPoint - { - set c0; - option all; // all points of cell - } - - // Select based on faceSet - faceToPoint - { - set f0; // name of faceSet - option all; // all points of face - } - - // Select by explicitly providing point labels - labelToPoint - { - value (12 13 56); // labels of points - } - - // All points in pointzone - zoneToPoint - { - name ".*Zone"; // name of pointZone, regular expressions allowed - } - - // Points nearest to coordinates - nearestToPoint - { - points ((0 0 0) (1 1 1)); - } - - // Points with coordinate within box - boxToPoint - { - box (0 0 0) (1 1 1); - } - - // Select based on surface - surfaceToPoint - { - file "www.avl.com-geometry.stl"; - nearDistance 0.1; // points near to surface - includeInside false; // points on inside of surface - // (requires closed surface with consistent - // normals) - includeOutside false; // ,, outside ,, - } -); - -// ************************************************************************* // diff --git a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C index 783848d09be6936d717733dcb881232247f2dd06..ba3170d281051a4505272fa2539d079f773fdf9a 100644 --- a/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C +++ b/applications/utilities/mesh/manipulation/refineMesh/refineMesh.C @@ -290,18 +290,26 @@ label twoDNess(const polyMesh& mesh) int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" - argList::addBoolOption("dict"); + argList::addNote + ( + "refine cells in multiple directions" + ); + + #include "addOverwriteOption.H" + argList::addBoolOption + ( + "dict", + "refine according to system/refineMeshDict" + ); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createPolyMesh.H" + #include "createPolyMesh.H" const word oldInstance = mesh.pointsInstance(); printEdgeStats(mesh); - // // Read/construct control dictionary // diff --git a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C index 11bf6e853d9d6eadd8abc5d5f9e43f6de9c04927..80f9b6f93a5c40352f20ad8e058ed9e73413bce9 100644 --- a/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C +++ b/applications/utilities/mesh/manipulation/renumberMesh/renumberMesh.C @@ -363,9 +363,21 @@ autoPtr<mapPolyMesh> reorderMesh int main(int argc, char *argv[]) { - argList::addBoolOption("blockOrder"); - argList::addBoolOption("orderPoints"); - argList::addBoolOption("writeMaps"); + argList::addBoolOption + ( + "blockOrder", + "order cells into regions (using decomposition)" + ); + argList::addBoolOption + ( + "orderPoints", + "order points into internal and boundary points" + ); + argList::addBoolOption + ( + "writeMaps", + "write cellMap, faceMap, pointMap in polyMesh/" + ); # include "addOverwriteOption.H" # include "addTimeOptions.H" diff --git a/applications/utilities/mesh/manipulation/setSet/setSet.C b/applications/utilities/mesh/manipulation/setSet/setSet.C index d8c216c662b83921e59f18255e1756398ceb804d..308319f2e6b30ca273e2cbce5a922d10128e59ef 100644 --- a/applications/utilities/mesh/manipulation/setSet/setSet.C +++ b/applications/utilities/mesh/manipulation/setSet/setSet.C @@ -439,6 +439,7 @@ bool doCommand const word& actionName, const bool writeVTKFile, const bool writeCurrentTime, + const bool noSync, Istream& is ) { @@ -581,7 +582,7 @@ bool doCommand // Set will have been modified. // Synchronize for coupled patches. - currentSet.sync(mesh); + if (!noSync) currentSet.sync(mesh); // Write if (writeVTKFile) @@ -828,7 +829,17 @@ int main(int argc, char *argv[]) # include "addRegionOption.H" argList::addBoolOption("noVTK", "do not write VTK files"); argList::addBoolOption("loop", "execute batch commands for all timesteps"); - argList::addOption("batch", "file"); + argList::addOption + ( + "batch", + "file", + "process in batch mode, using input from specified file" + ); + argList::addBoolOption + ( + "noSync", + "do not synchronise selection across coupled patches" + ); # include "setRootCase.H" # include "createTime.H" @@ -837,6 +848,7 @@ int main(int argc, char *argv[]) const bool writeVTK = !args.optionFound("noVTK"); const bool loop = args.optionFound("loop"); const bool batch = args.optionFound("batch"); + const bool noSync = args.optionFound("noSync"); if (loop && !batch) { @@ -1003,7 +1015,8 @@ int main(int argc, char *argv[]) setName, actionName, writeVTK, - loop, // if in looping mode dump sets to time directory + loop, // if in looping mode dump sets to time directory + noSync, is ); diff --git a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C index 8a30d3bdf89cdcf2f8688b3faa48c30b2bef5da2..5a2cdfdcccdd42005b24f7027d8c45faa6daa899 100644 --- a/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C +++ b/applications/utilities/mesh/manipulation/setsToZones/setsToZones.C @@ -57,14 +57,23 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::addBoolOption("noFlipMap"); + argList::addNote + ( + "add point/face/cell Zones from similar named point/face/cell Sets" + ); -# include "addRegionOption.H" -# include "addTimeOptions.H" -# include "setRootCase.H" -# include "createTime.H" + argList::addBoolOption + ( + "noFlipMap", + "ignore orientation of faceSet" + ); - bool noFlipMap = args.optionFound("noFlipMap"); + #include "addRegionOption.H" + #include "addTimeOptions.H" + #include "setRootCase.H" + #include "createTime.H" + + const bool noFlipMap = args.optionFound("noFlipMap"); // Get times list instantList Times = runTime.times(); @@ -73,11 +82,11 @@ int main(int argc, char *argv[]) label endTime = Times.size(); // check -time and -latestTime options -# include "checkTimeOption.H" + #include "checkTimeOption.H" runTime.setTime(Times[startTime], startTime); -# include "createNamedPolyMesh.H" + #include "createNamedPolyMesh.H" // Search for list of objects for the time of the mesh word setsInstance = runTime.findInstance @@ -153,9 +162,19 @@ int main(int argc, char *argv[]) DynamicList<label> addressing(set.size()); DynamicList<bool> flipMap(set.size()); - if (!noFlipMap) + if (noFlipMap) { - word setName(set.name() + "SlaveCells"); + // No flip map. + forAll(faceLabels, i) + { + label faceI = faceLabels[i]; + addressing.append(faceI); + flipMap.append(false); + } + } + else + { + const word setName(set.name() + "SlaveCells"); Info<< "Trying to load cellSet " << setName << " to find out the slave side of the zone." << nl @@ -226,16 +245,6 @@ int main(int argc, char *argv[]) flipMap.append(flip); } } - else - { - // No flip map. - forAll(faceLabels, i) - { - label faceI = faceLabels[i]; - addressing.append(faceI); - flipMap.append(false); - } - } label zoneID = mesh.faceZones().findZoneID(set.name()); if (zoneID == -1) diff --git a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C index 49de532ee100e358420571a0c5bac0f48cfefef2..dfff8d477994d9fcc9336a87ee75dd533a715bce 100644 --- a/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C +++ b/applications/utilities/mesh/manipulation/splitMesh/splitMesh.C @@ -85,12 +85,12 @@ label findEdge(const primitiveMesh& mesh, const label v0, const label v1) // Checks whether patch present void checkPatch(const polyBoundaryMesh& bMesh, const word& name) { - label patchI = bMesh.findPatchID(name); + const label patchI = bMesh.findPatchID(name); if (patchI == -1) { FatalErrorIn("checkPatch(const polyBoundaryMesh&, const word&)") - << "Cannot find patch " << name << endl + << "Cannot find patch " << name << nl << "It should be present but of zero size" << endl << "Valid patches are " << bMesh.names() << exit(FatalError); diff --git a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C index 1bac3a554bebc8923649589425cfd317ea6ac889..1b38f6b23973cb9db83a65aa9367d496831b4037 100644 --- a/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C +++ b/applications/utilities/mesh/manipulation/splitMeshRegions/splitMeshRegions.C @@ -1473,26 +1473,68 @@ void writeCellToRegion(const fvMesh& mesh, const labelList& cellRegion) } - // Main program: int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" - argList::addBoolOption("cellZones"); - argList::addBoolOption("cellZonesOnly"); - argList::addOption("cellZonesFileOnly", "cellZonesName"); - argList::addOption("blockedFaces", "faceSet"); - argList::addBoolOption("makeCellZones"); - argList::addBoolOption("largestOnly"); - argList::addOption("insidePoint", "point"); - argList::addBoolOption("detectOnly"); - argList::addBoolOption("sloppyCellZones"); - -# include "setRootCase.H" -# include "createTime.H" + argList::addNote + ( + "splits mesh into multiple regions (detected by walking across faces)" + ); + #include "addOverwriteOption.H" + argList::addBoolOption + ( + "cellZones", + "additionally split cellZones off into separate regions" + ); + argList::addBoolOption + ( + "cellZonesOnly", + "use cellZones only to split mesh into regions; do not use walking" + ); + argList::addOption + ( + "cellZonesFileOnly", + "file", + "like -cellZonesOnly, but use specified file" + ); + argList::addOption + ( + "blockedFaces", + "faceSet", + "specify additional region boundaries that walking does not cross" + ); + argList::addBoolOption + ( + "makeCellZones", + "place cells into cellZones instead of splitting mesh" + ); + argList::addBoolOption + ( + "largestOnly", + "only write largest region" + ); + argList::addOption + ( + "insidePoint", + "point", + "only write region containing point" + ); + argList::addBoolOption + ( + "detectOnly", + "do not write mesh" + ); + argList::addBoolOption + ( + "sloppyCellZones", + "try to match heuristically regions to existing cell zones" + ); + + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createMesh.H" + #include "createMesh.H" const word oldInstance = mesh.pointsInstance(); word blockedFacesName; @@ -1514,10 +1556,7 @@ int main(int argc, char *argv[]) if ( (useCellZonesOnly || useCellZonesFile) - && ( - blockedFacesName != word::null - || useCellZones - ) + && (useCellZones || blockedFacesName.size()) ) { FatalErrorIn(args.executable()) @@ -1529,7 +1568,6 @@ int main(int argc, char *argv[]) } - if (insidePoint && largestOnly) { FatalErrorIn(args.executable()) @@ -1719,7 +1757,6 @@ int main(int argc, char *argv[]) writeCellToRegion(mesh, cellRegion); - // Sizes per region // ~~~~~~~~~~~~~~~~ diff --git a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C index 3b7bb42a1ce129de399dcf40fd328c0132a66484..733cef024b8bd8a44f9d3ab80e8b56a6e58b9a7d 100644 --- a/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C +++ b/applications/utilities/mesh/manipulation/stitchMesh/stitchMesh.C @@ -40,6 +40,7 @@ Description Comparable to running a meshModifier of the form (if masterPatch is called "M" and slavePatch "S"): + @verbatim couple { type slidingInterface; @@ -51,6 +52,7 @@ Description slavePatchName S; typeOfMatch partial or integral } + @endverbatim \*---------------------------------------------------------------------------*/ @@ -168,7 +170,7 @@ label addCellZone(const polyMesh& mesh, const word& name) // Checks whether patch present void checkPatch(const polyBoundaryMesh& bMesh, const word& name) { - label patchI = bMesh.findPatchID(name); + const label patchI = bMesh.findPatchID(name); if (patchI == -1) { @@ -192,22 +194,41 @@ void checkPatch(const polyBoundaryMesh& bMesh, const word& name) int main(int argc, char *argv[]) { + argList::addNote + ( + "merge the faces on the specified patches (if geometrically possible)\n" + "so the faces become internal" + ); + argList::noParallel(); -# include "addOverwriteOption.H" -# include "addRegionOption.H" + #include "addOverwriteOption.H" + #include "addRegionOption.H" argList::validArgs.append("masterPatch"); argList::validArgs.append("slavePatch"); - argList::addBoolOption("partial"); - argList::addBoolOption("perfect"); - - argList::addOption("toleranceDict", "file with tolerances"); + argList::addBoolOption + ( + "partial", + "couple partially overlapping patches" + ); + argList::addBoolOption + ( + "perfect", + "couple perfectly aligned patches" + ); + argList::addOption + ( + "toleranceDict", + "file", + "dictionary file with tolerances" + ); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createNamedMesh.H" + #include "createNamedMesh.H" + const word oldInstance = mesh.pointsInstance(); const word masterPatchName = args[1]; @@ -220,7 +241,7 @@ int main(int argc, char *argv[]) if (partialCover && perfectCover) { FatalErrorIn(args.executable()) - << "Cannot both supply partial and perfect." << endl + << "Cannot supply both partial and perfect." << endl << "Use perfect match option if the patches perfectly align" << " (both vertex positions and face centres)" << endl << exit(FatalError); @@ -291,11 +312,7 @@ int main(int argc, char *argv[]) // Create and add face zones and mesh modifiers // Master patch - const polyPatch& masterPatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(masterPatchName) - ]; + const polyPatch& masterPatch = mesh.boundaryMesh()[masterPatchName]; // Make list of masterPatch faces labelList isf(masterPatch.size()); @@ -352,11 +369,7 @@ int main(int argc, char *argv[]) ); // Slave patch - const polyPatch& slavePatch = - mesh.boundaryMesh() - [ - mesh.boundaryMesh().findPatchID(slavePatchName) - ]; + const polyPatch& slavePatch = mesh.boundaryMesh()[slavePatchName]; labelList osf(slavePatch.size()); diff --git a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C index 5c9ed448f1b4eb910b6dbad2e3f15666b73b0872..bfff3950f3be327906f4e63b5357a88fa39ca152 100644 --- a/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C +++ b/applications/utilities/mesh/manipulation/subsetMesh/subsetMesh.C @@ -150,14 +150,25 @@ void subsetPointFields int main(int argc, char *argv[]) { -# include "addOverwriteOption.H" - argList::validArgs.append("set"); - argList::addOption("patch", "patch name"); + argList::addNote + ( + "select a mesh subset based on a cellSet" + ); -# include "setRootCase.H" -# include "createTime.H" + #include "addOverwriteOption.H" + argList::validArgs.append("cellSet"); + argList::addOption + ( + "patch", + "name", + "add exposed internal faces to specified patch instead of to " + "'oldInternalFaces'" + ); + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); -# include "createMesh.H" + #include "createMesh.H" + const word oldInstance = mesh.pointsInstance(); const word setName = args[1]; @@ -190,7 +201,7 @@ int main(int argc, char *argv[]) else { Info<< "Adding exposed internal faces to a patch called" - << " \"oldInternalFaces\" (created if nessecary)" << endl + << " \"oldInternalFaces\" (created if necessary)" << endl << endl; } diff --git a/applications/utilities/mesh/manipulation/topoSet/Make/files b/applications/utilities/mesh/manipulation/topoSet/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..872e324100813e3e52039f754344bf61b9e6a691 --- /dev/null +++ b/applications/utilities/mesh/manipulation/topoSet/Make/files @@ -0,0 +1,4 @@ +topoSet.C + +EXE = $(FOAM_APPBIN)/topoSet + diff --git a/applications/utilities/mesh/manipulation/cellSet/Make/options b/applications/utilities/mesh/manipulation/topoSet/Make/options similarity index 100% rename from applications/utilities/mesh/manipulation/cellSet/Make/options rename to applications/utilities/mesh/manipulation/topoSet/Make/options diff --git a/applications/utilities/mesh/manipulation/topoSet/topoSet.C b/applications/utilities/mesh/manipulation/topoSet/topoSet.C new file mode 100644 index 0000000000000000000000000000000000000000..6f1c9957e4d1f4b3926a65a05a3a02b2565f94e6 --- /dev/null +++ b/applications/utilities/mesh/manipulation/topoSet/topoSet.C @@ -0,0 +1,233 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / 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 <http://www.gnu.org/licenses/>. + +Description + Operates on cellSets/faceSets/pointSets through a dictionary. + +\*---------------------------------------------------------------------------*/ + +#include "argList.H" +#include "Time.H" +#include "polyMesh.H" +#include "topoSetSource.H" +#include "cellSet.H" +#include "faceSet.H" +#include "pointSet.H" + +using namespace Foam; + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Main program: + +int main(int argc, char *argv[]) +{ + argList::addOption + ( + "dict", + "file", + "specify an alternative dictionary for the topoSet dictionary" + ); +# include "addRegionOption.H" + argList::addBoolOption + ( + "noSync", + "do not synchronise selection across coupled patches" + ); + +# include "setRootCase.H" +# include "createTime.H" +# include "createNamedPolyMesh.H" + + const bool noSync = args.optionFound("noSync"); + + const word dictName("topoSetDict"); + + fileName dictPath = dictName; + if (args.optionFound("dict")) + { + dictPath = args["dict"]; + if (isDir(dictPath)) + { + dictPath = dictPath / dictName; + } + } + + Info<< "Reading " << dictName << "\n" << endl; + + IOdictionary topoSetDict + ( + ( + args.optionFound("dict") + ? IOobject + ( + dictPath, + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + : IOobject + ( + dictName, + runTime.system(), + mesh, + IOobject::MUST_READ, + IOobject::NO_WRITE + ) + ) + ); + + + // Read set construct info from dictionary + PtrList<dictionary> patchSources(topoSetDict.lookup("actions")); + + forAll(patchSources, i) + { + const dictionary& dict = patchSources[i]; + + const word setName(dict.lookup("name")); + const word actionName(dict.lookup("action")); + const word setType(dict.lookup("type")); + + + topoSetSource::setAction action = topoSetSource::toAction(actionName); + + autoPtr<topoSet> currentSet; + if + ( + (action == topoSetSource::NEW) + || (action == topoSetSource::CLEAR) + ) + { + currentSet = topoSet::New(setType, mesh, setName, 10000); + Info<< "Created set " << setName << endl; + } + else if (action == topoSetSource::REMOVE) + { + //? + } + else + { + currentSet = topoSet::New + ( + setType, + mesh, + setName, + IOobject::MUST_READ + ); + Info<< "Read set " << setName << " with size " + << currentSet().size() << endl; + } + + + + // Handle special actions (clear, invert) locally, rest through sources. + switch (action) + { + case topoSetSource::NEW: + case topoSetSource::ADD: + case topoSetSource::DELETE: + { + Info<< " Applying source " << word(dict.lookup("source")) + << endl; + autoPtr<topoSetSource> source = topoSetSource::New + ( + dict.lookup("source"), + mesh, + dict.subDict("sourceInfo") + ); + + source().applyToSet(action, currentSet()); + // Synchronize for coupled patches. + if (!noSync) currentSet().sync(mesh); + currentSet().write(); + } + break; + + case topoSetSource::SUBSET: + { + Info<< " Applying source " << word(dict.lookup("source")) + << endl; + autoPtr<topoSetSource> source = topoSetSource::New + ( + dict.lookup("source"), + mesh, + dict.subDict("sourceInfo") + ); + + // Backup current set. + autoPtr<topoSet> oldSet + ( + topoSet::New + ( + setType, + mesh, + currentSet().name() + "_old2", + currentSet() + ) + ); + + currentSet().clear(); + source().applyToSet(topoSetSource::NEW, currentSet()); + + // Combine new value of currentSet with old one. + currentSet().subset(oldSet()); + // Synchronize for coupled patches. + if (!noSync) currentSet().sync(mesh); + currentSet().write(); + } + break; + + case topoSetSource::CLEAR: + Info<< " Clearing set" << endl; + currentSet().clear(); + currentSet().write(); + break; + + case topoSetSource::INVERT: + Info<< " Inverting set" << endl; + currentSet().invert(currentSet().maxSize(mesh)); + currentSet().write(); + break; + + default: + WarningIn(args.executable()) + << "Unhandled action " << action << endl; + break; + } + + if (currentSet.valid()) + { + Info<< " Set " << currentSet().name() + << " now size " << currentSet().size() + << endl; + } + } + + Info<< "\nEnd\n" << endl; + + return 0; +} + + +// ************************************************************************* // diff --git a/applications/utilities/mesh/manipulation/topoSet/topoSetDict b/applications/utilities/mesh/manipulation/topoSet/topoSetDict new file mode 100644 index 0000000000000000000000000000000000000000..40afc5ecb92b10cb5cf5d37db2f0efa459cfe420 --- /dev/null +++ b/applications/utilities/mesh/manipulation/topoSet/topoSetDict @@ -0,0 +1,363 @@ +/*--------------------------------*- 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 topoSetDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// List of actions. Each action is a dictionary with e.g. +// // name of set +// name c0; +// +// // type: pointSet/faceSet/cellSet/faceZoneSet/cellZoneSet +// type cellSet; +// +// // action to perform on set. Two types: +// // - require no source : clear/invert +// // - require source : new/add/delete/subset +// action new; +// +// The source entry varies according to the type of set: +// +// cellSet +// ~~~~~~~ +// +// // Select by explicitly providing cell labels +// source labelToCell; +// { +// value (12 13 56); // labels of cells +// } +// +// // Copy elements from cellSet +// source cellToCell; +// { +// set c1; +// } +// +// // Cells in cell zone +// source zoneToCell; +// { +// name ".*Zone"; // Name of cellZone, regular expressions allowed +// } +// +// // Cells on master or slave side of faceZone +// source faceZoneToCell; +// { +// name ".*Zone"; // Name of faceZone, regular expressions allowed +// option master; // master/slave +// } +// +// // Select based on faceSet +// source faceToCell; +// { +// set f0; // Name of faceSet +// +// //option neighbour; // cell with neighbour in faceSet +// //option owner; // ,, owner +// option any; // cell with any face in faceSet +// //option all; // cell with all faces in faceSet +// } +// +// // Select based on pointSet +// source pointToCell; +// { +// set p0; +// option any; // cell with any point in pointSet +// //option all; // cell with all points in pointSet +// } +// +// // Select based on cellShape +// source shapeToCell; +// { +// type hex; // hex/wedge/prism/pyr/tet/tetWedge/splitHex +// } +// +// // Cells with cell centre within box +// source boxToCell; +// { +// box (0 0 0) (1 1 1); +// } +// +// // Cells with cell centre within box +// // Is skewed, rotated box. Given as origin and three spanning vectors. +// source rotatedBoxToCell; +// { +// origin (0.2 0.2 -10); +// i (0.2 0.2 0); +// j (-0.2 0.2 0); +// k (10 10 10); +// } +// +// // Cells with centre within cylinder +// source cylinderToCell; +// { +// p1 (0.2 0.2 -10); // start point on cylinder axis +// p2 (0.2 0.2 0); // end point on cylinder axis +// radius 5.0; +// } +// +// // Cells with centre within sphere +// source sphereToCell; +// { +// centre (0.2 0.2 -10); +// radius 5.0; +// } +// +// // Cells with cellCentre nearest to coordinates +// source nearestToCell; +// { +// points ((0 0 0) (1 1 1)(2 2 2)); +// } +// +// // Select based on surface +// source surfaceToCell; +// { +// file "www.avl.com-geometry.stl"; +// outsidePoints ((-99 -99 -59)); // definition of outside +// includeCut false; // cells cut by surface +// includeInside false; // cells not on outside of surf +// includeOutside false; // cells on outside of surf +// nearDistance -1; // cells with centre near surf +// // (set to -1 if not used) +// curvature 0.9; // cells within nearDistance +// // and near surf curvature +// // (set to -100 if not used) +// } +// +// // values of field within certain range +// source fieldToCell; +// { +// fieldName U; // Note: uses mag(U) since volVectorField +// min 0.1; +// max 0.5; +// } +// +// // Mesh region (non-face connected part of (subset of)mesh) +// source regionToCell; +// { +// set c0; // name of cellSet giving mesh subset +// insidePoint (1 2 3); // point inside region to select +// } +// +// +// +// faceSet +// ~~~~~~~ +// +// // Copy elements from faceSet +// source faceToFace; +// { +// set f1; +// } +// +// // Select based on cellSet +// source cellToFace; +// { +// set c0; +// option all; // All faces of cells +// //option both; // Only faces whose owner&neighbour are in cellSet +// } +// +// // Select based on pointSet +// source pointToFace; +// { +// set p0; +// option any; // Faces using any point in pointSet +// //option all // Faces with all points in pointSet +// } +// +// // Select by explicitly providing face labels +// source labelToFace; +// { +// value (12 13 56); // labels of faces +// } +// +// // All faces of patch +// source patchToFace; +// { +// name ".*Wall"; // Name of patch, regular expressions allowed +// } +// +// // All faces of faceZone +// source zoneToFace; +// { +// name ".*Zone1"; // Name of faceZone, regular expressions allowed +// } +// +// // Faces with face centre within box +// source boxToFace; +// { +// box (0 0 0) (1 1 1); +// } +// +// // Faces with normal to within certain angle aligned with vector. +// source normalToFace; +// { +// normal (0 0 1); // Vector +// cos 0.01; // Tolerance (max cos of angle) +// } +// +// +// +// pointSet +// ~~~~~~~ +// +// // Copy elements from pointSet +// source pointToPoint; +// { +// set p1; +// } +// +// // Select based on cellSet +// source cellToPoint; +// { +// set c0; +// option all; // all points of cell +// } +// +// // Select based on faceSet +// source faceToPoint; +// { +// set f0; // name of faceSet +// option all; // all points of face +// } +// +// // Select by explicitly providing point labels +// source labelToPoint; +// { +// value (12 13 56); // labels of points +// } +// +// // All points in pointzone +// source zoneToPoint; +// { +// name ".*Zone"; // name of pointZone, regular expressions allowed +// } +// +// // Points nearest to coordinates +// source nearestToPoint; +// { +// points ((0 0 0) (1 1 1)); +// } +// +// // Points with coordinate within box +// source boxToPoint; +// { +// box (0 0 0) (1 1 1); +// } +// +// // Select based on surface +// source surfaceToPoint; +// { +// file "www.avl.com-geometry.stl"; +// nearDistance 0.1; // points near to surface +// includeInside false; // points on inside of surface +// // (requires closed surface with consistent +// // normals) +// includeOutside false; // ,, outside ,, +// } +// +// +// +// +// cellZoneSet +// ~~~~~~~~~~~ +// (mirrors operations on a cellSet into a cellZone) +// +// // Select based on cellSet +// source setToCellZone; +// { +// set c0; // name of cellSet +// } +// +// +// +// faceZoneSet +// ~~~~~~~~~~~ +// // Select based on faceSet without orientation +// source setToFaceZone; +// { +// set f0; // name of faceSet +// } +// +// // Select based on faceSet, using cellSet to determine orientation +// source setsToFaceZone; +// { +// faceSet f0; // name of faceSet +// cellSet c0; // name of cellSet of slave side +// } + + + +actions +( + // Example:pick up internal faces on outside of cellSet + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + // Load initial cellSet + { + name c0; + type cellSet; + action new; + source labelToCell; + sourceInfo + { + value (12 13 56); + } + } + + // Get all faces in cellSet + { + name f0; + type faceSet; + action new; + source cellToFace; + sourceInfo + { + set c0; + option all; + } + } + + // Determine inverse cellSet + { + name c1; + type cellSet; + action new; + source cellToCell; + sourceInfo + { + set c0; + } + } + { + name c1; + type cellSet; + action invert; + } + + // Keep in f0 all faces in c1 + { + name f0; + type faceSet; + action subset; + source cellToFace; + sourceInfo + { + set c1; + option all; + } + } +); + +// ************************************************************************* // diff --git a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C index b5fe48ec47672e72464034ac4a4d5e11e5bbe044..7a089c5f98d34e5b543ca340e45b23e3d8b5327b 100644 --- a/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C +++ b/applications/utilities/mesh/manipulation/transformPoints/transformPoints.C @@ -158,13 +158,13 @@ int main(int argc, char *argv[]) ( "rollPitchYaw", "vector", - "transform in terms of '( roll pitch yaw )' in degrees" + "transform in terms of '(roll pitch yaw)' in degrees" ); argList::addOption ( "yawPitchRoll", "vector", - "transform in terms of '( yaw pitch roll )' in degrees" + "transform in terms of '(yaw pitch roll)' in degrees" ); argList::addBoolOption ( diff --git a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C index c488cb6602c5dc765a3395c83d25253b2fe48f15..08e8f29f24d37f67fc95fafbf35a289266341a42 100644 --- a/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C +++ b/applications/utilities/miscellaneous/expandDictionary/expandDictionary.C @@ -44,7 +44,6 @@ int main(int argc, char *argv[]) { argList::noBanner(); argList::noParallel(); - argList::validArgs.clear(); argList::validArgs.append("inputDict"); argList args(argc, argv); diff --git a/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C b/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C index 8945c0cf5e50f53d35f5cd1e74d9cfc13a0e229e..0fe8bbd945efa6fc0bc158b4d2a6692848ae884a 100644 --- a/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C +++ b/applications/utilities/miscellaneous/foamInfoExec/foamInfoExec.C @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Description - Interrogates a case and prints information to screen + Interrogates a case and prints information to stdout \*---------------------------------------------------------------------------*/ @@ -38,15 +38,33 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::noParallel(); - argList::addBoolOption("times"); - argList::addOption("dictionary", "dictionary name"); - argList::addBoolOption("keywords"); - argList::addOption("entry", "entry name"); - -# include "setRootCase.H" + argList::addNote + ( + "interrogates a case and prints information to stdout" + ); - Info<< endl; + argList::noBanner(); + argList::noParallel(); + argList::addBoolOption("times", "list available times"); + argList::addBoolOption + ( + "keywords", + "report keywords for the specified dictionary" + ); + argList::addOption + ( + "dict", + "file", + "specify a dictionary to interrogate" + ); + argList::addOption + ( + "entry", + "name", + "report the named entry for the specified dictionary" + ); + + #include "setRootCase.H" if (args.optionFound("times")) { @@ -61,11 +79,11 @@ int main(int argc, char *argv[]) } } - if (args.optionFound("dictionary")) + if (args.optionFound("dict")) { - fileName dictFileName + const fileName dictFileName ( - args.rootPath()/args.caseName()/args["dictionary"] + args.rootPath()/args.caseName()/args["dict"] ); IFstream dictFile(dictFileName); @@ -74,14 +92,7 @@ int main(int argc, char *argv[]) { dictionary dict(dictFile); - if (args.optionFound("keywords") && !args.optionFound("entry")) - { - forAllConstIter(dictionary, dict, iter) - { - Info<< iter().keyword() << endl; - } - } - else if (args.optionFound("entry")) + if (args.optionFound("entry")) { wordList entryNames ( @@ -152,6 +163,13 @@ int main(int argc, char *argv[]) FatalError.exit(2); } } + else if (args.optionFound("keywords")) + { + forAllConstIter(dictionary, dict, iter) + { + Info<< iter().keyword() << endl; + } + } else { Info<< dict; diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index f63026e3f0d8dc1e63445786e98b1943c71d7112..c465aa3c3befb513ed63f035b90c817a04840425 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -81,8 +81,13 @@ Usage int main(int argc, char *argv[]) { + argList::addNote + ( + "decompose a mesh and fields of a case for parallel execution" + ); + argList::noParallel(); -# include "addRegionOption.H" + #include "addRegionOption.H" argList::addBoolOption ( "cellDist", @@ -110,12 +115,7 @@ int main(int argc, char *argv[]) "only decompose geometry if the number of domains has changed" ); - argList::addNote - ( - "decompose a mesh and fields of a case for parallel execution" - ); - -# include "setRootCase.H" + #include "setRootCase.H" word regionName = fvMesh::defaultRegion; word regionDir = word::null; @@ -132,7 +132,7 @@ int main(int argc, char *argv[]) bool forceOverwrite = args.optionFound("force"); bool ifRequiredDecomposition = args.optionFound("ifRequired"); -# include "createTime.H" + #include "createTime.H" Info<< "Time = " << runTime.timeName() << endl; diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C index 7a19700ebdc696db13091e13430b950449f26086..36ce46e454db12d95b1d108269d1d931b6d4f23b 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecompositionDistribute.C @@ -55,7 +55,7 @@ void Foam::domainDecomposition::distributeCells() forAll(pNames, i) { - label patchI = patches.findPatchID(pNames[i]); + const label patchI = patches.findPatchID(pNames[i]); if (patchI == -1) { diff --git a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C index 4d35b661d4f4d86dd69454ab12891c965d626033..e827fee60c308df6e1d5b58c151a33e6fbe906a6 100644 --- a/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C +++ b/applications/utilities/parallelProcessing/reconstructParMesh/reconstructParMesh.C @@ -279,6 +279,11 @@ autoPtr<mapPolyMesh> mergeSharedPoints int main(int argc, char *argv[]) { + argList::addNote + ( + "reconstruct a mesh using geometric information only" + ); + argList::noParallel(); argList::addOption ( @@ -293,15 +298,10 @@ int main(int argc, char *argv[]) "do (slower) geometric matching on all boundary faces" ); - argList::addNote - ( - "reconstruct a mesh using geometric information only" - ); - -# include "addTimeOptions.H" -# include "addRegionOption.H" -# include "setRootCase.H" -# include "createTime.H" + #include "addTimeOptions.H" + #include "addRegionOption.H" + #include "setRootCase.H" + #include "createTime.H" Info<< "This is an experimental tool which tries to merge" << " individual processor" << nl diff --git a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C index 9c0caebc08c914be0e66b16816b25f9a7edc7f57..c3a2003d40bc1864654e4d07a560ffd932ec9e41 100644 --- a/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C +++ b/applications/utilities/parallelProcessing/redistributeMeshPar/redistributeMeshPar.C @@ -503,7 +503,13 @@ void compareFields int main(int argc, char *argv[]) { # include "addRegionOption.H" - argList::addOption("mergeTol", "relative merge distance"); + argList::addOption + ( + "mergeTol", + "scalar", + "specify the merge distance relative to the bounding box size " + "(default 1E-6)" + ); // Create argList. This will check for non-existing processor dirs. # include "setRootCase.H" diff --git a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C index 29bb06782f23d788bd37cff55e8261932c2f94d7..dff5d8b8c8e7902a787ba2fcfd857e9944e65a5a 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C +++ b/applications/utilities/postProcessing/dataConversion/foamToEnsight/foamToEnsight.C @@ -341,9 +341,9 @@ int main(int argc, char *argv[]) { wordList fieldNames = objects.names(volFieldTypes[i]); - for (label j=0; j<fieldNames.size(); j++) + forAll(fieldNames, j) { - word fieldName = fieldNames[j]; + const word& fieldName = fieldNames[j]; # include "checkData.H" diff --git a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/foamToFieldview9.C b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/foamToFieldview9.C index deaf3897fc68d8637230b565da089e0258259409..ea9a685b6730de3b2133cb0cc4f39dc29595ec4f 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToFieldview9/foamToFieldview9.C +++ b/applications/utilities/postProcessing/dataConversion/foamToFieldview9/foamToFieldview9.C @@ -176,7 +176,11 @@ static void writeFaceData int main(int argc, char *argv[]) { argList::noParallel(); - argList::addBoolOption("noWall"); + argList::addBoolOption + ( + "noWall", + "skip setting wall information" + ); timeSelector::addOptions(true, false); # include "setRootCase.H" diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H index a49c4e188e0562d102f60ae93699d6df1cda9db5..61833a245e900ec2ff5a35a2c796ce6c2fa2b1eb 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H +++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutput.H @@ -6,10 +6,10 @@ for (label i=0; i < nTypes; i++) { gmvFile << "variable" << nl; } - for (label j=0; j < fieldNames.size(); j++) - { - word fieldName = fieldNames[j]; + forAll(fieldNames, j) + { + const word& fieldName = fieldNames[j]; IOobject fieldObject ( diff --git a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutputHeader.H b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutputHeader.H index 842a4684d4b8492867d6e3040afc329a4dc18409..54be801175a2f66eeb13576aa8c579d178170804 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutputHeader.H +++ b/applications/utilities/postProcessing/dataConversion/foamToGMV/gmvOutputHeader.H @@ -20,7 +20,7 @@ for (label indx=0;indx<nPoints;indx++) } gmvFile << nl; gmvFile << "cells " << cells.size() << nl; -for (label indx=0;indx<cells.size();indx++) +forAll(cells, indx) { label nNodes = cells[indx].size(); if (nNodes == 8) diff --git a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C index 2ba61565d99599a7547d6e5aa83ae38c33a3b869..a801d001be47347e45e8d580ceadd74de97e8d07 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C +++ b/applications/utilities/postProcessing/dataConversion/foamToTecplot360/foamToTecplot360.C @@ -31,7 +31,7 @@ Usage - foamToTecplot360 [OPTION] - @param -fields \<fields\>\n + @param -fields \<names\>\n Convert selected fields only. For example, @verbatim -fields '( p T U )' @@ -163,30 +163,65 @@ labelList getSelectedPatches int main(int argc, char *argv[]) { - timeSelector::addOptions(); + argList::addNote + ( + "Tecplot binary file format writer" + ); -# include "addRegionOption.H" + timeSelector::addOptions(); + #include "addRegionOption.H" - argList::addOption("fields", "fields"); - argList::addOption("cellSet", "cellSet name"); - argList::addOption("faceSet", "faceSet name"); - argList::addBoolOption("nearCellValue"); - argList::addBoolOption("noInternal"); - argList::addBoolOption("noPointValues"); + argList::addOption + ( + "fields", + "names", + "convert selected fields only. eg, '(p T U)'" + ); + argList::addOption + ( + "cellSet", + "name", + "restrict conversion to the specified cellSet" + ); + argList::addOption + ( + "faceSet", + "name", + "restrict conversion to the specified cellSet" + ); + argList::addBoolOption + ( + "nearCellValue", + "output cell value on patches instead of patch value itself" + ); + argList::addBoolOption + ( + "noInternal", + "do not generate file for mesh, only for patches" + ); + argList::addBoolOption + ( + "noPointValues", + "no pointFields" + ); argList::addOption ( "excludePatches", "patches (wildcards) to exclude" ); - argList::addBoolOption("noFaceZones"); - -# include "setRootCase.H" -# include "createTime.H" + argList::addBoolOption + ( + "noFaceZones", + "no faceZones" + ); - bool doWriteInternal = !args.optionFound("noInternal"); - bool doFaceZones = !args.optionFound("noFaceZones"); + #include "setRootCase.H" + #include "createTime.H" - bool nearCellValue = args.optionFound("nearCellValue"); + const bool doWriteInternal = !args.optionFound("noInternal"); + const bool doFaceZones = !args.optionFound("noFaceZones"); + const bool nearCellValue = args.optionFound("nearCellValue"); + const bool noPointValues = args.optionFound("noPointValues"); if (nearCellValue) { @@ -195,8 +230,6 @@ int main(int argc, char *argv[]) << nl << endl; } - bool noPointValues = args.optionFound("noPointValues"); - if (noPointValues) { WarningIn(args.executable()) diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C index a93885d976deb67b44463bf812159a78fb9a1f5b..cfbdf8717cfdc35d4ecd65b31f15829f1b6eed1d 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/foamToVTK.C @@ -40,7 +40,6 @@ Usage - foamToVTK [OPTION] - @param -ascii \n Write VTK data in ASCII format instead of binary. @@ -78,6 +77,9 @@ Usage @param -noLinks \n (in parallel) do not link processor files to master + @param poly \n + write polyhedral cells without tet/pyramid decomposition + @param -allPatches \n Combine all patches into a single file @@ -95,7 +97,7 @@ Usage Note mesh subset is handled by vtkMesh. Slight inconsistency in - interpolation: on the internal field it interpolates the whole volfield + interpolation: on the internal field it interpolates the whole volField to the whole-mesh pointField and then selects only those values it needs for the subMesh (using the fvMeshSubset cellMap(), pointMap() functions). For the patches however it uses the @@ -226,13 +228,17 @@ labelList getSelectedPatches int main(int argc, char *argv[]) { + argList::addNote + ( + "legacy VTK file format writer" + ); timeSelector::addOptions(); -# include "addRegionOption.H" - + #include "addRegionOption.H" argList::addOption ( - "fields", "wordList", + "fields", + "wordList", "only convert the specified fields - eg '(p T U)'" ); argList::addOption @@ -241,25 +247,64 @@ int main(int argc, char *argv[]) "name", "convert a mesh subset corresponding to the specified cellSet" ); - argList::addOption("faceSet", "name"); - argList::addOption("pointSet", "name"); + argList::addOption + ( + "faceSet", + "name", + "restrict conversion to the specified faceSet" + ); + argList::addOption + ( + "pointSet", + "name", + "restrict conversion to the specified pointSet" + ); argList::addBoolOption ( "ascii", "write in ASCII format instead of binary" ); - argList::addBoolOption("surfaceFields"); - argList::addBoolOption("nearCellValue"); - argList::addBoolOption("noInternal"); - argList::addBoolOption("noPointValues"); - argList::addBoolOption("allPatches"); + argList::addBoolOption + ( + "poly", + "write polyhedral cells without tet/pyramid decomposition" + ); + argList::addBoolOption + ( + "surfaceFields", + "write surfaceScalarFields (e.g., phi)" + ); + argList::addBoolOption + ( + "nearCellValue", + "use cell value on patches instead of patch value itself" + ); + argList::addBoolOption + ( + "noInternal", + "do not generate file for mesh, only for patches" + ); + argList::addBoolOption + ( + "noPointValues", + "no pointFields" + ); + argList::addBoolOption + ( + "allPatches", + "combine all patches into a single file" + ); argList::addOption ( "excludePatches", "wordReList", "a list of patches to exclude - eg '( inlet \".*Wall\" )' " ); - argList::addBoolOption("noFaceZones"); + argList::addBoolOption + ( + "noFaceZones", + "no faceZones" + ); argList::addBoolOption ( "noLinks", @@ -271,8 +316,8 @@ int main(int argc, char *argv[]) "use the time name instead of the time index when naming the files" ); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" const bool doWriteInternal = !args.optionFound("noInternal"); const bool doFaceZones = !args.optionFound("noFaceZones"); @@ -280,6 +325,9 @@ int main(int argc, char *argv[]) const bool binary = !args.optionFound("ascii"); const bool useTimeName = args.optionFound("useTimeName"); + // decomposition of polyhedral cells into tets/pyramids cells + vtkTopo::decomposePoly = !args.optionFound("poly"); + if (binary && (sizeof(floatScalar) != 4 || sizeof(label) != 4)) { FatalErrorIn(args.executable()) @@ -941,17 +989,17 @@ int main(int argc, char *argv[]) Info<< " FaceZone : " << patchFileName << endl; - std::ofstream str(patchFileName.c_str()); + std::ofstream ostr(patchFileName.c_str()); - writeFuns::writeHeader(str, binary, pp.name()); - str << "DATASET POLYDATA" << std::endl; + writeFuns::writeHeader(ostr, binary, pp.name()); + ostr<< "DATASET POLYDATA" << std::endl; writePatchGeom ( binary, pp().localFaces(), pp().localPoints(), - str + ostr ); } } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C index 0c008935545dac4af6467e3e69930632d1302506..fa4ad21a5b87b6c3e0fcad9887d0e6212ca4b5a8 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/internalWriter.C @@ -28,7 +28,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::internalWriter::internalWriter ( const vtkMesh& vMesh, @@ -58,8 +57,7 @@ Foam::internalWriter::internalWriter const labelList& addPointCellLabels = topo.addPointCellLabels(); const label nTotPoints = mesh.nPoints() + addPointCellLabels.size(); - os_ << "POINTS " << nTotPoints - << " float" << std::endl; + os_ << "POINTS " << nTotPoints << " float" << std::endl; DynamicList<floatScalar> ptField(3*nTotPoints); @@ -87,9 +85,7 @@ Foam::internalWriter::internalWriter nFaceVerts += vtkVertLabels[cellI].size() + 1; } - os_ << "CELLS " << vtkVertLabels.size() << ' ' << nFaceVerts - << std::endl; - + os_ << "CELLS " << vtkVertLabels.size() << ' ' << nFaceVerts << std::endl; DynamicList<label> vertLabels(nFaceVerts); @@ -104,7 +100,6 @@ Foam::internalWriter::internalWriter writeFuns::write(os_, binary_, vertLabels); - const labelList& vtkCellTypes = topo.cellTypes(); os_ << "CELL_TYPES " << vtkCellTypes.size() << std::endl; @@ -128,8 +123,7 @@ void Foam::internalWriter::writeCellIDs() const labelList& superCells = topo.superCells(); // Cell ids first - os_ << "cellID 1 " << vtkCellTypes.size() << " int" - << std::endl; + os_ << "cellID 1 " << vtkCellTypes.size() << " int" << std::endl; labelList cellId(vtkCellTypes.size()); label labelI = 0; diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/lagrangianWriter.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/lagrangianWriter.C index 7f1354c4c41dfa7703ee4fc6c9af0f50218273ac..439857dc79fa9b5a4f7ce66998f13a906a0ce808 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/lagrangianWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/lagrangianWriter.C @@ -30,7 +30,6 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::lagrangianWriter::lagrangianWriter ( const vtkMesh& vMesh, diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C index 69bbac95754903473abd619901e9728b98a7d908..5ff3e370ee6decd421ecd874895decf913b080f2 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/patchWriter.C @@ -26,11 +26,8 @@ License #include "patchWriter.H" #include "writeFuns.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::patchWriter::patchWriter ( const vtkMesh& vMesh, @@ -59,7 +56,7 @@ Foam::patchWriter::patchWriter { writeFuns::writeHeader(os_, binary_, "patches"); } - os_ << "DATASET UNSTRUCTURED_GRID" << std::endl; + os_ << "DATASET POLYDATA" << std::endl; // Write topology nPoints_ = 0; @@ -91,11 +88,9 @@ Foam::patchWriter::patchWriter } writeFuns::write(os_, binary_, ptField); - os_ << "CELLS " << nFaces_ << ' ' << nFaceVerts - << std::endl; + os_ << "POLYGONS " << nFaces_ << ' ' << nFaceVerts << std::endl; DynamicList<label> vertLabels(nFaceVerts); - DynamicList<label> faceTypes(nFaceVerts); label offset = 0; @@ -107,31 +102,12 @@ Foam::patchWriter::patchWriter { const face& f = pp.localFaces()[faceI]; - const label fSize = f.size(); - vertLabels.append(fSize); - + vertLabels.append(f.size()); writeFuns::insert(f + offset, vertLabels); - - if (fSize == 3) - { - faceTypes.append(vtkTopo::VTK_TRIANGLE); - } - else if (fSize == 4) - { - faceTypes.append(vtkTopo::VTK_QUAD); - } - else - { - faceTypes.append(vtkTopo::VTK_POLYGON); - } } offset += pp.nPoints(); } writeFuns::write(os_, binary_, vertLabels); - - os_ << "CELL_TYPES " << nFaces_ << std::endl; - - writeFuns::write(os_, binary_, faceTypes); } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.C index ae11ffbf38f728c3e8c6bee7cb4bb1b1cf3b2e1b..c006a05ba3f7c6f7d51ae4c092ee76ca8fb0010e 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkMesh.C @@ -28,12 +28,8 @@ License #include "Time.H" #include "cellSet.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -// Construct from components Foam::vtkMesh::vtkMesh ( fvMesh& baseMesh, @@ -63,8 +59,8 @@ Foam::polyMesh::readUpdateState Foam::vtkMesh::readUpdate() if (meshState != polyMesh::UNCHANGED) { - // Note: since fvMeshSubset has no movePoints() functionality reconstruct - // the subset even if only movement. + // Note: since fvMeshSubset has no movePoints() functionality, + // reconstruct the subset even if only movement. topoPtr_.clear(); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C index 434c46b1acc76e6a3b71763069dc60fda469c21a..c8d32ef33d240c75521c0401a3e561b255b5d422 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.C @@ -34,6 +34,11 @@ Description #include "cellModeller.H" #include "Swap.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +bool Foam::vtkTopo::decomposePoly = true; + + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // Foam::vtkTopo::vtkTopo(const polyMesh& mesh) @@ -50,10 +55,8 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) const cellModel& tetWedge = *(cellModeller::lookup("tetWedge")); const cellModel& hex = *(cellModeller::lookup("hex")); - const cellShapeList& cellShapes = mesh_.cellShapes(); - // Number of additional points needed by the decomposition of polyhedra label nAddPoints = 0; @@ -65,39 +68,42 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) // Scan for cells which need to be decomposed and count additional points // and cells - - forAll(cellShapes, cellI) + if (decomposePoly) { - const cellModel& model = cellShapes[cellI].model(); - - if - ( - model != hex - // && model != wedge // See above. - && model != prism - && model != pyr - && model != tet - && model != tetWedge - ) + forAll(cellShapes, cellI) { - const cell& cFaces = mesh_.cells()[cellI]; - - forAll(cFaces, cFaceI) + const cellModel& model = cellShapes[cellI].model(); + + if + ( + model != hex + // && model != wedge // See above. + && model != prism + && model != pyr + && model != tet + && model != tetWedge + ) { - const face& f = mesh_.faces()[cFaces[cFaceI]]; + const cell& cFaces = mesh_.cells()[cellI]; - label nQuads = 0; - label nTris = 0; - f.nTrianglesQuads(mesh_.points(), nTris, nQuads); + forAll(cFaces, cFaceI) + { + const face& f = mesh_.faces()[cFaces[cFaceI]]; - nAddCells += nQuads + nTris; - } + label nQuads = 0; + label nTris = 0; + f.nTrianglesQuads(mesh_.points(), nTris, nQuads); + + nAddCells += nQuads + nTris; + } - nAddCells--; - nAddPoints++; + nAddCells--; + nAddPoints++; + } } } + // Set size of additional point addressing array // (from added point to original cell) addPointCellLabels_.setSize(nAddPoints); @@ -179,9 +185,9 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) cellTypes_[cellI] = VTK_HEXAHEDRON; } - else + else if (decomposePoly) { - // Polyhedral cell. Decompose into tets + prisms. + // Polyhedral cell. Decompose into tets + pyramids. // Mapping from additional point to cell addPointCellLabels_[addPointI] = cellI; @@ -300,13 +306,67 @@ Foam::vtkTopo::vtkTopo(const polyMesh& mesh) addPointI++; } + else + { + // Polyhedral cell - not decomposed + cellTypes_[cellI] = VTK_POLYHEDRON; + + const labelList& cFaces = mesh_.cells()[cellI]; + + // space for the number of faces and size of each face + label nData = 1 + cFaces.size(); + + // count total number of face points + forAll(cFaces, cFaceI) + { + const face& f = mesh.faces()[cFaces[cFaceI]]; + nData += f.size(); // space for the face labels + } + + vtkVerts.setSize(nData); + + nData = 0; + vtkVerts[nData++] = cFaces.size(); + + // build face stream + forAll(cFaces, cFaceI) + { + const face& f = mesh.faces()[cFaces[cFaceI]]; + const bool isOwner = (owner[cFaces[cFaceI]] == cellI); + + // number of labels for this face + vtkVerts[nData++] = f.size(); + + if (isOwner) + { + forAll(f, fp) + { + vtkVerts[nData++] = f[fp]; + } + } + else + { + // fairly immaterial if we reverse the list + // or use face::reverseFace() + forAllReverse(f, fp) + { + vtkVerts[nData++] = f[fp]; + } + } + } + } + } + + if (decomposePoly) + { + Pout<< " Original cells:" << mesh_.nCells() + << " points:" << mesh_.nPoints() + << " Additional cells:" << superCells_.size() + << " additional points:" << addPointCellLabels_.size() + << nl << endl; } - Pout<< " Original cells:" << mesh_.nCells() - << " points:" << mesh_.nPoints() - << " Additional cells:" << superCells_.size() - << " additional points:" << addPointCellLabels_.size() - << nl << endl; } + // ************************************************************************* // diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.H index 4b59ee427e4bfd4b62d809eb4d84fcb300d8ab82..0e8661df1b1c51007494e4699a5ed51304abe822 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/vtkTopo.H @@ -93,11 +93,14 @@ public: VTK_POLYHEDRON = 42 }; + //- Enable/disable polyhedron decomposition. Default = true + static bool decomposePoly; + + // Constructors //- Construct from components - vtkTopo(const polyMesh& mesh); - + vtkTopo(const polyMesh&); // Member Functions diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C index a1a19b90a637ea1361db39f08b0b1733ea954739..fa2d6ab827ed97ebb90d07d162444edac3e69b7c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFaceSet.C @@ -39,21 +39,16 @@ void Foam::writeFaceSet { const faceList& faces = vMesh.mesh().faces(); - std::ofstream pStream(fileName.c_str()); + std::ofstream ostr(fileName.c_str()); - pStream - << "# vtk DataFile Version 2.0" << std::endl - << set.name() << std::endl; - if (binary) - { - pStream << "BINARY" << std::endl; - } - else - { - pStream << "ASCII" << std::endl; - } - pStream << "DATASET POLYDATA" << std::endl; + writeFuns::writeHeader + ( + ostr, + binary, + set.name() + ); + ostr<< "DATASET POLYDATA" << std::endl; //------------------------------------------------------------------ // @@ -79,13 +74,13 @@ void Foam::writeFaceSet // Write points and faces as polygons - pStream << "POINTS " << fp.nPoints() << " float" << std::endl; + ostr<< "POINTS " << fp.nPoints() << " float" << std::endl; DynamicList<floatScalar> ptField(3*fp.nPoints()); writeFuns::insert(fp.localPoints(), ptField); - writeFuns::write(pStream, binary, ptField); + writeFuns::write(ostr, binary, ptField); label nFaceVerts = 0; @@ -94,8 +89,7 @@ void Foam::writeFaceSet { nFaceVerts += fp.localFaces()[faceI].size() + 1; } - pStream << "POLYGONS " << fp.size() << ' ' << nFaceVerts - << std::endl; + ostr<< "POLYGONS " << fp.size() << ' ' << nFaceVerts << std::endl; DynamicList<label> vertLabels(nFaceVerts); @@ -108,7 +102,7 @@ void Foam::writeFaceSet writeFuns::insert(f, vertLabels); } - writeFuns::write(pStream, binary, vertLabels); + writeFuns::write(ostr, binary, vertLabels); //----------------------------------------------------------------- @@ -119,14 +113,14 @@ void Foam::writeFaceSet // Write faceID - pStream + ostr << "CELL_DATA " << fp.size() << std::endl << "FIELD attributes 1" << std::endl; // Cell ids first - pStream << "faceID 1 " << fp.size() << " int" << std::endl; + ostr<< "faceID 1 " << fp.size() << " int" << std::endl; - writeFuns::write(pStream, binary, setFaceLabels); + writeFuns::write(ostr, binary, setFaceLabels); } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C index 89f0a5932755679d75cb8c650c0231385ddbac9a..7180c86f3d4065b0bb6b8b645d6ee544252ca4e8 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.C @@ -100,14 +100,18 @@ void Foam::writeFuns::write { forAll(fField, i) { - os << fField[i] << ' '; + os << fField[i]; if (i > 0 && (i % 10) == 0) { os << std::endl; } + else + { + os << ' '; + } } - os << std::endl; + os << std::endl; } } @@ -149,12 +153,16 @@ void Foam::writeFuns::write { forAll(elems, i) { - os << elems[i] << ' '; + os << elems[i]; if (i > 0 && (i % 10) == 0) { os << std::endl; } + else + { + os << ' '; + } } os << std::endl; } @@ -178,11 +186,11 @@ void Foam::writeFuns::writeHeader ( std::ostream& os, const bool binary, - const string& name + const std::string& title ) { os << "# vtk DataFile Version 2.0" << std::endl - << name << std::endl; + << title << std::endl; if (binary) { @@ -219,62 +227,59 @@ void Foam::writeFuns::writePointDataHeader } -void Foam::writeFuns::insert(const scalar pt, DynamicList<floatScalar>& dest) +void Foam::writeFuns::insert(const scalar src, DynamicList<floatScalar>& dest) { - dest.append(float(pt)); + dest.append(float(src)); } -void Foam::writeFuns::insert(const vector& pt, DynamicList<floatScalar>& dest) +void Foam::writeFuns::insert(const vector& src, DynamicList<floatScalar>& dest) { - for (direction cmpt = 0; cmpt < vector::nComponents; cmpt++) + for (direction cmpt = 0; cmpt < vector::nComponents; ++cmpt) { - dest.append(float(pt[cmpt])); + dest.append(float(src[cmpt])); } } void Foam::writeFuns::insert ( - const sphericalTensor& pt, + const sphericalTensor& src, DynamicList<floatScalar>& dest ) { - for (direction cmpt = 0; cmpt < sphericalTensor::nComponents; cmpt++) + for (direction cmpt = 0; cmpt < sphericalTensor::nComponents; ++cmpt) { - dest.append(float(pt[cmpt])); + dest.append(float(src[cmpt])); } } void Foam::writeFuns::insert ( - const symmTensor& pt, + const symmTensor& src, DynamicList<floatScalar>& dest ) { - for (direction cmpt = 0; cmpt < symmTensor::nComponents; cmpt++) + for (direction cmpt = 0; cmpt < symmTensor::nComponents; ++cmpt) { - dest.append(float(pt[cmpt])); + dest.append(float(src[cmpt])); } } -void Foam::writeFuns::insert(const tensor& pt, DynamicList<floatScalar>& dest) +void Foam::writeFuns::insert(const tensor& src, DynamicList<floatScalar>& dest) { - for (direction cmpt = 0; cmpt < tensor::nComponents; cmpt++) + for (direction cmpt = 0; cmpt < tensor::nComponents; ++cmpt) { - dest.append(float(pt[cmpt])); + dest.append(float(src[cmpt])); } } -void Foam::writeFuns::insert(const labelList& source, DynamicList<label>& dest) +void Foam::writeFuns::insert(const labelList& src, DynamicList<label>& dest) { - forAll(source, i) - { - dest.append(source[i]); - } + dest.append(src); } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H index 955d375d82708c6c63eca7c86fb6e3312a9450f0..ff073e288159beb6b70bce8fc452d6b106109525 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeFuns.H @@ -73,13 +73,23 @@ public: // Write header - static void writeHeader(std::ostream&, const bool, const string&); - static void writeCellDataHeader(std::ostream&, const label, const label); + static void writeHeader + ( + std::ostream&, + const bool isBinary, + const std::string& title + ); + static void writeCellDataHeader + ( + std::ostream&, + const label nCells, + const label nFields + ); static void writePointDataHeader ( std::ostream&, - const label, - const label + const label nPoints, + const label nFields ); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writePatchGeom.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writePatchGeom.C index 48ffe44e689f3a5d258fc09ea190d4b150a91b4d..0dd2bd920071906bb1f39418d6c238ac3eb88142 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writePatchGeom.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writePatchGeom.C @@ -40,16 +40,16 @@ void writePatchGeom const bool binary, const faceList& faces, const pointField& points, - std::ofstream& pStream + std::ofstream& ostr ) { - pStream << "POINTS " << points.size() << " float" << std::endl; + ostr<< "POINTS " << points.size() << " float" << std::endl; DynamicList<floatScalar> ptField(3*points.size()); writeFuns::insert(points, ptField); - writeFuns::write(pStream, binary, ptField); + writeFuns::write(ostr, binary, ptField); label nFaceVerts = 0; @@ -58,8 +58,7 @@ void writePatchGeom { nFaceVerts += faces[faceI].size() + 1; } - pStream << "POLYGONS " << faces.size() << ' ' << nFaceVerts - << std::endl; + ostr<< "POLYGONS " << faces.size() << ' ' << nFaceVerts << std::endl; DynamicList<label> vertLabels(nFaceVerts); @@ -72,7 +71,7 @@ void writePatchGeom writeFuns::insert(f, vertLabels); } - writeFuns::write(pStream, binary, vertLabels); + writeFuns::write(ostr, binary, vertLabels); } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writePatchGeom.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/writePatchGeom.H index cc8f1250b8802844b90f6f2c0ac479f932e7ae88..02a4e73df9c5c6bad60327bf7211d9faab920881 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writePatchGeom.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writePatchGeom.H @@ -43,13 +43,13 @@ SourceFiles namespace Foam { -// Write lagrangian fields. +// Write patch geometry void writePatchGeom ( const bool binary, const faceList& faces, const pointField& points, - std::ofstream& pStream + std::ofstream& ); } // End namespace Foam diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writePointSet.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writePointSet.C index c810162a9c506d5471dcb487605e7a849314e46d..7426da7da0e20baf9f69e03ad0818be7b3703459 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writePointSet.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writePointSet.C @@ -42,21 +42,16 @@ void writePointSet const fileName& fileName ) { - std::ofstream pStream(fileName.c_str()); - - pStream - << "# vtk DataFile Version 2.0" << std::endl - << set.name() << std::endl; - if (binary) - { - pStream << "BINARY" << std::endl; - } - else - { - pStream << "ASCII" << std::endl; - } - pStream << "DATASET POLYDATA" << std::endl; + std::ofstream ostr(fileName.c_str()); + writeFuns::writeHeader + ( + ostr, + binary, + set.name() + ); + + ostr<< "DATASET POLYDATA" << std::endl; //------------------------------------------------------------------ // @@ -67,7 +62,7 @@ void writePointSet // Write points - pStream << "POINTS " << set.size() << " float" << std::endl; + ostr<< "POINTS " << set.size() << " float" << std::endl; DynamicList<floatScalar> ptField(3*set.size()); @@ -77,7 +72,7 @@ void writePointSet ptField ); - writeFuns::write(pStream, binary, ptField); + writeFuns::write(ostr, binary, ptField); //----------------------------------------------------------------- @@ -88,16 +83,16 @@ void writePointSet // Write faceID - pStream + ostr << "POINT_DATA " << set.size() << std::endl << "FIELD attributes 1" << std::endl; // Cell ids first - pStream << "pointID 1 " << set.size() << " int" << std::endl; + ostr<< "pointID 1 " << set.size() << " int" << std::endl; labelList pointIDs(set.toc()); - writeFuns::write(pStream, binary, pointIDs); + writeFuns::write(ostr, binary, pointIDs); } diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C index 70c9ed8ab10b11e82409f4eb896b6c0cdf135faf..302505f896086e88220fc56273b67181e05918db 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.C @@ -49,17 +49,13 @@ void writeSurfFields std::ofstream str(fileName.c_str()); - str << "# vtk DataFile Version 2.0" << std::endl - << "surfaceFields" << std::endl; + writeFuns::writeHeader + ( + str, + binary, + "surfaceFields" + ); - if (binary) - { - str << "BINARY" << std::endl; - } - else - { - str << "ASCII" << std::endl; - } str << "DATASET POLYDATA" << std::endl; const pointField& fc = mesh.faceCentres(); diff --git a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.H b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.H index b4055d98da49971f97ea28a7e37746f832deb627..18af5fa8b9b075c962ea0cd37e83ab4929b5f22c 100644 --- a/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.H +++ b/applications/utilities/postProcessing/dataConversion/foamToVTK/writeSurfFields.H @@ -44,7 +44,7 @@ SourceFiles namespace Foam { -// Write lagrangian fields. +// Write surface vector fields void writeSurfFields ( const bool binary, diff --git a/applications/utilities/postProcessing/foamCalc/foamCalcApp.C b/applications/utilities/postProcessing/foamCalc/foamCalcApp.C index 9661e4257b030438e37f6c79ab41fb4507fad0bc..85365b2a4398c5fef42722164bde426aafb43e14 100644 --- a/applications/utilities/postProcessing/foamCalc/foamCalcApp.C +++ b/applications/utilities/postProcessing/foamCalc/foamCalcApp.C @@ -51,7 +51,8 @@ int main(int argc, char *argv[]) Foam::argList::addOption ( "dict", - "dictionary name" + "name", + "dictionary to use" ); if (argc < 2) @@ -61,7 +62,7 @@ int main(int argc, char *argv[]) << exit(FatalError); } - word utilityName = argv[1]; + const word utilityName = argv[1]; Foam::autoPtr<Foam::calcType> utility ( diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx index b508d21ec0cd3a407f8e0bf21c53a98de26c2bf2..5198de5eb11d3e63bce269b022dc87093451a434 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.cxx @@ -39,14 +39,13 @@ License #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkStringArray.h" -// Foam includes +// OpenFOAM includes #include "vtkPV3Foam.H" #undef EXPERIMENTAL_TIME_CACHING // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -vtkCxxRevisionMacro(vtkPV3FoamReader, "$Revision: 1.5$"); vtkStandardNewMacro(vtkPV3FoamReader); @@ -414,7 +413,7 @@ int vtkPV3FoamReader::RequestData #endif - // Do any cleanup on the Foam side + // Do any cleanup on the OpenFOAM side foamData_->CleanUp(); return 1; diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h index b286aea477ef04474653748e27b7ef7930f7f4f6..dc91b2e27769ee02406e571406fe9d6c28d3e257 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/PV3FoamReader/vtkPV3FoamReader.h @@ -47,7 +47,7 @@ SourceFiles class vtkDataArraySelection; class vtkCallbackCommand; -// Foam forward declarations +// OpenFOAM forward declarations namespace Foam { class vtkPV3Foam; @@ -63,7 +63,7 @@ class VTK_IO_EXPORT vtkPV3FoamReader public vtkMultiBlockDataSetAlgorithm { public: - vtkTypeRevisionMacro(vtkPV3FoamReader,vtkMultiBlockDataSetAlgorithm); + vtkTypeMacro(vtkPV3FoamReader, vtkMultiBlockDataSetAlgorithm); void PrintSelf(ostream&, vtkIndent); static vtkPV3FoamReader* New(); @@ -78,16 +78,16 @@ public: vtkGetStringMacro(FileName); // Description: - // FOAM mesh caching control + // OpenFOAM mesh caching control vtkSetMacro(CacheMesh, int); vtkGetMacro(CacheMesh, int); // Description: - // FOAM refresh times/fields + // OpenFOAM refresh times/fields virtual void SetRefresh(int); // Description: - // FOAM Skip/include the 0/ time directory + // OpenFOAM skip/include the 0/ time directory vtkSetMacro(SkipZeroTime, int); vtkGetMacro(SkipZeroTime, int); @@ -97,27 +97,27 @@ public: vtkGetMacro(UpdateGUI, int); // Description: - // FOAM extrapolate internal values onto the patches + // OpenFOAM extrapolate internal values onto the patches vtkSetMacro(ExtrapolatePatches, int); vtkGetMacro(ExtrapolatePatches, int); // Description: - // FOAM use vtkPolyhedron instead of decomposing polyhedra + // OpenFOAM use vtkPolyhedron instead of decomposing polyhedra vtkSetMacro(UseVTKPolyhedron, int); vtkGetMacro(UseVTKPolyhedron, int); // Description: - // FOAM read sets control + // OpenFOAM read sets control virtual void SetIncludeSets(int); vtkGetMacro(IncludeSets, int); // Description: - // FOAM read zones control + // OpenFOAM read zones control virtual void SetIncludeZones(int); vtkGetMacro(IncludeZones, int); // Description: - // FOAM display patch names control + // OpenFOAM display patch names control virtual void SetShowPatchNames(int); vtkGetMacro(ShowPatchNames, int); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options index 48e0c4a9a3c1a97c99bbb69531d31fbe080b4659..b10a420add997d2d9c932f410b943ab5f8a907ed 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/Make/options @@ -1,10 +1,18 @@ +/* Note: enable vtkPolyhedron when available */ + +PARAVIEW_INC=$(ParaView_DIR)/include/paraview-$(ParaView_MAJOR) + EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I$(ParaView_DIR)/include/paraview-$(ParaView_MAJOR) \ -I../../vtkPV3Readers/lnInclude \ - -I../PV3FoamReader + -I../PV3FoamReader \ + -I$(PARAVIEW_INC) \ + $(shell \ + test -f $(PARAVIEW_INC)/vtkPolyhedron.h && \ + echo "-DHAS_VTK_POLYHEDRON" || echo "-UHAS_VTK_POLYHEDRON" \ + ) LIB_LIBS = \ -lvtkPV3Readers \ diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H index f518ecfaf3f972fde356803c67b31136f8e4086d..d6489ec11e21f4f50fc2dd53e53244b873f9b527 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkOpenFOAMPoints.H @@ -56,7 +56,7 @@ inline void vtkSetOpenFOAMPoint } -// Convert Foam mesh vertices to VTK +// Convert OpenFOAM mesh vertices to VTK inline vtkPoints* vtkSetOpenFOAMPoints(const Foam::pointField& points) { vtkPoints *vtkpoints = vtkPoints::New(); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C index c94572f729ad08b4063e2c4ca93a9bf39318b611..1a01cb6564099d38da952036d7a7e1816cc01452 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.C @@ -26,7 +26,7 @@ License #include "vtkPV3Foam.H" #include "vtkPV3FoamReader.h" -// Foam includes +// OpenFOAM includes #include "fvMesh.H" #include "Time.H" #include "patchZones.H" @@ -426,12 +426,12 @@ void Foam::vtkPV3Foam::updateFoamMesh() meshPtr_ = NULL; } - // Check to see if the FOAM mesh has been created + // Check to see if the OpenFOAM mesh has been created if (!meshPtr_) { if (debug) { - Info<< "Creating Foam mesh for region " << meshRegion_ + Info<< "Creating OpenFOAM mesh for region " << meshRegion_ << " at time=" << dbPtr_().timeName() << endl; @@ -454,7 +454,7 @@ void Foam::vtkPV3Foam::updateFoamMesh() { if (debug) { - Info<< "Using existing Foam mesh" << endl; + Info<< "Using existing OpenFOAM mesh" << endl; } } @@ -488,7 +488,7 @@ void Foam::vtkPV3Foam::Update reader_->UpdateProgress(0.15); - // Update the Foam mesh + // Update the OpenFOAM mesh updateFoamMesh(); reader_->UpdateProgress(0.4); @@ -527,6 +527,10 @@ void Foam::vtkPV3Foam::Update convertVolFields(output); convertPointFields(output); convertLagrangianFields(lagrangianOutput); + if (debug) + { + Info<< "done reader part" << endl; + } reader_->UpdateProgress(0.95); meshChanged_ = fieldsChanged_ = false; diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H index 7b874029d6175c599ec4cec6258093bcb9f14fd4..62e7d42ed1afde0ce79582714759eb5dbc0e8060 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3Foam.H @@ -89,7 +89,7 @@ class vtkIndent; namespace Foam { -// Foam class forward declarations +// OpenFOAM class forward declarations class argList; class Time; class fvMesh; @@ -249,10 +249,10 @@ class vtkPV3Foam //- Access to the controlling vtkPV3FoamReader vtkPV3FoamReader* reader_; - //- Foam time control + //- OpenFOAM time control autoPtr<Time> dbPtr_; - //- Foam mesh + //- OpenFOAM mesh fvMesh* meshPtr_; //- The mesh region @@ -384,7 +384,7 @@ class vtkPV3Foam // Update helper functions - //- Foam mesh + //- OpenFOAM mesh void updateFoamMesh(); //- Reduce memory footprint after conversion @@ -496,7 +496,7 @@ class vtkPV3Foam ); - // Convert Foam fields + // Convert OpenFOAM fields //- Volume fields - all types template<class Type> diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H index 451d08b65dc6c7089ea32dbc983a8c42b58bfaaa..6858a2ea73e6224582abdeceb51de5efec5fe888 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamAddToSelection.H @@ -26,7 +26,7 @@ License #ifndef vtkPV3FoamAddToSelection_H #define vtkPV3FoamAddToSelection_H -// FOAM includes +// OpenFOAM includes #include "IOobjectList.H" #include "SortableList.H" diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C index 3ede5b2f710bd4a7d39f99a4bf764793b1304a87..25e9582d6a231a26a1cba6a72b9557da0312e577 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamFields.C @@ -25,7 +25,7 @@ License #include "vtkPV3Foam.H" -// Foam includes +// OpenFOAM includes #include "IOobjectList.H" #include "vtkPV3FoamReader.h" @@ -94,7 +94,7 @@ void Foam::vtkPV3Foam::convertVolFields if (debug) { Info<< "<beg> Foam::vtkPV3Foam::convertVolFields" << nl - << "converting Foam volume fields" << endl; + << "converting OpenFOAM volume fields" << endl; forAllConstIter(IOobjectList, objects, iter) { Info<< " " << iter()->name() @@ -163,6 +163,10 @@ void Foam::vtkPV3Foam::convertPointFields if (selectedFields.empty()) { + if (debug) + { + Info<< "no point fields selected" << endl; + } return; } @@ -179,7 +183,7 @@ void Foam::vtkPV3Foam::convertPointFields if (debug) { Info<< "<beg> Foam::vtkPV3Foam::convertPointFields" << nl - << "converting Foam volume fields" << endl; + << "converting OpenFOAM volume fields -> point fields" << endl; forAllConstIter(IOobjectList, objects, iter) { Info<< " " << iter()->name() @@ -274,7 +278,7 @@ void Foam::vtkPV3Foam::convertLagrangianFields if (debug) { - Info<< "converting Foam lagrangian fields" << nl; + Info<< "converting OpenFOAM lagrangian fields" << nl; forAllConstIter(IOobjectList, objects, iter) { Info<< " " << iter()->name() diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C index 5442d468cf41584bbe8b6607ed775cd3d5c1ffe9..f68a207df1183850d1a9e2809d22f490f22f25d9 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMesh.C @@ -25,7 +25,7 @@ License #include "vtkPV3Foam.H" -// Foam includes +// OpenFOAM includes #include "cellSet.H" #include "faceSet.H" #include "pointSet.H" diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C index 9822282393d29c23f8ecad9a0681f9209511106b..2f0f4a2f4f36e051066fe223506d2db1cc89de44 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshLagrangian.C @@ -25,7 +25,7 @@ License #include "vtkPV3Foam.H" -// Foam includes +// OpenFOAM includes #include "Cloud.H" #include "fvMesh.H" #include "IOobjectList.H" diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C index e9da7f40705a70558c731dfb0a02a8a6d0e94c27..ea0ba18f47c2d06c917dd996304cb446b669ddb3 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshPatch.C @@ -25,7 +25,7 @@ License #include "vtkPV3Foam.H" -// Foam includes +// OpenFOAM includes #include "polyPatch.H" #include "primitivePatch.H" #include "vtkOpenFOAMPoints.H" @@ -47,7 +47,7 @@ vtkPolyData* Foam::vtkPV3Foam::patchVTKMesh(const polyPatch& p) printMemory(); } - // Convert Foam mesh vertices to VTK + // Convert OpenFOAM mesh vertices to VTK const Foam::pointField& points = p.localPoints(); vtkPoints* vtkpoints = vtkPoints::New(); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C index 3e9893b3778dde123f444e4a196c5c6b6d634667..7960c07dca12f1503413ae1030dbaff923ff115f 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshSet.C @@ -25,7 +25,7 @@ License #include "vtkPV3Foam.H" -// Foam includes +// OpenFOAM includes #include "faceSet.H" #include "pointSet.H" #include "vtkOpenFOAMPoints.H" @@ -65,7 +65,7 @@ vtkPolyData* Foam::vtkPV3Foam::faceSetVTKMesh // The balance of this routine should be identical to patchVTKMesh - // Convert Foam mesh vertices to VTK + // Convert OpenFOAM mesh vertices to VTK const pointField& points = p.localPoints(); vtkPoints* vtkpoints = vtkPoints::New(); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C index 855c0d2b3ed68ab7fe8ae1235b4f5b5c73094c9f..a9e39afbb7e179816c81cf6755a408d3d8c90675 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshVolume.C @@ -26,7 +26,7 @@ License #include "vtkPV3Foam.H" #include "vtkPV3FoamReader.h" -// Foam includes +// OpenFOAM includes #include "fvMesh.H" #include "cellModeller.H" #include "vtkOpenFOAMPoints.H" @@ -74,15 +74,15 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh labelList& superCells = decompInfo.superCells(); labelList& addPointCellLabels = decompInfo.addPointCellLabels(); - if (debug) - { - Info<< "... scanning" << endl; - } - // Scan for cells which need to be decomposed and count additional points // and cells if (!reader_->GetUseVTKPolyhedron()) { + if (debug) + { + Info<< "... scanning for polyhedra" << endl; + } + forAll(cellShapes, cellI) { const cellModel& model = cellShapes[cellI].model(); @@ -138,7 +138,7 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh Info<< "... converting points" << endl; } - // Convert Foam mesh vertices to VTK + // Convert OpenFOAM mesh vertices to VTK vtkPoints* vtkpoints = vtkPoints::New(); vtkpoints->Allocate(mesh.nPoints() + nAddPoints); @@ -164,6 +164,10 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh // data types - max 'order' = hex = 8 points vtkIdType nodeIds[8]; + // face-stream for a polyhedral cell + // [numFace0Pts, id1, id2, id3, numFace1Pts, id1, id2, id3, ...] + DynamicList<vtkIdType> faceStream(256); + forAll(cellShapes, cellI) { const cellShape& cellShape = cellShapes[cellI]; @@ -271,8 +275,8 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh // Polyhedral cell - use VTK_POLYHEDRON const labelList& cFaces = mesh.cells()[cellI]; +#ifdef HAS_VTK_POLYHEDRON vtkIdType nFaces = cFaces.size(); - vtkIdType nodeCount = 0; vtkIdType nLabels = nFaces; // count size for face stream @@ -282,61 +286,65 @@ vtkUnstructuredGrid* Foam::vtkPV3Foam::volumeVTKMesh nLabels += f.size(); } - // unique node ids - approximately equal to the number of point ids - DynamicList<vtkIdType> uniqueNodeIds(nLabels-nFaces); + // build face-stream + // [numFace0Pts, id1, id2, id3, numFace1Pts, id1, id2, id3, ...] + // point Ids are global + faceStream.clear(); + faceStream.reserve(nLabels + nFaces); - // zero-based index into uniqueNodeIds - DynamicList<vtkIdType> faceLabels(nLabels); - - // localized point id within the cell - Map<label> mapLocalId(2*nLabels); - - // establish the unique point ids, - // record the local mapping ids, - // create new face list forAll(cFaces, cFaceI) { const face& f = mesh.faces()[cFaces[cFaceI]]; + const bool isOwner = (owner[cFaces[cFaceI]] == cellI); const label nFacePoints = f.size(); // number of labels for this face - faceLabels.append(nFacePoints); + faceStream.append(nFacePoints); - forAll(f, fp) + if (isOwner) { - const label nodeId = f[fp]; - - if (mapLocalId.insert(nodeId, nodeCount)) + forAll(f, fp) { - // insertion was successful (node Id was unique) - uniqueNodeIds.append(nodeId); - // map orig vertex id -> localized point label - faceLabels.append(nodeCount); - ++nodeCount; + faceStream.append(f[fp]); } - else + } + else + { + // fairly immaterial if we reverse the list + // or use face::reverseFace() + forAllReverse(f, fp) { - // map orig vertex id -> localized point label - faceLabels.append(mapLocalId[nodeId]); + faceStream.append(f[fp]); } } } -#ifdef HAS_VTK_POLYHEDRON - vtkmesh->InsertNextCell - ( - VTK_POLYHEDRON, - nodeCount, - uniqueNodeIds.data(), - faceCount, - faceLabels.data() - ); + vtkmesh->InsertNextCell(VTK_POLYHEDRON, nFaces, faceStream.data()); #else + // this is a horrible substitute + // but avoids crashes when there is no vtkPolyhedron support + + // establish unique node ids used + HashSet<vtkIdType, Hash<label> > hashUniqId(2*256); + + forAll(cFaces, cFaceI) + { + const face& f = mesh.faces()[cFaces[cFaceI]]; + + forAll(f, fp) + { + hashUniqId.insert(f[fp]); + } + } + + // use face stream to store unique node ids: + faceStream = hashUniqId.sortedToc(); + vtkmesh->InsertNextCell ( VTK_CONVEX_POINT_SET, - nodeCount, - uniqueNodeIds.data() + vtkIdType(faceStream.size()), + faceStream.data() ); #endif } diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C index c4bb977fb75192164609d4d7878adad62a0c4f1e..0f47f53d7e37c735b49ef4131e6ab8e668d6e309 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamMeshZone.C @@ -25,7 +25,7 @@ License #include "vtkPV3Foam.H" -// Foam includes +// OpenFOAM includes #include "vtkOpenFOAMPoints.H" // VTK includes @@ -62,7 +62,7 @@ vtkPolyData* Foam::vtkPV3Foam::faceZoneVTKMesh // The balance of this routine should be identical to patchVTKMesh - // Convert Foam mesh vertices to VTK + // Convert OpenFOAM mesh vertices to VTK const pointField& points = p.localPoints(); vtkPoints* vtkpoints = vtkPoints::New(); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H index 0ca9092af9893abe27b89cc3ef76c0e7ad2d9ea7..a243d81a7cc8ad9e4d72928fc97799acbb48d12f 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamPointFields.H @@ -29,7 +29,7 @@ InClass #ifndef vtkPV3FoamPointFields_H #define vtkPV3FoamPointFields_H -// Foam includes +// OpenFOAM includes #include "interpolatePointToCell.H" #include "vtkOpenFOAMTupleRemap.H" diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C index 8f610a283f73ad39b25d9b3e1e6ae8ca00c55ded..dcc1b962bb0d5f6fad7694110bada069dfcacbab 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUpdateInfo.C @@ -25,7 +25,7 @@ License #include "vtkPV3Foam.H" -// Foam includes +// OpenFOAM includes #include "cellSet.H" #include "faceSet.H" #include "pointSet.H" diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C index 01d87a4f14b5db799557b189fd0b3e1e711cbcc7..673aeccffd2f7debe0f28fc380a0e0f250fc7562 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamUtils.C @@ -29,7 +29,7 @@ Description #include "vtkPV3Foam.H" #include "vtkPV3FoamReader.h" -// Foam includes +// OpenFOAM includes #include "fvMesh.H" #include "Time.H" #include "IFstream.H" @@ -63,7 +63,7 @@ namespace Foam } } - //! @endcond fileScope + //! @endcond } // End namespace Foam diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H index f4a328916d61369c4039b5903db816bc89c6b531..cad7ffb0114a5f004f64a7227169a95f6043ffe6 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3FoamReader/vtkPV3Foam/vtkPV3FoamVolFields.H @@ -29,7 +29,7 @@ InClass #ifndef vtkPV3FoamVolFields_H #define vtkPV3FoamVolFields_H -// Foam includes +// OpenFOAM includes #include "emptyFvPatchField.H" #include "wallPolyPatch.H" #include "faceSet.H" diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx index 547c4ff66b57adeb79b7b28cd09c72fb19f2cf20..5deee083ae2a6f55bc8fc2386e133cc6f692a77f 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.cxx @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -39,12 +39,11 @@ License #include "vtkStreamingDemandDrivenPipeline.h" #include "vtkStringArray.h" -// Foam includes +// OpenFOAM includes #include "vtkPV3blockMesh.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -vtkCxxRevisionMacro(vtkPV3blockMeshReader, "$Revision:$"); vtkStandardNewMacro(vtkPV3blockMeshReader); @@ -227,7 +226,7 @@ int vtkPV3blockMeshReader::RequestData foamData_->Update(output); updatePointNumbersView(ShowPointNumbers); - // Do any cleanup on the Foam side + // Do any cleanup on the OpenFOAM side foamData_->CleanUp(); return 1; diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.h b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.h index b41f49c8d7568ad7de854d89c9b138ce1d77a1ce..0a2f251b770ab4d818307f355175431136cd950b 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.h +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/PV3blockMeshReader/vtkPV3blockMeshReader.h @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2009-2009 OpenCFD Ltd. + \\ / A nd | Copyright (C) 2009-2010 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,7 +61,7 @@ class VTK_IO_EXPORT vtkPV3blockMeshReader public vtkMultiBlockDataSetAlgorithm { public: - vtkTypeRevisionMacro(vtkPV3blockMeshReader,vtkMultiBlockDataSetAlgorithm); + vtkTypeMacro(vtkPV3blockMeshReader, vtkMultiBlockDataSetAlgorithm); void PrintSelf(ostream&, vtkIndent); static vtkPV3blockMeshReader* New(); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C index 4460ce2ab16e3d251402d518292bd71daa91072f..a7483a210c0e735b6c37edb56842588c1c789786 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.C @@ -26,7 +26,7 @@ License #include "vtkPV3blockMesh.H" #include "vtkPV3blockMeshReader.h" -// Foam includes +// OpenFOAM includes #include "blockMesh.H" #include "Time.H" #include "patchZones.H" @@ -298,7 +298,7 @@ void Foam::vtkPV3blockMesh::updateFoamMesh() Info<< "<beg> Foam::vtkPV3blockMesh::updateFoamMesh" << endl; } - // Check to see if the FOAM mesh has been created + // Check to see if the OpenFOAM mesh has been created if (!meshPtr_) { if (debug) @@ -347,7 +347,7 @@ void Foam::vtkPV3blockMesh::Update reader_->UpdateProgress(0.2); - // Update the Foam mesh + // Update the OpenFOAM mesh updateFoamMesh(); reader_->UpdateProgress(0.5); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.H b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.H index aac26fdd3597dc671d3e046fece7061427e34cde..2efb067cd72c7e47054b4fe8c15497e2a5136e9d 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.H +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMesh.H @@ -71,7 +71,7 @@ class vtkIndent; namespace Foam { -// Foam class forward declarations +// OpenFOAM class forward declarations class argList; class Time; class blockMesh; @@ -167,10 +167,10 @@ class vtkPV3blockMesh //- Access to the controlling vtkPV3blockMeshReader vtkPV3blockMeshReader* reader_; - //- Foam time control + //- OpenFOAM time control autoPtr<Time> dbPtr_; - //- Foam mesh + //- OpenFOAM mesh blockMesh* meshPtr_; //- Selected geometrical parts @@ -242,7 +242,7 @@ class vtkPV3blockMesh // Update helper functions - //- Foam mesh + //- OpenFOAM mesh void updateFoamMesh(); // Mesh conversion functions diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C index 71e277d53451ec81717d257ac6bbe51fc70169ca..dd038d13ad9555a7b967b9301c795c54d4c9038a 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshConvert.C @@ -26,7 +26,7 @@ License #include "vtkPV3blockMesh.H" #include "vtkPV3blockMeshReader.h" -// Foam includes +// OpenFOAM includes #include "blockMesh.H" #include "Time.H" @@ -81,7 +81,7 @@ void Foam::vtkPV3blockMesh::convertMeshBlocks vtkUnstructuredGrid* vtkmesh = vtkUnstructuredGrid::New(); - // Convert Foam mesh vertices to VTK + // Convert OpenFOAM mesh vertices to VTK vtkPoints *vtkpoints = vtkPoints::New(); vtkpoints->Allocate( blockDef.nPoints() ); const labelList& blockLabels = blockDef.blockShape(); diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshUtils.C b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshUtils.C index 0c48ff63b2058f3ab9a5dd41936c4ce5db4310ca..10ea16f1724f400b6d9e9864b3a2739c0f319a3a 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshUtils.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/PV3blockMeshReader/vtkPV3blockMesh/vtkPV3blockMeshUtils.C @@ -58,7 +58,7 @@ namespace Foam } } - //! @endcond fileScope + //! @endcond } // End namespace Foam diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.C b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.C index 4dcb2aee93affe8b9e85e5d4a2ea27993d9628e0..d4baaa10b609354ba1318c5210413529bb24d03f 100644 --- a/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.C +++ b/applications/utilities/postProcessing/graphics/PV3Readers/vtkPV3Readers/vtkPV3Readers.C @@ -28,7 +28,7 @@ Description #include "vtkPV3Readers.H" -// Foam includes +// OpenFOAM includes #include "IFstream.H" // VTK includes @@ -64,7 +64,7 @@ namespace Foam } } - //! @endcond fileScope + //! @endcond } // End namespace Foam diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_variable_info.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_variable_info.H index 91c205b0b5b60cc852c45c8e163b64c77c1c7512..1bf375cad76980e7dd69ff23f5f4648d7e649fb8 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_variable_info.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_gold_variable_info.H @@ -95,7 +95,7 @@ int USERD_get_gold_variable_info ); } - for (label n=0; n<lagrangianVectorNames.size(); n++) + forAll(lagrangianVectorNames, n) { var_type[offset + Ns + n] = Z_VECTOR; var_classify[offset + Ns + n] = Z_PER_ELEM; diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_element_ids_by_type.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_element_ids_by_type.H index 4b82c06f33a1d54c328d0defa88296f52902aae8..06759502390d76dd6fe4d5f8bc6a9db33b145cf9 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_element_ids_by_type.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_element_ids_by_type.H @@ -144,7 +144,7 @@ int USERD_get_part_element_ids_by_type } else if (part_number == nPatches+2) { - for (label n=0; n<sprayPtr->size(); n++) + forAll(*sprayPtr, n) { elemid_array[n] = n + 1; } diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H index d90f3643fc7aa8d4de4e143f265f49fafe855e1a..c9fd0d389ffc43c211a01bb936eba0791cb8b2a0 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_get_part_elements_by_type.H @@ -234,7 +234,7 @@ int USERD_get_part_elements_by_type } else if (part_number == nPatches+2) { - for (label n=0; n<sprayPtr->size(); n++) + forAll(*sprayPtr, n) { conn_array[n][0] = n + 1; } diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H index ccaad12cb3af8febdbfd6c759b5ae5b6efe8e4d8..a85c942a085204d029891f0b5af0f37d82dbee3b 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/USERD_set_filenames.H @@ -99,7 +99,7 @@ int USERD_set_filenames label nVar = 0; wordList scalars = objects.names(scalarName); - for (label n=0; n<fieldNames.size(); n++) + forAll(fieldNames, n) { bool isitScalar = false; forAll(scalars,i) @@ -115,7 +115,7 @@ int USERD_set_filenames wordList vectors = objects.names(vectorName); - for (label n=0; n<fieldNames.size(); n++) + forAll(fieldNames, n) { bool isitVector = false; forAll(vectors,i) @@ -131,7 +131,7 @@ int USERD_set_filenames wordList tensors = objects.names(tensorName); - for (label n=0; n<fieldNames.size(); n++) + forAll(fieldNames, n) { bool isitTensor = false; forAll(tensors,i) diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianScalar.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianScalar.H index 3c1d5f84cb8a8211d7621986b439fb37167c013a..dd20ba0db8c765b6f5e85d3ff55cad9e755c60c6 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianScalar.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianScalar.H @@ -21,7 +21,7 @@ if (nVar >= 0) if (s.size()) { - for (label n = 0; n < s.size(); n++) + forAll(s, n) { var_array[n+1] = s[n]; } diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H index c6548c1408279dce2d0e92c827b814caab09d51c..31e4bc729c93dfaa5d2fabe2229cacc3c783b097 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/getLagrangianVector.H @@ -22,7 +22,7 @@ if (nVar >= 0) if (v.size()) { - for (label n = 0; n < v.size(); n++) + forAll(v, n) { if (component == 0) { diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldScalar.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldScalar.H index 0c91c665e60beeef1f8fc679f7c739950be108a3..46f4f46d8d3d719724c1f0ca1f0a191aecc19ae8 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldScalar.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldScalar.H @@ -39,7 +39,7 @@ const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh(); if (which_type == Z_TRI03) { label counter = 1; - for (label facei=0; facei<sfb.size(); facei++) + forAll(sfb, facei) { label nPoints = bMesh[patchi][facei].size(); if (nPoints == 3) @@ -52,7 +52,7 @@ if (which_type == Z_TRI03) if (which_type == Z_QUA04) { label counter = 1; - for (label facei=0; facei<sfb.size(); facei++) + forAll(sfb, facei) { label nPoints = bMesh[patchi][facei].size(); if (nPoints == 4) @@ -65,10 +65,10 @@ if (which_type == Z_QUA04) if (which_type == Z_NSIDED) { label counter = 1; - for (label facei=0; facei<sfb.size(); facei++) + forAll(sfb, facei) { label nPoints = bMesh[patchi][facei].size(); - if ((nPoints != 3) && (nPoints != 4)) + if (nPoints != 3 && nPoints != 4) { var_array[counter++] = sfb[facei]; } diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldTensor.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldTensor.H index 81f0bbfad6d12d17d52fa4a86c2fc163e3f4c3bb..67e68359a6ed320eb739655541c90cbe8cbfa8ec 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldTensor.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldTensor.H @@ -39,7 +39,7 @@ const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh(); if (which_type == Z_TRI03) { label counter = 1; - for (label n=0; n<tf.size(); n++) + forAll(tf, n) { label nPoints = bMesh[patchi][n].size(); if (nPoints == 3) @@ -52,7 +52,7 @@ if (which_type == Z_TRI03) if (which_type == Z_QUA04) { label counter = 1; - for (label n=0; n<tf.size(); n++) + forAll(tf, n) { label nPoints = bMesh[patchi][n].size(); if (nPoints == 4) @@ -65,7 +65,7 @@ if (which_type == Z_QUA04) if (which_type == Z_NSIDED) { label counter = 1; - for (label n=0; n<tf.size(); n++) + forAll(tf, n) { label nPoints = bMesh[patchi][n].size(); if ((nPoints != 3) && (nPoints != 4)) diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldVector.H b/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldVector.H index a33781d6d67b627cbe1ae4d6d7f13f9d8c74b87a..fa8441bb5f6b4c60aebc289b4d71cf88c4527728 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldVector.H +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/getPatchFieldVector.H @@ -39,7 +39,7 @@ const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh(); if (which_type == Z_TRI03) { label counter = 1; - for (label facei=0; facei<sfb.size(); facei++) + forAll(sfb, facei) { label nPoints = bMesh[patchi][facei].size(); if (nPoints == 3) @@ -52,7 +52,7 @@ if (which_type == Z_TRI03) if (which_type == Z_QUA04) { label counter = 1; - for (label facei=0; facei<sfb.size(); facei++) + forAll(sfb, facei) { label nPoints = bMesh[patchi][facei].size(); if (nPoints == 4) @@ -65,7 +65,7 @@ if (which_type == Z_QUA04) if (which_type == Z_NSIDED) { label counter = 1; - for (label facei=0; facei<sfb.size(); facei++) + forAll(sfb, facei) { label nPoints = bMesh[patchi][facei].size(); if ((nPoints != 3) && (nPoints != 4)) diff --git a/applications/utilities/postProcessing/graphics/ensightFoamReader/libuserd.C b/applications/utilities/postProcessing/graphics/ensightFoamReader/libuserd.C index e8e44ac74f70505efcf0162d5c454112a63b3556..f81925bb728fdada6ffac08e2d5d4c04f3d02bd8 100644 --- a/applications/utilities/postProcessing/graphics/ensightFoamReader/libuserd.C +++ b/applications/utilities/postProcessing/graphics/ensightFoamReader/libuserd.C @@ -73,7 +73,7 @@ extern "C" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // // slightly changed with 2.0 from 1.0 -// (to handle complex variables - not used by FOAM anyway) +// (to handle complex variables - not used by OpenFOAM anyway) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #include "USERD_get_constant_val.H" diff --git a/applications/utilities/postProcessing/graphics/fieldview9Reader/fieldview9Reader.C b/applications/utilities/postProcessing/graphics/fieldview9Reader/fieldview9Reader.C index a2bebe924c7c94601adf397322694517a2ee7d1b..230ffd79e04bae28217cd4365e0cdd725eeb6b5c 100644 --- a/applications/utilities/postProcessing/graphics/fieldview9Reader/fieldview9Reader.C +++ b/applications/utilities/postProcessing/graphics/fieldview9Reader/fieldview9Reader.C @@ -117,7 +117,7 @@ void register_functions() // -// Storage for all Foam state (mainly database & mesh) +// Storage for all OpenFOAM state (mainly database & mesh) // static readerDatabase db_; @@ -521,7 +521,7 @@ void user_query_file_function ( "Could not find system/ and constant/ directory in\n" + rootAndCase - + "\nPlease select a Foam case directory." + + "\nPlease select an OpenFOAM case directory." ); *iret = 1; diff --git a/applications/utilities/postProcessing/graphics/fieldview9Reader/readerDatabase.H b/applications/utilities/postProcessing/graphics/fieldview9Reader/readerDatabase.H index 211c78b39e7a87f89c2cb4b71a2defd6e2de8c5f..14fc9d4ced11af0c1a21ff878d5c1f6ffdf0daac 100644 --- a/applications/utilities/postProcessing/graphics/fieldview9Reader/readerDatabase.H +++ b/applications/utilities/postProcessing/graphics/fieldview9Reader/readerDatabase.H @@ -25,7 +25,7 @@ Class Foam::readerDatabase Description - Singleton caching Foam database and mesh and various. Used in Fv reader + Singleton caching OpenFOAM database and mesh and various. Used in Fv reader to keep track of data inbetween callbacks. SourceFiles diff --git a/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H index aef0139de1db22ae157c16f641ec0b2e54947d47..61c126e492a51ed4773ad6009bba9d04ce0a4884 100644 --- a/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H +++ b/applications/utilities/postProcessing/lagrangian/particleTracks/createFields.H @@ -9,7 +9,7 @@ IOdictionary propsDict ) ); -word cloudName(propsDict.lookup("cloudName")); +const word cloudName(propsDict.lookup("cloudName")); label sampleFrequency(readLabel(propsDict.lookup("sampleFrequency"))); diff --git a/applications/utilities/postProcessing/miscellaneous/foamListTimes/foamListTimes.C b/applications/utilities/postProcessing/miscellaneous/foamListTimes/foamListTimes.C index 73a21450cb8221d7ea8fa19bcacde8939fc38ad5..73fa1c803f52bcc853709d3a46a4c5f8b978e035 100644 --- a/applications/utilities/postProcessing/miscellaneous/foamListTimes/foamListTimes.C +++ b/applications/utilities/postProcessing/miscellaneous/foamListTimes/foamListTimes.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 @@ -32,7 +32,7 @@ Usage - foamListTimes [OPTION] @param -processor \n - List times from processor0 directory + List times from processor0/ directory \*---------------------------------------------------------------------------*/ @@ -46,11 +46,19 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "list times using timeSelector" + ); + timeSelector::addOptions(); // -constant enabled argList::noBanner(); argList::noParallel(); - argList::addBoolOption("processor"); - + argList::addBoolOption + ( + "processor", + "list times from processor0/ directory" + ); # include "setRootCase.H" label nProcs = 0; diff --git a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C index 28fd075179a80ab1062ab2a81086dd2e82599865..009e28329e39fb75517a2ba1c204285b44955904 100644 --- a/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C +++ b/applications/utilities/postProcessing/miscellaneous/postChannel/channelIndex.C @@ -236,7 +236,7 @@ Foam::channelIndex::channelIndex forAll(patchNames, i) { - label patchI = patches.findPatchID(patchNames[i]); + const label patchI = patches.findPatchID(patchNames[i]); if (patchI == -1) { @@ -254,7 +254,7 @@ Foam::channelIndex::channelIndex forAll(patchNames, i) { - const polyPatch& pp = patches[patches.findPatchID(patchNames[i])]; + const polyPatch& pp = patches[patchNames[i]]; forAll(pp, j) { diff --git a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C index 2875818005b4945449d332158d9efa8f9c546a39..55c6ae29633184352f79ee5ce75715f6e192c1bd 100644 --- a/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C +++ b/applications/utilities/postProcessing/patch/patchAverage/patchAverage.C @@ -65,8 +65,8 @@ int main(int argc, char *argv[]) { mesh.readUpdate(); - label patchi = mesh.boundaryMesh().findPatchID(patchName); - if (patchi < 0) + const label patchI = mesh.boundaryMesh().findPatchID(patchName); + if (patchI < 0) { FatalError << "Unable to find patch " << patchName << nl @@ -78,20 +78,20 @@ int main(int argc, char *argv[]) Info<< " Reading volScalarField " << fieldName << endl; volScalarField field(fieldHeader, mesh); - scalar area = gSum(mesh.magSf().boundaryField()[patchi]); + scalar area = gSum(mesh.magSf().boundaryField()[patchI]); scalar sumField = 0; if (area > 0) { sumField = gSum ( - mesh.magSf().boundaryField()[patchi] - * field.boundaryField()[patchi] + mesh.magSf().boundaryField()[patchI] + * field.boundaryField()[patchI] ) / area; } Info<< " Average of " << fieldName << " over patch " - << patchName << '[' << patchi << ']' << " = " + << patchName << '[' << patchI << ']' << " = " << sumField << endl; } else diff --git a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C index 06eef0339c5606f85b157dd94cd9532d1000ca42..9dbe43a8b3ec07e5069e92c26776908fa74a1081 100644 --- a/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C +++ b/applications/utilities/postProcessing/patch/patchIntegrate/patchIntegrate.C @@ -67,8 +67,8 @@ int main(int argc, char *argv[]) { mesh.readUpdate(); - label patchi = mesh.boundaryMesh().findPatchID(patchName); - if (patchi < 0) + const label patchI = mesh.boundaryMesh().findPatchID(patchName); + if (patchI < 0) { FatalError << "Unable to find patch " << patchName << nl @@ -76,16 +76,16 @@ int main(int argc, char *argv[]) } // Give patch area - if (isA<cyclicPolyPatch>(mesh.boundaryMesh()[patchi])) + if (isA<cyclicPolyPatch>(mesh.boundaryMesh()[patchI])) { Info<< " Cyclic patch vector area: " << nl; - label nFaces = mesh.boundaryMesh()[patchi].size(); + label nFaces = mesh.boundaryMesh()[patchI].size(); vector sum1 = vector::zero; vector sum2 = vector::zero; for (label i=0; i<nFaces/2; i++) { - sum1 += mesh.Sf().boundaryField()[patchi][i]; - sum2 += mesh.Sf().boundaryField()[patchi][i+nFaces/2]; + sum1 += mesh.Sf().boundaryField()[patchI][i]; + sum2 += mesh.Sf().boundaryField()[patchI][i+nFaces/2]; } reduce(sum1, sumOp<vector>()); reduce(sum2, sumOp<vector>()); @@ -94,16 +94,16 @@ int main(int argc, char *argv[]) << " - total = " << (sum1 + sum2) << ", " << mag(sum1 + sum2) << endl; Info<< " Cyclic patch area magnitude = " - << gSum(mesh.magSf().boundaryField()[patchi])/2.0 << endl; + << gSum(mesh.magSf().boundaryField()[patchI])/2.0 << endl; } else { Info<< " Area vector of patch " - << patchName << '[' << patchi << ']' << " = " - << gSum(mesh.Sf().boundaryField()[patchi]) << endl; + << patchName << '[' << patchI << ']' << " = " + << gSum(mesh.Sf().boundaryField()[patchI]) << endl; Info<< " Area magnitude of patch " - << patchName << '[' << patchi << ']' << " = " - << gSum(mesh.magSf().boundaryField()[patchi]) << endl; + << patchName << '[' << patchI << ']' << " = " + << gSum(mesh.magSf().boundaryField()[patchI]) << endl; } // Read field and calc integral @@ -116,21 +116,21 @@ int main(int argc, char *argv[]) Info<< " Integral of " << fieldName << " over vector area of patch " - << patchName << '[' << patchi << ']' << " = " + << patchName << '[' << patchI << ']' << " = " << gSum ( - mesh.Sf().boundaryField()[patchi] - *field.boundaryField()[patchi] + mesh.Sf().boundaryField()[patchI] + *field.boundaryField()[patchI] ) << nl; Info<< " Integral of " << fieldName << " over area magnitude of patch " - << patchName << '[' << patchi << ']' << " = " + << patchName << '[' << patchI << ']' << " = " << gSum ( - mesh.magSf().boundaryField()[patchi] - *field.boundaryField()[patchi] + mesh.magSf().boundaryField()[patchI] + *field.boundaryField()[patchI] ) << nl; } @@ -143,10 +143,10 @@ int main(int argc, char *argv[]) << fieldName << endl; surfaceScalarField field(fieldHeader, mesh); - scalar sumField = gSum(field.boundaryField()[patchi]); + scalar sumField = gSum(field.boundaryField()[patchI]); Info<< " Integral of " << fieldName << " over patch " - << patchName << '[' << patchi << ']' << " = " + << patchName << '[' << patchI << ']' << " = " << sumField << nl; } else diff --git a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C index bc8083bc948566c29e6e698d47206167629514c6..bb3216333f64b12c94773c893edd427439587d21 100644 --- a/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C +++ b/applications/utilities/postProcessing/wall/yPlusRAS/yPlusRAS.C @@ -28,8 +28,8 @@ Description Calculates and reports yPlus for all wall patches, for the specified times when using RAS turbulence models. - Default behaviour assumes operating in incompressible mode. To apply to - compressible RAS cases, use the -compressible option. + Default behaviour assumes operating in incompressible mode. + Use the -compressible option for compressible RAS cases. \*---------------------------------------------------------------------------*/ @@ -185,14 +185,18 @@ int main(int argc, char *argv[]) #include "addRegionOption.H" - argList::addBoolOption("compressible"); + argList::addBoolOption + ( + "compressible", + "calculate compressible y+" + ); #include "setRootCase.H" #include "createTime.H" instantList timeDirs = timeSelector::select0(runTime, args); #include "createNamedMesh.H" - bool compressible = args.optionFound("compressible"); + const bool compressible = args.optionFound("compressible"); forAll(timeDirs, timeI) { @@ -205,8 +209,7 @@ int main(int argc, char *argv[]) { Info<< "Calculating wall distance\n" << endl; wallDist y(mesh, true); - Info<< "Writing wall distance to field " - << y.name() << nl << endl; + Info<< "Writing wall distance to field " << y.name() << nl << endl; y.write(); } diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C index 6d1efa3a1df9d72f44efacd698db1bf59a4a135a..13bc8f747635c5e95e66dfdb9bdf109cea4f367a 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C +++ b/applications/utilities/preProcessing/applyBoundaryLayer/applyBoundaryLayer.C @@ -49,9 +49,28 @@ static const scalar kappa(0.41); int main(int argc, char *argv[]) { - argList::addOption("ybl", "scalar"); - argList::addOption("Cbl", "scalar"); - argList::addBoolOption("writenut"); + argList::addNote + ( + "apply a simplified boundary-layer model to the velocity and\n" + "turbulence fields based on the 1/7th power-law." + ); + + argList::addOption + ( + "ybl", + "scalar", + "specify the boundary-layer thickness" + ); + argList::addOption + ( + "Cbl", "scalar", + "boundary-layer thickness as Cbl * mean distance to wall" + ); + argList::addBoolOption + ( + "writenut", + "write nut field" + ); #include "setRootCase.H" #include "createTime.H" diff --git a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H index 00e8b413ae70cbf9d43e71ae53bb59acba75511e..2c12ed376d75b8a79083b151990f034a548920d9 100644 --- a/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H +++ b/applications/utilities/preProcessing/applyBoundaryLayer/createFields.H @@ -60,7 +60,7 @@ License else if (args.optionFound("Cbl")) { // Calculate boundary layer thickness as Cbl * mean distance to wall - ybl.value() = gAverage(y)*args.optionRead<scalar>("Cbl"); + ybl.value() = gAverage(y) * args.optionRead<scalar>("Cbl"); } else { diff --git a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C index 28dc3add1b187460e06d13412a627c7e3f4b471c..4023a6d17ea2f708bb4b7efcf532a03a4038d8b4 100644 --- a/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C +++ b/applications/utilities/preProcessing/applyWallFunctionBoundaryConditions/applyWallFunctionBoundaryConditions.C @@ -333,13 +333,17 @@ void updateIncompressibleCase(const fvMesh& mesh) int main(int argc, char *argv[]) { #include "addTimeOptions.H" - argList::addBoolOption("compressible"); + argList::addBoolOption + ( + "compressible", + "force use of compressible wall functions. default is auto-detect." + ); #include "setRootCase.H" #include "createTime.H" #include "createMesh.H" - bool compressible = args.optionFound("compressible"); + const bool compressible = args.optionFound("compressible"); Info<< "Updating turbulence fields to operate using new run time " << "selectable" << nl << "wall functions" diff --git a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C index 9f2643907692932e139275c9b031b7ef8afcae26..69a201e5587301b0e97712e0f7e0ca020851b690 100644 --- a/applications/utilities/preProcessing/changeDictionary/changeDictionary.C +++ b/applications/utilities/preProcessing/changeDictionary/changeDictionary.C @@ -244,15 +244,24 @@ bool merge int main(int argc, char *argv[]) { - argList::addOption("instance", "instance"); - argList::addBoolOption("literalRE"); + argList::addOption + ( + "instance", + "name", + "specify alternate time instance - default is latest time" + ); + argList::addBoolOption + ( + "literalRE", + "treat regular expressions literally (ie, as a keyword)" + ); #include "addRegionOption.H" #include "setRootCase.H" #include "createTime.H" #include "createNamedMesh.H" - bool literalRE = args.optionFound("literalRE"); + const bool literalRE = args.optionFound("literalRE"); if (literalRE) { diff --git a/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C b/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C index 5d2601663107a91cae8bcd7932ccff0fc684e9c1..0cdf0cbe7755184df383ded8e15fdfddf5b92a9f 100644 --- a/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C +++ b/applications/utilities/preProcessing/foamUpgradeFvSolution/foamUpgradeFvSolution.C @@ -48,8 +48,17 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "upgrade the syntax of system/fvSolution::solvers" + ); + argList::noParallel(); - argList::addBoolOption("test"); + argList::addBoolOption + ( + "test", + "suppress writing the updated system/fvSolution file" + ); # include "setRootCase.H" # include "createTime.H" @@ -89,7 +98,6 @@ int main(int argc, char *argv[]) << (solutionDict.objectPath() + ".old") << nl; } - solutionDict.writeObject ( IOstream::ASCII, diff --git a/applications/utilities/preProcessing/mapFields/mapFields.C b/applications/utilities/preProcessing/mapFields/mapFields.C index 649f4bbafe6c43d4d0511d75467eda513d61ad50..72dae9f8389fd6829333772e078bd63225d97def 100644 --- a/applications/utilities/preProcessing/mapFields/mapFields.C +++ b/applications/utilities/preProcessing/mapFields/mapFields.C @@ -227,7 +227,56 @@ wordList addProcessorPatches int main(int argc, char *argv[]) { - #include "setRoots.H" + argList::addNote + ( + "map volume fields from one mesh to another" + ); + argList::noParallel(); + argList::validArgs.append("sourceCase"); + + argList::addOption + ( + "sourceTime", + "scalar", + "specify the source time" + ); + argList::addBoolOption + ( + "parallelSource", + "the source is decomposed" + ); + argList::addBoolOption + ( + "parallelTarget", + "the target is decomposed" + ); + argList::addBoolOption + ( + "consistent", + "source and target geometry and boundary conditions identical" + ); + + argList args(argc, argv); + + if (!args.check()) + { + FatalError.exit(); + } + + fileName rootDirTarget(args.rootPath()); + fileName caseDirTarget(args.globalCaseName()); + + const fileName casePath = args[1]; + const fileName rootDirSource = casePath.path(); + const fileName caseDirSource = casePath.name(); + + Info<< "Source: " << rootDirSource << " " << caseDirSource << nl + << "Target: " << rootDirTarget << " " << caseDirTarget << endl; + + const bool parallelSource = args.optionFound("parallelSource"); + const bool parallelTarget = args.optionFound("parallelTarget"); + const bool consistent = args.optionFound("consistent"); + #include "createTimes.H" HashTable<word> patchMap; @@ -249,7 +298,6 @@ int main(int argc, char *argv[]) ); mapFieldsDict.lookup("patchMap") >> patchMap; - mapFieldsDict.lookup("cuttingPatches") >> cuttingPatches; } diff --git a/applications/utilities/preProcessing/mapFields/setRoots.H b/applications/utilities/preProcessing/mapFields/setRoots.H deleted file mode 100644 index d7651306b463bf5f2cbcca41d425dd3bb254c266..0000000000000000000000000000000000000000 --- a/applications/utilities/preProcessing/mapFields/setRoots.H +++ /dev/null @@ -1,30 +0,0 @@ - argList::noParallel(); - argList::validArgs.clear(); - argList::validArgs.append("source dir"); - - argList::addOption("sourceTime", "scalar"); - argList::addBoolOption("parallelSource"); - argList::addBoolOption("parallelTarget"); - argList::addBoolOption("consistent"); - - argList args(argc, argv); - - if (!args.check()) - { - FatalError.exit(); - } - - fileName rootDirTarget(args.rootPath()); - fileName caseDirTarget(args.globalCaseName()); - - const fileName casePath = args[1]; - const fileName rootDirSource = casePath.path(); - const fileName caseDirSource = casePath.name(); - - Info<< "Source: " << rootDirSource << " " << caseDirSource << nl - << "Target: " << rootDirTarget << " " << caseDirTarget << endl; - - const bool parallelSource = args.optionFound("parallelSource"); - const bool parallelTarget = args.optionFound("parallelTarget"); - const bool consistent = args.optionFound("consistent"); - diff --git a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/SpaldingsLaw/SpaldingsLaw.C b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/SpaldingsLaw/SpaldingsLaw.C index 2b45b23461031fccd3cfb19620990850d4d500ed..79a68d93f7b6d68158a06ca1d9d1dae9fb00619f 100644 --- a/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/SpaldingsLaw/SpaldingsLaw.C +++ b/applications/utilities/preProcessing/wallFunctionTable/tabulatedWallFunction/SpaldingsLaw/SpaldingsLaw.C @@ -57,7 +57,7 @@ void Foam::tabulatedWallFunctions::SpaldingsLaw::invertFunction() scalar uPlus = 1; // Populate the table - for (label i=0; i<invertedTable_.size(); i++) + forAll(invertedTable_, i) { if (invertedTable_.log10()) { diff --git a/applications/utilities/surface/surfaceAdd/surfaceAdd.C b/applications/utilities/surface/surfaceAdd/surfaceAdd.C index 775ccaa3fd5394c64ad82c337c90d15b8b08b62f..2c6d1509d9f1b0f6442f383d777780eada7f0e80 100644 --- a/applications/utilities/surface/surfaceAdd/surfaceAdd.C +++ b/applications/utilities/surface/surfaceAdd/surfaceAdd.C @@ -45,14 +45,27 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::noParallel(); - argList::validArgs.clear(); - argList::validArgs.append("Foam surface file"); - argList::validArgs.append("Foam surface file"); - argList::validArgs.append("Foam output file"); + argList::addNote + ( + "add two surfaces via a geometric merge on points." + ); - argList::addOption("points", "pointsFile"); - argList::addBoolOption("mergeRegions"); + argList::noParallel(); + argList::validArgs.append("surfaceFile"); + argList::validArgs.append("surfaceFile"); + argList::validArgs.append("output surfaceFile"); + + argList::addOption + ( + "points", + "file", + "provide additional points" + ); + argList::addBoolOption + ( + "mergeRegions", + "combine regions from both surfaces" + ); argList args(argc, argv); diff --git a/applications/utilities/surface/surfaceAutoPatch/surfaceAutoPatch.C b/applications/utilities/surface/surfaceAutoPatch/surfaceAutoPatch.C index ff68646a4290d5bfd20dc744f40ec7879214ae24..1ab3b58082e16d927575b8131aedd59443cd225f 100644 --- a/applications/utilities/surface/surfaceAutoPatch/surfaceAutoPatch.C +++ b/applications/utilities/surface/surfaceAutoPatch/surfaceAutoPatch.C @@ -46,18 +46,16 @@ using namespace Foam; int main(int argc, char *argv[]) { argList::noParallel(); - argList::validArgs.clear(); - argList::validArgs.append("input surface file"); - argList::validArgs.append("output surface file"); - argList::validArgs.append("included angle [0..180]"); + argList::validArgs.append("input surfaceFile"); + argList::validArgs.append("output surfaceFile"); + argList::validArgs.append("includedAngle [0..180]"); argList args(argc, argv); const fileName inFileName = args[1]; const fileName outFileName = args[2]; const scalar includedAngle = args.argRead<scalar>(3); - Info<< "Surface : " << inFileName << nl - << endl; + Info<< "Surface : " << inFileName << nl << endl; // Read diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index 4d9171af46cf5262a19b0b978c288c63ce909453..577f1470ae1924d72bd96d8e80e15359827f5620 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -173,12 +173,17 @@ labelList countBins int main(int argc, char *argv[]) { argList::noParallel(); - - argList::validArgs.clear(); - argList::validArgs.append("surface file"); - - argList::addBoolOption("checkSelfIntersection"); - argList::addBoolOption("verbose"); + argList::validArgs.append("surfaceFile"); + argList::addBoolOption + ( + "checkSelfIntersection", + "also check for self-intersection" + ); + argList::addBoolOption + ( + "verbose", + "verbose operation" + ); argList::addBoolOption ( "blockMesh", @@ -224,8 +229,8 @@ int main(int argc, char *argv[]) <<" hex (0 1 2 3 4 5 6 7) (10 10 10) simpleGrading (1 1 1)\n" <<");\n" << nl; - Info<<"edges();" << nl - <<"patches();" << endl; + Info<<"edges\n();" << nl + <<"patches\n();" << endl; } diff --git a/applications/utilities/surface/surfaceClean/surfaceClean.C b/applications/utilities/surface/surfaceClean/surfaceClean.C index 46d9bb90dad282b908f87cfb9c9718d486acf91c..85b9cd324e3d18fc965cba94167f095894faaade 100644 --- a/applications/utilities/surface/surfaceClean/surfaceClean.C +++ b/applications/utilities/surface/surfaceClean/surfaceClean.C @@ -46,11 +46,10 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList::noParallel(); - argList::validArgs.append("surface file"); + argList::validArgs.append("surfaceFile"); argList::validArgs.append("min length"); - argList::validArgs.append("output surface file"); + argList::validArgs.append("output surfaceFile"); argList args(argc, argv); const fileName inFileName = args[1]; diff --git a/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C b/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C index 76c97af3cdfb6462bc1b704791bbfcd11b556bdb..3a2393949d6774963a82f7071549b2c2a6d21e8a 100644 --- a/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C +++ b/applications/utilities/surface/surfaceCoarsen/surfaceCoarsen.C @@ -64,10 +64,9 @@ int mapVertex(::List<int>& collapse_map, int a, int mx) int main(int argc, char *argv[]) { argList::noParallel(); - argList::validArgs.clear(); - argList::validArgs.append("Foam surface file"); - argList::validArgs.append("reduction factor"); - argList::validArgs.append("Foam output file"); + argList::validArgs.append("surfaceFile"); + argList::validArgs.append("reductionFactor"); + argList::validArgs.append("output surfaceFile"); argList args(argc, argv); const fileName inFileName = args[1]; diff --git a/applications/utilities/surface/surfaceConvert/surfaceConvert.C b/applications/utilities/surface/surfaceConvert/surfaceConvert.C index 6c97d9ff1ce93984b2919ac8c1077d05ae8837e8..c2598aff2af3ac174ea19b40dbecbd1d520d53ef 100644 --- a/applications/utilities/surface/surfaceConvert/surfaceConvert.C +++ b/applications/utilities/surface/surfaceConvert/surfaceConvert.C @@ -58,14 +58,31 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "convert between surface formats" + ); + argList::noParallel(); - argList::validArgs.clear(); argList::validArgs.append("inputFile"); argList::validArgs.append("outputFile"); - argList::addBoolOption("clean"); - argList::addBoolOption("group"); - argList::addOption("scale", "scale"); + argList::addBoolOption + ( + "clean", + "perform some surface checking/cleanup on the input surface" + ); + argList::addBoolOption + ( + "group", + "reorder faces into groups; one per region" + ); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); argList args(argc, argv); @@ -96,8 +113,7 @@ int main(int argc, char *argv[]) Info<< endl; } - bool sortByRegion = args.optionFound("group"); - + const bool sortByRegion = args.optionFound("group"); if (sortByRegion) { Info<< "Reordering faces into groups; one per region." << endl; diff --git a/applications/utilities/surface/surfaceFeatureConvert/surfaceFeatureConvert.C b/applications/utilities/surface/surfaceFeatureConvert/surfaceFeatureConvert.C index 3323deccfc5646d3ad115a2c5bdce8ec09579770..38469872e475f04ade02372a929451a26fadcbbb 100644 --- a/applications/utilities/surface/surfaceFeatureConvert/surfaceFeatureConvert.C +++ b/applications/utilities/surface/surfaceFeatureConvert/surfaceFeatureConvert.C @@ -53,7 +53,7 @@ int main(int argc, char *argv[]) ( "scale", "factor", - "specify a scaling factor for the points" + "geometry scaling factor - default is 1" ); argList args(argc, argv); diff --git a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C index 0ed7cff2b6aa24e93c4337b09e4c7c584183f718..83d84b92c826439d62ee3762d6a7edb8ea03a123 100644 --- a/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C +++ b/applications/utilities/surface/surfaceFeatureExtract/surfaceFeatureExtract.C @@ -90,19 +90,51 @@ void deleteBox int main(int argc, char *argv[]) { + argList::addNote + ( + "extract and write surface features to file" + ); argList::noParallel(); - - argList::validArgs.clear(); argList::validArgs.append("surface"); argList::validArgs.append("output set"); - argList::addOption("includedAngle", "included angle [0..180]"); - argList::addOption("set", "input feature set"); + argList::addOption + ( + "includedAngle", + "degrees", + "construct feature set from included angle [0..180]" + ); + argList::addOption + ( + "set", + "name", + "use existing feature set from file" + ); + argList::addOption + ( + "minLen", + "scalar", + "remove features shorter than the specified cumulative length" + ); + argList::addOption + ( + "minElem", + "int", + "remove features with fewer than the specified number of edges" + ); + argList::addOption + ( + "subsetBox", + "((x0 y0 z0)(x1 y1 z1))", + "remove edges outside specified bounding box" + ); + argList::addOption + ( + "deleteBox", + "((x0 y0 z0)(x1 y1 z1))", + "remove edges within specified bounding box" + ); - argList::addOption("minLen", "cumulative length of feature"); - argList::addOption("minElem", "number of edges in feature"); - argList::addOption("subsetBox", "((x0 y0 z0)(x1 y1 z1))"); - argList::addOption("deleteBox", "((x0 y0 z0)(x1 y1 z1))"); argList args(argc, argv); Info<< "Feature line extraction is only valid on closed manifold surfaces." @@ -143,7 +175,7 @@ int main(int argc, char *argv[]) } else if (args.optionFound("includedAngle")) { - scalar includedAngle = args.optionRead<scalar>("includedAngle"); + const scalar includedAngle = args.optionRead<scalar>("includedAngle"); Info<< "Constructing feature set from included angle " << includedAngle << endl; @@ -175,8 +207,6 @@ int main(int argc, char *argv[]) << endl; - - // Trim set // ~~~~~~~~ @@ -200,7 +230,6 @@ int main(int argc, char *argv[]) } - // Subset // ~~~~~~ diff --git a/applications/utilities/surface/surfaceFind/surfaceFind.C b/applications/utilities/surface/surfaceFind/surfaceFind.C index b2019c2f17b21d2c622d610377baf20261622902..1d6d098752e51cca179addf9f9108b88108b404b 100644 --- a/applications/utilities/surface/surfaceFind/surfaceFind.C +++ b/applications/utilities/surface/surfaceFind/surfaceFind.C @@ -40,16 +40,14 @@ using namespace Foam; int main(int argc, char *argv[]) { argList::noParallel(); - argList::validArgs.clear(); + argList::validArgs.append("surfaceFile"); argList::addOption("x", "X", "The point x-coordinate (if non-zero)"); argList::addOption("y", "Y", "The point y-coordinate (if non-zero)"); argList::addOption("z", "Z", "The point y-coordinate (if non-zero)"); - argList::validArgs.append("surface file"); - argList args(argc, argv); - point samplePt + const point samplePt ( args.optionLookupOrDefault<scalar>("x", 0), args.optionLookupOrDefault<scalar>("y", 0), diff --git a/applications/utilities/surface/surfaceInertia/surfaceInertia.C b/applications/utilities/surface/surfaceInertia/surfaceInertia.C index ded1d16b696aeebeae76f00db690cc6382d89fdf..c68608feda20f82c1ace1309a39a108c40fae517 100644 --- a/applications/utilities/surface/surfaceInertia/surfaceInertia.C +++ b/applications/utilities/surface/surfaceInertia/surfaceInertia.C @@ -289,8 +289,12 @@ int main(int argc, char *argv[]) ); argList::noParallel(); - argList::validArgs.append("surface file"); - argList::addBoolOption("shellProperties"); + argList::validArgs.append("surfaceFile"); + argList::addBoolOption + ( + "shellProperties", + "inertia of a thin shell" + ); argList::addOption ( @@ -587,18 +591,27 @@ int main(int argc, char *argv[]) if (showTransform) { - Info<< "Transform tensor from reference state (Q). " << nl + Info<< "Transform tensor from reference state (orientation):" << nl + << eVec.T() << nl << "Rotation tensor required to transform " "from the body reference frame to the global " "reference frame, i.e.:" << nl - << "globalVector = Q & bodyLocalVector" - << nl << eVec.T() + << "globalVector = orientation & bodyLocalVector" + << endl; + + Info<< nl + << "Entries for sixDoFRigidBodyDisplacement boundary condition:" + << nl + << " mass " << m << token::END_STATEMENT << nl + << " centreOfMass " << cM << token::END_STATEMENT << nl + << " momentOfInertia " << eVal << token::END_STATEMENT << nl + << " orientation " << eVec.T() << token::END_STATEMENT << endl; } if (calcAroundRefPt) { - Info << "Inertia tensor relative to " << refPt << ": " + Info<< nl << "Inertia tensor relative to " << refPt << ": " << nl << applyParallelAxisTheorem(m, cM, J, refPt) << endl; } diff --git a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C index 28c3b5fd37ff09f4e37065491cf9ac72bfc96512..248ac3e3d09e3285cbef54c01f21b25a266155fc 100644 --- a/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C +++ b/applications/utilities/surface/surfaceMeshConvert/surfaceMeshConvert.C @@ -71,6 +71,11 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "convert between surface formats" + ); + argList::noParallel(); argList::validArgs.append("inputFile"); argList::validArgs.append("outputFile"); @@ -83,14 +88,14 @@ int main(int argc, char *argv[]) argList::addOption ( "scaleIn", - "scale", - "specify input geometry scaling factor" + "factor", + "geometry scaling factor on input" ); argList::addOption ( "scaleOut", - "scale", - "specify output geometry scaling factor" + "factor", + "geometry scaling factor on output" ); argList::addOption ( diff --git a/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C b/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C index 220aaf1be143cf82b245c1c81f9e4d8791adb18f..30a76b846e2992289e7b01e8a09ca1bde93e974a 100644 --- a/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C +++ b/applications/utilities/surface/surfaceMeshConvertTesting/surfaceMeshConvertTesting.C @@ -71,6 +71,13 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "convert between surface formats, " + "but primarily for testing functionality\n" + "Normally use surfaceMeshConvert instead." + ); + argList::noParallel(); argList::validArgs.append("inputFile"); argList::validArgs.append("outputFile"); @@ -82,7 +89,12 @@ int main(int argc, char *argv[]) argList::addBoolOption("unsorted"); argList::addBoolOption("triFace"); - argList::addOption("scale", "scale"); + argList::addOption + ( + "scale", + "factor", + "geometry scaling factor - default is 1" + ); # include "setRootCase.H" diff --git a/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C b/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C index a4ae9d247261007a39a6f6dc290df4411b1c38e0..dda71c3565a0c6f4535efb67deea12da35429944 100644 --- a/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C +++ b/applications/utilities/surface/surfaceMeshExport/surfaceMeshExport.C @@ -48,10 +48,10 @@ Usage Specify an alternative dictionary for constant/coordinateSystems. @param -from \<coordinateSystem\> \n - Specify a coordinate System when reading files. + Specify a coordinate system when reading files. @param -to \<coordinateSystem\> \n - Specify a coordinate System when writing files. + Specify a coordinate system when writing files. Note The filename extensions are used to determine the file format type. @@ -72,17 +72,56 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "export from surfMesh to various third-party surface formats" + ); + argList::noParallel(); argList::validArgs.append("outputFile"); - argList::addBoolOption("clean"); - - argList::addOption("name", "name"); - argList::addOption("scaleIn", "scale"); - argList::addOption("scaleOut", "scale"); - argList::addOption("dict", "coordinateSystemsDict"); - argList::addOption("from", "sourceCoordinateSystem"); - argList::addOption("to", "targetCoordinateSystem"); + argList::addBoolOption + ( + "clean", + "perform some surface checking/cleanup on the input surface" + ); + argList::addOption + ( + "name", + "name", + "specify an alternative surface name when reading - " + "default is 'default'" + ); + argList::addOption + ( + "scaleIn", + "factor", + "geometry scaling factor on input - default is 1" + ); + argList::addOption + ( + "scaleOut", + "factor", + "geometry scaling factor on output - default is 1" + ); + argList::addOption + ( + "dict", + "file", + "specify an alternative dictionary for constant/coordinateSystems" + ); + argList::addOption + ( + "from", + "coordinateSystem", + "specify the source coordinate system, applied after '-scaleIn'" + ); + argList::addOption + ( + "to", + "coordinateSystem", + "specify the target coordinate system, applied before '-scaleOut'" + ); argList args(argc, argv); Time runTime(args.rootPath(), args.caseName()); diff --git a/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C b/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C index 2df0724891c9873819434320b3a84a6cb41d8381..853becfc89dbd75c79ba7c2bf9cd0092dbbe1e89 100644 --- a/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C +++ b/applications/utilities/surface/surfaceMeshImport/surfaceMeshImport.C @@ -48,10 +48,10 @@ Usage Specify an alternative dictionary for constant/coordinateSystems. @param -from \<coordinateSystem\> \n - Specify a coordinate System when reading files. + Specify a coordinate system when reading files. @param -to \<coordinateSystem\> \n - Specify a coordinate System when writing files. + Specify a coordinate system when writing files. Note The filename extensions are used to determine the file format type. @@ -72,20 +72,59 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "import from various third-party surface formats into surfMesh" + ); + argList::noParallel(); argList::validArgs.append("inputFile"); - argList::addBoolOption("clean"); - - argList::addOption("name", "name"); - argList::addOption("scaleIn", "scale"); - argList::addOption("scaleOut", "scale"); - argList::addOption("dict", "coordinateSystemsDict"); - argList::addOption("from", "sourceCoordinateSystem"); - argList::addOption("to", "targetCoordinateSystem"); + argList::addBoolOption + ( + "clean", + "perform some surface checking/cleanup on the input surface" + ); + argList::addOption + ( + "name", + "name", + "specify an alternative surface name when writing - " + "default is 'default'" + ); + argList::addOption + ( + "scaleIn", + "factor", + "geometry scaling factor on input - default is 1" + ); + argList::addOption + ( + "scaleOut", + "factor", + "geometry scaling factor on output - default is 1" + ); + argList::addOption + ( + "dict", + "file", + "specify an alternative dictionary for constant/coordinateSystems" + ); + argList::addOption + ( + "from", + "coordinateSystem", + "specify a local coordinate system when reading files." + ); + argList::addOption + ( + "to", + "coordinateSystem", + "specify a local coordinate system when writing files." + ); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" // try for the latestTime, but create "constant" as needed instantList Times = runTime.times(); diff --git a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C index 5bcbb7dc49a63fb6539caccab8cf3fbebd64f9d7..14fd9525a5e3dce40f4d56e8e9a5ebb36d65a1a5 100644 --- a/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C +++ b/applications/utilities/surface/surfaceMeshTriangulate/surfaceMeshTriangulate.C @@ -48,13 +48,26 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "extract surface from a polyMesh and triangulate boundary faces" + ); argList::validArgs.append("output file"); -# include "addRegionOption.H" - argList::addBoolOption("excludeProcPatches"); - argList::addOption("patches", "(patch0 .. patchN)"); + #include "addRegionOption.H" + argList::addBoolOption + ( + "excludeProcPatches", + "exclude processor patches" + ); + argList::addOption + ( + "patches", + "(patch0 .. patchN)", + "only triangulate named patches" + ); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" const fileName outFileName(runTime.path()/args[1]); @@ -63,9 +76,9 @@ int main(int argc, char *argv[]) Pout<< "Reading mesh from time " << runTime.value() << endl; -# include "createNamedPolyMesh.H" + #include "createNamedPolyMesh.H" - bool includeProcPatches = + const bool includeProcPatches = !( args.optionFound("excludeProcPatches") || Pstream::parRun() @@ -92,7 +105,7 @@ int main(int argc, char *argv[]) forAll(patchNames, patchNameI) { const word& patchName = patchNames[patchNameI]; - label patchI = bMesh.findPatchID(patchName); + const label patchI = bMesh.findPatchID(patchName); if (patchI == -1) { diff --git a/applications/utilities/surface/surfaceOrient/surfaceOrient.C b/applications/utilities/surface/surfaceOrient/surfaceOrient.C index 0d02aaea317f0e28d06372fa8ea45c3615db9064..6ed45df88d74eaafef0991a0be074e1bf5a36a04 100644 --- a/applications/utilities/surface/surfaceOrient/surfaceOrient.C +++ b/applications/utilities/surface/surfaceOrient/surfaceOrient.C @@ -39,12 +39,21 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "set face normals consistent with a user-provided 'outside' point" + ); + argList::noParallel(); - argList::validArgs.clear(); - argList::validArgs.append("Foam surface file"); + argList::validArgs.append("surfaceFile"); argList::validArgs.append("visiblePoint"); - argList::validArgs.append("output file"); - argList::addBoolOption("inside"); + argList::validArgs.append("output surfaceFile"); + argList::addBoolOption + ( + "inside", + "treat provided point as being inside" + ); + argList args(argc, argv); const fileName surfFileName = args[1]; @@ -53,18 +62,18 @@ int main(int argc, char *argv[]) const bool orientInside = args.optionFound("inside"); - Info<< "Reading surface from " << surfFileName << endl; - Info<< "Visible point " << visiblePoint << endl; + Info<< "Reading surface from " << surfFileName << nl + << "Visible point " << visiblePoint << nl + << "Orienting surface such that visiblePoint " << visiblePoint + << " is "; if (orientInside) { - Info<< "Orienting surface such that visiblePoint " << visiblePoint - << " is inside" << endl; + Info<< "inside" << endl; } else { - Info<< "Orienting surface such that visiblePoint " << visiblePoint - << " is outside" << endl; + Info<< "outside" << endl; } Info<< "Writing surface to " << outFileName << endl; diff --git a/applications/utilities/surface/surfacePointMerge/surfacePointMerge.C b/applications/utilities/surface/surfacePointMerge/surfacePointMerge.C index c70b31ea4e7d762b36ecf8bddf523434523fceb9..542a72e48466c9ba3fc32b015d11d7f0d9ea0025 100644 --- a/applications/utilities/surface/surfacePointMerge/surfacePointMerge.C +++ b/applications/utilities/surface/surfacePointMerge/surfacePointMerge.C @@ -42,10 +42,9 @@ using namespace Foam; int main(int argc, char *argv[]) { argList::noParallel(); - argList::validArgs.clear(); - argList::validArgs.append("surface file"); + argList::validArgs.append("surfaceFile"); argList::validArgs.append("merge distance"); - argList::validArgs.append("output file"); + argList::validArgs.append("output surfaceFile"); argList args(argc, argv); const fileName surfFileName = args[1]; diff --git a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C index a960603ae22881f8e4bd5d0e2739838ed68dfe8e..8e2c7eb9185f83f77f7bb5178446cfbc40008ae4 100644 --- a/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C +++ b/applications/utilities/surface/surfaceRedistributePar/surfaceRedistributePar.C @@ -80,7 +80,7 @@ void writeProcStats { const List<treeBoundBox>& bbs = meshBb[procI]; - Info<< "processor" << procI << endl + Info<< "processor" << procI << nl << "\tMesh bounds : " << bbs[0] << nl; for (label i = 1; i < bbs.size(); i++) { @@ -99,19 +99,27 @@ void writeProcStats int main(int argc, char *argv[]) { + argList::addNote + ( + "redistribute a triSurface" + ); + argList::validArgs.append("triSurfaceMesh"); argList::validArgs.append("distributionType"); + argList::addBoolOption + ( + "keepNonMapped", + "preserve surface outside of mesh bounds" + ); - argList::addBoolOption("keepNonMapped"); -# include "setRootCase.H" -# include "createTime.H" + #include "setRootCase.H" + #include "createTime.H" runTime.functionObjects().off(); const fileName surfFileName = args[1]; const word distType = args[2]; - Info<< "Reading surface from " << surfFileName << nl - << nl + Info<< "Reading surface from " << surfFileName << nl << nl << "Using distribution method " << distributedTriSurfaceMesh::distributionTypeNames_[distType] << " " << distType << nl << endl; @@ -138,7 +146,7 @@ int main(int argc, char *argv[]) } -# include "createPolyMesh.H" + #include "createPolyMesh.H" Random rndGen(653213); diff --git a/applications/utilities/surface/surfaceRefineRedGreen/surfaceRefineRedGreen.C b/applications/utilities/surface/surfaceRefineRedGreen/surfaceRefineRedGreen.C index d7e84e1303c59312b14433819b61f6edcf5f5e9c..3bf41c96edc53460b4fec8ad81f746ddfcd0f7d2 100644 --- a/applications/utilities/surface/surfaceRefineRedGreen/surfaceRefineRedGreen.C +++ b/applications/utilities/surface/surfaceRefineRedGreen/surfaceRefineRedGreen.C @@ -47,9 +47,8 @@ using namespace Foam; int main(int argc, char *argv[]) { argList::noParallel(); - argList::validArgs.clear(); - argList::validArgs.append("surface file"); - argList::validArgs.append("output surface file"); + argList::validArgs.append("surfaceFile"); + argList::validArgs.append("output surfaceFile"); argList args(argc, argv); const fileName surfFileName = args[1]; diff --git a/applications/utilities/surface/surfaceSmooth/surfaceSmooth.C b/applications/utilities/surface/surfaceSmooth/surfaceSmooth.C index d023c8f027404bc78b5bb5dbe83c40eb34c60ede..3f990dc8ff7e5c254586506899bcaef38ecaaaa7 100644 --- a/applications/utilities/surface/surfaceSmooth/surfaceSmooth.C +++ b/applications/utilities/surface/surfaceSmooth/surfaceSmooth.C @@ -42,11 +42,10 @@ int main(int argc, char *argv[]) { argList::noParallel(); argList::validOptions.clear(); - argList::validArgs.clear(); - argList::validArgs.append("surface file"); + argList::validArgs.append("surfaceFile"); argList::validArgs.append("underrelax factor (0..1)"); argList::validArgs.append("iterations"); - argList::validArgs.append("output file"); + argList::validArgs.append("output surfaceFile"); argList args(argc, argv); const fileName surfFileName = args[1]; diff --git a/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C b/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C index 50502faebeabb48799371b6534b909e0135cb89d..1024ea9bf4743ffbd83d0803bda9892fd88e8a90 100644 --- a/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C +++ b/applications/utilities/surface/surfaceSplitByPatch/surfaceSplitByPatch.C @@ -36,9 +36,13 @@ using namespace Foam; int main(int argc, char *argv[]) { + argList::addNote + ( + "write surface mesh regions to separate files" + ); + argList::noParallel(); - argList::validArgs.clear(); - argList::validArgs.append("input file"); + argList::validArgs.append("input surfaceFile"); argList args(argc, argv); const fileName surfName = args[1]; @@ -104,7 +108,6 @@ int main(int argc, char *argv[]) subSurf.write(outFile); } - Info<< "End\n" << endl; return 0; diff --git a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C index 32975365c820d6ca7dcd33977b0abe18e90c486b..a8ec5ea4d8bf095acff404596aa4a4acaf982572 100644 --- a/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C +++ b/applications/utilities/surface/surfaceSplitNonManifolds/surfaceSplitNonManifolds.C @@ -666,12 +666,18 @@ bool splitBorderEdges int main(int argc, char *argv[]) { + argList::addNote + ( + "split multiply connected surface edges by duplicating points" + ); argList::noParallel(); - argList::validArgs.clear(); - - argList::validArgs.append("surface file"); - argList::validArgs.append("output surface file"); - argList::addBoolOption("debug"); + argList::validArgs.append("surfaceFile"); + argList::validArgs.append("output surfaceFile"); + argList::addBoolOption + ( + "debug", + "add debugging output" + ); argList args(argc, argv); @@ -679,7 +685,6 @@ int main(int argc, char *argv[]) const fileName outSurfName = args[2]; const bool debug = args.optionFound("debug"); - Info<< "Reading surface from " << inSurfName << endl; triSurface surf(inSurfName); diff --git a/applications/utilities/surface/surfaceSubset/surfaceSubset.C b/applications/utilities/surface/surfaceSubset/surfaceSubset.C index 43698ec4e5f072f72b70ce814c7e4e3942a50ddf..3246358d9b712c7998a5a6d83d9380c616fc745a 100644 --- a/applications/utilities/surface/surfaceSubset/surfaceSubset.C +++ b/applications/utilities/surface/surfaceSubset/surfaceSubset.C @@ -47,10 +47,9 @@ using namespace Foam; int main(int argc, char *argv[]) { argList::noParallel(); - argList::validArgs.clear(); argList::validArgs.append("surfaceSubsetDict"); - argList::validArgs.append("surface file"); - argList::validArgs.append("output file"); + argList::validArgs.append("surfaceFile"); + argList::validArgs.append("output surfaceFile"); argList args(argc, argv); Info<< "Reading dictionary " << args[1] << " ..." << endl; diff --git a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C index eb0a69f89f5639645e35ef6cd44855d63a5304ba..1ee292499ba09ca242b8facc8f00bff3c351b2fd 100644 --- a/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C +++ b/applications/utilities/surface/surfaceToPatch/surfaceToPatch.C @@ -163,14 +163,29 @@ bool repatchFace int main(int argc, char *argv[]) { - argList::noParallel(); - argList::validArgs.append("surface file"); - argList::addOption("faceSet", "faceSet name"); - argList::addOption("tol", "fraction of mesh size"); + argList::addNote + ( + "reads surface and applies surface regioning to a mesh" + ); -# include "setRootCase.H" -# include "createTime.H" -# include "createPolyMesh.H" + argList::noParallel(); + argList::validArgs.append("surfaceFile"); + argList::addOption + ( + "faceSet", + "name", + "only repatch the faces in specified faceSet" + ); + argList::addOption + ( + "tol", + "scalar", + "search tolerance as fraction of mesh size (default 1e-3)" + ); + + #include "setRootCase.H" + #include "createTime.H" + #include "createPolyMesh.H" const fileName surfName = args[1]; @@ -190,7 +205,7 @@ int main(int argc, char *argv[]) << " triangle ..." << endl; } - scalar searchTol = args.optionLookupOrDefault("tol", 1e-3); + const scalar searchTol = args.optionLookupOrDefault("tol", 1e-3); // Get search box. Anything not within this box will not be considered. const boundBox& meshBb = mesh.globalData().bb(); @@ -212,7 +227,6 @@ int main(int argc, char *argv[]) Info<< endl; - boundaryMesh bMesh; // Load in the surface. diff --git a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C index 92fe956fb8ef13d5f18f1dc1f129919e4fb6f42b..0b223d6f833120968cdb322115540ea3f6abaf40 100644 --- a/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C +++ b/applications/utilities/surface/surfaceTransformPoints/surfaceTransformPoints.C @@ -60,9 +60,8 @@ int main(int argc, char *argv[]) "Like transformPoints but for surfaces." ); argList::noParallel(); - argList::validArgs.clear(); - argList::validArgs.append("surface file"); - argList::validArgs.append("output surface file"); + argList::validArgs.append("surfaceFile"); + argList::validArgs.append("output surfaceFile"); argList::addOption ( "translate", diff --git a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C index 5139b8c4990a92b1b13fc8ea5847018b79145b0c..29d8d35febb218a580f25c317bc8014860850b18 100644 --- a/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C +++ b/applications/utilities/thermophysical/adiabaticFlameT/adiabaticFlameT.C @@ -49,7 +49,6 @@ typedef specieThermo<janafThermo<perfectGas> > thermo; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList::validArgs.append("controlFile"); argList args(argc, argv); diff --git a/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C b/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C index 508d868c7a4537b444341bfe8a60ccb4042bb451..1bf676cd544afe0d4dd02d0cf67bbfe8188cddde 100644 --- a/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C +++ b/applications/utilities/thermophysical/chemkinToFoam/chemkinToFoam.C @@ -38,7 +38,6 @@ using namespace Foam; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList::validArgs.append("CHEMKINFile"); argList::validArgs.append("CHEMKINThermodynamicsFile"); argList::validArgs.append("FOAMChemistryFile"); diff --git a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C index 2990cc81dc19ea35bf6ff986fe77984d62faacbb..457c0db080ff8b915a28e252223f9a6ee3265dda 100644 --- a/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C +++ b/applications/utilities/thermophysical/equilibriumFlameT/equilibriumFlameT.C @@ -50,7 +50,6 @@ typedef specieThermo<janafThermo<perfectGas> > thermo; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList::validArgs.append("controlFile"); argList args(argc, argv); diff --git a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C index fa28d5cc01a16001bfbc3d248c6c30ac0c66deda..eef86c7f7afa3322f2566d10fe141b11a3ecbc77 100644 --- a/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C +++ b/applications/utilities/thermophysical/mixtureAdiabaticFlameT/mixtureAdiabaticFlameT.C @@ -49,7 +49,6 @@ typedef specieThermo<janafThermo<perfectGas> > thermo; int main(int argc, char *argv[]) { - argList::validArgs.clear(); argList::validArgs.append("controlFile"); argList args(argc, argv); diff --git a/bin/tools/doxyFilt-ignore.awk b/bin/tools/doxyFilt-ignore.awk index 16ff7671e5fc517cc7149178adb75d6a8e430ffc..ebbacc7177a5840e05b5324e209aa33dcacd9cea 100644 --- a/bin/tools/doxyFilt-ignore.awk +++ b/bin/tools/doxyFilt-ignore.awk @@ -37,8 +37,8 @@ BEGIN { } { print } - + END { - print "//! @endcond OpenFOAMIgnoreAppDoxygen" + print "//! @endcond" } # ----------------------------------------------------------------------------- diff --git a/bin/tools/doxyFilt-top.awk b/bin/tools/doxyFilt-top.awk index a3a8af4cc76bb4f09786a8dc7c8f651ac05646c1..97b96ff7b46133db1823cf94f53c607cfcbd7752 100644 --- a/bin/tools/doxyFilt-top.awk +++ b/bin/tools/doxyFilt-top.awk @@ -74,7 +74,7 @@ FNR == 1 { END { if (state == 2) { - print "//! @endcond OpenFOAMIgnoreAppDoxygen" + print "//! @endcond" } } diff --git a/bin/tools/doxyFilt.sed b/bin/tools/doxyFilt.sed index 8afffb37015100de5ee11967e4d0741481b7ba0b..4aaa7adb0e59a09eb0cf78ea04dcb0914d98ddb4 100644 --- a/bin/tools/doxyFilt.sed +++ b/bin/tools/doxyFilt.sed @@ -7,8 +7,8 @@ # equivalent # ----------------------------------------------------------------------------- -/^License/,/\*\//{ # new FSF address +/^License/,/\*\//{ /^License/,\%http://www.gnu.org/licenses%{ s?^License.*?\*\/\ \/\*! @file %filePath%\ @@ -130,11 +130,9 @@ s/^ // } -/^To[Dd]o *$/,/^[^ ]/{ -/^To[Dd]o/c\ -@todo -s/^ // -} +# remove ToDo paragraph to avoid them showing on related pages +/^To[Dd]o *$/,/^ *$/d + /^Warning *$/,/^[^ ]/{ /^Warning/c\ diff --git a/doc/doxygen/Allwmake b/doc/doxygen/Allwmake new file mode 100755 index 0000000000000000000000000000000000000000..a34eb3fd7e0cce80561fd61bc768738bb5e0cd02 --- /dev/null +++ b/doc/doxygen/Allwmake @@ -0,0 +1,22 @@ +#!/bin/sh +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 +doxygen + +# fix permissions (NB: '+X' and not '+x'!) +chmod -R a+rX html latex man 2>/dev/null + +echo +echo "Done doxygen" +echo + +# ----------------------------------------------------------------- end-of-file diff --git a/doc/doxygen/Doxyfile b/doc/doxygen/Doxyfile new file mode 100644 index 0000000000000000000000000000000000000000..1b1f98598fc3317b734a46a5d5ca16b585b855fa --- /dev/null +++ b/doc/doxygen/Doxyfile @@ -0,0 +1,1565 @@ +# Doxyfile 1.6.3 + +# This file describes the settings to be used by the documentation system +# doxygen (www.doxygen.org) for a project +# +# All text after a hash (#) is considered a comment and will be ignored +# The format is: +# TAG = value [value, ...] +# For lists items can also be appended using: +# TAG += value [value, ...] +# Values that contain spaces should be placed between quotes (" ") + +#--------------------------------------------------------------------------- +# Project related configuration options +#--------------------------------------------------------------------------- + +# This tag specifies the encoding used for all characters in the config file +# that follow. The default is UTF-8 which is also the encoding used for all +# text before the first occurrence of this tag. Doxygen uses libiconv (or the +# iconv built into libc) for the transcoding. See +# http://www.gnu.org/software/libiconv for the list of possible encodings. + +DOXYFILE_ENCODING = UTF-8 + +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# by quotes) that should identify the project. + +PROJECT_NAME = OpenFOAM-$(WM_PROJECT_VERSION) + +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or +# if some version control system is used. + +PROJECT_NUMBER = + +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location +# where doxygen was started. If left blank the current directory will be used. + +OUTPUT_DIRECTORY = + +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would +# otherwise cause performance problems for the file system. + +CREATE_SUBDIRS = NO + +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, +# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, +# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English +# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, +# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrilic, Slovak, +# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. + +OUTPUT_LANGUAGE = English + +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). +# Set to NO to disable this. + +BRIEF_MEMBER_DESC = YES + +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# brief descriptions will be completely suppressed. + +REPEAT_BRIEF = YES + +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" +# "represents" "a" "an" "the" + +ABBREVIATE_BRIEF = + +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief +# description. + +ALWAYS_DETAILED_SEC = NO + +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment +# operators of the base classes will not be shown. + +INLINE_INHERITED_MEMB = NO + +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set +# to NO the shortest path that makes the file name unique will be used. + +FULL_PATH_NAMES = YES + +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the +# path to strip. + +STRIP_FROM_PATH = $(WM_PROJECT_DIR) + +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that +# are normally passed to the compiler using the -I flag. + +STRIP_FROM_INC_PATH = + +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems +# doesn't support long names like on DOS, Mac, or CD-ROM. + +SHORT_NAMES = NO + +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like regular Qt-style comments +# (thus requiring an explicit @brief command for a brief description.) + +JAVADOC_AUTOBRIEF = NO + +# If the QT_AUTOBRIEF tag is set to YES then Doxygen will +# interpret the first line (until the first dot) of a Qt-style +# comment as the brief description. If set to NO, the comments +# will behave just like regular Qt-style comments (thus requiring +# an explicit \brief command for a brief description.) + +QT_AUTOBRIEF = NO + +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed +# description. Set this tag to YES if you prefer the old behaviour instead. + +MULTILINE_CPP_IS_BRIEF = NO + +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it +# re-implements. + +INHERIT_DOCS = YES + +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will +# be part of the file/class/namespace that contains it. + +SEPARATE_MEMBER_PAGES = NO + +# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# Doxygen uses this value to replace tabs by spaces in code fragments. + +TAB_SIZE = 4 + +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". +# You can put \n's in the value part of an alias to insert newlines. + +ALIASES = + +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list +# of all members will be omitted, etc. + +OPTIMIZE_OUTPUT_FOR_C = NO + +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for +# Java. For instance, namespaces will be presented as packages, qualified +# scopes will look different, etc. + +OPTIMIZE_OUTPUT_JAVA = NO + +# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran +# sources only. Doxygen will then generate output that is more tailored for +# Fortran. + +OPTIMIZE_FOR_FORTRAN = NO + +# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL +# sources. Doxygen will then generate output that is tailored for +# VHDL. + +OPTIMIZE_OUTPUT_VHDL = NO + +# Doxygen selects the parser to use depending on the extension of the files it parses. +# With this tag you can assign which parser to use for a given extension. +# Doxygen has a built-in mapping, but you can override or extend it using this tag. +# The format is ext=language, where ext is a file extension, and language is one of +# the parsers supported by doxygen: IDL, Java, Javascript, C#, C, C++, D, PHP, +# Objective-C, Python, Fortran, VHDL, C, C++. For instance to make doxygen treat +# .inc files as Fortran files (default is PHP), and .f files as C (default is Fortran), +# use: inc=Fortran f=C. Note that for custom extensions you also need to set FILE_PATTERNS otherwise the files are not read by doxygen. + +EXTENSION_MAPPING = + +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want +# to include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration +# diagrams that involve STL classes more complete and accurate. + +BUILTIN_STL_SUPPORT = NO + +# If you use Microsoft's C++/CLI language, you should set this option to YES to +# enable parsing support. + +CPP_CLI_SUPPORT = NO + +# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. +# Doxygen will parse them like normal C++ but will assume all classes use public +# instead of private inheritance when no explicit protection keyword is present. + +SIP_SUPPORT = NO + +# For Microsoft's IDL there are propget and propput attributes to indicate getter +# and setter methods for a property. Setting this option to YES (the default) +# will make doxygen to replace the get and set methods by a property in the +# documentation. This will only work if the methods are indeed getting or +# setting a simple type. If this is not the case, or you want to show the +# methods anyway, you should set this option to NO. + +IDL_PROPERTY_SUPPORT = YES + +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default +# all members of a group must be documented explicitly. + +DISTRIBUTE_GROUP_DOC = NO + +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using +# the \nosubgrouping command. + +SUBGROUPING = YES + +# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum +# is documented as struct, union, or enum with the name of the typedef. So +# typedef struct TypeS {} TypeT, will appear in the documentation as a struct +# with name TypeT. When disabled the typedef will appear as a member of a file, +# namespace, or class. And the struct will be named TypeS. This can typically +# be useful for C code in case the coding convention dictates that all compound +# types are typedef'ed and only the typedef is referenced, never the tag name. + +TYPEDEF_HIDES_STRUCT = NO + +# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to +# determine which symbols to keep in memory and which to flush to disk. +# When the cache is full, less often used symbols will be written to disk. +# For small to medium size projects (<1000 input files) the default value is +# probably good enough. For larger projects a too small cache size can cause +# doxygen to be busy swapping symbols to and from disk most of the time +# causing a significant performance penality. +# If the system has enough physical memory increasing the cache will improve the +# performance by keeping more symbols in memory. Note that the value works on +# a logarithmic scale so increasing the size by one will rougly double the +# memory usage. The cache size is given by this formula: +# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, +# corresponding to a cache size of 2^16 = 65536 symbols + +SYMBOL_CACHE_SIZE = 0 + +#--------------------------------------------------------------------------- +# Build related configuration options +#--------------------------------------------------------------------------- + +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless +# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES + +EXTRACT_ALL = YES + +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# will be included in the documentation. + +EXTRACT_PRIVATE = NO + +# If the EXTRACT_STATIC tag is set to YES all static members of a file +# will be included in the documentation. + +EXTRACT_STATIC = YES + +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. +# If set to NO only classes defined in header files are included. + +EXTRACT_LOCAL_CLASSES = YES + +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. +# If set to NO (the default) only methods in the interface are included. + +EXTRACT_LOCAL_METHODS = NO + +# If this flag is set to YES, the members of anonymous namespaces will be +# extracted and appear in the documentation as a namespace called +# 'anonymous_namespace{file}', where file will be replaced with the base +# name of the file that contains the anonymous namespace. By default +# anonymous namespace are hidden. + +EXTRACT_ANON_NSPACES = NO + +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. +# This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_MEMBERS = NO + +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various +# overviews. This option has no effect if EXTRACT_ALL is enabled. + +HIDE_UNDOC_CLASSES = NO + +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the +# documentation. + +HIDE_FRIEND_COMPOUNDS = NO + +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the +# function's detailed documentation block. + +HIDE_IN_BODY_DOCS = NO + +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. +# Set it to YES to include the internal documentation. + +INTERNAL_DOCS = NO + +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows +# and Mac users are advised to set this option to NO. + +CASE_SENSE_NAMES = YES + +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the +# documentation. If set to YES the scope will be hidden. + +HIDE_SCOPE_NAMES = YES + +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation +# of that file. + +SHOW_INCLUDE_FILES = NO + +# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen +# will list include files with double quotes in the documentation +# rather than with sharp brackets. + +FORCE_LOCAL_INCLUDES = NO + +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# is inserted in the documentation for inline members. + +INLINE_INFO = YES + +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in +# declaration order. + +SORT_MEMBER_DOCS = NO + +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in +# declaration order. + +SORT_BRIEF_DOCS = NO + +# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the (brief and detailed) documentation of class members so that constructors and destructors are listed first. If set to NO (the default) the constructors will appear in the respective orders defined by SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. + +SORT_MEMBERS_CTORS_1ST = NO + +# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the +# hierarchy of group names into alphabetical order. If set to NO (the default) +# the group names will appear in their defined order. + +SORT_GROUP_NAMES = NO + +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. +# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. +# Note: This option applies only to the class list, not to the +# alphabetical list. + +SORT_BY_SCOPE_NAME = NO + +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo +# commands in the documentation. + +GENERATE_TODOLIST = YES + +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test +# commands in the documentation. + +GENERATE_TESTLIST = YES + +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug +# commands in the documentation. + +GENERATE_BUGLIST = YES + +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting +# \deprecated commands in the documentation. + +GENERATE_DEPRECATEDLIST= YES + +# The ENABLED_SECTIONS tag can be used to enable conditional +# documentation sections, marked by \if sectionname ... \endif. + +ENABLED_SECTIONS = + +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer +# command in the documentation regardless of this setting. + +MAX_INITIALIZER_LINES = 30 + +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the +# list will mention the files that were used to generate the documentation. + +SHOW_USED_FILES = YES + +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# in the documentation. The default is NO. + +SHOW_DIRECTORIES = YES + +# Set the SHOW_FILES tag to NO to disable the generation of the Files page. +# This will remove the Files entry from the Quick Index and from the +# Folder Tree View (if specified). The default is YES. + +SHOW_FILES = YES + +# Set the SHOW_NAMESPACES tag to NO to disable the generation of the +# Namespaces page. +# This will remove the Namespaces entry from the Quick Index +# and from the Folder Tree View (if specified). The default is YES. + +SHOW_NAMESPACES = YES + +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from +# the version control system). Doxygen will invoke the program by executing (via +# popen()) the command <command> <input-file>, where <command> is the value of +# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file +# provided by doxygen. Whatever the program writes to standard output +# is used as the file version. See the manual for examples. + +FILE_VERSION_FILTER = + +# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed by +# doxygen. The layout file controls the global structure of the generated output files +# in an output format independent way. The create the layout file that represents +# doxygen's defaults, run doxygen with the -l option. You can optionally specify a +# file name after the option, if omitted DoxygenLayout.xml will be used as the name +# of the layout file. + +LAYOUT_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to warning and progress messages +#--------------------------------------------------------------------------- + +# The QUIET tag can be used to turn on/off the messages that are generated +# by doxygen. Possible values are YES and NO. If left blank NO is used. + +QUIET = NO + +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank +# NO is used. + +WARNINGS = YES + +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# automatically be disabled. + +WARN_IF_UNDOCUMENTED = YES + +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that +# don't exist or using markup commands wrongly. + +WARN_IF_DOC_ERROR = YES + +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of +# documentation. + +WARN_NO_PARAMDOC = NO + +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could +# be obtained via FILE_VERSION_FILTER) + +WARN_FORMAT = "$file:$line: $text " + +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written +# to stderr. + +WARN_LOGFILE = + +#--------------------------------------------------------------------------- +# configuration options related to the input files +#--------------------------------------------------------------------------- + +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories +# with spaces. + +# INPUT = $(WM_PROJECT_DIR)/src \ +# $(WM_PROJECT_DIR)/applications/utilities \ +# $(WM_PROJECT_DIR)/applications/solvers + +# limit input for testing purposes +INPUT = $(WM_PROJECT_DIR)/src/OpenFOAM/global + +# This tag can be used to specify the character encoding of the source files +# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is +# also the default input encoding. Doxygen uses libiconv (or the iconv built +# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# the list of possible encodings. + +INPUT_ENCODING = UTF-8 + +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 + +FILE_PATTERNS = *.H \ + *.C + +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. +# If left blank NO is used. + +RECURSIVE = YES + +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a +# subdirectory from a directory tree whose root is specified with the INPUT tag. + +EXCLUDE = + +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded +# from the input. + +EXCLUDE_SYMLINKS = NO + +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories +# for example use the pattern */test/* + +EXCLUDE_PATTERNS = */lnInclude/* \ + */t/* + +# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names +# (namespaces, classes, functions, etc.) that should be excluded from the +# output. The symbol name can be a fully qualified name, a word, or if the +# wildcard * is used, a substring. Examples: ANamespace, AClass, +# AClass::ANamespace, ANamespace::*Test + +EXCLUDE_SYMBOLS = + +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see +# the \include command). + +EXAMPLE_PATH = + +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank all files are included. + +EXAMPLE_PATTERNS = + +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. +# Possible values are YES and NO. If left blank NO is used. + +EXAMPLE_RECURSIVE = NO + +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see +# the \image command). + +IMAGE_PATH = + +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command <filter> <input-file>, where <filter> +# is the value of the INPUT_FILTER tag, and <input-file> is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. +# If FILTER_PATTERNS is specified, this tag will be +# ignored. + +INPUT_FILTER = doxyFilt + +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. +# Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. +# The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# is applied to all files. + +FILTER_PATTERNS = + +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source +# files to browse (i.e. when SOURCE_BROWSER is set to YES). + +FILTER_SOURCE_FILES = NO + +#--------------------------------------------------------------------------- +# configuration options related to source browsing +#--------------------------------------------------------------------------- + +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also +# VERBATIM_HEADERS is set to NO. + +SOURCE_BROWSER = YES + +# Setting the INLINE_SOURCES tag to YES will include the body +# of functions and classes directly in the documentation. + +INLINE_SOURCES = NO + +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code +# fragments. Normal C and C++ comments will always remain visible. + +STRIP_CODE_COMMENTS = YES + +# If the REFERENCED_BY_RELATION tag is set to YES +# then for each documented function all documented +# functions referencing it will be listed. + +REFERENCED_BY_RELATION = YES + +# If the REFERENCES_RELATION tag is set to YES +# then for each documented function all documented entities +# called/used by that function will be listed. + +REFERENCES_RELATION = YES + +# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) +# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from +# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will +# link to the source code. +# Otherwise they will link to the documentation. + +REFERENCES_LINK_SOURCE = YES + +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You +# will need version 4.8.6 or higher. + +USE_HTAGS = NO + +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for +# which an include is specified. Set to NO to disable this. + +VERBATIM_HEADERS = YES + +#--------------------------------------------------------------------------- +# configuration options related to the alphabetical class index +#--------------------------------------------------------------------------- + +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project +# contains a lot of classes, structs, unions or interfaces. + +ALPHABETICAL_INDEX = YES + +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# in which this list will be split (can be a number in the range [1..20]) + +COLS_IN_ALPHA_INDEX = 4 + +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# should be ignored while generating the index headers. + +IGNORE_PREFIX = + +#--------------------------------------------------------------------------- +# configuration options related to the HTML output +#--------------------------------------------------------------------------- + +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# generate HTML output. + +GENERATE_HTML = YES + +# If the HTML_FOOTER_DESCRIPTION tag is set to YES, Doxygen will +# add generated date, project name and doxygen version to HTML footer. + +HTML_FOOTER_DESCRIPTION= NO + +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `html' will be used as the default path. + +HTML_OUTPUT = html + +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# doxygen will generate files with .html extension. + +HTML_FILE_EXTENSION = .html + +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a +# standard header. + +HTML_HEADER = $(WM_PROJECT_DIR)/doc/doxygen/_Header + +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a +# standard footer. + +HTML_FOOTER = $(WM_PROJECT_DIR)/doc/doxygen/_Footer + +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own +# stylesheet in the HTML output directory as well, or it will be erased! + +HTML_STYLESHEET = + +# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML +# page will contain the date and time when the page was generated. Setting +# this to NO can help when comparing the output of multiple runs. + +HTML_TIMESTAMP = NO + +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to +# NO a bullet list will be used. + +HTML_ALIGN_MEMBERS = YES + +# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML +# documentation will contain sections that can be hidden and shown after the +# page has loaded. For this to work a browser that supports +# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox +# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). + +HTML_DYNAMIC_SECTIONS = NO + +# If the GENERATE_DOCSET tag is set to YES, additional index files +# will be generated that can be used as input for Apple's Xcode 3 +# integrated development environment, introduced with OSX 10.5 (Leopard). +# To create a documentation set, doxygen will generate a Makefile in the +# HTML output directory. Running make will produce the docset in that +# directory and running "make install" will install the docset in +# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find +# it at startup. +# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html for more information. + +GENERATE_DOCSET = NO + +# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the +# feed. A documentation feed provides an umbrella under which multiple +# documentation sets from a single provider (such as a company or product suite) +# can be grouped. + +DOCSET_FEEDNAME = "Doxygen generated docs" + +# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that +# should uniquely identify the documentation set bundle. This should be a +# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen +# will append .docset to the name. + +DOCSET_BUNDLE_ID = org.doxygen.Project + +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) +# of the generated HTML documentation. + +GENERATE_HTMLHELP = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be +# written to the html output directory. + +CHM_FILE = + +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# the HTML help compiler on the generated index.hhp. + +HHC_LOCATION = + +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that +# it should be included in the master .chm file (NO). + +GENERATE_CHI = NO + +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING +# is used to encode HtmlHelp index (hhk), content (hhc) and project file +# content. + +CHM_INDEX_ENCODING = + +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a +# normal table of contents (NO) in the .chm file. + +BINARY_TOC = NO + +# The TOC_EXPAND flag can be set to YES to add extra items for group members +# to the contents of the HTML help documentation and to the tree view. + +TOC_EXPAND = NO + +# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and QHP_VIRTUAL_FOLDER +# are set, an additional index file will be generated that can be used as input for +# Qt's qhelpgenerator to generate a Qt Compressed Help (.qch) of the generated +# HTML documentation. + +GENERATE_QHP = NO + +# If the QHG_LOCATION tag is specified, the QCH_FILE tag can +# be used to specify the file name of the resulting .qch file. +# The path specified is relative to the HTML output folder. + +QCH_FILE = + +# The QHP_NAMESPACE tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#namespace + +QHP_NAMESPACE = org.doxygen.Project + +# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating +# Qt Help Project output. For more information please see +# http://doc.trolltech.com/qthelpproject.html#virtual-folders + +QHP_VIRTUAL_FOLDER = doc + +# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to add. +# For more information please see +# http://doc.trolltech.com/qthelpproject.html#custom-filters + +QHP_CUST_FILTER_NAME = + +# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the custom filter to add.For more information please see +# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters">Qt Help Project / Custom Filters</a>. + +QHP_CUST_FILTER_ATTRS = + +# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this project's +# filter section matches. +# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes">Qt Help Project / Filter Attributes</a>. + +QHP_SECT_FILTER_ATTRS = + +# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can +# be used to specify the location of Qt's qhelpgenerator. +# If non-empty doxygen will try to run qhelpgenerator on the generated +# .qhp file. + +QHG_LOCATION = + +# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files +# will be generated, which together with the HTML files, form an Eclipse help +# plugin. To install this plugin and make it available under the help contents +# menu in Eclipse, the contents of the directory containing the HTML and XML +# files needs to be copied into the plugins directory of eclipse. The name of +# the directory within the plugins directory should be the same as +# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before the help appears. + +GENERATE_ECLIPSEHELP = NO + +# A unique identifier for the eclipse help plugin. When installing the plugin +# the directory name containing the HTML and XML files should also have +# this name. + +ECLIPSE_DOC_ID = org.doxygen.Project + +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and +# the value YES disables it. + +DISABLE_INDEX = NO + +# This tag can be used to set the number of enum values (range [1..20]) +# that doxygen will group on one line in the generated HTML documentation. + +ENUM_VALUES_PER_LINE = 4 + +# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index +# structure should be generated to display hierarchical information. +# If the tag value is set to YES, a side panel will be generated +# containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). +# Windows users are probably better off using the HTML help feature. + +GENERATE_TREEVIEW = NO + +# By enabling USE_INLINE_TREES, doxygen will generate the Groups, Directories, +# and Class Hierarchy pages using a tree view instead of an ordered list. + +USE_INLINE_TREES = NO + +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree +# is shown. + +TREEVIEW_WIDTH = 250 + +# Use this tag to change the font size of Latex formulas included +# as images in the HTML documentation. The default is 10. Note that +# when you change the font size after a successful doxygen run you need +# to manually remove any form_*.png images from the HTML output directory +# to force them to be regenerated. + +FORMULA_FONTSIZE = 10 + +# When the SEARCHENGINE tag is enabled doxygen will generate a search box for the HTML output. The underlying search engine uses javascript +# and DHTML and should work on any modern browser. Note that when using HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) there is already a search function so this one should +# typically be disabled. For large projects the javascript based search engine +# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. + +SEARCHENGINE = YES + +# When the SERVER_BASED_SEARCH tag is enabled the search engine will be implemented using a PHP enabled web server instead of at the web client using Javascript. Doxygen will generate the search PHP script and index +# file to put on the web server. The advantage of the server based approach is that it scales better to large projects and allows full text search. The disadvances is that it is more difficult to setup +# and does not have live searching capabilities. + +SERVER_BASED_SEARCH = NO +# old default +# SERVER_BASED_SEARCH = YES + +#--------------------------------------------------------------------------- +# configuration options related to the LaTeX output +#--------------------------------------------------------------------------- + +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# generate Latex output. + +GENERATE_LATEX = NO + +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `latex' will be used as the default path. + +LATEX_OUTPUT = latex + +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# invoked. If left blank `latex' will be used as the default command name. +# Note that when enabling USE_PDFLATEX this option is only used for +# generating bitmaps for formulas in the HTML output, but not in the +# Makefile that is written to the output directory. + +LATEX_CMD_NAME = latex + +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the +# default command name. + +MAKEINDEX_CMD_NAME = makeindex + +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_LATEX = NO + +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and +# executive. If left blank a4wide will be used. + +PAPER_TYPE = a4wide + +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# packages that should be included in the LaTeX output. + +EXTRA_PACKAGES = $(WM_PROJECT_DIR)/doc/Doxygen/Macros/tensorOperator + +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a +# standard header. Notice: only use this tag if you know what you are doing! + +LATEX_HEADER = + +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references +# This makes the output suitable for online browsing using a pdf viewer. + +PDF_HYPERLINKS = YES + +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a +# higher quality PDF documentation. + +USE_PDFLATEX = YES + +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. +# This option is also used when generating formulas in HTML. + +LATEX_BATCHMODE = NO + +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) +# in the output. + +LATEX_HIDE_INDICES = NO + +# If LATEX_SOURCE_CODE is set to YES then doxygen will include source code with syntax highlighting in the LaTeX output. Note that which sources are shown also depends on other settings such as SOURCE_BROWSER. + +LATEX_SOURCE_CODE = NO + +#--------------------------------------------------------------------------- +# configuration options related to the RTF output +#--------------------------------------------------------------------------- + +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with +# other RTF readers or editors. + +GENERATE_RTF = NO + +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `rtf' will be used as the default path. + +RTF_OUTPUT = rtf + +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to +# save some trees in general. + +COMPACT_RTF = NO + +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. +# Note: wordpad (write) and others do not support links. + +RTF_HYPERLINKS = NO + +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide +# replacements, missing definitions are set to their default value. + +RTF_STYLESHEET_FILE = + +# Set optional variables used in the generation of an rtf document. +# Syntax is similar to doxygen's config file. + +RTF_EXTENSIONS_FILE = + +#--------------------------------------------------------------------------- +# configuration options related to the man page output +#--------------------------------------------------------------------------- + +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# generate man pages + +GENERATE_MAN = NO + +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `man' will be used as the default path. + +MAN_OUTPUT = man + +# The MAN_EXTENSION tag determines the extension that is added to +# the generated man pages (default is the subroutine's section .3) + +MAN_EXTENSION = .3 + +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command +# would be unable to find the correct page. The default is NO. + +MAN_LINKS = NO + +#--------------------------------------------------------------------------- +# configuration options related to the XML output +#--------------------------------------------------------------------------- + +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of +# the code including all documentation. + +GENERATE_XML = NO + +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# put in front of it. If left blank `xml' will be used as the default path. + +XML_OUTPUT = xml + +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_SCHEMA = + +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the +# syntax of the XML files. + +XML_DTD = + +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that +# enabling this will significantly increase the size of the XML output. + +XML_PROGRAMLISTING = YES + +#--------------------------------------------------------------------------- +# configuration options for the AutoGen Definitions output +#--------------------------------------------------------------------------- + +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental +# and incomplete at the moment. + +GENERATE_AUTOGEN_DEF = NO + +#--------------------------------------------------------------------------- +# configuration options related to the Perl module output +#--------------------------------------------------------------------------- + +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the +# moment. + +GENERATE_PERLMOD = NO + +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# to generate PDF and DVI output from the Perl module output. + +PERLMOD_LATEX = NO + +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. +# This is useful +# if you want to understand what is going on. +# On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller +# and Perl will parse it just the same. + +PERLMOD_PRETTY = YES + +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same +# Makefile don't overwrite each other's variables. + +PERLMOD_MAKEVAR_PREFIX = + +#--------------------------------------------------------------------------- +# Configuration options related to the preprocessor +#--------------------------------------------------------------------------- + +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include +# files. + +ENABLE_PREPROCESSING = YES + +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled +# way by setting EXPAND_ONLY_PREDEF to YES. + +MACRO_EXPANSION = YES + +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the +# PREDEFINED and EXPAND_AS_DEFINED tags. + +EXPAND_ONLY_PREDEF = NO + +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# in the INCLUDE_PATH (see below) will be search if a #include is found. + +SEARCH_INCLUDES = NO + +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by +# the preprocessor. + +INCLUDE_PATH = + +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will +# be used. + +INCLUDE_FILE_PATTERNS = + +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator +# instead of the = operator. + +PREDEFINED = + +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. +# Use the PREDEFINED tag if you want to use a different macro definition. + +EXPAND_AS_DEFINED = + +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse +# the parser if not removed. + +SKIP_FUNCTION_MACROS = YES + +#--------------------------------------------------------------------------- +# Configuration::additions related to external references +#--------------------------------------------------------------------------- + +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool +# does not have to be run to correct the links. +# Note that each tag file must have a unique name +# (where the name does NOT include the path) +# If a tag file is not located in the directory in which doxygen +# is run, you must also specify the path to the tagfile here. + +TAGFILES = + +# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# a tag file that is based on the input files it reads. + +GENERATE_TAGFILE = + +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes +# will be listed. + +ALLEXTERNALS = YES + +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will +# be listed. + +EXTERNAL_GROUPS = YES + +# The PERL_PATH should be the absolute path and name of the perl script +# interpreter (i.e. the result of `which perl'). + +PERL_PATH = /usr/bin/perl + +#--------------------------------------------------------------------------- +# Configuration options related to the dot tool +#--------------------------------------------------------------------------- + +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more +# powerful graphs. + +CLASS_DIAGRAMS = YES + +# You can define message sequence charts within doxygen comments using the \msc +# command. Doxygen will then run the mscgen tool (see +# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the +# documentation. The MSCGEN_PATH tag allows you to specify the directory where +# the mscgen tool resides. If left empty the tool is assumed to be found in the +# default search path. + +MSCGEN_PATH = + +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented +# or is not a class. + +HIDE_UNDOC_RELATIONS = YES + +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# have no effect if this option is set to NO (the default) + +HAVE_DOT = YES + +# By default doxygen will write a font called FreeSans.ttf to the output +# directory and reference it in all dot files that doxygen generates. This +# font does not include all possible unicode characters however, so when you need +# these (or just want a differently looking font) you can specify the font name +# using DOT_FONTNAME. You need need to make sure dot is able to find the font, +# which can be done by putting it in a standard location or by setting the +# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory +# containing the font. + +DOT_FONTNAME = FreeSans + +# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. +# The default size is 10pt. + +DOT_FONTSIZE = 10 + +# By default doxygen will tell dot to use the output directory to look for the +# FreeSans.ttf font (which doxygen will put there itself). If you specify a +# different font using DOT_FONTNAME you can set the path where dot +# can find it using this tag. + +DOT_FONTPATH = + +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the +# the CLASS_DIAGRAMS tag to NO. + +CLASS_GRAPH = YES + +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and +# class references variables) of the class with other documented classes. + +COLLABORATION_GRAPH = YES + +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for groups, showing the direct groups dependencies + +GROUP_GRAPHS = YES + +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling +# Language. + +UML_LOOK = NO + +# If set to YES, the inheritance and collaboration graphs will show the +# relations between templates and their instances. + +TEMPLATE_RELATIONS = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with +# other documented files. + +INCLUDE_GRAPH = YES + +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or +# indirectly include this file. + +INCLUDED_BY_GRAPH = YES + +# If the CALL_GRAPH and HAVE_DOT options are set to YES then +# doxygen will generate a call dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable call graphs +# for selected functions only using the \callgraph command. + +CALL_GRAPH = YES + +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then +# doxygen will generate a caller dependency graph for every global function +# or class method. Note that enabling this option will significantly increase +# the time of a run. So in most cases it will be better to enable caller +# graphs for selected functions only using the \callergraph command. + +CALLER_GRAPH = YES + +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# will graphical hierarchy of all classes instead of a textual one. + +GRAPHICAL_HIERARCHY = YES + +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories +# in a graphical way. The dependency relations are determined by the #include +# relations between the files in the directories. + +DIRECTORY_GRAPH = YES + +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# generated by dot. Possible values are png, jpg, or gif +# If left blank png will be used. + +DOT_IMAGE_FORMAT = png + +# The tag DOT_PATH can be used to specify the path where the dot tool can be +# found. If left blank, it is assumed the dot tool can be found in the path. + +DOT_PATH = + +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the +# \dotfile command). + +DOTFILE_DIRS = + +# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of +# nodes that will be shown in the graph. If the number of nodes in a graph +# becomes larger than this value, doxygen will truncate the graph, which is +# visualized by representing a node as a red box. Note that doxygen if the +# number of direct children of the root node in a graph is already larger than +# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note +# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. + +DOT_GRAPH_MAX_NODES = 50 + +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that the size of a graph can be further restricted by +# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. + +MAX_DOT_GRAPH_DEPTH = 3 + +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, because dot on Windows does not +# seem to support this out of the box. Warning: Depending on the platform used, +# enabling this option may lead to badly anti-aliased labels on the edges of +# a graph (i.e. they become hard to read). + +DOT_TRANSPARENT = YES + +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) +# support this, this feature is disabled by default. + +DOT_MULTI_TARGETS = YES + +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and +# arrows in the dot generated graphs. + +GENERATE_LEGEND = YES + +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate +# the various graphs. + +DOT_CLEANUP = YES diff --git a/doc/doxygen/OpenFOAMdocIcon.png b/doc/doxygen/OpenFOAMdocIcon.png new file mode 100644 index 0000000000000000000000000000000000000000..705a314103c5da2d696e3ab829aac944555f8925 Binary files /dev/null and b/doc/doxygen/OpenFOAMdocIcon.png differ diff --git a/doc/doxygen/OpenFOAMicon.png b/doc/doxygen/OpenFOAMicon.png new file mode 100644 index 0000000000000000000000000000000000000000..568b0060908a05c84cc9e9a707e65ddd43949d2b Binary files /dev/null and b/doc/doxygen/OpenFOAMicon.png differ diff --git a/doc/doxygen/_Footer b/doc/doxygen/_Footer new file mode 100644 index 0000000000000000000000000000000000000000..11d8da9cb56840a3ce070bda8929d6e024111f7c --- /dev/null +++ b/doc/doxygen/_Footer @@ -0,0 +1,17 @@ + <!-- end of doxygen-generated content --> + </div> <!-- main --> + <div class="footer"> + <p> + Copyright © 2000-2010 + <a href="http://www.openfoam.com/about">OpenCFD Limited</a> + | OPENFOAM® and OpenCFD® are registered trademarks of OpenCFD Ltd. + </p> + <p class="credits"> + Based on design by + <a target="new" href="http://1234.info">1234.info</a> + | Content generated by <a target="new" href="http://www.doxygen.org">doxygen</a> + </p> + </div> <!-- footer --> +</div> <!-- page-container --> +</body> +</html> diff --git a/doc/doxygen/_Header b/doc/doxygen/_Header new file mode 100644 index 0000000000000000000000000000000000000000..e788da5f0dd21bb5a2ad810eca6d9f3e731200fd --- /dev/null +++ b/doc/doxygen/_Header @@ -0,0 +1,71 @@ +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=UFT-8"/> +<title> OpenFOAM® programmer's C++ documentation </title> +<!-- links --> +<link href="../OpenFOAMdocIcon.png" rel="icon" type="image/png" /> +<link href="search/search.css" rel="stylesheet" type="text/css" /> +<link href="../css/openfoam.css" rel="stylesheet" type="text/css" /> +<script type="text/javaScript" src="search/search.js"></script> + +<!-- meta info --> +<meta + name="keywords" + content="computational fluid dynamics, CFD, OpenCFD, OpenFOAM, open source CFD, open source" + /> +<meta + name="description" + content="OpenCFD Ltd, leaders in open source Computational Fluid Dynamics (CFD), the developers and maintainers of OpenFOAM: the open source CFD toolbox. We supply support and contracted developments for OpenFOAM" + /> +</head> +<body> +<div class="page-container"> + <div class="header"> + <div class="header-top"> + <div class="round-border-topleft"></div> + <div class="round-border-topright"></div> + <a class="sitelogo" href="http://www.openfoam.com" title="Home"></a> + <div class="sitename"> + <h1><a + href="http://foam.sourceforge.net/doc/Doxygen/html/" + title="Source Guide">Programmer's C++ documentation</a></h1> + </div> + </div> <!-- header-top --> + <div class="header-bottom"> + <!-- navigation --> + <div class="nav2"> + <ul> + <li> + <a href="http://foam.sourceforge.net/doc/Doxygen/html">Source Guide</a> + </li> + </ul> + <ul> + <li> + <a href="http://www.openfoam.com/features/">Features</a> + </li> + </ul> + <ul> + <li> + <a href="http://www.openfoam.com/">OpenFOAM</a> + </li> + </ul> + <ul> + <li> + <a href="http://www.openfoam.com/contact/">Contact</a> + </li> + </ul> + <ul> + <li> + <a href="http://www.openfoam.com/about/">OpenCFD</a> + </li> + </ul> + </ul> + + </div> <!-- nav2 --> + </div> <!-- header-bottom --> + </div> <!-- header --> + + <div class="main"> + <!-- begin of doxygen-generated content --> diff --git a/doc/doxygen/css/cfdLayout.css b/doc/doxygen/css/cfdLayout.css new file mode 100644 index 0000000000000000000000000000000000000000..4376035c4ca9bc13702343c0761e4831109b7a27 --- /dev/null +++ b/doc/doxygen/css/cfdLayout.css @@ -0,0 +1,363 @@ +/* OpenCFD layout styles */ + +* { + padding: 0; + margin: 0; + font-family: Arial, sans-serif; +} + +body { + background-color: #ffffff; + font-size: 62.5%; +} /*Font-size: 1.0em = 10px when browser default size is 16px*/ + +p:after { + content:"."; + display:block; + height:0; + /* clear:both */; + visibility:hidden; +} + +.clear-contentunit { + clear:both; + width:100%; + height:0.1em; + border:none; + background:rgb(210,210,210); + color:rgb(210,210,210); +} + +/* page-container **************************************/ +.page-container { + width:960px; + margin:0px auto; + margin-top:10px; + margin-bottom:10px; + font-size:1.0em; +} + +.page-container:after, +.header:after, +.header-bottom:after, +.header-breadcrumbs:after, +.main:after, +.main-navigation:after, +.main-content:after, +.main-content div:after, +.main-subcontent:after +{ + content:"."; + display:block; + height:0; + clear:both; + visibility:hidden; +} + +/*Font-size: 1.0em = 12px when browser default size is 16px*/ +.main +{ + font-size: 120%; +} + +/*********************header***************************************************/ +.header { + width:100%; +} + +.header-top { + height:80px; + border:3px solid rgb(175,175,175); + border-bottom-width: 0; + margin-top:10px; + background:#d5e1f0; + overflow:visible !important /*Firefox*/; + overflow:hidden /*IE6*/; +} + +.header-bottom { + border:3px solid rgb(175,175,175); + border-top-width: 1px; + background:rgb(225,225,225); +} + +.header .round-border-topleft { + width:25px; + height:25px; + position:absolute; + z-index:100; + background:url(img/bg_head_corner_topleft_25px.gif) no-repeat; + margin-top:-3px; + margin-left:-3px; +} + +.header .round-border-topright { + width:25px; + height:25px; + position:absolute; + z-index:100; + background:url(img/bg_head_corner_topright_25px.gif) no-repeat; + margin-top:-3px; + margin-left:932px; +} + +/********************sitelogo *************************************************/ +.sitelogo { + width:924px; + height:40px; + position:absolute; + z-index:1; + margin:20px 0 0 15px; + background:url(img/OpenCFDlogo.png) no-repeat; +} + +/**************************sitename ************************************************/ +.sitename { + width:400px; + height:45px; + position:absolute; + z-index:1; + margin:25px 0 0 320px; + overflow:visible !important /*Firefox*/; + overflow:hidden /*IE6*/; +} + +.sitename h1 { + font-weight:normal; + font-size:240%; +} + +.sitename h2 { + margin:-2px 0 0 0; + color:rgb(125,125,125); + font-weight:normal; + font-size:100%; +} +.sitename a { + text-decoration:none; + color:rgb(125,125,125); + color:#333; +} +.sitename a:hover { + text-decoration:none; + color:rgb(125,125,125); +} + +/*****************header-breadcrumbs ***************************************/ +.header-breadcrumbs { + clear:both; + width:100%; + padding:1.0em 0 1.5em 0; + border-left:3px solid rgb(175,175,175); + border-right:3px solid rgb(175,175,175); +} + +.header-breadcrumbs ul { + float:left; + width:560px; + list-style:none; + padding:7px 0 0 3px; + font-family:verdana,arial,sans-serif; +} + +.header-breadcrumbs ul li { + display:inline; + padding:0 0 0 5px; + color:#323232; + font-size:100%; +} + +.header-breadcrumbs ul a { + color:rgb(70,122,167); + text-decoration:none; +} + +.header-breadcrumbs ul a:hover { + color:rgb(42,90,138); + color:#333; + text-decoration:underline; +} +.header-breadcrumbs .searchform { + float:right; + width:285px; + padding:0 17px 0px 0px !important /*Non-IE6*/; + padding:0 12px 0px 0px /*IE6*/; +} +.header-breadcrumbs .searchform form fieldset { + float:right; + border:none; +} +.header-breadcrumbs .searchform input.field { + width:10.0em; + padding:0.2em 0 0.2em 0; + border:1px solid rgb(200,200,200); + font-family:verdana,arial,sans-serif; + font-size:120%; +} +.header-breadcrumbs .searchform input.button { + width:3.0em; + padding:1px !important /*Non-IE6*/; + padding:0 /*IE6*/; + background:rgb(230,230,230); + border:solid 1px rgb(150,150,150); + text-align:center; + font-family:verdana,arial,sans-serif; + color:rgb(150,150,150); + font-size:120%; +} +.header-breadcrumbs .searchform input.button:hover { + cursor:pointer; + border:solid 1px rgb(80,80,80); + background:rgb(220,220,220); + color:rgb(80,80,80); +} + + +/******************footer ************************************************/ +.footer { + clear:both; + padding:1.0em 1.0em 1.0em 1.0em; + border:3px solid rgb(175,175,175); + background:rgb(225,225,225); + font-size:1.0em; + overflow:visible !important /*Firefox*/; + overflow:hidden /*IE6*/; +} +.footer p { + line-height:1.3em; + text-align:center; + color:rgb(125,125,125); + font-weight:bold; + font-size:110%; +} +.footer p.credits { + font-weight:normal; +} +.footer a { + text-decoration:underline; + color:rgb(125,125,125); +} +.footer a:hover { + text-decoration:none; + color:rgb(0,0,0); +} +/* +.footer a:visited { + color:rgb(0,0,0); +} +*/ +.footer:after { + content:"."; + display:block; + height:0; + clear:both; + visibility:hidden; +} + +/*******************main **********************************************/ +.main { + clear:both; + width:954px; + padding-bottom:30px; + border-left: 3px solid rgb(175,175,175); + border-right:3px solid rgb(175,175,175); + background:transparent url(img/bg_main.gif) top left repeat-y; +} +.main img { + clear:both; + margin:3px 10px 7px 0; + padding:1px; +} +.main img.center { + clear:both; + float:none; + display:block; + margin:0 auto; + padding:1px; +} +.main img.right { + clear:both; + float:right; + margin:3px 0 7px 10px; + padding:1px; +} + +div.contents a { + color:rgb(70,122,167); + font-weight:bold; + text-decoration:none; +} +div.contents a:hover { + color:rgb(42,90,138); + text-decoration:underline; +} +/* +.main a:visited { + color:rgb(42,90,138); +} +*/ + +.main a img { + border:solid 1px rgb(150,150,150); +} +.main a:hover img { + border:solid 1px rgb(220,220,220); +} + +/********************************/ +/* PRINTING and MISCELLANEOUS */ +/********************************/ +@media print { + +.header-top { + width:100%; + height:80px; + background:rgb(240,240,240); + overflow:visible !important /*Firefox*/; + overflow:hidden /*IE6*/; +} +.header-breadcrumbs { + width:100%; + background:transparent; +} +.nav2 { + float:left; + width:100%; + border:none; + background:rgb(240,240,240); + color:rgb(75,75,75); + font-size:1.0em; + font-size:130%; +} /*Color navigation bar normal mode*/ +.main { + clear:both; + width:100%; + padding-bottom:30px; + background:transparent; +} +.main-navigation { + display:inline /*Fix IE floating margin bug*/; + float:left; + width:199px; + border-right:1px solid rgb(200,200,200); + border-bottom:1px solid rgb(200,200,200); + background-color:rgb(240,240,240); + overflow:visible !important /*Firefox*/; + overflow:hidden /*IE*/; +} +.footer { + clear:both; + width:100%; + height:3.7em; + padding:1.1em 0 0; + background:rgb(240,240,240); + font-size:1.0em; + overflow:visible !important /*Firefox*/; + overflow:hidden /*IE6*/; +} +div.crosslinks { + visibility:hidden; +} + +} /* end media print */ + diff --git a/doc/doxygen/css/cfdNav.css b/doc/doxygen/css/cfdNav.css new file mode 100644 index 0000000000000000000000000000000000000000..506d7a6c7244c91fba90436b7bb9d41d17db9c6b --- /dev/null +++ b/doc/doxygen/css/cfdNav.css @@ -0,0 +1,569 @@ +/* Naviation Styles */ +.nav0 +{ + width:350px; + position:absolute; + z-index:2; + margin:25px 0 0 0; + margin-left:610px !important /*Non-IE6*/; + margin-left:613px /*IE6*/; +} +.nav0 ul +{ + float:right; + padding:0 20px 0 0; +} +.nav0 li +{ + display:inline; + list-style:none; +} +.nav0 li a +{ + padding:0 0 0 3px; +} +.nav0 a:hover +{ + text-decoration:none; +} +.nav0 a img +{ + height:20px; + border:none; +} +.nav1 +{ + width:350px; + position:absolute; + z-index:3; + margin:55px 0 0 610px; +} +.nav1 ul +{ + float:right; + padding:0 15px 0 0; + font-weight:normal; +} +.nav1 li +{ + display:inline; + list-style:none; +} +.nav1 li a +{ + display:block; + float:left; + padding:2px 5px 2px 5px; + color:rgb(125,125,125); + text-decoration:none; + font-size:110%; +} +.nav1 a:hover +{ + text-decoration:none; + color:rgb(50,50,50); +} +.nav1_ln +{ + float:right; + height:2.1em; + width:300px; +} +.nav1_ln ul +{ + float:right; + padding:7px 15px 0 0; + font-weight:normal; +} +.nav1_ln li +{ + display:inline; + list-style:none; +} +.nav1_ln li a +{ + display:block; + float:left; + padding:2px 5px 2px 5px; + color:rgb(125,125,125); + text-decoration:none; + font-size:110%; +} +.nav1_ln a:hover +{ + text-decoration:none; + color:rgb(50,50,50); +} +.nav2 +{ + white-space:nowrap /*IE hack*/; + float:left; + width:100%; + background:rgb(225,225,225); + color:rgb(100,100,100); + font-size:130%; + height:2.1em; +} /*Color navigation bar normal mode*/ +.nav2 ul +{ + list-style-type:none; +} +.nav2 ul li +{ + float:left; + z-index:auto !important /*Non-IE6*/; + z-index:1000 /*IE6*/; + border-right:solid 1px rgb(175,175,175); +} +.nav2 ul li a +{ + float:none !important /*Non-IE6*/; + float:left /*IE-6*/; + display:block; + height:2.1em; + line-height:2.1em; + padding:0 16px 0 16px; + text-decoration:none; + font-weight:normal; + color: rgb(100,100,100); + color:#333; +} +.nav2 ul li ul +{ + display:none; + border:none; +} +.nav2 ul li:hover +{ + position:relative; +} /*Sylvain IE hack*/ +.nav2 ul li:hover a +{ + background-color:rgb(215,215,215); + text-decoration:none; +} /*Color main cells hovering mode*/ +.nav2 ul li:hover ul +{ + display:block; + width:12.0em; + position:absolute; + z-index:999; + top:2.0em; + margin-top:0.1em; + left:0; +} +.nav2 ul li:hover ul li a +{ + white-space:normal; + display:block; + width:12.0em; + height:auto; + line-height:1.3em; + margin-left:-1px; + padding:4px 16px 4px 16px; + border-left:solid 1px rgb(175,175,175); + border-bottom: solid 1px rgb(175,175,175); + background-color:rgb(240,240,240); + font-weight:normal; + color:rgb(100,100,100); + color:#333; +} /*Color subcells normal mode*/ +.nav2 ul li:hover ul li a:hover +{ + background-color:rgb(215,215,215); + text-decoration:none; +} /*Color subcells hovering mode*/ +.nav2 table +{ + position:absolute; + top:0; + left:-1px; + border-collapse:collapse; +} +.nav2 ul li a:hover +{ + position:relative /*Sylvain IE hack*/; + z-index:1000 /*Sylvain IE hack*/; + background-color:rgb(215,215,215); + text-decoration:none; +} /*Color main cells hovering mode*/ +.nav2 ul li a:hover ul +{ + display:block; + width:12.0em; + position:absolute; + z-index:999; + top:2.1em; + t\op:2.0em; + left:0; + marg\in-top:0.1em; +} +.nav2 ul li a:hover ul li a +{ + white-space:normal; + display:block; + w\idth:12.0em; + height:1px; + line-height:1.3em; + padding:4px 16px 4px 16px; + border-left:solid 1px rgb(175,175,175); + border-bottom: solid 1px rgb(175,175,175); + background-color:rgb(240,240,240); + font-weight:normal; + color:rgb(50,50,50); +} /*Color subcells normal mode*/ +.nav2 ul li a:hover ul li a:hover +{ + background-color:rgb(215,215,215); + text-decoration:none; +} /*Color subcells hovering mode*/ + +/*nav3-grid ****************************************/ +.nav3-grid +{ + width:199px; + border-bottom:solid 1px rgb(200,200,200); +} +.nav3-grid dt a, .nav3-grid dt a:visited +{ + display:block; + min-height:2.0em /*Non-IE6*/; + height:auto !important; + height:2.0em /*IE6*/; + line-height:2.0em; + padding:0px 10px 0px 20px; + border-top: solid 1px rgb(200,200,200); + text-decoration:none; + color:rgb(70,122,167); + font-weight:bold; + font-size:100%; +} +.nav3-grid dd a, .nav3-grid dd a:visited +{ + display:block; + min-height:1.7em /*Non-IE6*/; + height:auto !important; + height:1.7em /*IE6*/; + line-height:1.7em; + padding:0px 10px 0px 40px; + border:none; + font-weight:normal; + text-decoration:none; + color:rgb(70,122,167); + font-size:100%; +} +.nav3-grid dt a:hover, .nav3-grid dd a:hover +{ + background-color:rgb(225,225,225); + color:rgb(42,90,138); + text-decoration:none; +} + +/*nav3-nobullet *********************/ +nav3-bullet +{ + width:170px; + margin:10px 0 0 20px; +} +.nav3-bullet dt a, .nav3-bullet dt a:visited +{ + line-height:2.0em; + padding:0 0 0 10px; + background:url(img/bg_bullet_full_1.gif) no-repeat 0px 50%; + text-decoration:none; + color:rgb(70,122,167); + font-weight:bold; + font-size:120%; +} +.nav3-bullet dd a, .nav3-bullet dd a:visited +{ + line-height:1.7em; + margin:0 0 0 15px; + padding:0 0 0 10px; + background:url(img/bg_bullet_half_1.gif) no-repeat 0px 50%; + text-decoration:none; + color:rgb(70,122,167); + font-weight:normal; + font-size:120%; +} +.nav3-bullet dt a:hover +{ + background:url(img/bg_bullet_full_2.gif) no-repeat 0px 50%; + text-decoration:underline; + color:rgb(42,90,138); +} +.nav3-bullet dd a:hover +{ + background:url(img/bg_bullet_half_2.gif) no-repeat 0px 50%; + text-decoration:underline; + color:rgb(42,90,138); +} +.nav3-nobullet +{ + width:170px; + margin:10px 0 0 20px; +} +.nav3-nobullet dt a, .nav3-nobullet dt a:visited +{ + line-height:2.0em; + text-decoration:none; + color:rgb(70,122,167); + font-weight:bold; + font-size:120%; +} +.nav3-nobullet dd a, .nav3-nobullet dd a:visited +{ + line-height:1.7em; + margin:0 0 0 15px; + text-decoration:none; + color:rgb(70,122,167); + font-weight:normal; + font-size:120%; +} +.nav3-nobullet dt a:hover, .nav3-nobullet dd a:hover +{ + text-decoration:underline; + color:rgb(42,90,138); +} + +/*main-navigation ************************************************/ +.main-navigation .loginform +{ + width:160px; + margin:-10px 20px 0 20px; +} +.main-navigation .loginform p +{ + clear:both; + margin:0; + padding:0; +} +.main-navigation .loginform fieldset +{ + width:160px; + border:none; +} +.main-navigation .loginform label.top +{ + float:left; + width:125px; + margin:0 0 2px 0; + font-size:110%; +} +.main-navigation .loginform label.right +{ + float:left; + width:125px; + margin:5px 0 0 0; + padding:0 0 0 3px; + /*IE6*/; + font-size:110%; +} +.main-navigation .loginform input.field +{ + width:158px; + margin:0 0 5px 0; + padding:0.1em 0 0.2em 0 !important /*Non-IE6*/; + padding:0.2em 0 0.3em 0 /*IE6*/; + border:solid 1px rgb(200,200,200); + font-family:verdana,arial,sans-serif; + font-size:110%; +} +.main-navigation .loginform input.checkbox +{ + float:left; + margin:5px 0 0 0 !important /*Non-IE6*/; + margin:2px 0 0 -3px /*IE6*/; + border:none; +} +.main-navigation .loginform input.button +{ + float:left; + width:5.0em; + margin:10px 0 5px 0; + padding:1px; + background:rgb(230,230,230); + border:solid 1px rgb(150,150,150); + text-align:center; + font-family:verdana,arial,sans-serif; + color:rgb(150,150,150); + font-size:110%; +} +.main-navigation .loginform input.button:hover +{ + cursor:pointer; + border:solid 1px rgb(80,80,80); + background:rgb(220,220,220); + color:rgb(80,80,80); +} +.main-navigation .searchform +{ + width:160px; + margin:0 20px 0 20px; +} +.main-navigation .searchform p +{ + clear:both; + margin:0; + padding:0; +} +.main-navigation .searchform fieldset +{ + border:none; +} +.main-navigation .searchform input.field +{ + float:left; + width:158px; + padding:0.1em 0 0.2em 0 !important /*Non-IE6*/; + padding:0.2em 0 0.3em 0 /*IE6*/; + border:1px solid rgb(200,200,200); + font-family:verdana,arial,sans-serif; + font-size:120%; +} +.main-navigation .searchform input.button +{ + float:left; + width:3.0em; + margin-top: 0.5em; + padding:1px; + background:rgb(230,230,230); + border:solid 1px rgb(150,150,150); + text-align:center; + font-family:verdana,arial,sans-serif; + color:rgb(150,150,150); + font-size:120%; +} +.main-navigation .searchform input.button:hover +{ + cursor:pointer; + border:solid 1px rgb(80,80,80); + background:rgb(220,220,220); + color:rgb(80,80,80); +} +.main-navigation h1.first +{ + clear:both; + margin:0px; + padding:4px 20px 3px 20px; + background-color:rgb(190,190,190); + background-color:#89aad6; + font-family:"trebuchet ms",arial,sans-serif; + color:rgb(255,255,255); + font-weight:bold; +} +.main-navigation h1 +{ + clear:both; + margin:30px 0 20px 0; + padding:4px 20px 3px 20px; + background:rgb(190,190,190); + background:#89aad6; + font-family:"trebuchet ms",arial,sans-serif; + color:rgb(255,255,255); + font-weight:bold; + font-size:1.2em; +} +.main-navigation h2 +{ + clear:both; + margin:20px 10px 10px 20px; + font-family:"trebuchet ms",arial,sans-serif; + color:rgb(100,100,100); + font-weight:bold; + font-size:150%; +} +.main-navigation h3 +{ + clear:both; + margin:10px 10px 5px 20px; + color:rgb(80,80,80); + font-weight:bold; + font-size:110%; +} /* Note: h2 not existent, to make identical to formats for main-navigation for easier exchange */ +.main-navigation p +{ + clear:both; + margin:0 10px 10px 20px; + color:rgb(80,80,80); + line-height:1.3em; + font-size:110%; +} +.main-navigation p.center +{ + text-align:center; +} +.main-navigation p.right +{ + text-align:right; +} +.main-navigation ul +{ + list-style:none; + margin:0.5em 5px 1.0em 5px; +} +.main-navigation ul li +{ + margin:5px 0 0.2em 2px; + background-image:none; + line-height:1.4em; + font-size:90%; + color:#467aa7; + font-weight:normal; +} +.main-navigation a, +.main-navigation ul li ul li, +.main-navigation ul li ul li a, +.main-navigation ul li ul li a:visited +{ + color:#333; + font-weight:normal; +} +.main-navigation ol +{ + margin:0.5em 10px 1.0em 40px !important /*Non-IE6*/; + margin:0.5em 10px 1.0em 45px /*IE6*/; +} +.main-navigation ol li +{ + list-style-position:outside; + margin:0 0 0.4em 0; + font-size:110%; +} + +.main-navigation +{ + font-size:14px; + display:inline /*Fix IE floating margin bug*/; + float:left; + width:200px; + height:100%; + overflow:visible !important /*Firefox*/; + overflow:hidden /*IE6*/; + background:rgb(245,245,245); +} + +.main-navigation .round-border-topright +{ + width:10px; + height:10px; + position:absolute; + z-index:10; + margin:0 0 0 190px; + background:url(img/bg_corner_topright.gif) no-repeat; +} + +.main-navigation h2 +{ + margin: 5px 10px 5px 10px; +} +.main-navigation h1.first ,.main-navigation h1 +{ + background-color:#89aad6 !important; +} +.main-navigation +{ + background-color:#d5e1f0 !important; +} + + diff --git a/doc/doxygen/css/doxyMod.css b/doc/doxygen/css/doxyMod.css new file mode 100644 index 0000000000000000000000000000000000000000..01d666e03e7443e8e25f4a7c514f2329309fcbe4 --- /dev/null +++ b/doc/doxygen/css/doxyMod.css @@ -0,0 +1,54 @@ +/* Modifications to standard doxygen style */ + +/* needs space between surrounding border */ +.contents { + padding-left: 10px; + padding-right: 10px; +} + +/* needs space between surrounding border */ +.contents ul { + margin-left: 20px; + list-style-type: square; +} + + +/* colour and underline to match OpenCFD style */ +.contents h1, +.contents h2 +{ + color: #646464; + padding-top: 1em; + padding-bottom: 1em; + margin-bottom: 1em; + border-bottom: 7px solid #E1E1E1; +} + +/* sub-heading as per navigation background */ +.contents h2 +{ + margin-top: 1em; + background: rgb(240,240,240); +} + + +/* match overall border style */ +.contents hr +{ + border: 2px solid rgb(175,175,175); + margin: 1em -10px; +} + + +/* client-side search */ +/* #MSearchResultsWindow { } */ + + +/* table displayed in "Class List" */ +td.indexkey, +td.indexvalue, +tr.memlist +{ + background-color: #F0F0F0; +} + diff --git a/doc/doxygen/css/doxyTabs.css b/doc/doxygen/css/doxyTabs.css new file mode 100644 index 0000000000000000000000000000000000000000..1cc5525827bbbf7270e1e4ede0aa27ab87898613 --- /dev/null +++ b/doc/doxygen/css/doxyTabs.css @@ -0,0 +1,146 @@ +/* + * tabs styles, without slidingdoor graphics + * http://www.alistapart.com/articles/slidingdoors + */ + +div.navigation +{ + margin: 0px; + padding: 0px; + border-bottom: 3px solid rgb(175,175,175); +} + + +div.tabs +{ + width : 100%; + padding-top : 5px; + padding-bottom : 5px; + background: rgb(240,240,240); + border-bottom: 1px solid rgb(175,175,175); +} + +div.tabs ul +{ + margin: 0px; + padding-left: 10px; + padding-right: 10px; + list-style: none; +/* max-height: 16px; */ +} + + +div.tabs li, div.tabs form +{ + display : inline; + margin : 0px; + padding : 0px; +} + +div.tabs ul li +{ + padding-top: 10px; + padding-bottom: 10px; + height: 100%; +} + +div.tabs form +{ + padding : 0px 9px; +} + +div.tabs a +{ + font-size : 12px; + font-weight : normal; + text-decoration : none; + border-right: 1px solid rgb(175,175,175); +} + +/* not needed - no image */ +div.tabs a:hover +{ + background-position: 100% -150px; +} + +div.tabs a:link, +div.tabs a:visited, +div.tabs a:active, +div.tabs a:hover +{ + color : #000000; + color:#555; +} + +div.tabs span +{ + display : inline; + padding : 0px 9px; + white-space : nowrap; +} + +/* client-side search */ +div.tabs #MSearchBox +{ + float : right; + background : white; + display : inline; + font-size : 1em; +} + +div.tabs #MSearchSelect +{ + float : left; + display : inline; + font-size : 1em; +} + +/* old name? */ +div.tabs input +{ + float : right; + display : inline; + font-size : 1em; +} + +div.tabs td +{ + font-size : 80%; + font-weight : bold; + text-decoration : none; +} + +/* Commented backslash hack hides rule from IE5-Mac \*/ +div.tabs span { float : none; } +/* End IE5-Mac hack */ + +/* not needed - no image */ +div.tabs a:hover span +{ + background-position: 0% -150px; +} + +div.tabs li.current a +{ + border-width : 0px; + border-right: 1px solid rgb(175,175,175); + color : #555; +} + +div.tabs li.current span +{ + padding-bottom: 0px; + white-space: nowrap; + font-style: italic; +} + +div.navpath +{ + background : none; + border : none; + margin : 10px 0px; + padding : 0px; + font-size : 110%; + text-align : center; +} + diff --git a/doc/doxygen/css/doxygen.css b/doc/doxygen/css/doxygen.css new file mode 100644 index 0000000000000000000000000000000000000000..c063349e6e9585dc60db50fa148db70e762484ac --- /dev/null +++ b/doc/doxygen/css/doxygen.css @@ -0,0 +1,548 @@ +/* The standard CSS for doxygen */ + +/* set these elsewhere!! */ +/* +body, table, div, p, dl { + font-family: Lucida Grande, Verdana, Geneva, Arial, sans-serif; + font-size: 12px; +} +*/ + +/* @group Heading Levels */ + +h1 { + text-align: center; + font-size: 150%; +} + +h2 { + font-size: 120%; +} + +h3 { + font-size: 100%; +} + +dt { + font-weight: bold; +} + +div.multicol { + -moz-column-gap: 1em; + -webkit-column-gap: 1em; + -moz-column-count: 3; + -webkit-column-count: 3; +} + +p.startli, p.startdd, p.starttd { + margin-top: 2px; +} + +p.endli { + margin-bottom: 0px; +} + +p.enddd { + margin-bottom: 4px; +} + +p.endtd { + margin-bottom: 2px; +} + +/* @end */ + +caption { + font-weight: bold; +} + +span.legend { + font-size: 70%; + text-align: center; +} + +h3.version { + font-size: 90%; + text-align: center; +} + +div.qindex, div.navtab{ + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + padding: 2px; +} + +div.qindex, div.navpath { + width: 100%; + line-height: 140%; +} + +div.navtab { + margin-right: 15px; +} + +/* @group Link Styling */ + +a { + color: #153788; + font-weight: normal; + text-decoration: none; +} + +.contents a:visited { + color: #1b77c5; +} + +a:hover { + text-decoration: underline; +} + +a.qindex { + font-weight: bold; +} + +a.qindexHL { + font-weight: bold; + background-color: #6666cc; + color: #ffffff; + border: 1px double #9295C2; +} + +.contents a.qindexHL:visited { + color: #ffffff; +} + +a.el { + font-weight: bold; +} + +a.elRef { +} + +a.code { + color: #3030f0; +} + +a.codeRef { + color: #3030f0; +} + +/* @end */ + +dl.el { + margin-left: -1cm; +} + +.fragment { + font-family: monospace, fixed; + font-size: 105%; +} + +pre.fragment { + border: 1px solid #CCCCCC; + background-color: #f5f5f5; + padding: 4px 6px; + margin: 4px 8px 4px 2px; + overflow: auto; + word-wrap: break-word; + font-size: 9pt; + line-height: 125%; +} + +div.ah { + background-color: black; + font-weight: bold; + color: #ffffff; + margin-bottom: 3px; + margin-top: 3px +} + +div.groupHeader { + margin-left: 16px; + margin-top: 12px; + margin-bottom: 6px; + font-weight: bold; +} + +div.groupText { + margin-left: 16px; + font-style: italic; +} + +body { + background: white; + color: black; + margin-right: 20px; + margin-left: 20px; +} + +td.indexkey { + background-color: #e8eef2; + font-weight: bold; + border: 1px solid #CCCCCC; + margin: 2px 0px 2px 0; + padding: 2px 10px; +} + +td.indexvalue { + background-color: #e8eef2; + border: 1px solid #CCCCCC; + padding: 2px 10px; + margin: 2px 0px; +} + +tr.memlist { + background-color: #f0f0f0; +} + +p.formulaDsp { + text-align: center; +} + +img.formulaDsp { + +} + +img.formulaInl { + vertical-align: middle; +} + +div.center { + text-align: center; + margin-top: 0px; + margin-bottom: 0px; + padding: 0px; +} + +div.center img { + border: 0px; +} + +img.footer { + border: 0px; + vertical-align: middle; +} + +/* @group Code Colorization */ + +span.keyword { + color: #008000 +} + +span.keywordtype { + color: #604020 +} + +span.keywordflow { + color: #e08000 +} + +span.comment { + color: #800000 +} + +span.preprocessor { + color: #806020 +} + +span.stringliteral { + color: #002080 +} + +span.charliteral { + color: #008080 +} + +span.vhdldigit { + color: #ff00ff +} + +span.vhdlchar { + color: #000000 +} + +span.vhdlkeyword { + color: #700070 +} + +span.vhdllogic { + color: #ff0000 +} + +/* @end */ + +.search { + color: #003399; + font-weight: bold; +} + +form.search { + margin-bottom: 0px; + margin-top: 0px; +} + +input.search { + font-size: 75%; + color: #000080; + font-weight: normal; + background-color: #e8eef2; +} + +td.tiny { + font-size: 75%; +} + +.dirtab { + padding: 4px; + border-collapse: collapse; + border: 1px solid #84b0c7; +} + +th.dirtab { + background: #e8eef2; + font-weight: bold; +} + +hr { + height: 0px; + border: none; + border-top: 1px solid #666; +} + +hr.footer { + height: 1px; +} + +/* @group Member Descriptions */ + +.mdescLeft, .mdescRight, +.memItemLeft, .memItemRight, +.memTemplItemLeft, .memTemplItemRight, .memTemplParams { + background-color: #FAFAFA; + border: none; + margin: 4px; + padding: 1px 0 0 8px; +} + +.mdescLeft, .mdescRight { + padding: 0px 8px 4px 8px; + color: #555; +} + +.memItemLeft, .memItemRight, .memTemplParams { + border-top: 1px solid #ccc; +} + +.memItemLeft, .memTemplItemLeft { + white-space: nowrap; +} + +.memTemplParams { + color: #606060; + white-space: nowrap; +} + +/* @end */ + +/* @group Member Details */ + +/* Styles for detailed member documentation */ + +.memtemplate { + font-size: 80%; + color: #606060; + font-weight: normal; + margin-left: 3px; +} + +.memnav { + background-color: #e8eef2; + border: 1px solid #84b0c7; + text-align: center; + margin: 2px; + margin-right: 15px; + padding: 2px; +} + +.memitem { + padding: 0; + margin-bottom: 10px; +} + +.memname { + white-space: nowrap; + font-weight: bold; + margin-left: 6px; +} + +.memproto { + border-top: 1px solid #84b0c7; + border-left: 1px solid #84b0c7; + border-right: 1px solid #84b0c7; + padding: 0; + background-color: #d5e1e8; + font-weight: bold; + /* firefox specific markup */ + background-image: -moz-linear-gradient(rgba(228, 233, 245, 1.0) 0%, rgba(193, 205, 232, 1.0) 100%); + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + -moz-border-radius-topright: 8px; + -moz-border-radius-topleft: 8px; + /* webkit specific markup */ + background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, from(rgba(228, 233, 245, 1.0)), to(rgba(193, 205, 232, 1.0))); + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); + -webkit-border-top-right-radius: 8px; + -webkit-border-top-left-radius: 8px; + +} + +.memdoc { + border-bottom: 1px solid #84b0c7; + border-left: 1px solid #84b0c7; + border-right: 1px solid #84b0c7; + padding: 2px 5px; + background-color: #eef3f5; + border-top-width: 0; + /* firefox specific markup */ + -moz-border-radius-bottomleft: 8px; + -moz-border-radius-bottomright: 8px; + -moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px; + /* webkit specific markup */ + -webkit-border-bottom-left-radius: 8px; + -webkit-border-bottom-right-radius: 8px; + -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15); +} + +.paramkey { + text-align: right; +} + +.paramtype { + white-space: nowrap; +} + +.paramname { + color: #602020; + white-space: nowrap; +} +.paramname em { + font-style: normal; +} + +/* @end */ + +/* @group Directory (tree) */ + +/* for the tree view */ + +.ftvtree { + font-family: sans-serif; + margin: 0.5em; +} + +/* these are for tree view when used as main index */ + +.directory { + font-size: 9pt; + font-weight: bold; +} + +.directory h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +/* +The following two styles can be used to replace the root node title +with an image of your choice. Simply uncomment the next two styles, +specify the name of your image and be sure to set 'height' to the +proper pixel height of your image. +*/ + +/* +.directory h3.swap { + height: 61px; + background-repeat: no-repeat; + background-image: url("yourimage.gif"); +} +.directory h3.swap span { + display: none; +} +*/ + +.directory > h3 { + margin-top: 0; +} + +.directory p { + margin: 0px; + white-space: nowrap; +} + +.directory div { + display: none; + margin: 0px; +} + +.directory img { + vertical-align: -30%; +} + +/* these are for tree view when not used as main index */ + +.directory-alt { + font-size: 100%; + font-weight: bold; +} + +.directory-alt h3 { + margin: 0px; + margin-top: 1em; + font-size: 11pt; +} + +.directory-alt > h3 { + margin-top: 0; +} + +.directory-alt p { + margin: 0px; + white-space: nowrap; +} + +.directory-alt div { + display: none; + margin: 0px; +} + +.directory-alt img { + vertical-align: -30%; +} + +/* @end */ + +address { + font-style: normal; + color: #333; +} + +table.doxtable { + border-collapse:collapse; +} + +table.doxtable td, table.doxtable th { + border: 1px solid #153788; + padding: 3px 7px 2px; +} + +table.doxtable th { + background-color: #254798; + color: #FFFFFF; + font-size: 110%; + padding-bottom: 4px; + padding-top: 5px; + text-align:left; +} + diff --git a/doc/doxygen/css/img/OpenCFDlogo.png b/doc/doxygen/css/img/OpenCFDlogo.png new file mode 100644 index 0000000000000000000000000000000000000000..15c03032cad560b323539fd1567fcdac036612da Binary files /dev/null and b/doc/doxygen/css/img/OpenCFDlogo.png differ diff --git a/doc/doxygen/css/img/bg_bullet_full_1.gif b/doc/doxygen/css/img/bg_bullet_full_1.gif new file mode 100644 index 0000000000000000000000000000000000000000..45cce6f70731fde7681290309d061eb3485885d2 Binary files /dev/null and b/doc/doxygen/css/img/bg_bullet_full_1.gif differ diff --git a/doc/doxygen/css/img/bg_bullet_full_2.gif b/doc/doxygen/css/img/bg_bullet_full_2.gif new file mode 100644 index 0000000000000000000000000000000000000000..98807b21e1924965ac7c8f294b91e2a7c4b39860 Binary files /dev/null and b/doc/doxygen/css/img/bg_bullet_full_2.gif differ diff --git a/doc/doxygen/css/img/bg_bullet_half_1.gif b/doc/doxygen/css/img/bg_bullet_half_1.gif new file mode 100644 index 0000000000000000000000000000000000000000..04e6f94141bc53e94305667bff3619674efee4ca Binary files /dev/null and b/doc/doxygen/css/img/bg_bullet_half_1.gif differ diff --git a/doc/doxygen/css/img/bg_bullet_half_2.gif b/doc/doxygen/css/img/bg_bullet_half_2.gif new file mode 100644 index 0000000000000000000000000000000000000000..9be6bc623d141645afceebe8c36a34711102d034 Binary files /dev/null and b/doc/doxygen/css/img/bg_bullet_half_2.gif differ diff --git a/doc/doxygen/css/img/bg_corner_topright.gif b/doc/doxygen/css/img/bg_corner_topright.gif new file mode 100644 index 0000000000000000000000000000000000000000..95b146294bb3ffdc32b3ecdbeca7cfa00d32a132 Binary files /dev/null and b/doc/doxygen/css/img/bg_corner_topright.gif differ diff --git a/doc/doxygen/css/img/bg_head_corner_topleft_25px.gif b/doc/doxygen/css/img/bg_head_corner_topleft_25px.gif new file mode 100644 index 0000000000000000000000000000000000000000..e70f44a1c9158026955bdc1dd749399120060017 Binary files /dev/null and b/doc/doxygen/css/img/bg_head_corner_topleft_25px.gif differ diff --git a/doc/doxygen/css/img/bg_head_corner_topright_25px.gif b/doc/doxygen/css/img/bg_head_corner_topright_25px.gif new file mode 100644 index 0000000000000000000000000000000000000000..1bcf6a6a4c610a6a28601037b62c3e838f141381 Binary files /dev/null and b/doc/doxygen/css/img/bg_head_corner_topright_25px.gif differ diff --git a/doc/doxygen/css/openfoam.css b/doc/doxygen/css/openfoam.css new file mode 100644 index 0000000000000000000000000000000000000000..a2e67a318d4d55091a7d80988fadaabf08b5d08d --- /dev/null +++ b/doc/doxygen/css/openfoam.css @@ -0,0 +1,7 @@ +/* import doxygen-specific styles */ +@import url(doxygen.css); /* standard doxygen style with very minor mods */ +@import url(doxyMod.css); /* modifications to standard doxygen style */ +@import url(doxyTabs.css); /* modified doxygen tabs style */ +@import url(cfdLayout.css); /* OpenCFD layout styles */ +@import url(cfdNav.css); /* OpenCFD navigation styles */ + diff --git a/etc/bashrc b/etc/bashrc index 56d16635092396e2efe5de7a52c0b99315220271..cd5e43239ecb0d9ebd48ccb8e4b5bb66f9334a76 100644 --- a/etc/bashrc +++ b/etc/bashrc @@ -90,6 +90,22 @@ _foamSource() foamPrefs=`$WM_PROJECT_DIR/bin/foamEtcFile prefs.sh` && _foamSource $foamPrefs unset foamPrefs +# Evaluate command-line parameters +while [ $# -gt 0 ] +do + case "$1" in + *=) + # name= -> unset name + eval "unset ${1%=}" + ;; + *=*) + # name=value -> export name=value + eval "export $1" + ;; + esac + shift +done + # Operating System/Platform # ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/controlDict b/etc/controlDict index f74a8bc38fff491fc43c93a3b3428cef7a7f9bb4..891e010e0ccc54b7b1a263297fc2133918d54965 100644 --- a/etc/controlDict +++ b/etc/controlDict @@ -18,11 +18,11 @@ FoamFile Documentation { - docBrowser "kde-open %f"; + docBrowser "firefox %f"; doxyDocDirs ( - "$WM_PROJECT_USER_DIR/Doxygen/html" - "~OpenFOAM/Doxygen/html" + "$WM_PROJECT_USER_DIR/html" + "~OpenFOAM/html" "$WM_PROJECT_DIR/doc/Doxygen/html" ); doxySourceFileExts diff --git a/etc/cshrc b/etc/cshrc index 77d2d6543c8c6ecaec5fc48ab5207c4c7cc284e2..95a594da6b3ec76ccc7d065686d9e222c68e7046 100644 --- a/etc/cshrc +++ b/etc/cshrc @@ -78,6 +78,21 @@ if ( $status == 0 ) then endif unset foamPrefs +# Evaluate command-line parameters +while ( $#argv > 0 ) + switch ($argv[1]) + case *=: + # name= -> unsetenv name + eval "unsetenv $argv[1]:s/=//" + breaksw + case *=*: + # name=value -> setenv name value + eval "setenv $argv[1]:s/=/ /" + breaksw + endsw + shift +end + # Operating System/Platform # ~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/etc/settings.csh b/etc/settings.csh index 44a25b32a99855a9fe5c36611ee03c797f5269aa..5df50a809aeb9dce1998b6251aaf1a283f8bcfaa 100644 --- a/etc/settings.csh +++ b/etc/settings.csh @@ -121,7 +121,6 @@ case OpenFOAM: 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 - if ( $?mpc_version ) then set mpcDir=$WM_THIRD_PARTY_DIR/platforms/$WM_ARCH$WM_COMPILER_ARCH/$mpc_version endif diff --git a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C index 91d92e674f21413b65890fd5868bc84ce642372d..dbc83a2736267e38d860e7376364e6453c963386 100644 --- a/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C +++ b/src/OpenFOAM/db/dictionary/primitiveEntry/primitiveEntryIO.C @@ -213,7 +213,7 @@ void Foam::primitiveEntry::write(Ostream& os) const { os.writeKeyword(keyword()); - for (label i=0; i<size(); i++) + for (label i=0; i<size(); ++i) { os << operator[](i); diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index b3937e4495370db5a7b17352b4460a188c00b98a..82c6ff47c95145c5dec3ec5418f4a44b257824d4 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -344,7 +344,7 @@ void Foam::argList::getRootCase() else { // qualify relative path - fileName casePath = cwd()/rootPath_/globalCase_; + casePath = cwd()/rootPath_/globalCase_; casePath.clean(); setEnv("FOAM_CASE", casePath, true); @@ -881,7 +881,12 @@ void Foam::argList::displayDoc(bool source) const if (found) { - string docBrowser(docDict.lookup("docBrowser")); + string docBrowser = getEnv("FOAM_DOC_BROWSER"); + if (docBrowser.empty()) + { + docDict.lookup("docBrowser") >> docBrowser; + } + // can use FOAM_DOC_BROWSER='application file://%f' if required docBrowser.replaceAll("%f", docFile); Info<< "Show documentation: " << docBrowser.c_str() << endl; diff --git a/src/OpenFOAM/global/argList/argList.H b/src/OpenFOAM/global/argList/argList.H index c36955d5ced42210f5407513d6e374c971daff4c..7865f645e6d43a4c20a5d13994325660544ca846 100644 --- a/src/OpenFOAM/global/argList/argList.H +++ b/src/OpenFOAM/global/argList/argList.H @@ -37,7 +37,7 @@ Description @verbatim ( "file1.txt" "file2.txt" ... "fileN.txt" ) @endverbatim - The backslash-escaping has been used to avoid shell expansions. + The backslash-escaping is required to avoid interpretation by the shell. @par Default command-line options @param -case \<dir\> \n @@ -57,10 +57,14 @@ Description global case. Note - - Adjustment of the valid (mandatory) arguments + - The document browser used is defined by the @b FOAM_DOC_BROWSER + environment variable or the <tt>Documentation/docBrowser</tt> entry + in the <tt>~OpenFOAM/controlDict</tt> file. + The \%f token is used as a placeholder for the file name. + - The valid (mandatory) arguments can be adjusted by directly manipulating the argList::validArgs static member. - - Adjustment of the valid options - via the addOption/removeOption static methods or by directly + - The valid options can be adjusted + via the addOption/removeOption static methods instead of directly manipulating the argList::validOptions static member. SourceFiles @@ -168,7 +172,7 @@ public: initValidTables(); }; - //! @endcond ignoreDocumentation + //! @endcond // Constructors diff --git a/src/OpenFOAM/global/debug/debug.C b/src/OpenFOAM/global/debug/debug.C index 533e33959634a6ee3bf6d58d333bcfb7511d8ba6..c6cc3aa04c280c2747e08701f17bb7ae44555319 100644 --- a/src/OpenFOAM/global/debug/debug.C +++ b/src/OpenFOAM/global/debug/debug.C @@ -63,7 +63,7 @@ public: }; deleteControlDictPtr deleteControlDictPtr_; -//! @endcond ignoreDocumentation +//! @endcond } // End namespace debug diff --git a/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.C b/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.C new file mode 100644 index 0000000000000000000000000000000000000000..2fa74142cd13e87a949a2d027af9de42bfec4ffe --- /dev/null +++ b/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.C @@ -0,0 +1,126 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +\*---------------------------------------------------------------------------*/ + +#include "interpolateSplineXY.H" +#include "primitiveFields.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +Foam::Field<Type> Foam::interpolateSplineXY +( + const scalarField& xNew, + const scalarField& xOld, + const Field<Type>& yOld +) +{ + Field<Type> yNew(xNew.size()); + + forAll(xNew, i) + { + yNew[i] = interpolateSmoothXY(xNew[i], xOld, yOld); + } + + return yNew; +} + + +template<class Type> +Type Foam::interpolateSplineXY +( + const scalar x, + const scalarField& xOld, + const Field<Type>& yOld +) +{ + label n = xOld.size(); + + // early exit if out of bounds or only one value + if (n == 1 || x < xOld[0]) + { + return yOld[0]; + } + if (x > xOld[n - 1]) + { + return yOld[n - 1]; + } + + // linear interpolation if only two values + if (n == 2) + { + return (x - xOld[0])/(xOld[1] - xOld[0])*(yOld[1] - yOld[0]) + yOld[0]; + } + + // find bounding knots + label hi = 0; + while (hi < n && xOld[hi] < x) + { + hi++; + } + + label lo = hi - 1; + + const Type& y1 = yOld[lo]; + const Type& y2 = yOld[hi]; + + Type y0; + if (lo == 0) + { + y0 = 2*y1 - y2; + } + else + { + y0 = yOld[lo - 1]; + } + + Type y3; + if (hi + 1 == n) + { + y3 = 2*y2 - y1; + } + else + { + y3 = yOld[hi + 1]; + } + + // weighting + scalar mu = (x - xOld[lo])/(xOld[hi] - xOld[lo]); + + // interpolate + return + 0.5 + *( + 2*y1 + + mu + *( + -y0 + y2 + + mu*((2*y0 - 5*y1 + 4*y2 - y3) + mu*(-y0 + 3*y1 - 3*y2 + y3)) + ) + ); +} + + +// ************************************************************************* // diff --git a/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.H b/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.H new file mode 100644 index 0000000000000000000000000000000000000000..7d06169ea8349ec5fe4743971a51483bf76e1759 --- /dev/null +++ b/src/OpenFOAM/interpolations/interpolateSplineXY/interpolateSplineXY.H @@ -0,0 +1,84 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 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 2 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, write to the Free Software Foundation, + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +InNamespace + Foam + +Description + Interpolates y values from one curve to another with a different x + distribution. + + Uses Catmull-Rom spline interpolation between points. + +SourceFiles + interpolateSplineXY.C + +\*---------------------------------------------------------------------------*/ + +#ifndef interpolateSplineXY_H +#define interpolateSplineXY_H + +#include "scalar.H" +#include "primitiveFieldsFwd.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +Field<Type> interpolateSplineXY +( + const scalarField& xNew, + const scalarField& xOld, + const Field<Type>& yOld +); + + +template<class Type> +Type interpolateSplineXY +( + const scalar x, + const scalarField& xOld, + const Field<Type>& yOld +); + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "interpolateSplineXY.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/OpenFOAM/interpolations/interpolateXY/interpolateXY.C b/src/OpenFOAM/interpolations/interpolateXY/interpolateXY.C index 5c45e33bd3c5232775104d131a85856df4e17310..45cff57a7a31255c890a3e247f13c1baf00b92d9 100644 --- a/src/OpenFOAM/interpolations/interpolateXY/interpolateXY.C +++ b/src/OpenFOAM/interpolations/interpolateXY/interpolateXY.C @@ -41,7 +41,7 @@ Field<Type> interpolateXY const Field<Type>& yOld ) { - scalarField yNew(xNew.size()); + Field<Type> yNew(xNew.size()); forAll(xNew, i) { diff --git a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C index c9a8678f64347995e51f3fd490c9be8a4b771195..74910b856cfc2f6858950c24658bd814e44d5b41 100644 --- a/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C +++ b/src/OpenFOAM/interpolations/primitivePatchInterpolation/PrimitivePatchInterpolation.C @@ -125,7 +125,7 @@ void PrimitivePatchInterpolation<Patch>::makeFaceToEdgeWeights() const faceToEdgeWeightsPtr_ = new scalarList(patch_.nInternalEdges()); scalarList& weights = *faceToEdgeWeightsPtr_; - for (label edgei = 0; edgei < weights.size(); edgei++) + forAll(weights, edgei) { vector P = faces[edgeFaces[edgei][0]].centre(points); vector N = faces[edgeFaces[edgei][1]].centre(points); diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C index 59fffd80eef46972768ce2a3da60d93e1ae0fd06..1f95df8baf87e3b5d410e8c8467cdadc9a30f176 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/cyclicLduInterface.C @@ -28,10 +28,8 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(cyclicLduInterface, 0); -} +defineTypeNameAndDebug(Foam::cyclicLduInterface, 0); + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduInterface.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduInterface.C index 9c862b7c61cbdf031c7169232b0c940f94ceeb46..27c261e0593a9d39f4f1041e92d7c66d71b66189 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/lduInterface.C @@ -25,23 +25,15 @@ License #include "lduInterface.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(lduInterface, 0); +defineTypeNameAndDebug(Foam::lduInterface, 0); + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -lduInterface::~lduInterface() +Foam::lduInterface::~lduInterface() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.C index 09b5ce0d57b031f13889014625396564dcceada1..1d5e3632b2bd39fde47bc97b85959d88d9afe057 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterface/processorLduInterface.C @@ -27,10 +27,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(processorLduInterface, 0); -} +defineTypeNameAndDebug(Foam::processorLduInterface, 0); // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C index f16a4eb20a8105fbe7edd9576ed5e31939a1034b..472cec83f231156373e7073ec82e2e947632dbfd 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/cyclicLduInterfaceField/cyclicLduInterfaceField.C @@ -28,10 +28,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(cyclicLduInterfaceField, 0); -} +defineTypeNameAndDebug(Foam::cyclicLduInterfaceField, 0); // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C index 29830dde54473c435f276d9fcf6b79cba75beada..a3c6cca9b811d86884f0c33a233d008db5d43289 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/lduInterfaceField/lduInterfaceField.C @@ -25,23 +25,14 @@ License #include "lduInterfaceField.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(lduInterfaceField, 0); +defineTypeNameAndDebug(Foam::lduInterfaceField, 0); // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -lduInterfaceField::~lduInterfaceField() +Foam::lduInterfaceField::~lduInterfaceField() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C index 23386a89f28520b33cc821d363524cf912c69361..e6c1b341e1f6654f6b114c5a1da1a1c332f19911 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduAddressing/lduInterfaceFields/processorLduInterfaceField/processorLduInterfaceField.C @@ -28,10 +28,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(processorLduInterfaceField, 0); -} +defineTypeNameAndDebug(Foam::processorLduInterfaceField, 0); // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C index 31e52646cf38424ba90920aeb1fd21a33be48fed..9f155f94edac845b8003d82b6bccf5b988feca78 100644 --- a/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C +++ b/src/OpenFOAM/matrices/lduMatrix/lduMatrix/lduMatrix.C @@ -28,10 +28,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(lduMatrix, 1); -} +defineTypeNameAndDebug(Foam::lduMatrix, 1); const Foam::scalar Foam::lduMatrix::great_ = 1.0e+20; const Foam::scalar Foam::lduMatrix::small_ = 1.0e-20; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C index 2feefab0f425544afdcfbc9816f8c9ac84aa10dd..69946221608535290fb50a9446b718d939160049 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C @@ -27,10 +27,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(pairGAMGAgglomeration, 0); -} +defineTypeNameAndDebug(Foam::pairGAMGAgglomeration, 0); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/diagonalSolver/diagonalSolver.C b/src/OpenFOAM/matrices/lduMatrix/solvers/diagonalSolver/diagonalSolver.C index 0e9e3752fd4faa09f2729ae1ca3ea9529621751b..38852a0dfd2416a220beaddf099b449f56f61b75 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/diagonalSolver/diagonalSolver.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/diagonalSolver/diagonalSolver.C @@ -27,10 +27,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(diagonalSolver, 0); -} +defineTypeNameAndDebug(Foam::diagonalSolver, 0); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C index 841dbc7d0a47ac0f7590a53e32fc8a80785c0be5..1d4716a222efaea1a2d2d29287d82f2c77a34c29 100644 --- a/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C +++ b/src/OpenFOAM/matrices/scalarMatrices/SVD/SVD.C @@ -363,7 +363,7 @@ Foam::SVD::SVD(const scalarRectangularMatrix& A, const scalar minCondition) // zero singular values that are less than minCondition*maxS const scalar minS = minCondition*S_[findMax(S_)]; - for (label i = 0; i < S_.size(); i++) + forAll(S_, i) { if (S_[i] <= minS) { diff --git a/src/OpenFOAM/matrices/solution/solution.C b/src/OpenFOAM/matrices/solution/solution.C index e83fac416111ceb4aa3edecd76b8ab88a7b819a3..5aa40ae572e19d245c9fe683fe625ccbda38a4fa 100644 --- a/src/OpenFOAM/matrices/solution/solution.C +++ b/src/OpenFOAM/matrices/solution/solution.C @@ -41,7 +41,7 @@ static const Foam::List<Foam::word> subDictNames ( Foam::IStringStream("(preconditioner smoother)")() ); -//! @endcond localScope +//! @endcond // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/tolerances/tolerances.C b/src/OpenFOAM/matrices/tolerances/tolerances.C index dead8a2490e5cc27dcad0cbecfdddb9322579ba1..9becd91b604b5c4ff02148cbc8a14d8490cffa81 100644 --- a/src/OpenFOAM/matrices/tolerances/tolerances.C +++ b/src/OpenFOAM/matrices/tolerances/tolerances.C @@ -25,14 +25,9 @@ License #include "tolerances.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -tolerances::tolerances(const Time& t, const fileName& dictName) +Foam::tolerances::tolerances(const Time& t, const fileName& dictName) : IOdictionary ( @@ -58,7 +53,7 @@ tolerances::tolerances(const Time& t, const fileName& dictName) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool tolerances::read() +bool Foam::tolerances::read() { if (regIOobject::read()) { @@ -90,34 +85,34 @@ bool tolerances::read() } -bool tolerances::relax(const word& name) const +bool Foam::tolerances::relax(const word& name) const { return relaxationFactors_.found(name); } -scalar tolerances::relaxationFactor(const word& name) const + +Foam::scalar Foam::tolerances::relaxationFactor(const word& name) const { return readScalar(relaxationFactors_.lookup(name)); } -scalar tolerances::solverTolerance(const word& name) const + +Foam::scalar Foam::tolerances::solverTolerance(const word& name) const { return readScalar(solverTolerances_.lookup(name)); } -bool tolerances::solverRelativeTolerances() const + +bool Foam::tolerances::solverRelativeTolerances() const { return solverRelativeTolerances_.size(); } -scalar tolerances::solverRelativeTolerance(const word& name) const + +Foam::scalar Foam::tolerances::solverRelativeTolerance(const word& name) const { return readScalar(solverRelativeTolerances_.lookup(name)); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/generic/genericPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/generic/genericPointPatch.C index 9d9f8d7de284910e399cb7480ffb1440e0b6d6f5..ea58760984e897608ae83dc3ed375e7db6b179e4 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/generic/genericPointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/generic/genericPointPatch.C @@ -26,26 +26,20 @@ License #include "genericPointPatch.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineTypeNameAndDebug(genericPointPatch, 0); -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + // Add the patch constructor functions to the hash tables + addToRunTimeSelectionTable + ( + facePointPatch, + genericPointPatch, + polyPatch + ); +} -defineTypeNameAndDebug(genericPointPatch, 0); - -// Add the patch constructor functions to the hash tables -addToRunTimeSelectionTable -( - facePointPatch, - genericPointPatch, - polyPatch -); - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.C index ec9f20865fb7c09edf55652892dc6250c665b977..58078a615ca0c4ebf5720d415b085f34691d2de0 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/cyclic/cyclicPointPatch.C @@ -31,20 +31,18 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(cyclicPointPatch, 0); - -addToRunTimeSelectionTable -( - facePointPatch, - cyclicPointPatch, - polyPatch -); - +namespace Foam +{ + defineTypeNameAndDebug(cyclicPointPatch, 0); + addToRunTimeSelectionTable + ( + facePointPatch, + cyclicPointPatch, + polyPatch + ); +} // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // @@ -77,22 +75,22 @@ void Foam::cyclicPointPatch::calcGeometry(PstreamBuffers&) } -void cyclicPointPatch::initMovePoints(PstreamBuffers&, const pointField&) +void Foam::cyclicPointPatch::initMovePoints(PstreamBuffers&, const pointField&) {} -void cyclicPointPatch::movePoints(PstreamBuffers&, const pointField&) +void Foam::cyclicPointPatch::movePoints(PstreamBuffers&, const pointField&) {} -void cyclicPointPatch::initUpdateMesh(PstreamBuffers& pBufs) +void Foam::cyclicPointPatch::initUpdateMesh(PstreamBuffers& pBufs) { facePointPatch::initUpdateMesh(pBufs); cyclicPointPatch::initGeometry(pBufs); } -void cyclicPointPatch::updateMesh(PstreamBuffers& pBufs) +void Foam::cyclicPointPatch::updateMesh(PstreamBuffers& pBufs) { facePointPatch::updateMesh(pBufs); cyclicPointPatch::calcGeometry(pBufs); @@ -101,7 +99,7 @@ void cyclicPointPatch::updateMesh(PstreamBuffers& pBufs) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -cyclicPointPatch::cyclicPointPatch +Foam::cyclicPointPatch::cyclicPointPatch ( const polyPatch& patch, const pointBoundaryMesh& bm @@ -114,26 +112,22 @@ cyclicPointPatch::cyclicPointPatch // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -cyclicPointPatch::~cyclicPointPatch() +Foam::cyclicPointPatch::~cyclicPointPatch() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const edgeList& cyclicPointPatch::transformPairs() const +const Foam::edgeList& Foam::cyclicPointPatch::transformPairs() const { return cyclicPolyPatch_.coupledPoints(); } -const labelList& cyclicPointPatch::separatedPoints() const +const Foam::labelList& Foam::cyclicPointPatch::separatedPoints() const { return separatedPoints_; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/empty/emptyPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/empty/emptyPointPatch.C index 984196a91f84af7a46b892f5f5e22349f3386b0c..d08676867e5026e11861e1abe78829e462a6ee4b 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/empty/emptyPointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/empty/emptyPointPatch.C @@ -31,22 +31,19 @@ License namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(emptyPointPatch, 0); - -addToRunTimeSelectionTable -( - facePointPatch, - emptyPointPatch, - polyPatch -); + defineTypeNameAndDebug(emptyPointPatch, 0); + addToRunTimeSelectionTable + ( + facePointPatch, + emptyPointPatch, + polyPatch + ); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void emptyPointPatch::applyConstraint +void Foam::emptyPointPatch::applyConstraint ( const label pointi, pointConstraint& pc @@ -56,8 +53,4 @@ void emptyPointPatch::applyConstraint } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C index 78d961cc483b668b36c0546907efeb2aaf5da20f..79faa898cb5dea58bd12aed855b035782486ca89 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.C @@ -31,21 +31,18 @@ License #include "primitiveFacePatch.H" #include "emptyPolyPatch.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(processorPointPatch, 0); - -addToRunTimeSelectionTable -( - facePointPatch, - processorPointPatch, - polyPatch -); + defineTypeNameAndDebug(processorPointPatch, 0); + addToRunTimeSelectionTable + ( + facePointPatch, + processorPointPatch, + polyPatch + ); +} // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // @@ -123,22 +120,26 @@ void Foam::processorPointPatch::calcGeometry(PstreamBuffers& pBufs) } -void processorPointPatch::initMovePoints(PstreamBuffers&, const pointField&) +void Foam::processorPointPatch::initMovePoints +( + PstreamBuffers&, + const pointField& +) {} -void processorPointPatch::movePoints(PstreamBuffers&, const pointField&) +void Foam::processorPointPatch::movePoints(PstreamBuffers&, const pointField&) {} -void processorPointPatch::initUpdateMesh(PstreamBuffers& pBufs) +void Foam::processorPointPatch::initUpdateMesh(PstreamBuffers& pBufs) { facePointPatch::initUpdateMesh(pBufs); processorPointPatch::initGeometry(pBufs); } -void processorPointPatch::updateMesh(PstreamBuffers& pBufs) +void Foam::processorPointPatch::updateMesh(PstreamBuffers& pBufs) { facePointPatch::updateMesh(pBufs); processorPointPatch::calcGeometry(pBufs); @@ -147,7 +148,7 @@ void processorPointPatch::updateMesh(PstreamBuffers& pBufs) // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -processorPointPatch::processorPointPatch +Foam::processorPointPatch::processorPointPatch ( const polyPatch& patch, const pointBoundaryMesh& bm @@ -160,26 +161,22 @@ processorPointPatch::processorPointPatch // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -processorPointPatch::~processorPointPatch() +Foam::processorPointPatch::~processorPointPatch() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const labelList& processorPointPatch::reverseMeshPoints() const +const Foam::labelList& Foam::processorPointPatch::reverseMeshPoints() const { return reverseMeshPoints_; } -const labelList& processorPointPatch::separatedPoints() const +const Foam::labelList& Foam::processorPointPatch::separatedPoints() const { return separatedPoints_; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.C index f98b909653139681a84c096b3b26f9762746db5c..71fcde091cdee94599142f4d97ae079bdb40064f 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/symmetry/symmetryPointPatch.C @@ -29,25 +29,25 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -defineTypeNameAndDebug(symmetryPointPatch, 0); - -// Add the patch constructor functions to the hash tables -addToRunTimeSelectionTable -( - facePointPatch, - symmetryPointPatch, - polyPatch -); +namespace Foam +{ + defineTypeNameAndDebug(symmetryPointPatch, 0); + + // Add the patch constructor functions to the hash tables + addToRunTimeSelectionTable + ( + facePointPatch, + symmetryPointPatch, + polyPatch + ); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void symmetryPointPatch::applyConstraint +void Foam::symmetryPointPatch::applyConstraint ( const label pointi, pointConstraint& pc @@ -57,8 +57,4 @@ void symmetryPointPatch::applyConstraint } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/wedge/wedgePointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/wedge/wedgePointPatch.C index 416b9d5a99b05cf526211c0a8e4ba50207864923..1f167ed081e4210e84f5bfef21c3330649f7202a 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/wedge/wedgePointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/wedge/wedgePointPatch.C @@ -34,23 +34,21 @@ Description namespace Foam { - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -defineTypeNameAndDebug(wedgePointPatch, 0); - -// Add the patch constructor functions to the hash tables -addToRunTimeSelectionTable -( - facePointPatch, - wedgePointPatch, - polyPatch -); + defineTypeNameAndDebug(wedgePointPatch, 0); + + // Add the patch constructor functions to the hash tables + addToRunTimeSelectionTable + ( + facePointPatch, + wedgePointPatch, + polyPatch + ); +} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void wedgePointPatch::applyConstraint +void Foam::wedgePointPatch::applyConstraint ( const label pointi, pointConstraint& pc @@ -60,8 +58,4 @@ void wedgePointPatch::applyConstraint } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.C b/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.C index 88418ae304694fc08e9a0d47f3c76ba8d78a7dfe..87b51525a6d2520ebe91f9ffd7484419d08dc9fc 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.C +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/derived/coupled/coupledFacePointPatch.C @@ -26,19 +26,14 @@ License #include "coupledFacePointPatch.H" #include "pointBoundaryMesh.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(coupledFacePointPatch, 0); +defineTypeNameAndDebug(Foam::coupledFacePointPatch, 0); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -coupledFacePointPatch::coupledFacePointPatch +Foam::coupledFacePointPatch::coupledFacePointPatch ( const polyPatch& patch, const pointBoundaryMesh& bm @@ -52,12 +47,8 @@ coupledFacePointPatch::coupledFacePointPatch // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -coupledFacePointPatch::~coupledFacePointPatch() +Foam::coupledFacePointPatch::~coupledFacePointPatch() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C index 1c351ab61d2bdc13896ff10c2fed138b76a469c7..f23a05879f63f1b6a85096743241b4e9aeb94142 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.C @@ -120,9 +120,9 @@ Foam::polyBoundaryMesh::~polyBoundaryMesh() void Foam::polyBoundaryMesh::clearGeom() { - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).clearGeom(); + operator[](patchI).clearGeom(); } } @@ -132,9 +132,9 @@ void Foam::polyBoundaryMesh::clearAddressing() neighbourEdgesPtr_.clear(); patchIDPtr_.clear(); - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).clearAddressing(); + operator[](patchI).clearAddressing(); } } @@ -151,16 +151,16 @@ void Foam::polyBoundaryMesh::calcGeometry() || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).initGeometry(pBufs); + operator[](patchI).initGeometry(pBufs); } pBufs.finishedSends(); - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).calcGeometry(pBufs); + operator[](patchI).calcGeometry(pBufs); } } else if (Pstream::defaultCommsType == Pstream::scheduled) @@ -172,15 +172,15 @@ void Foam::polyBoundaryMesh::calcGeometry() forAll(patchSchedule, patchEvali) { - label patchi = patchSchedule[patchEvali].patch; + const label patchI = patchSchedule[patchEvali].patch; if (patchSchedule[patchEvali].init) { - operator[](patchi).initGeometry(pBufs); + operator[](patchI).initGeometry(pBufs); } else { - operator[](patchi).calcGeometry(pBufs); + operator[](patchI).calcGeometry(pBufs); } } } @@ -204,15 +204,15 @@ Foam::polyBoundaryMesh::neighbourEdges() const // Initialize. label nEdgePairs = 0; - forAll(*this, patchi) + forAll(*this, patchI) { - const polyPatch& pp = operator[](patchi); + const polyPatch& pp = operator[](patchI); - neighbourEdges[patchi].setSize(pp.nEdges() - pp.nInternalEdges()); + neighbourEdges[patchI].setSize(pp.nEdges() - pp.nInternalEdges()); - forAll(neighbourEdges[patchi], i) + forAll(neighbourEdges[patchI], i) { - labelPair& edgeInfo = neighbourEdges[patchi][i]; + labelPair& edgeInfo = neighbourEdges[patchI][i]; edgeInfo[0] = -1; edgeInfo[1] = -1; @@ -225,9 +225,9 @@ Foam::polyBoundaryMesh::neighbourEdges() const // point addressing) to patch + relative edge index. HashTable<labelPair, edge, Hash<edge> > pointsToEdge(nEdgePairs); - forAll(*this, patchi) + forAll(*this, patchI) { - const polyPatch& pp = operator[](patchi); + const polyPatch& pp = operator[](patchI); const edgeList& edges = pp.edges(); @@ -256,7 +256,7 @@ Foam::polyBoundaryMesh::neighbourEdges() const meshEdge, labelPair ( - patchi, + patchI, edgei - pp.nInternalEdges() ) ); @@ -266,11 +266,11 @@ Foam::polyBoundaryMesh::neighbourEdges() const // Second occurrence. Store. const labelPair& edgeInfo = fnd(); - neighbourEdges[patchi][edgei - pp.nInternalEdges()] = + neighbourEdges[patchI][edgei - pp.nInternalEdges()] = edgeInfo; neighbourEdges[edgeInfo[0]][edgeInfo[1]] - = labelPair(patchi, edgei - pp.nInternalEdges()); + = labelPair(patchI, edgei - pp.nInternalEdges()); // Found all two occurrences of this edge so remove from // hash to save space. Note that this will give lots of @@ -288,11 +288,11 @@ Foam::polyBoundaryMesh::neighbourEdges() const << abort(FatalError); } - forAll(*this, patchi) + forAll(*this, patchI) { - const polyPatch& pp = operator[](patchi); + const polyPatch& pp = operator[](patchI); - const labelPairList& nbrEdges = neighbourEdges[patchi]; + const labelPairList& nbrEdges = neighbourEdges[patchI]; forAll(nbrEdges, i) { @@ -409,8 +409,7 @@ Foam::label Foam::polyBoundaryMesh::findPatchID(const word& patchName) const // Patch not found if (debug) { - Pout<< "label polyBoundaryMesh::findPatchID(const word& " - << "patchName) const" + Pout<< "label polyBoundaryMesh::findPatchID(const word&) const" << "Patch named " << patchName << " not found. " << "List of available patch names: " << names() << endl; } @@ -641,16 +640,16 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p) || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).initMovePoints(pBufs, p); + operator[](patchI).initMovePoints(pBufs, p); } pBufs.finishedSends(); - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).movePoints(pBufs, p); + operator[](patchI).movePoints(pBufs, p); } } else if (Pstream::defaultCommsType == Pstream::scheduled) @@ -662,15 +661,15 @@ void Foam::polyBoundaryMesh::movePoints(const pointField& p) forAll(patchSchedule, patchEvali) { - label patchi = patchSchedule[patchEvali].patch; + const label patchI = patchSchedule[patchEvali].patch; if (patchSchedule[patchEvali].init) { - operator[](patchi).initMovePoints(pBufs, p); + operator[](patchI).initMovePoints(pBufs, p); } else { - operator[](patchi).movePoints(pBufs, p); + operator[](patchI).movePoints(pBufs, p); } } } @@ -690,16 +689,16 @@ void Foam::polyBoundaryMesh::updateMesh() || Pstream::defaultCommsType == Pstream::nonBlocking ) { - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).initUpdateMesh(pBufs); + operator[](patchI).initUpdateMesh(pBufs); } pBufs.finishedSends(); - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).updateMesh(pBufs); + operator[](patchI).updateMesh(pBufs); } } else if (Pstream::defaultCommsType == Pstream::scheduled) @@ -711,15 +710,15 @@ void Foam::polyBoundaryMesh::updateMesh() forAll(patchSchedule, patchEvali) { - label patchi = patchSchedule[patchEvali].patch; + const label patchI = patchSchedule[patchEvali].patch; if (patchSchedule[patchEvali].init) { - operator[](patchi).initUpdateMesh(pBufs); + operator[](patchI).initUpdateMesh(pBufs); } else { - operator[](patchi).updateMesh(pBufs); + operator[](patchI).updateMesh(pBufs); } } } @@ -734,9 +733,9 @@ void Foam::polyBoundaryMesh::reorder(const UList<label>& oldToNew) // Adapt indices polyPatchList& patches = *this; - forAll(patches, patchi) + forAll(patches, patchI) { - patches[patchi].index() = patchi; + patches[patchI].index() = patchI; } updateMesh(); @@ -749,11 +748,11 @@ bool Foam::polyBoundaryMesh::writeData(Ostream& os) const os << patches.size() << nl << token::BEGIN_LIST << incrIndent << nl; - forAll(patches, patchi) + forAll(patches, patchI) { - os << indent << patches[patchi].name() << nl + os << indent << patches[patchI].name() << nl << indent << token::BEGIN_BLOCK << nl - << incrIndent << patches[patchi] << decrIndent + << incrIndent << patches[patchI] << decrIndent << indent << token::END_BLOCK << endl; } @@ -776,6 +775,49 @@ bool Foam::polyBoundaryMesh::writeObject return regIOobject::writeObject(fmt, ver, IOstream::UNCOMPRESSED); } +// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // + +const Foam::polyPatch& Foam::polyBoundaryMesh::operator[] +( + const word& patchName +) const +{ + const label patchI = findPatchID(patchName); + + if (patchI < 0) + { + FatalErrorIn + ( + "polyBoundaryMesh::operator[](const word&) const" + ) << "Patch named " << patchName << " not found." << nl + << "Available patch names: " << names() << endl + << abort(FatalError); + } + + return operator[](patchI); +} + + +Foam::polyPatch& Foam::polyBoundaryMesh::operator[] +( + const word& patchName +) +{ + const label patchI = findPatchID(patchName); + + if (patchI < 0) + { + FatalErrorIn + ( + "polyBoundaryMesh::operator[](const word&)" + ) << "Patch named " << patchName << " not found." << nl + << "Available patch names: " << names() << endl + << abort(FatalError); + } + + return operator[](patchI); +} + // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H index 8fa0eca53497d45e833638013764337e56b09e3b..4b687ad5180686ff902dafcadfa05019112f8f2a 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/polyBoundaryMesh/polyBoundaryMesh.H @@ -126,7 +126,7 @@ public: void clearAddressing(); - // Member functions + // Member Functions //- Return the mesh reference const polyMesh& mesh() const @@ -194,6 +194,17 @@ public: IOstream::compressionType cmp ) const; + // Member Operators + + //- Return const and non-const reference to polyPatch by index. + using polyPatchList::operator[]; + + //- Return const reference to polyPatch by name. + const polyPatch& operator[](const word&) const; + + //- Return reference to polyPatch by name. + polyPatch& operator[](const word&); + // Ostream operator diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C index 7ad51549b1c84f343dbb4720148d0662feffeb4b..fe1c6de03ec9a9ca370ce1ec67093e48930e7f88 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.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 @@ -27,15 +27,10 @@ License #include "entry.H" #include "demandDrivenData.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template<class ZoneType, class MeshType> -void ZoneMesh<ZoneType, MeshType>::calcZoneMap() const +void Foam::ZoneMesh<ZoneType, MeshType>::calcZoneMap() const { // It is an error to attempt to recalculate cellEdges // if the pointer is already set @@ -77,7 +72,7 @@ void ZoneMesh<ZoneType, MeshType>::calcZoneMap() const // Read constructor given IOobject and a MeshType reference template<class ZoneType, class MeshType> -ZoneMesh<ZoneType, MeshType>::ZoneMesh +Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh ( const IOobject& io, const MeshType& mesh @@ -136,7 +131,7 @@ ZoneMesh<ZoneType, MeshType>::ZoneMesh // Construct given size. Zones will be set later template<class ZoneType, class MeshType> -ZoneMesh<ZoneType, MeshType>::ZoneMesh +Foam::ZoneMesh<ZoneType, MeshType>::ZoneMesh ( const IOobject& io, const MeshType& mesh, @@ -153,7 +148,7 @@ ZoneMesh<ZoneType, MeshType>::ZoneMesh // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class ZoneType, class MeshType> -ZoneMesh<ZoneType, MeshType>::~ZoneMesh() +Foam::ZoneMesh<ZoneType, MeshType>::~ZoneMesh() { clearAddressing(); } @@ -163,7 +158,8 @@ ZoneMesh<ZoneType, MeshType>::~ZoneMesh() // Map of zones for quick zone lookup template<class ZoneType, class MeshType> -const Map<label>& ZoneMesh<ZoneType, MeshType>::zoneMap() const +const Foam::Map<Foam::label>& +Foam::ZoneMesh<ZoneType, MeshType>::zoneMap() const { if (!zoneMapPtr_) { @@ -177,7 +173,10 @@ const Map<label>& ZoneMesh<ZoneType, MeshType>::zoneMap() const // Given a global object index, return the zone it is in. // If object does not belong to any zones, return -1 template<class ZoneType, class MeshType> -label ZoneMesh<ZoneType, MeshType>::whichZone(const label objectIndex) const +Foam::label Foam::ZoneMesh<ZoneType, MeshType>::whichZone +( + const label objectIndex +) const { const Map<label>& zm = zoneMap(); Map<label>::const_iterator zmIter = zm.find(objectIndex); @@ -195,40 +194,43 @@ label ZoneMesh<ZoneType, MeshType>::whichZone(const label objectIndex) const // Return a list of zone names template<class ZoneType, class MeshType> -wordList ZoneMesh<ZoneType, MeshType>::types() const +Foam::wordList Foam::ZoneMesh<ZoneType, MeshType>::types() const { const PtrList<ZoneType>& zones = *this; - wordList t(zones.size()); + wordList lst(zones.size()); forAll(zones, zoneI) { - t[zoneI] = zones[zoneI].type(); + lst[zoneI] = zones[zoneI].type(); } - return t; + return lst; } // Return a list of zone names template<class ZoneType, class MeshType> -wordList ZoneMesh<ZoneType, MeshType>::names() const +Foam::wordList Foam::ZoneMesh<ZoneType, MeshType>::names() const { const PtrList<ZoneType>& zones = *this; - wordList t(zones.size()); + wordList lst(zones.size()); forAll(zones, zoneI) { - t[zoneI] = zones[zoneI].name(); + lst[zoneI] = zones[zoneI].name(); } - return t; + return lst; } template<class ZoneType, class MeshType> -label ZoneMesh<ZoneType, MeshType>::findZoneID(const word& zoneName) const +Foam::label Foam::ZoneMesh<ZoneType, MeshType>::findZoneID +( + const word& zoneName +) const { const PtrList<ZoneType>& zones = *this; @@ -243,19 +245,18 @@ label ZoneMesh<ZoneType, MeshType>::findZoneID(const word& zoneName) const // Zone not found if (debug) { - Info<< "label ZoneMesh<ZoneType>::findZoneID(const word& " - << "zoneName) const : " + Info<< "label ZoneMesh<ZoneType>::findZoneID(const word&) const : " << "Zone named " << zoneName << " not found. " << "List of available zone names: " << names() << endl; } - // A dummy return to kep the compiler happy + // A dummy return to keep the compiler happy return -1; } template<class ZoneType, class MeshType> -void ZoneMesh<ZoneType, MeshType>::clearAddressing() +void Foam::ZoneMesh<ZoneType, MeshType>::clearAddressing() { deleteDemandDrivenData(zoneMapPtr_); @@ -269,7 +270,7 @@ void ZoneMesh<ZoneType, MeshType>::clearAddressing() template<class ZoneType, class MeshType> -void ZoneMesh<ZoneType, MeshType>::clear() +void Foam::ZoneMesh<ZoneType, MeshType>::clear() { clearAddressing(); PtrList<ZoneType>::clear(); @@ -278,7 +279,10 @@ void ZoneMesh<ZoneType, MeshType>::clear() // Check zone definition template<class ZoneType, class MeshType> -bool ZoneMesh<ZoneType, MeshType>::checkDefinition(const bool report) const +bool Foam::ZoneMesh<ZoneType, MeshType>::checkDefinition +( + const bool report +) const { bool inError = false; @@ -294,7 +298,7 @@ bool ZoneMesh<ZoneType, MeshType>::checkDefinition(const bool report) const // Correct zone mesh after moving points template<class ZoneType, class MeshType> -void ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& p) +void Foam::ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& p) { PtrList<ZoneType>& zones = *this; @@ -307,17 +311,66 @@ void ZoneMesh<ZoneType, MeshType>::movePoints(const pointField& p) // writeData member function required by regIOobject template<class ZoneType, class MeshType> -bool ZoneMesh<ZoneType, MeshType>::writeData(Ostream& os) const +bool Foam::ZoneMesh<ZoneType, MeshType>::writeData(Ostream& os) const { - os << *this; + os << *this; return os.good(); } +// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // + +template<class ZoneType, class MeshType> +const ZoneType& Foam::ZoneMesh<ZoneType, MeshType>::operator[] +( + const word& zoneName +) const +{ + const label zoneI = findZoneID(zoneName); + + if (zoneI < 0) + { + FatalErrorIn + ( + "ZoneMesh<ZoneType>::operator[](const word&) const" + ) << "Zone named " << zoneName << " not found." << nl + << "Available zone names: " << names() << endl + << abort(FatalError); + } + + return operator[](zoneI); +} + + +template<class ZoneType, class MeshType> +ZoneType& Foam::ZoneMesh<ZoneType, MeshType>::operator[] +( + const word& zoneName +) +{ + const label zoneI = findZoneID(zoneName); + + if (zoneI < 0) + { + FatalErrorIn + ( + "ZoneMesh<ZoneType>::operator[](const word&)" + ) << "Zone named " << zoneName << " not found." << nl + << "Available zone names: " << names() << endl + << abort(FatalError); + } + + return operator[](zoneI); +} + // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // template<class ZoneType, class MeshType> -Ostream& operator<<(Ostream& os, const ZoneMesh<ZoneType, MeshType>& zones) +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const ZoneMesh<ZoneType, MeshType>& zones +) { os << zones.size() << nl << token::BEGIN_LIST; @@ -332,8 +385,4 @@ Ostream& operator<<(Ostream& os, const ZoneMesh<ZoneType, MeshType>& zones) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H index ca1a2dce860d9626349ecd3639e6d07f03ec2d3e..03b9c216becd4de67a54c8aabdb11a83be1f9db9 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.H +++ b/src/OpenFOAM/meshes/polyMesh/zones/ZoneMesh/ZoneMesh.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 @@ -109,7 +109,7 @@ public: ~ZoneMesh(); - // Member functions + // Member Functions //- Return the mesh reference const MeshType& mesh() const @@ -149,6 +149,17 @@ public: //- writeData member function required by regIOobject bool writeData(Ostream&) const; + // Member Operators + + //- Return const and non-const reference to ZoneType by index. + using PtrList<ZoneType>::operator[]; + + //- Return const reference to ZoneType by name. + const ZoneType& operator[](const word&) const; + + //- Return reference to ZoneType by name. + ZoneType& operator[](const word&); + // Ostream operator diff --git a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C index 578d9dbe6c9e143807f7e114f48d236010bbee41..63fbfbf3e76e2ff8d92536d2b1a3f5ebadd45e7c 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/zone/zone.C @@ -29,10 +29,8 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(zone, 0); -} +defineTypeNameAndDebug(Foam::zone, 0); + // * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // diff --git a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C index a94cf99ae455783890525733110a9b0cd62b6bdf..956846fb94a26886c51f7c18234c88e40be00660 100644 --- a/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C +++ b/src/OpenFOAM/meshes/primitiveMesh/primitivePatch/walkPatch.C @@ -153,7 +153,7 @@ void Foam::walkPatch::faceToFace indexInFace_.append(fp); // Visit neighbouring faces in order, starting at fp. - for (label i = 0; i < f.size(); i++) + forAll(f, i) { label fp1 = reverse_ ? f.rcIndex(fp) : f.fcIndex(fp); label nbr = getNeighbour(faceI, fp, f[fp], f[fp1]); diff --git a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C index 29c0ba60a8b0b646e26dc7f49b8fad22de90e0ca..34a30af3ed7037e5553ace04d248a18a2786bdf6 100644 --- a/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C +++ b/src/OpenFOAM/primitives/hashes/SHA1/SHA1.C @@ -49,7 +49,7 @@ Description // The bytes used to pad buffer to the next 64-byte boundary. // (RFC 1321, 3.1: Step 1) static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; -//! @endcond fileScope +//! @endcond // * * * * * * * * * * * * Static Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/primitives/hashes/SHA1/SHA1Digest.C b/src/OpenFOAM/primitives/hashes/SHA1/SHA1Digest.C index 70ea99ce9d40f04e7a7c6949a6c9412a228f561a..49543d96661a1749d9e878904da2aacdc2500761 100644 --- a/src/OpenFOAM/primitives/hashes/SHA1/SHA1Digest.C +++ b/src/OpenFOAM/primitives/hashes/SHA1/SHA1Digest.C @@ -32,7 +32,7 @@ License //! @cond fileScope const char hexChars[] = "0123456789abcdef"; -//! @endcond fileScope +//! @endcond // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/Pstream/gamma/OPwrite.C b/src/Pstream/gamma/OPwrite.C index b37b40f25291c0315ec11f8804ec038bc17599c1..0f5e7814618da90aa4734c094a1a12777762800a 100644 --- a/src/Pstream/gamma/OPwrite.C +++ b/src/Pstream/gamma/OPwrite.C @@ -48,7 +48,7 @@ namespace Foam // if necessary //! @cond fileScope labelList maxSendSize; -//! @endcond fileScope +//! @endcond // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // diff --git a/src/Pstream/mpi/PstreamGlobals.C b/src/Pstream/mpi/PstreamGlobals.C index 47e96a49d3eb3a1536eb4c5ce9fbdb49c93b43b7..94a0487eab72c7863b4501571783507c129d5673 100644 --- a/src/Pstream/mpi/PstreamGlobals.C +++ b/src/Pstream/mpi/PstreamGlobals.C @@ -35,7 +35,7 @@ namespace Foam // Outstanding non-blocking operations. //! @cond fileScope DynamicList<MPI_Request> PstreamGlobals::outstandingRequests_; -//! @endcond fileScope +//! @endcond // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C index af715a6fe2c3f1211c905fa254e092cc638f7bce..eb2eef6a81fadea3458de34fa978acb7233a1f83 100644 --- a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C +++ b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C @@ -28,20 +28,23 @@ License #include "motionSolver.H" #include "volFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineTypeNameAndDebug(dynamicMotionSolverFvMesh, 0); + addToRunTimeSelectionTable + ( + dynamicFvMesh, + dynamicMotionSolverFvMesh, + IOobject + ); +} -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(dynamicMotionSolverFvMesh, 0); - -addToRunTimeSelectionTable(dynamicFvMesh, dynamicMotionSolverFvMesh, IOobject); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -dynamicMotionSolverFvMesh::dynamicMotionSolverFvMesh(const IOobject& io) +Foam::dynamicMotionSolverFvMesh::dynamicMotionSolverFvMesh(const IOobject& io) : dynamicFvMesh(io), motionPtr_(motionSolver::New(*this)) @@ -50,13 +53,13 @@ dynamicMotionSolverFvMesh::dynamicMotionSolverFvMesh(const IOobject& io) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -dynamicMotionSolverFvMesh::~dynamicMotionSolverFvMesh() +Foam::dynamicMotionSolverFvMesh::~dynamicMotionSolverFvMesh() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool dynamicMotionSolverFvMesh::update() +bool Foam::dynamicMotionSolverFvMesh::update() { fvMesh::movePoints(motionPtr_->newPoints()); @@ -71,8 +74,4 @@ bool dynamicMotionSolverFvMesh::update() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C index b4d6bf06d2d6dd3d31a7ceab7048a72750e2d947..38ef552948f9a9b89d7c5f7dc4a760208a429abc 100644 --- a/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C +++ b/src/dynamicFvMesh/solidBodyMotionFvMesh/solidBodyMotionFunctions/tabulated6DoFMotion/tabulated6DoFMotion.C @@ -27,7 +27,7 @@ License #include "addToRunTimeSelectionTable.H" #include "Tuple2.H" #include "IFstream.H" -#include "interpolateXY.H" +#include "interpolateSplineXY.H" #include "mathematicalConstants.H" using namespace Foam::constant::mathematical; @@ -98,7 +98,7 @@ Foam::solidBodyMotionFunctions::tabulated6DoFMotion::transformation() const << exit(FatalError); } - translationRotationVectors TRV = interpolateXY + translationRotationVectors TRV = interpolateSplineXY ( t, times_, diff --git a/src/dynamicFvMesh/staticFvMesh/staticFvMesh.C b/src/dynamicFvMesh/staticFvMesh/staticFvMesh.C index 492d4c95850d481da15ffa5dcab4efcbaaa45fdb..01e7485990901e3d001d34ba3ed7c60e0e798569 100644 --- a/src/dynamicFvMesh/staticFvMesh/staticFvMesh.C +++ b/src/dynamicFvMesh/staticFvMesh/staticFvMesh.C @@ -28,19 +28,18 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -defineTypeNameAndDebug(staticFvMesh, 0); +namespace Foam +{ + defineTypeNameAndDebug(staticFvMesh, 0); + addToRunTimeSelectionTable(dynamicFvMesh, staticFvMesh, IOobject); +} -addToRunTimeSelectionTable(dynamicFvMesh, staticFvMesh, IOobject); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -//- Construct from objectRegistry, and read/write options -staticFvMesh::staticFvMesh(const IOobject& io) +Foam::staticFvMesh::staticFvMesh(const IOobject& io) : dynamicFvMesh(io) {} @@ -48,20 +47,16 @@ staticFvMesh::staticFvMesh(const IOobject& io) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -staticFvMesh::~staticFvMesh() +Foam::staticFvMesh::~staticFvMesh() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool staticFvMesh::update() +bool Foam::staticFvMesh::update() { return false; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/dynamicMesh/attachDetach/attachInterface.C b/src/dynamicMesh/attachDetach/attachInterface.C index e195395e6a26189290ea6f5b9d62bef06c9a7182..8217d549bef91009b7f144830aaa9129b4f2aa36 100644 --- a/src/dynamicMesh/attachDetach/attachInterface.C +++ b/src/dynamicMesh/attachDetach/attachInterface.C @@ -88,7 +88,7 @@ void Foam::attachDetach::attachInterface // Pout << "Points to be mapped: " << removedPoints << endl; // Remove all faces from the slave patch - for (label i = 0; i < slavePatch.size(); i++) + forAll(slavePatch, i) { ref.setAction(polyRemoveFace(i + slavePatchStart)); // Pout << "Removing face " << i + slavePatchStart << endl; diff --git a/src/dynamicMesh/boundaryMesh/boundaryMesh.C b/src/dynamicMesh/boundaryMesh/boundaryMesh.C index 436cc18601c17e63061b472c125774ebc340ab26..877f10f80ebd38304d66efdaef1b9b1bb99b10dd 100644 --- a/src/dynamicMesh/boundaryMesh/boundaryMesh.C +++ b/src/dynamicMesh/boundaryMesh/boundaryMesh.C @@ -1125,13 +1125,11 @@ void Foam::boundaryMesh::patchify forAll(oldPatches, oldPatchI) { const polyPatch& patch = oldPatches[oldPatchI]; - - label newPatchI = findPatchID(patch.name()); + const label newPatchI = findPatchID(patch.name()); if (newPatchI != -1) { nameToIndex.insert(patch.name(), newPatchI); - indexToName.insert(newPatchI, patch.name()); } } @@ -1145,7 +1143,6 @@ void Foam::boundaryMesh::patchify if (!nameToIndex.found(bp.name())) { nameToIndex.insert(bp.name(), bPatchI); - indexToName.insert(bPatchI, bp.name()); } } @@ -1167,10 +1164,10 @@ void Foam::boundaryMesh::patchify { const boundaryPatch& bp = patches_[bPatchI]; - label newPatchI = nameToIndex[bp.name()]; + const label newPatchI = nameToIndex[bp.name()]; // Find corresponding patch in polyMesh - label oldPatchI = findPatchID(oldPatches, bp.name()); + const label oldPatchI = findPatchID(oldPatches, bp.name()); if (oldPatchI == -1) { @@ -1599,7 +1596,7 @@ void Foam::boundaryMesh::addPatch(const word& patchName) void Foam::boundaryMesh::deletePatch(const word& patchName) { - label delPatchI = findPatchID(patchName); + const label delPatchI = findPatchID(patchName); if (delPatchI == -1) { @@ -1658,7 +1655,7 @@ void Foam::boundaryMesh::changePatchType const word& patchType ) { - label changeI = findPatchID(patchName); + const label changeI = findPatchID(patchName); if (changeI == -1) { diff --git a/src/dynamicMesh/meshCut/directions/directions.C b/src/dynamicMesh/meshCut/directions/directions.C index b49dc435dcbd7f6f0c60704828bc44efc8b7a9b4..c404504326a622dcdf7d7d2c2ea70a9b9ca115d7 100644 --- a/src/dynamicMesh/meshCut/directions/directions.C +++ b/src/dynamicMesh/meshCut/directions/directions.C @@ -343,7 +343,7 @@ Foam::directions::directions const word patchName(patchDict.lookup("patch")); - label patchI = mesh.boundaryMesh().findPatchID(patchName); + const label patchI = mesh.boundaryMesh().findPatchID(patchName); if (patchI == -1) { diff --git a/src/dynamicMesh/motionSmoother/motionSmoother.C b/src/dynamicMesh/motionSmoother/motionSmoother.C index 1f94c7582ae1e3dacbce0cfaca01c7844bd933fe..5c3d79a97856578e87810318dd51ab95edf347f5 100644 --- a/src/dynamicMesh/motionSmoother/motionSmoother.C +++ b/src/dynamicMesh/motionSmoother/motionSmoother.C @@ -774,7 +774,8 @@ Foam::tmp<Foam::scalarField> Foam::motionSmoother::movePoints newPoints, minEqOp<point>(), // combine op vector(GREAT,GREAT,GREAT), // null - true // separation + true, // separation + 1E-6*mesh_.bounds().mag() ); } @@ -925,7 +926,8 @@ bool Foam::motionSmoother::scaleMesh totalDisplacement, maxMagEqOp(), vector::zero, // null value - false // separation + false, // separation + 1E-6*mesh_.bounds().mag() ); } diff --git a/src/dynamicMesh/motionSmoother/motionSmoother.H b/src/dynamicMesh/motionSmoother/motionSmoother.H index f5df37e677d5ada11b1384c6769cd0c90770a117..ee306dd3c9a2eed2ba5dd137897ff9a7a38c370a 100644 --- a/src/dynamicMesh/motionSmoother/motionSmoother.H +++ b/src/dynamicMesh/motionSmoother/motionSmoother.H @@ -208,7 +208,8 @@ class motionSmoother const Field<Type>&, const CombineOp& cop, const Type& zero, - const bool separation + const bool separation, + const scalar maxMag ) const; //- Assemble tensors for multi-patch constraints diff --git a/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C b/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C index aec66f951f9c157017c37e18f25b5654d24d184d..1660a29e18decf00024f479d9a6a8bf5f50c700f 100644 --- a/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C +++ b/src/dynamicMesh/motionSmoother/motionSmootherTemplates.C @@ -292,7 +292,8 @@ void Foam::motionSmoother::testSyncField const Field<Type>& fld, const CombineOp& cop, const Type& zero, - const bool separation + const bool separation, + const scalar maxMag ) const { if (debug) @@ -315,6 +316,7 @@ void Foam::motionSmoother::testSyncField forAll(syncedFld, i) { if (syncedFld[i] != fld[i]) + if (mag(syncedFld[i] - fld[i]) > maxMag) { FatalErrorIn ( diff --git a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C index 4eae7a7c6991cdab17fecdf0c9aaa74a8251de02..76e0bd0f8940fbfe8a3cccf44553dbc1b9e0fe5c 100644 --- a/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C +++ b/src/dynamicMesh/polyMeshAdder/polyMeshAdder.C @@ -265,7 +265,7 @@ Foam::List<Foam::polyPatch*> Foam::polyMeshAdder::combinePatches // Copy patches0 with new sizes. First patches always come from // mesh0 and will always be present. - for (label patchI = 0; patchI < patches0.size(); patchI++) + forAll(patches0, patchI) { // Originates from mesh0. Clone with new size & filter out empty // patch. @@ -363,7 +363,7 @@ Foam::labelList Foam::polyMeshAdder::getFaceOrder labelList oldToNew(owner.size(), -1); // Leave boundary faces in order - for (label faceI = nInternalFaces; faceI < owner.size(); faceI++) + for (label faceI = nInternalFaces; faceI < owner.size(); ++faceI) { oldToNew[faceI] = faceI; } diff --git a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C index 5d4ff5722fdf8779a783e87d09b5802f48f0a0bb..9105db90237a277097b97aeccc2f756c138f2621 100644 --- a/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C +++ b/src/dynamicMesh/polyTopoChange/polyTopoChange/addPatchCellLayer.C @@ -915,7 +915,7 @@ void Foam::addPatchCellLayer::setRefinement vector disp = firstLayerDisp[patchPointI]; - for (label i = 0; i < addedPoints_[patchPointI].size(); i++) + forAll(addedPoints_[patchPointI], i) { pt += disp; @@ -1000,7 +1000,7 @@ void Foam::addPatchCellLayer::setRefinement face newFace(f.size()); - for (label i = 0; i < addedCells[patchFaceI].size(); i++) + forAll(addedCells[patchFaceI], i) { forAll(f, fp) { diff --git a/src/dynamicMesh/polyTopoChange/repatchPolyTopoChanger/repatchPolyTopoChanger.C b/src/dynamicMesh/polyTopoChange/repatchPolyTopoChanger/repatchPolyTopoChanger.C index 428f6e0e49ff5619e833b384975fe19176ba8ada..f5040a0d8ed27895d32dcbb67cb3d9d69cad2f05 100644 --- a/src/dynamicMesh/polyTopoChange/repatchPolyTopoChanger/repatchPolyTopoChanger.C +++ b/src/dynamicMesh/polyTopoChange/repatchPolyTopoChanger/repatchPolyTopoChanger.C @@ -262,7 +262,7 @@ void Foam::repatchPolyTopoChanger::changeAnchorPoint label fVert = fp; - for (label i = 0; i < f.size(); i++) + forAll(f, i) { newFace[i] = f[fVert++]; diff --git a/src/dynamicMesh/setUpdater/setUpdaterTemplates.C b/src/dynamicMesh/setUpdater/setUpdaterTemplates.C index 9ab84988e373c53c99fa1eb3bb0ffee73085e2cf..083adae774fa6ba5db3dced22f67f70803e948f3 100644 --- a/src/dynamicMesh/setUpdater/setUpdaterTemplates.C +++ b/src/dynamicMesh/setUpdater/setUpdaterTemplates.C @@ -29,15 +29,10 @@ License #include "mapPolyMesh.H" #include "IOobjectList.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class Type> -void setUpdater::updateSets(const mapPolyMesh& morphMap) const +void Foam::setUpdater::updateSets(const mapPolyMesh& morphMap) const { // // Update all sets in memory. @@ -106,8 +101,4 @@ void setUpdater::updateSets(const mapPolyMesh& morphMap) const } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchFaces.C b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchFaces.C index f92963bb2ca1d863375276e74e3dccb8cb41c403..1bc7f633ddbcabd470c01bf9f10caaa967659139 100644 --- a/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchFaces.C +++ b/src/dynamicMesh/slidingInterface/enrichedPatch/enrichedPatchFaces.C @@ -200,7 +200,7 @@ void Foam::enrichedPatch::calcEnrichedFaces // Go through the points and collect them based on // weights from lower to higher. This gives the // correct order of points along the edge. - for (label passI = 0; passI < edgePointWeights.size(); passI++) + forAll(edgePointWeights, passI) { // Max weight can only be one, so the sorting is // done by elimination. @@ -351,7 +351,7 @@ void Foam::enrichedPatch::calcEnrichedFaces // Go through the points and collect them based on // weights from lower to higher. This gives the // correct order of points along the edge. - for (label pass = 0; pass < edgePointWeights.size(); pass++) + forAll(edgePointWeights, passI) { // Max weight can only be one, so the sorting is // done by elimination. diff --git a/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C b/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C index ebd47d7d812db5e96360403388d947261e501438..a7d107a0fdab192ef02f98d0488063eb0d884c8d 100644 --- a/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C +++ b/src/engine/engineMesh/fvMotionSolverEngineMesh/fvMotionSolverEngineMesh.C @@ -28,20 +28,18 @@ License #include "fvcMeshPhi.H" #include "surfaceInterpolate.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineTypeNameAndDebug(fvMotionSolverEngineMesh, 0); + addToRunTimeSelectionTable(engineMesh, fvMotionSolverEngineMesh, IOobject); +} -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(fvMotionSolverEngineMesh, 0); - -addToRunTimeSelectionTable(engineMesh, fvMotionSolverEngineMesh, IOobject); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(const IOobject& io) +Foam::fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(const IOobject& io) : engineMesh(io), pistonLayers_("pistonLayers", dimLength, 0.0), @@ -56,13 +54,13 @@ fvMotionSolverEngineMesh::fvMotionSolverEngineMesh(const IOobject& io) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -fvMotionSolverEngineMesh::~fvMotionSolverEngineMesh() +Foam::fvMotionSolverEngineMesh::~fvMotionSolverEngineMesh() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void fvMotionSolverEngineMesh::move() +void Foam::fvMotionSolverEngineMesh::move() { scalar deltaZ = engineDB_.pistonDisplacement().value(); Info<< "deltaZ = " << deltaZ << endl; @@ -125,8 +123,4 @@ void fvMotionSolverEngineMesh::move() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/engine/engineMesh/staticEngineMesh/staticEngineMesh.C b/src/engine/engineMesh/staticEngineMesh/staticEngineMesh.C index 8bd1fa392cd8e90d12aad4dd2e878ee8f6ecf96d..9787d974f66048e6fc6000fe9637352c3a3d6dc4 100644 --- a/src/engine/engineMesh/staticEngineMesh/staticEngineMesh.C +++ b/src/engine/engineMesh/staticEngineMesh/staticEngineMesh.C @@ -26,21 +26,17 @@ License #include "staticEngineMesh.H" #include "addToRunTimeSelectionTable.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineTypeNameAndDebug(staticEngineMesh, 0); + addToRunTimeSelectionTable(engineMesh, staticEngineMesh, IOobject); +} -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(staticEngineMesh, 0); - -addToRunTimeSelectionTable(engineMesh, staticEngineMesh, IOobject); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -//- Construct from objectRegistry, and read/write options -staticEngineMesh::staticEngineMesh(const IOobject& io) +Foam::staticEngineMesh::staticEngineMesh(const IOobject& io) : engineMesh(io) {} @@ -48,18 +44,14 @@ staticEngineMesh::staticEngineMesh(const IOobject& io) // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -staticEngineMesh::~staticEngineMesh() +Foam::staticEngineMesh::~staticEngineMesh() {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void staticEngineMesh::move() +void Foam::staticEngineMesh::move() {} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/engine/ignition/ignition.C b/src/engine/ignition/ignition.C index f961cafdce6e479587c47445b5bb6f9515e74a4f..0d87e3287ea6c12f21e3873e3634fdf50a515309 100644 --- a/src/engine/ignition/ignition.C +++ b/src/engine/ignition/ignition.C @@ -26,14 +26,10 @@ License #include "ignition.H" #include "fvMesh.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool ignition::igniting() const +bool Foam::ignition::igniting() const { if (!ignite()) { @@ -54,7 +50,7 @@ bool ignition::igniting() const } -bool ignition::ignited() const +bool Foam::ignition::ignited() const { if (!ignite()) { @@ -75,8 +71,4 @@ bool ignition::ignited() const } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/engine/ignition/ignitionIO.C b/src/engine/ignition/ignitionIO.C index 3e8dd32034d39b4f9d3477ebbaee15771f8ada88..8013bce29d795d8880679129e127db2adb1f056d 100644 --- a/src/engine/ignition/ignitionIO.C +++ b/src/engine/ignition/ignitionIO.C @@ -26,14 +26,9 @@ License #include "engineTime.H" #include "ignition.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -ignition::ignition +Foam::ignition::ignition ( const dictionary& combustionProperties, const Time& db, @@ -59,7 +54,7 @@ ignition::ignition } -ignition::ignition +Foam::ignition::ignition ( const dictionary& combustionProperties, const engineTime& edb, @@ -85,8 +80,4 @@ ignition::ignition } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/engine/ignition/ignitionSite.C b/src/engine/ignition/ignitionSite.C index 2f6e8f05f266e4cc5f5882e4d7180b1b18a238b8..39a2000ff2b9849e5de18a62cf3ee10e55b9cdfa 100644 --- a/src/engine/ignition/ignitionSite.C +++ b/src/engine/ignition/ignitionSite.C @@ -27,14 +27,9 @@ License #include "Time.H" #include "volFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void ignitionSite::findIgnitionCells(const fvMesh& mesh) +void Foam::ignitionSite::findIgnitionCells(const fvMesh& mesh) { // Bit tricky: generate C and V before shortcutting if cannot find // cell locally. mesh.C generation uses parallel communication. @@ -90,7 +85,7 @@ void ignitionSite::findIgnitionCells(const fvMesh& mesh) // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -const labelList& ignitionSite::cells() const +const Foam::labelList& Foam::ignitionSite::cells() const { if (mesh_.changing() && timeIndex_ != db_.timeIndex()) { @@ -102,7 +97,7 @@ const labelList& ignitionSite::cells() const } -bool ignitionSite::igniting() const +bool Foam::ignitionSite::igniting() const { scalar curTime = db_.value(); scalar deltaT = db_.deltaTValue(); @@ -116,7 +111,7 @@ bool ignitionSite::igniting() const } -bool ignitionSite::ignited() const +bool Foam::ignitionSite::ignited() const { scalar curTime = db_.value(); scalar deltaT = db_.deltaTValue(); @@ -127,7 +122,7 @@ bool ignitionSite::ignited() const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -void ignitionSite::operator=(const ignitionSite& is) +void Foam::ignitionSite::operator=(const ignitionSite& is) { location_ = is.location_; diameter_ = is.diameter_; @@ -139,8 +134,4 @@ void ignitionSite::operator=(const ignitionSite& is) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/engine/ignition/ignitionSiteIO.C b/src/engine/ignition/ignitionSiteIO.C index aa37495108d510831ac8373d1115c87c8f83d194..ea1410638bf6066452559b571442b70ff5bf360a 100644 --- a/src/engine/ignition/ignitionSiteIO.C +++ b/src/engine/ignition/ignitionSiteIO.C @@ -26,14 +26,14 @@ License #include "ignitionSite.H" #include "engineTime.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -ignitionSite::ignitionSite(Istream& is, const Time& db, const fvMesh& mesh) +Foam::ignitionSite::ignitionSite +( + Istream& is, + const Time& db, + const fvMesh& mesh +) : db_(db), mesh_(mesh), @@ -64,7 +64,7 @@ ignitionSite::ignitionSite(Istream& is, const Time& db, const fvMesh& mesh) } -ignitionSite::ignitionSite +Foam::ignitionSite::ignitionSite ( Istream& is, const engineTime& edb, @@ -100,8 +100,4 @@ ignitionSite::ignitionSite } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C index b8fbe54a89a0ea11ffe42347e93b538dc1540283..1873bbe3fec8ca7db272376d5a39dff8ed6d5d10 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.C @@ -33,7 +33,7 @@ template<class Type> const Foam::wordList Foam::TimeActivatedExplicitSource<Type>:: selectionModeTypeNames_ ( - IStringStream("(points cellSet)")() + IStringStream("(points cellSet cellZone all)")() ); @@ -156,6 +156,15 @@ void Foam::TimeActivatedExplicitSource<Type>::setSelection dict.lookup("cellSet") >> cellSetName_; break; } + case smCellZone: + { + dict.lookup("cellZone") >> cellSetName_; + break; + } + case smAll: + { + break; + } default: { FatalErrorIn @@ -221,13 +230,14 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet() { Info<< indent << "- selecting cells using points" << endl; - labelHashSet cellOwners; + labelHashSet selectedCells; + forAll(points_, i) { label cellI = mesh_.findCell(points_[i]); if (cellI >= 0) { - cellOwners.insert(cellI); + selectedCells.insert(cellI); } label globalCellI = returnReduce(cellI, maxOp<label>()); @@ -239,7 +249,7 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet() } } - cellsPtr_.reset(new cellSet(mesh_, "points", cellOwners)); + cells_ = selectedCells.toc(); break; } @@ -247,7 +257,32 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet() { Info<< indent << "- selecting cells using cellSet " << cellSetName_ << endl; - cellsPtr_.reset(new cellSet(mesh_, cellSetName_)); + + cellSet selectedCells(mesh_, cellSetName_); + cells_ = selectedCells.toc(); + + break; + } + case smCellZone: + { + Info<< indent << "- selecting cells using cellZone " + << cellSetName_ << endl; + label zoneID = mesh_.cellZones().findZoneID(cellSetName_); + if (zoneID == -1) + { + FatalErrorIn("TimeActivatedExplicitSource<Type>::setCellIds()") + << "Cannot find cellZone " << cellSetName_ << endl + << "Valid cellZones are " << mesh_.cellZones().names() + << exit(FatalError); + } + cells_ = mesh_.cellZones()[zoneID]; + + break; + } + case smAll: + { + Info<< indent << "- selecting all cells" << endl; + cells_ = identity(mesh_.nCells()); break; } @@ -261,21 +296,20 @@ void Foam::TimeActivatedExplicitSource<Type>::setCellSet() } } - const cellSet& cSet = cellsPtr_(); - // Set volume normalisation - V_ = scalarField(cSet.size(), 1.0); if (volumeMode_ == vmAbsolute) { - label i = 0; - forAllConstIter(cellSet, cSet, iter) + V_ = 0.0; + forAll(cells_, i) { - V_[i++] = mesh_.V()[iter.key()]; + V_ += mesh_.V()[cells_[i]]; } + reduce(V_, sumOp<scalar>()); } - Info<< indent << "- selected " << returnReduce(cSet.size(), sumOp<label>()) - << " cell(s)" << nl << decrIndent << endl; + Info<< indent << "- selected " + << returnReduce(cells_.size(), sumOp<label>()) + << " cell(s) with volume " << V_ << nl << decrIndent << endl; } @@ -299,8 +333,7 @@ Foam::TimeActivatedExplicitSource<Type>::TimeActivatedExplicitSource selectionMode_(wordToSelectionModeType(dict.lookup("selectionMode"))), points_(), cellSetName_("none"), - V_(), - cellsPtr_(), + V_(1.0), fieldData_(), fieldIds_(fieldNames.size(), -1) { @@ -345,12 +378,9 @@ void Foam::TimeActivatedExplicitSource<Type>::addToField setCellSet(); } - const cellSet& cSet = cellsPtr_(); - - label i = 0; - forAllConstIter(cellSet, cSet, iter) + forAll(cells_, i) { - Su[iter.key()] = fieldData_[fid].second()/V_[i++]; + Su[cells_[i]] = fieldData_[fid].second()/V_; } } } diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.H b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.H index 11282a54d3a5222268ff1e4a288064ddadd07f3f..e014e02cd487126196d59cbce56ea1f3a1ef7e54 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSource.H @@ -33,7 +33,7 @@ Description active true; // on/off switch timeStart 0.2; // start time duration 2.0; // duration - selectionMode points; // cellSet + selectionMode points; // cellSet/cellZone/all volumeMode absolute; // specific fieldData // field data - usage for multiple fields @@ -48,7 +48,8 @@ Description (2.75 0.5 0) ); - cellSet c0; // cellSet name when selectionMode = cekllSet + cellSet c0; // cellSet name when selectionMode=cellSet + cellZone c0; // cellZone name when selectionMode=cellZone } SourceFiles @@ -100,7 +101,9 @@ public: enum selectionModeType { smPoints, - smCellSet + smCellSet, + smCellZone, + smAll }; //- Word list of selection mode type names @@ -147,14 +150,14 @@ protected: //- List of points for "points" selectionMode List<point> points_; - //- Name of cell set for "cellSet" selectionMode + //- Name of cell set for "cellSet" and "cellZone" selectionMode word cellSetName_; - //- Field of cell volumes according to cell set cells - scalarList V_; + //- Set of cells to apply source to + labelList cells_; - //- Cell set - autoPtr<cellSet> cellsPtr_; + //- Sum of cell volumes + scalar V_; //- List of source field name vs value pairs List<fieldNameValuePair> fieldData_; @@ -288,12 +291,11 @@ public: // selectionMode inline const word& cellSetName() const; - //- Return const access to the field of cell volumes according to - // cell set cells - inline const scalarList& V() const; + //- Return const access to the total cell volume + inline scalar V() const; //- Return const access to the cell set - inline const cellSet& cells() const; + inline const labelList& cells() const; //- Return const access to the source field name vs value pairs inline const List<fieldNameValuePair>& fieldData() const; @@ -330,12 +332,11 @@ public: // selectionMode inline word& cellSetName(); - //- Return access to the field of cell volumes according to - // cell set cells - inline scalarList& V(); + //- Return access to the total cell volume + inline scalar& V(); //- Return access to the cell set - inline cellSet& cells(); + inline labelList& cells(); //- Return access to the source field name vs value pairs inline List<fieldNameValuePair>& fieldData(); diff --git a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSourceI.H b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSourceI.H index be8bd5844a9c70ac02388fe29ed41058111fddba..55a9e7336e82c560053766034f4b1cf687c38d25 100644 --- a/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSourceI.H +++ b/src/finiteVolume/cfdTools/general/fieldSources/timeActivatedExplicitSource/TimeActivatedExplicitSourceI.H @@ -103,18 +103,17 @@ Foam::TimeActivatedExplicitSource<Type>::cellSetName() const template<class Type> -inline const Foam::scalarList& -Foam::TimeActivatedExplicitSource<Type>::V() const +inline Foam::scalar Foam::TimeActivatedExplicitSource<Type>::V() const { return V_; } template<class Type> -inline const Foam::cellSet& +inline const Foam::labelList& Foam::TimeActivatedExplicitSource<Type>::cells() const { - return cellsPtr_(); + return cells_; } @@ -195,16 +194,16 @@ inline Foam::word& Foam::TimeActivatedExplicitSource<Type>::cellSetName() template<class Type> -inline Foam::scalarList& Foam::TimeActivatedExplicitSource<Type>::V() +inline Foam::scalar& Foam::TimeActivatedExplicitSource<Type>::V() { return V_; } template<class Type> -inline Foam::cellSet& Foam::TimeActivatedExplicitSource<Type>::cells() +inline Foam::labelList& Foam::TimeActivatedExplicitSource<Type>::cells() { - return cellsPtr_(); + return cells_; } diff --git a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H index da3dc7530c21911bf48c950ba5c31ed5f71b539b..1dfc537dd08aeb9962303961d94a703540a649c9 100644 --- a/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H +++ b/src/finiteVolume/fields/fvPatchFields/basic/basicSymmetry/basicSymmetryFvPatchField.H @@ -76,7 +76,8 @@ public: const dictionary& ); - //- Construct by mapping given basicSymmetryFvPatchField onto a new patch + //- Construct by mapping given basicSymmetryFvPatchField onto a new + // patch basicSymmetryFvPatchField ( const basicSymmetryFvPatchField<Type>&, diff --git a/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C b/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C index 101acff876084c8e0e619625cb432207db991a32..dc93fbbfc1d5b998d13c582cd916d032dbb68ebc 100644 --- a/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C +++ b/src/finiteVolume/finiteVolume/snGradSchemes/quadraticFitSnGrad/quadraticFitSnGradData.C @@ -31,10 +31,7 @@ License // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(quadraticFitSnGradData, 0); -} +defineTypeNameAndDebug(Foam::quadraticFitSnGradData, 0); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -205,7 +202,7 @@ Foam::label Foam::quadraticFitSnGradData::calcFit // calculate the matrix of the polynomial components scalarRectangularMatrix B(C.size(), minSize_, scalar(0)); - for (label ip = 0; ip < C.size(); ip++) + forAll(C, ip) { const point& p = C[ip]; diff --git a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.C b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.C index 92bb9f42d0ea2a122587cfb1d5bf6369ca735a81..eec1fb13c24b8351b0886bd6cdbb3f1b46a5bff2 100644 --- a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.C +++ b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.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 @@ -70,16 +70,33 @@ Foam::fvBoundaryMesh::fvBoundaryMesh // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +Foam::label Foam::fvBoundaryMesh::findPatchID(const word& patchName) const +{ + const fvPatchList& patches = *this; + + forAll(patches, patchI) + { + if (patches[patchI].name() == patchName) + { + return patchI; + } + } + + // Not found, return -1 + return -1; +} + + void Foam::fvBoundaryMesh::movePoints() { - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).initMovePoints(); + operator[](patchI).initMovePoints(); } - forAll(*this, patchi) + forAll(*this, patchI) { - operator[](patchi).movePoints(); + operator[](patchI).movePoints(); } } @@ -88,14 +105,14 @@ Foam::lduInterfacePtrsList Foam::fvBoundaryMesh::interfaces() const { lduInterfacePtrsList interfaces(size()); - forAll(interfaces, patchi) + forAll(interfaces, patchI) { - if (isA<lduInterface>(this->operator[](patchi))) + if (isA<lduInterface>(this->operator[](patchI))) { interfaces.set ( - patchi, - &refCast<const lduInterface>(this->operator[](patchi)) + patchI, + &refCast<const lduInterface>(this->operator[](patchI)) ); } } @@ -111,4 +128,46 @@ void Foam::fvBoundaryMesh::readUpdate(const polyBoundaryMesh& basicBdry) } +// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // + +const Foam::fvPatch& Foam::fvBoundaryMesh::operator[] +( + const word& patchName +) const +{ + const label patchI = findPatchID(patchName); + + if (patchI < 0) + { + FatalErrorIn + ( + "fvBoundaryMesh::operator[](const word&) const" + ) << "Patch named " << patchName << " not found." << nl + << abort(FatalError); + } + + return operator[](patchI); +} + + +Foam::fvPatch& Foam::fvBoundaryMesh::operator[] +( + const word& patchName +) +{ + const label patchI = findPatchID(patchName); + + if (patchI < 0) + { + FatalErrorIn + ( + "fvBoundaryMesh::operator[](const word&)" + ) << "Patch named " << patchName << " not found." << nl + << abort(FatalError); + } + + return operator[](patchI); +} + + // ************************************************************************* // diff --git a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H index 75175dd28feabdf164a08986c3b0440a4bd27d95..13707bf0a50e9843941753a382dbbf1082820cde 100644 --- a/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H +++ b/src/finiteVolume/fvMesh/fvBoundaryMesh/fvBoundaryMesh.H @@ -54,8 +54,6 @@ class fvBoundaryMesh : public fvPatchList { -private: - // Private data //- Reference to mesh @@ -101,7 +99,7 @@ public: ); - // Member functions + // Member Functions // Access @@ -115,9 +113,24 @@ public: // with only those pointing to interfaces being set lduInterfacePtrsList interfaces() const; + //- Find patch index given a name + label findPatchID(const word& patchName) const; + //- Correct patches after moving points void movePoints(); + + // Member Operators + + //- Return const and non-const reference to fvPatch by index. + using fvPatchList::operator[]; + + //- Return const reference to fvPatch by name. + const fvPatch& operator[](const word&) const; + + //- Return reference to fvPatch by name. + fvPatch& operator[](const word&); + }; diff --git a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C index 69df844100870ea745966296ec9098340d0e43cb..053c08b2f96ff116c786f70f8b62d7db9c157c83 100644 --- a/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C +++ b/src/finiteVolume/interpolation/surfaceInterpolation/schemes/FitData/FitData.C @@ -164,7 +164,7 @@ void Foam::FitData<FitDataType, ExtendedStencil, Polynomial>::calcFit // Matrix of the polynomial components scalarRectangularMatrix B(C.size(), minSize_, scalar(0)); - for (label ip = 0; ip < C.size(); ip++) + forAll(C, ip) { const point& p = C[ip]; diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.C index e3a7e72b3cad7fde5eee0447ccf7cae1acde65d7..977fdb89a0b422ff261b4964251ebe35f7ee7649 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationFvMotionSolver.C @@ -148,8 +148,7 @@ displacementInterpolationFvMotionSolver forAll(faceZoneToTable, i) { const word& zoneName = faceZoneToTable[i][0]; - label zoneI = fZones.findZoneID(zoneName); - const faceZone& fz = fZones[zoneI]; + const faceZone& fz = fZones[zoneName]; scalar minCoord = VGREAT; scalar maxCoord = -VGREAT; diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionFvMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionFvMotionSolver.C index 8ade7abb4947e8d4be961a3bdd654a626a018bdc..bcc694c38548fae3baa21a746bf162353e22667a 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionFvMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionFvMotionSolver.C @@ -353,8 +353,7 @@ void Foam::displacementLayeredMotionFvMotionSolver::cellZoneSolve const dictionary& faceZoneDict = patchIter().dict(); // Determine the points of the faceZone within the cellZone - label zoneI = mesh().faceZones().findZoneID(faceZoneName); - const faceZone& fz = mesh().faceZones()[zoneI]; + const faceZone& fz = mesh().faceZones()[faceZoneName]; const labelList& fzMeshPoints = fz().meshPoints(); DynamicList<label> meshPoints(fzMeshPoints.size()); forAll(fzMeshPoints, i) diff --git a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C index 934f29e018063f63d0b44fcd41f55bb794e559b5..583ef450b1cf778cfd9a4f16914ad8338c292338 100644 --- a/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inverseFaceDistance/inverseFaceDistanceDiffusivity.C @@ -78,7 +78,7 @@ void Foam::inverseFaceDistanceDiffusivity::correct() forAll(patchNames_, i) { - label pID = bdry.findPatchID(patchNames_[i]); + const label pID = bdry.findPatchID(patchNames_[i]); if (pID > -1) { diff --git a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C index 00063e203cd993fee49a096c800055216da9e554..8cd891ea1f13ee6132c3ff5908fa3d25cb110a04 100644 --- a/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C +++ b/src/fvMotionSolver/motionDiffusivity/inversePointDistance/inversePointDistanceDiffusivity.C @@ -78,7 +78,7 @@ void Foam::inversePointDistanceDiffusivity::correct() forAll(patchNames_, i) { - label pID = bdry.findPatchID(patchNames_[i]); + const label pID = bdry.findPatchID(patchNames_[i]); if (pID > -1) { diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C index eb46df52340bb6f89bde58560f5e134aa85616e8..5188b7bc13895b89bcbce846d160f4cee0f8bb82 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C @@ -87,7 +87,7 @@ void surfaceDisplacementPointPatchVectorField::calcProjection { const pointZoneMesh& pZones = mesh.pointZones(); - zonePtr = &pZones[pZones.findZoneID(frozenPointsZone_)]; + zonePtr = &pZones[frozenPointsZone_]; Pout<< "surfaceDisplacementPointPatchVectorField : Fixing all " << zonePtr->size() << " points in pointZone " << zonePtr->name() diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C index 1c3ebb9f7a1f80cf64b444763da83df1232e2dd8..cd75617b9b7ffbb8804f8402803433c2da0ca620 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceSlipDisplacement/surfaceSlipDisplacementPointPatchVectorField.C @@ -86,7 +86,7 @@ void surfaceSlipDisplacementPointPatchVectorField::calcProjection { const pointZoneMesh& pZones = mesh.pointZones(); - zonePtr = &pZones[pZones.findZoneID(frozenPointsZone_)]; + zonePtr = &pZones[frozenPointsZone_]; Pout<< "surfaceSlipDisplacementPointPatchVectorField : Fixing all " << zonePtr->size() << " points in pointZone " << zonePtr->name() diff --git a/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransform.C b/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransform.C index d0a2703a89e88ab17b9487d43d1bee3eeb2e0c2b..3bcd500d04cdab78995873cd180db3b7d9508448 100644 --- a/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransform.C +++ b/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransform.C @@ -269,9 +269,9 @@ void Foam::globalIndexAndTransform::determineTransformPermutations() // Invert the ternary index encoding using repeated division by // three - for (label b = 0; b < transforms_.size(); b++) + forAll(transforms_, b) { - label w = (transformIndex % 3) - 1; + const label w = (transformIndex % 3) - 1; transformIndex /= 3; diff --git a/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransformI.H b/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransformI.H index da46fe08fe5b66f1fcb58bdd561356d27823a37c..fe2a6034a7ca94db4126b52ddbb0c8c01b399d4b 100644 --- a/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransformI.H +++ b/src/lagrangian/basic/InteractionLists/globalIndexAndTransform/globalIndexAndTransformI.H @@ -49,7 +49,7 @@ Foam::label Foam::globalIndexAndTransform::encodeTransformIndex label w = 1; - for (label b = 0; b < transforms_.size(); b++) + forAll(transforms_, b) { if (mag(permutationIndices[b]) > 1) { diff --git a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C b/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C index b0819d1213834429334ec85bf93cedf379310f0d..5f4732dfa4728d1a4ba21271ab83120c460335fe 100644 --- a/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C +++ b/src/lagrangian/basic/indexedParticle/indexedParticleCloud.C @@ -25,19 +25,14 @@ License #include "indexedParticleCloud.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineParticleTypeNameAndDebug(indexedParticle, 0); + defineTemplateTypeNameAndDebug(Cloud<indexedParticle>, 0); +} -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineParticleTypeNameAndDebug(indexedParticle, 0); -defineTemplateTypeNameAndDebug(Cloud<indexedParticle>, 0); - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C index 67bd87f76bdc117e8b2f60f31526703dcff93ff8..71e40a0a64c10b9bc376acb529565e064467877a 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationDiffusionLimitedRate/COxidationDiffusionLimitedRate.C @@ -123,7 +123,8 @@ Foam::scalar Foam::COxidationDiffusionLimitedRate<CloudType>::calculate const scalar YO2 = this->owner().mcCarrierThermo().Y(O2GlobalId_)[cellI]; // Change in C mass [kg] - scalar dmC = 4.0*constant::mathematical::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt; + scalar dmC = + 4.0*constant::mathematical::pi*d*D_*YO2*Tc*rhoc/(Sb_*(T + Tc))*dt; // Limit mass transfer by availability of C dmC = min(mass*fComb, dmC); diff --git a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C index f6f7b79c9acd1a9a2d980fa653836a033e58c329..3fb7d1887959f37a1ff702208ac4b3825184a7d4 100644 --- a/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C +++ b/src/lagrangian/coalCombustion/submodels/surfaceReactionModel/COxidationKineticDiffusionLimitedRate/COxidationKineticDiffusionLimitedRate.C @@ -140,7 +140,7 @@ Foam::scalar Foam::COxidationKineticDiffusionLimitedRate<CloudType>::calculate const scalar Ap = constant::mathematical::pi*sqr(d); // Change in C mass [kg] - scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk); + scalar dmC = Ap*rhoc*specie::RR*Tc*YO2/WO2_*D0*Rk/(D0 + Rk)*dt; // Limit mass transfer by availability of C dmC = min(mass*fComb, dmC); diff --git a/src/lagrangian/dieselSpray/injector/injector/injectorIO.C b/src/lagrangian/dieselSpray/injector/injector/injectorIO.C index bc7652b7bf9dfe11f1618899330dd2c98aaa9e4c..33c02dc6e28da2ea3609d006a2458ba3e193a1c9 100644 --- a/src/lagrangian/dieselSpray/injector/injector/injectorIO.C +++ b/src/lagrangian/dieselSpray/injector/injector/injectorIO.C @@ -26,14 +26,10 @@ License #include "injector.H" #include "dictionary.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -injector::injector(const Time& t, Istream& is) +Foam::injector::injector(const Time& t, Istream& is) : injectorDict_(is), properties_(injectorType::New(t, injectorDict_)) @@ -46,7 +42,7 @@ injector::injector(const Time& t, Istream& is) // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -Ostream& operator<<(Ostream& os, const injector& injector) +Foam::Ostream& Foam::operator<<(Ostream& os, const injector& injector) { // Check state of Ostream os.check("Ostream& operator<<(Ostream&, const injector&)"); @@ -57,8 +53,4 @@ Ostream& operator<<(Ostream& os, const injector& injector) } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/parcel/parcelFunctions.C b/src/lagrangian/dieselSpray/parcel/parcelFunctions.C index 7b7a6d9141df37206b82d5a37608daf8c5898e3c..cbd5c37105470211477e5574ca5e63e91880d4ed 100644 --- a/src/lagrangian/dieselSpray/parcel/parcelFunctions.C +++ b/src/lagrangian/dieselSpray/parcel/parcelFunctions.C @@ -26,15 +26,10 @@ License #include "parcel.H" #include "mathematicalConstants.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // The diameter based Reynolds number -scalar parcel::Re +Foam::scalar Foam::parcel::Re ( const vector& U, const scalar nu @@ -44,7 +39,7 @@ scalar parcel::Re } // The diameter based Reynolds number -scalar parcel::Re +Foam::scalar Foam::parcel::Re ( const scalar rho, const vector& U, @@ -56,7 +51,7 @@ scalar parcel::Re } // The diameter based Weber number -scalar parcel::We +Foam::scalar Foam::parcel::We ( const vector& U, const scalar rho, @@ -67,7 +62,7 @@ scalar parcel::We } -scalar parcel::Sc +Foam::scalar Foam::parcel::Sc ( const scalar mu, const scalar rho, @@ -78,7 +73,7 @@ scalar parcel::Sc } -scalar parcel::Sc +Foam::scalar Foam::parcel::Sc ( const scalar nu, const scalar massDiffusion @@ -88,7 +83,7 @@ scalar parcel::Sc } -scalar parcel::Pr +Foam::scalar Foam::parcel::Pr ( const scalar cp, const scalar mu, @@ -99,26 +94,22 @@ scalar parcel::Pr } -scalar parcel::N(const scalar rho) const +Foam::scalar Foam::parcel::N(const scalar rho) const { return 6.0*m_/(rho*pow3(d_)*constant::mathematical::pi); } -scalar parcel::Vd() const +Foam::scalar Foam::parcel::Vd() const { return pow3(d_)*constant::mathematical::pi/6.0; } -scalar parcel::V(const scalar rho) const +Foam::scalar Foam::parcel::V(const scalar rho) const { return m_/rho; } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C b/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C index bcefddd613846048a24c1648e021d0f5806696b9..aa93a4fa91119c2235d9ae5bb6cadbd6390893b1 100644 --- a/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C +++ b/src/lagrangian/dieselSpray/parcel/setRelaxationTimes.C @@ -31,14 +31,10 @@ License #include "heatTransferModel.H" #include "basicMultiComponentMixture.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void parcel::setRelaxationTimes +void Foam::parcel::setRelaxationTimes ( label celli, scalar& tauMomentum, @@ -55,7 +51,6 @@ void parcel::setRelaxationTimes const scalar dt ) { - const liquidMixture& fuels = sDB.fuels(); scalar mCell = rho*sDB.mesh().V()[cell()]; @@ -258,7 +253,7 @@ void parcel::setRelaxationTimes scalar vapourSurfaceEnthalpy = 0.0; scalar vapourFarEnthalpy = 0.0; - for (label k = 0; k < sDB.gasProperties().size(); k++) + forAll(sDB.gasProperties(), k) { vapourSurfaceEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(tBoilingSurface); vapourFarEnthalpy += sDB.composition().Y()[k][celli]*sDB.gasProperties()[k].H(temperature); @@ -292,8 +287,4 @@ void parcel::setRelaxationTimes } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spray/sprayFunctions.C b/src/lagrangian/dieselSpray/spray/sprayFunctions.C index 23c2e3d39414e5b84f88f2a92ba00f990e904d9c..2a7de13c54c8d06e793a1fed5b9a494adbb3ce24 100644 --- a/src/lagrangian/dieselSpray/spray/sprayFunctions.C +++ b/src/lagrangian/dieselSpray/spray/sprayFunctions.C @@ -26,14 +26,10 @@ License #include "spray.H" #include "mathematicalConstants.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -scalar spray::injectedMass(const scalar t) const +Foam::scalar Foam::spray::injectedMass(const scalar t) const { scalar sum = 0.0; @@ -46,7 +42,7 @@ scalar spray::injectedMass(const scalar t) const } -scalar spray::totalMassToInject() const +Foam::scalar Foam::spray::totalMassToInject() const { scalar sum = 0.0; @@ -59,7 +55,7 @@ scalar spray::totalMassToInject() const } -scalar spray::injectedEnthalpy +Foam::scalar Foam::spray::injectedEnthalpy ( const scalar time ) const @@ -89,7 +85,7 @@ scalar spray::injectedEnthalpy } -scalar spray::liquidMass() const +Foam::scalar Foam::spray::liquidMass() const { scalar sum = 0.0; @@ -109,7 +105,7 @@ scalar spray::liquidMass() const } -scalar spray::liquidEnthalpy() const +Foam::scalar Foam::spray::liquidEnthalpy() const { scalar sum = 0.0; label Nf = fuels().components().size(); @@ -146,7 +142,7 @@ scalar spray::liquidEnthalpy() const } -scalar spray::liquidTotalEnthalpy() const +Foam::scalar Foam::spray::liquidTotalEnthalpy() const { scalar sum = 0.0; label Nf = fuels().components().size(); @@ -186,7 +182,7 @@ scalar spray::liquidTotalEnthalpy() const } -scalar spray::liquidKineticEnergy() const +Foam::scalar Foam::spray::liquidKineticEnergy() const { scalar sum = 0.0; @@ -208,19 +204,19 @@ scalar spray::liquidKineticEnergy() const } -scalar spray::injectedLiquidKineticEnergy() const +Foam::scalar Foam::spray::injectedLiquidKineticEnergy() const { return injectedLiquidKE_; } -scalar spray::liquidPenetration(const scalar prc) const +Foam::scalar Foam::spray::liquidPenetration(const scalar prc) const { return liquidPenetration(0, prc); } -scalar spray::liquidPenetration +Foam::scalar Foam::spray::liquidPenetration ( const label nozzlei, const scalar prc @@ -349,7 +345,7 @@ scalar spray::liquidPenetration } -scalar spray::smd() const +Foam::scalar Foam::spray::smd() const { scalar numerator = 0.0, denominator = VSMALL; @@ -372,7 +368,7 @@ scalar spray::smd() const } -scalar spray::maxD() const +Foam::scalar Foam::spray::maxD() const { scalar maxD = 0.0; @@ -387,20 +383,16 @@ scalar spray::maxD() const } -void spray::calculateAmbientPressure() +void Foam::spray::calculateAmbientPressure() { ambientPressure_ = p_.average().value(); } -void spray::calculateAmbientTemperature() +void Foam::spray::calculateAmbientTemperature() { ambientTemperature_ = T_.average().value(); } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/dieselSpray/spray/sprayInject.C b/src/lagrangian/dieselSpray/spray/sprayInject.C index 952b6949c987ce2d45ba147ccc87bb2675221c5d..f27769dfb6d7e23ac3ec26528f084fcf6d8ed29a 100644 --- a/src/lagrangian/dieselSpray/spray/sprayInject.C +++ b/src/lagrangian/dieselSpray/spray/sprayInject.C @@ -31,12 +31,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -void spray::inject() +void Foam::spray::inject() { scalar time = runTime_.value(); scalar time0 = time0_; @@ -172,8 +167,4 @@ void spray::inject() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C index 6c49b07fc8539dccea58a6b542bedc604d076359..b3ed38cf8842f9691bdb50a5d861bbf92f437b7d 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/InjectionModel/PatchInjection/PatchInjection.C @@ -101,7 +101,7 @@ Foam::PatchInjection<CloudType>::PatchInjection cellOwners_(), fraction_(1.0) { - label patchId = owner.mesh().boundaryMesh().findPatchID(patchName_); + const label patchId = owner.mesh().boundaryMesh().findPatchID(patchName_); if (patchId < 0) { diff --git a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C index 8f23f91c6f9cd06104777de7f40c218982c6fcd2..9e6b0b10d6a581324f2a5be07f067ca8afa42228 100644 --- a/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C +++ b/src/lagrangian/intermediate/submodels/Kinematic/PostProcessingModel/PatchPostProcessing/PatchPostProcessing.C @@ -128,7 +128,7 @@ Foam::PatchPostProcessing<CloudType>::PatchPostProcessing { forAll(patchNames_, patchI) { - label id = mesh_.boundaryMesh().findPatchID(patchNames_[patchI]); + const label id = mesh_.boundaryMesh().findPatchID(patchNames_[patchI]); if (id < 0) { FatalErrorIn diff --git a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C index 92e9723bcdbdf35f90e519b941fdbf50d7bcacee..83777d3a94e91e1869a9078d83a5498d3cff2aa3 100644 --- a/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C +++ b/src/lagrangian/molecularDynamics/potential/energyScalingFunction/basic/energyScalingFunction.C @@ -25,15 +25,14 @@ License #include "energyScalingFunction.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // namespace Foam { + defineTypeNameAndDebug(energyScalingFunction, 0); + defineRunTimeSelectionTable(energyScalingFunction, dictionary); +} -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -defineTypeNameAndDebug(energyScalingFunction, 0); -defineRunTimeSelectionTable(energyScalingFunction, dictionary); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -64,8 +63,4 @@ bool Foam::energyScalingFunction::read } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C index 7ec3d369f140467f0457b24464604af88750f75d..a73e7bdcf606b1bd05b253cc612da9a159ab4396 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoSnapDriver.C @@ -70,9 +70,7 @@ Foam::Map<Foam::label> Foam::autoSnapDriver::getZoneBafflePatches if (faceZoneNames[surfI].size()) { // Get zone - label zoneI = fZones.findZoneID(faceZoneNames[surfI]); - - const faceZone& fZone = fZones[zoneI]; + const faceZone& fZone = fZones[faceZoneNames[surfI]]; //// Get patch allocated for zone //label patchI = surfaceToCyclicPatch_[surfI]; @@ -1311,11 +1309,8 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::autoSnapDriver::repatchToSurface forAll(zonedSurfaces, i) { - label zoneSurfI = zonedSurfaces[i]; - - label zoneI = fZones.findZoneID(faceZoneNames[zoneSurfI]); - - const faceZone& fZone = fZones[zoneI]; + const label zoneSurfI = zonedSurfaces[i]; + const faceZone& fZone = fZones[faceZoneNames[zoneSurfI]]; forAll(fZone, i) { diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C index d56ad740a12f2a6925a32272511376a4f7d4da11..12298ce6e1669f793ff6050f1c4b6e88af98d469 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.C @@ -258,6 +258,8 @@ void Foam::meshRefinement::checkData() meshCutter_.checkRefinementLevels(1, labelList(0)); + label nBnd = mesh_.nFaces()-mesh_.nInternalFaces(); + Pout<< "meshRefinement::checkData() : Checking synchronization." << endl; @@ -267,7 +269,7 @@ void Foam::meshRefinement::checkData() pointField::subList boundaryFc ( mesh_.faceCentres(), - mesh_.nFaces()-mesh_.nInternalFaces(), + nBnd, mesh_.nInternalFaces() ); @@ -292,8 +294,8 @@ void Foam::meshRefinement::checkData() // Check meshRefinement { // Get boundary face centre and level. Coupled aware. - labelList neiLevel(mesh_.nFaces()-mesh_.nInternalFaces()); - pointField neiCc(mesh_.nFaces()-mesh_.nInternalFaces()); + labelList neiLevel(nBnd); + pointField neiCc(nBnd); calcNeighbourData(neiLevel, neiCc); // Collect segments we want to test for @@ -327,11 +329,22 @@ void Foam::meshRefinement::checkData() surfaceLevel ); } + // Get the coupled hit + labelList neiHit + ( + SubList<label> + ( + surfaceHit, + nBnd, + mesh_.nInternalFaces() + ) + ); + syncTools::swapBoundaryFaceList(mesh_, neiHit, false); // Check forAll(surfaceHit, faceI) { - if (surfaceHit[faceI] != surfaceIndex_[faceI]) + if (surfaceIndex_[faceI] != surfaceHit[faceI]) { if (mesh_.isInternalFace(faceI)) { @@ -346,7 +359,11 @@ void Foam::meshRefinement::checkData() << mesh_.cellCentres()[mesh_.faceNeighbour()[faceI]] << endl; } - else + else if + ( + surfaceIndex_[faceI] + != neiHit[faceI-mesh_.nInternalFaces()] + ) { WarningIn("meshRefinement::checkData()") << "Boundary face:" << faceI @@ -355,6 +372,7 @@ void Foam::meshRefinement::checkData() << " current:" << surfaceHit[faceI] << " ownCc:" << mesh_.cellCentres()[mesh_.faceOwner()[faceI]] + << " end:" << end[faceI] << endl; } } @@ -1119,9 +1137,7 @@ Foam::autoPtr<Foam::mapDistributePolyMesh> Foam::meshRefinement::balance if (fzNames[surfI].size()) { // Get zone - label zoneI = fZones.findZoneID(fzNames[surfI]); - - const faceZone& fZone = fZones[zoneI]; + const faceZone& fZone = fZones[fzNames[surfI]]; forAll(fZone, i) { @@ -1540,7 +1556,7 @@ Foam::label Foam::meshRefinement::addPatch polyBoundaryMesh& polyPatches = const_cast<polyBoundaryMesh&>(mesh.boundaryMesh()); - label patchI = polyPatches.findPatchID(patchName); + const label patchI = polyPatches.findPatchID(patchName); if (patchI != -1) { if (polyPatches[patchI].type() == patchType) diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H index 10c582380e00f28c3d937dcb4b2c14588203c1b5..264394905754928137bf05634bfaa28c0f3b977c 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinement.H @@ -436,6 +436,16 @@ private: labelList& cellToZone ) const; + //- Finds zone per cell for cells inside named surfaces that have + // an inside point specified. + void findCellZoneInsideWalk + ( + const labelList& locationSurfaces, + const labelList& namedSurfaceIndex, + const labelList& surfaceToCellZone, + labelList& cellToZone + ) const; + //- Determines cell zone from cell region information. bool calcRegionToZone ( diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C index 0d9cecd039d5c852a972049b07b1091571e18367..2491f557fb54cbc6e0dc876fae235d183ffff451 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementBaffles.C @@ -1066,6 +1066,106 @@ void Foam::meshRefinement::findCellZoneGeometric false ); } +//XXXXXXXXX +void Foam::meshRefinement::findCellZoneInsideWalk +( + const labelList& locationSurfaces, // indices of surfaces with inside point + const labelList& namedSurfaceIndex, // per face index of named surface + const labelList& surfaceToCellZone, // cell zone index per surface + + labelList& cellToZone +) const +{ + // Analyse regions. Reuse regionsplit + boolList blockedFace(mesh_.nFaces()); + + forAll(namedSurfaceIndex, faceI) + { + if (namedSurfaceIndex[faceI] == -1) + { + blockedFace[faceI] = false; + } + else + { + blockedFace[faceI] = true; + } + } + // No need to sync since namedSurfaceIndex already is synced + + // Set region per cell based on walking + regionSplit cellRegion(mesh_, blockedFace); + blockedFace.clear(); + + + // For all locationSurface find the cell + forAll(locationSurfaces, i) + { + label surfI = locationSurfaces[i]; + const point& insidePoint = surfaces_.zoneInsidePoints()[surfI]; + + Info<< "For surface " << surfaces_.names()[surfI] + << " finding inside point " << insidePoint + << endl; + + // Find the region containing the insidePoint + label keepRegionI = -1; + + label cellI = mesh_.findCell(insidePoint); + + if (cellI != -1) + { + keepRegionI = cellRegion[cellI]; + } + reduce(keepRegionI, maxOp<label>()); + + Info<< "For surface " << surfaces_.names()[surfI] + << " found point " << insidePoint << " in cell " << cellI + << " in global region " << keepRegionI + << " out of " << cellRegion.nRegions() << " regions." << endl; + + if (keepRegionI == -1) + { + FatalErrorIn + ( + "meshRefinement::findCellZoneInsideWalk" + "(const labelList&, const labelList&" + ", const labelList&, const labelList&)" + ) << "Point " << insidePoint + << " is not inside the mesh." << nl + << "Bounding box of the mesh:" << mesh_.globalData().bb() + << exit(FatalError); + } + + // Set all cells with this region + forAll(cellRegion, cellI) + { + if (cellRegion[cellI] == keepRegionI) + { + if (cellToZone[cellI] == -2) + { + cellToZone[cellI] = surfaceToCellZone[surfI]; + } + else if (cellToZone[cellI] != surfaceToCellZone[surfI]) + { + WarningIn + ( + "meshRefinement::findCellZoneInsideWalk" + "(const labelList&, const labelList&" + ", const labelList&, const labelList&)" + ) << "Cell " << cellI + << " at " << mesh_.cellCentres()[cellI] + << " is inside surface " << surfaces_.names()[surfI] + << " but already marked as being in zone " + << cellToZone[cellI] << endl + << "This can happen if your surfaces are not" + << " (sufficiently) closed." + << endl; + } + } + } + } +} +//XXXXXXXXX bool Foam::meshRefinement::calcRegionToZone @@ -1234,6 +1334,7 @@ void Foam::meshRefinement::findCellZoneTopo { label surfI = namedSurfaceIndex[faceI]; + // Connected even if no cellZone defined for surface if (surfI != -1) { // Calculate region to zone from cellRegions on either side @@ -1286,6 +1387,7 @@ void Foam::meshRefinement::findCellZoneTopo label surfI = namedSurfaceIndex[faceI]; + // Connected even if no cellZone defined for surface if (surfI != -1) { bool changedCell = calcRegionToZone @@ -2295,9 +2397,6 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Put the cells into the correct zone // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // Closed surfaces with cellZone specified. - labelList closedNamedSurfaces(surfaces_.getClosedNamedSurfaces()); - // Zone per cell: // -2 : unset // -1 : not in any zone @@ -2308,6 +2407,9 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify // Set using geometric test // ~~~~~~~~~~~~~~~~~~~~~~~~ + // Closed surfaces with cellZone specified. + labelList closedNamedSurfaces(surfaces_.getClosedNamedSurfaces()); + if (closedNamedSurfaces.size()) { Info<< "Found " << closedNamedSurfaces.size() @@ -2317,17 +2419,41 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify findCellZoneGeometric ( - closedNamedSurfaces, // indices of closed surfaces - namedSurfaceIndex, // per face index of named surface - surfaceToCellZone, // cell zone index per surface + closedNamedSurfaces, // indices of closed surfaces + namedSurfaceIndex, // per face index of named surface + surfaceToCellZone, // cell zone index per surface + + cellToZone + ); + } + + + // Set using provided locations + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + labelList locationSurfaces(surfaces_.getInsidePointNamedSurfaces()); + if (locationSurfaces.size()) + { + Info<< "Found " << locationSurfaces.size() + << " named surfaces with a provided inside point." + << " Assigning cells inside these surfaces" + << " to the corresponding cellZone." + << nl << endl; + + findCellZoneInsideWalk + ( + locationSurfaces, // indices of closed surfaces + namedSurfaceIndex, // per face index of named surface + surfaceToCellZone, // cell zone index per surface + cellToZone ); } + // Set using walking // ~~~~~~~~~~~~~~~~~ - //if (!allowFreeStandingZoneFaces) { Info<< "Walking from location-in-mesh " << keepPoint << " to assign cellZones " @@ -2339,6 +2465,7 @@ Foam::autoPtr<Foam::mapPolyMesh> Foam::meshRefinement::zonify keepPoint, namedSurfaceIndex, surfaceToCellZone, + cellToZone ); } diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C index ac01e052cdb6b4a8062505b32f9a7c8ac7dfa16d..e53d7ae03f8d4194e6234b89bd4afd2684ff97a9 100644 --- a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C +++ b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.C @@ -32,6 +32,21 @@ License #include "searchableSurfacesQueries.H" #include "UPtrList.H" +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +template<> +const char* +Foam::NamedEnum<Foam::refinementSurfaces::areaSelectionAlgo, 4>::names[] = +{ + "inside", + "outside", + "insidePoint", + "none" +}; + +const Foam::NamedEnum<Foam::refinementSurfaces::areaSelectionAlgo, 4> + Foam::refinementSurfaces::areaSelectionAlgoNames; + // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -47,7 +62,8 @@ Foam::refinementSurfaces::refinementSurfaces names_(surfaceDicts.size()), faceZoneNames_(surfaceDicts.size()), cellZoneNames_(surfaceDicts.size()), - zoneInside_(surfaceDicts.size()), + zoneInside_(surfaceDicts.size(), NONE), + zoneInsidePoints_(surfaceDicts.size()), regionOffset_(surfaceDicts.size()) { labelList globalMinLevel(surfaceDicts.size(), 0); @@ -74,19 +90,51 @@ Foam::refinementSurfaces::refinementSurfaces globalMaxLevel[surfI] = readLabel(dict.lookup("maxRefinementLevel")); // Global zone names per surface - if (dict.found("faceZone")) + if (dict.readIfPresent("faceZone", faceZoneNames_[surfI])) { - dict.lookup("faceZone") >> faceZoneNames_[surfI]; - bool hasSide = dict.readIfPresent("zoneInside", zoneInside_[surfI]); + // Read optional entry to determine inside of faceZone + + word method; + bool hasSide = dict.readIfPresent("cellZoneInside", method); + if (hasSide) + { + zoneInside_[surfI] = areaSelectionAlgoNames[method]; + if (zoneInside_[surfI] == INSIDEPOINT) + { + dict.lookup("insidePoint") >> zoneInsidePoints_[surfI]; + } + } + else + { + // Check old syntax + bool inside; + if (dict.readIfPresent("zoneInside", inside)) + { + hasSide = true; + zoneInside_[surfI] = (inside ? INSIDE : OUTSIDE); + } + } + + // Read optional cellZone name + if (dict.readIfPresent("cellZone", cellZoneNames_[surfI])) { - if (hasSide && !allGeometry_[surfaces_[surfI]].hasVolumeType()) + if + ( + ( + zoneInside_[surfI] == INSIDE + || zoneInside_[surfI] == OUTSIDE + ) + && !allGeometry_[surfaces_[surfI]].hasVolumeType() + ) { IOWarningIn ( "refinementSurfaces::refinementSurfaces(..)", dict - ) << "Unused entry zoneInside for faceZone " + ) << "Illegal entry zoneInside " + << areaSelectionAlgoNames[zoneInside_[surfI]] + << " for faceZone " << faceZoneNames_[surfI] << " since surface " << names_[surfI] << " is not closed." << endl; @@ -282,7 +330,8 @@ Foam::refinementSurfaces::refinementSurfaces names_(surfacesDict.size()), faceZoneNames_(surfacesDict.size()), cellZoneNames_(surfacesDict.size()), - zoneInside_(surfacesDict.size()), + zoneInside_(surfacesDict.size(), NONE), + zoneInsidePoints_(surfacesDict.size()), regionOffset_(surfacesDict.size()) { // Wilcard specification : loop over all surface, all regions @@ -305,7 +354,7 @@ Foam::refinementSurfaces::refinementSurfaces names_.setSize(surfI); faceZoneNames_.setSize(surfI); cellZoneNames_.setSize(surfI); - zoneInside_.setSize(surfI); + zoneInside_.setSize(surfI, NONE); regionOffset_.setSize(surfI); labelList globalMinLevel(surfI, 0); @@ -332,19 +381,42 @@ Foam::refinementSurfaces::refinementSurfaces globalMaxLevel[surfI] = refLevel[1]; // Global zone names per surface - if (dict.found("faceZone")) + if (dict.readIfPresent("faceZone", faceZoneNames_[surfI])) { - dict.lookup("faceZone") >> faceZoneNames_[surfI]; - bool hasSide = dict.readIfPresent - ( - "zoneInside", - zoneInside_[surfI] - ); + // Read optional entry to determine inside of faceZone + + word method; + bool hasSide = dict.readIfPresent("cellZoneInside", method); + if (hasSide) + { + zoneInside_[surfI] = areaSelectionAlgoNames[method]; + if (zoneInside_[surfI] == INSIDEPOINT) + { + dict.lookup("insidePoint") >> zoneInsidePoints_[surfI]; + } + + } + else + { + // Check old syntax + bool inside; + if (dict.readIfPresent("zoneInside", inside)) + { + hasSide = true; + zoneInside_[surfI] = (inside ? INSIDE : OUTSIDE); + } + } + + // Read optional cellZone name + if (dict.readIfPresent("cellZone", cellZoneNames_[surfI])) { if ( - hasSide + ( + zoneInside_[surfI] == INSIDE + || zoneInside_[surfI] == OUTSIDE + ) && !allGeometry_[surfaces_[surfI]].hasVolumeType() ) { @@ -352,7 +424,9 @@ Foam::refinementSurfaces::refinementSurfaces ( "refinementSurfaces::refinementSurfaces(..)", dict - ) << "Unused entry zoneInside for faceZone " + ) << "Illegal entry zoneInside " + << areaSelectionAlgoNames[zoneInside_[surfI]] + << " for faceZone " << faceZoneNames_[surfI] << " since surface " << names_[surfI] << " is not closed." << endl; @@ -533,12 +607,36 @@ Foam::labelList Foam::refinementSurfaces::getClosedNamedSurfaces() const label closedI = 0; forAll(cellZoneNames_, surfI) { - if (cellZoneNames_[surfI].size()) + if + ( + cellZoneNames_[surfI].size() + && ( + zoneInside_[surfI] == INSIDE + || zoneInside_[surfI] == OUTSIDE + ) + && allGeometry_[surfaces_[surfI]].hasVolumeType() + ) { - if (allGeometry_[surfaces_[surfI]].hasVolumeType()) - { - closed[closedI++] = surfI; - } + closed[closedI++] = surfI; + } + } + closed.setSize(closedI); + + return closed; +} + + +// Get indices of named surfaces with a +Foam::labelList Foam::refinementSurfaces::getInsidePointNamedSurfaces() const +{ + labelList closed(cellZoneNames_.size()); + + label closedI = 0; + forAll(cellZoneNames_, surfI) + { + if (cellZoneNames_[surfI].size() && zoneInside_[surfI] == INSIDEPOINT) + { + closed[closedI++] = surfI; } } closed.setSize(closedI); @@ -1199,6 +1297,16 @@ void Foam::refinementSurfaces::findInside { label surfI = testSurfaces[i]; + if (zoneInside_[surfI] != INSIDE && zoneInside_[surfI] != OUTSIDE) + { + FatalErrorIn("refinementSurfaces::findInside(..)") + << "Trying to use surface " + << allGeometry_[surfaces_[surfI]].name() + << " which has non-geometric inside selection method " + << areaSelectionAlgoNames[zoneInside_[surfI]] + << exit(FatalError); + } + if (allGeometry_[surfaces_[surfI]].hasVolumeType()) { List<searchableSurface::volumeType> volType; @@ -1212,11 +1320,11 @@ void Foam::refinementSurfaces::findInside ( ( volType[pointI] == triSurfaceMesh::INSIDE - && zoneInside_[surfI] + && zoneInside_[surfI] == INSIDE ) || ( volType[pointI] == triSurfaceMesh::OUTSIDE - && !zoneInside_[surfI] + && zoneInside_[surfI] == OUTSIDE ) ) { diff --git a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.H b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.H index bafe949a08adc469ac611a8d6060410b9c8096b5..c83fe2fbbf5728c96661e3598ace7a29a5382e25 100644 --- a/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.H +++ b/src/mesh/autoMesh/autoHexMesh/refinementSurfaces/refinementSurfaces.H @@ -57,6 +57,21 @@ class triSurfaceMesh; class refinementSurfaces { +public: + + //- Types of selection of area + enum areaSelectionAlgo + { + INSIDE, + OUTSIDE, + INSIDEPOINT, + NONE + }; + + static const NamedEnum<areaSelectionAlgo, 4> areaSelectionAlgoNames; + +private: + // Private data //- Reference to all geometry. @@ -75,9 +90,12 @@ class refinementSurfaces wordList cellZoneNames_; //- Per 'interface' surface : (only used if surface is closed) - // whether to zone cells inside or outside surface. - boolList zoneInside_; + // How to select zone cells : surface inside or outside or given + // inside location. + List<areaSelectionAlgo> zoneInside_; + //- If zoneInside=location gives the corresponding inside point + pointField zoneInsidePoints_; //- From local region number to global region number labelList regionOffset_; @@ -159,9 +177,20 @@ public: //- Get indices of named surfaces (surfaces with faceZoneName) labelList getNamedSurfaces() const; - //- Get indices of closed surfaces with a cellZone + //- Get indices of surfaces with a cellZone that are closed and + // have 'inside' or 'outside' selection. labelList getClosedNamedSurfaces() const; + //- Get indices of surfaces with a cellZone that have 'insidePoint' + // section. + labelList getInsidePointNamedSurfaces() const; + + //- Get specified inside locations for surfaces with a cellZone + const pointField& zoneInsidePoints() const + { + return zoneInsidePoints_; + } + //- From local region number to global region number const labelList& regionOffset() const { diff --git a/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C b/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C index bacbbd17b5ebb355ad93e7bd0337738e6daa75b0..c957f32f642b122694ed988a027f67bf48b58607 100644 --- a/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C +++ b/src/mesh/autoMesh/autoHexMesh/shellSurfaces/shellSurfaces.C @@ -177,7 +177,7 @@ void Foam::shellSurfaces::orient() boundBox shellBb(points[0], points[0]); // Assume surface is compact! - for (label i = 0; i < points.size(); i++) + forAll(points, i) { const point& pt = points[i]; shellBb.min() = min(shellBb.min(), pt); diff --git a/src/mesh/blockMesh/blockDescriptor/blockDescriptorEdges.C b/src/mesh/blockMesh/blockDescriptor/blockDescriptorEdges.C index 7e08bc03e196309aa3c534bbbb9ba6e6ede03e02..2d2ee2b82d71ac220000194c0a576ed565c8418b 100644 --- a/src/mesh/blockMesh/blockDescriptor/blockDescriptorEdges.C +++ b/src/mesh/blockMesh/blockDescriptor/blockDescriptorEdges.C @@ -39,7 +39,7 @@ namespace Foam { return dim > 1 ? pow(expRatio, 1.0/(dim - 1)) : 0.0; } - //! @endcond fileScope + //! @endcond } // End namespace Foam diff --git a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C index 91c24ecf28f07ca09c8d3538b406afdf95a34777..1c9b5dd5cac9577b71a5178b197b68c7dba99b20 100644 --- a/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C +++ b/src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C @@ -744,7 +744,7 @@ const Foam::polyPatch& Foam::directMappedPatchBase::samplePolyPatch() const { const polyMesh& nbrMesh = sampleMesh(); - label patchI = nbrMesh.boundaryMesh().findPatchID(samplePatch_); + const label patchI = nbrMesh.boundaryMesh().findPatchID(samplePatch_); if (patchI == -1) { diff --git a/src/meshTools/octree/treeLeaf.C b/src/meshTools/octree/treeLeaf.C index 823594fb710df6b6ba5d7bb0b836fa6a8bbd3d3a..9f672f73fa08a8f8e24c390155eb673237c21549 100644 --- a/src/meshTools/octree/treeLeaf.C +++ b/src/meshTools/octree/treeLeaf.C @@ -453,7 +453,7 @@ Foam::Ostream& Foam::operator<< (Ostream& os, const treeLeaf<Type>& leaf) { // Storage not trimmed os << token::SPACE << leaf.size() << token::SPACE << token::BEGIN_LIST; - for (label i = 0; i < leaf.size(); i++) + forAll(leaf, i) { os << token::SPACE << leaf.indices()[i]; } diff --git a/src/meshTools/searchableSurface/searchableSurfaces.C b/src/meshTools/searchableSurface/searchableSurfaces.C index 752113cd17001a278e543be69afa42c141ac1336..e659a88d185c319bbb01eedf970b9403d8ad071d 100644 --- a/src/meshTools/searchableSurface/searchableSurfaces.C +++ b/src/meshTools/searchableSurface/searchableSurfaces.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 @@ -30,12 +30,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -namespace Foam -{ - -defineTypeNameAndDebug(searchableSurfaces, 0); - -} +defineTypeNameAndDebug(Foam::searchableSurfaces, 0); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // @@ -256,8 +251,10 @@ Foam::searchableSurfaces::searchableSurfaces // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -Foam::label Foam::searchableSurfaces::findSurfaceID(const word& wantedName) - const +Foam::label Foam::searchableSurfaces::findSurfaceID +( + const word& wantedName +) const { return findIndex(names_, wantedName); } @@ -344,5 +341,48 @@ Foam::pointIndexHit Foam::searchableSurfaces::facesIntersection ); } +// * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * * // + +const Foam::searchableSurface& Foam::searchableSurfaces::operator[] +( + const word& surfName +) const +{ + const label surfI = findSurfaceID(surfName); + + if (surfI < 0) + { + FatalErrorIn + ( + "searchableSurfaces::operator[](const word&) const" + ) << "Surface named " << surfName << " not found." << nl + << "Available surface names: " << names_ << endl + << abort(FatalError); + } + + return operator[](surfI); +} + + +Foam::searchableSurface& Foam::searchableSurfaces::operator[] +( + const word& surfName +) +{ + const label surfI = findSurfaceID(surfName); + + if (surfI < 0) + { + FatalErrorIn + ( + "searchableSurfaces::operator[](const word&)" + ) << "Surface named " << surfName << " not found." << nl + << "Available surface names: " << names_ << endl + << abort(FatalError); + } + + return operator[](surfI); +} + // ************************************************************************* // diff --git a/src/meshTools/searchableSurface/searchableSurfaces.H b/src/meshTools/searchableSurface/searchableSurfaces.H index 34a121128801e0aea2fa4c72c7de673bb5e1b5dd..40bcf8488593d89156f7c672dc975c95c7543d3b 100644 --- a/src/meshTools/searchableSurface/searchableSurfaces.H +++ b/src/meshTools/searchableSurface/searchableSurfaces.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 @@ -174,6 +174,19 @@ public: const point& start ) const; + + // Member Operators + + //- Return const and non-const reference to searchableSurface by index. + using PtrList<searchableSurface>::operator[]; + + //- Return const reference to searchableSurface by name. + const searchableSurface& operator[](const word&) const; + + //- Return reference to searchableSurface by name. + searchableSurface& operator[](const word&); + + }; diff --git a/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C b/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C index 52bec69e4a02858e385ae0df81095d6a72b4542e..4dbc73fbd4b6f80f1af2daa41ef0ceecf32cfc5e 100644 --- a/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.C +++ b/src/postProcessing/foamCalcFunctions/calcType/calcTypeNew.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 @@ -39,11 +39,23 @@ Foam::autoPtr<Foam::calcType> Foam::calcType::New if (cstrIter == dictionaryConstructorTablePtr_->end()) { - FatalErrorIn("calcType::New()") - << "Unknown calcType type " << calcTypeName - << "Valid calcType selections are:" << nl - << dictionaryConstructorTablePtr_->sortedToc() << nl - << abort(FatalError); + // special treatment for -help + // exit without stack trace + if (calcTypeName == "-help") + { + FatalErrorIn("calcType::New()") + << "Valid calcType selections are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() << nl + << exit(FatalError); + } + else + { + FatalErrorIn("calcType::New()") + << "Unknown calcType type " << calcTypeName << nl + << "Valid calcType selections are:" << nl + << dictionaryConstructorTablePtr_->sortedToc() << nl + << abort(FatalError); + } } return autoPtr<calcType>(cstrIter()()); diff --git a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C index e19a80dc2a08b32065b2989bc474341ced02fbce..517e5803b74c637eba7d25f895346ead24c46b98 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C +++ b/src/postProcessing/functionObjects/field/fieldValues/faceSource/faceSource.C @@ -161,7 +161,7 @@ void Foam::fieldValues::faceSource::setFaceZoneFaces() void Foam::fieldValues::faceSource::setPatchFaces() { - label patchId = mesh().boundaryMesh().findPatchID(sourceName_); + const label patchId = mesh().boundaryMesh().findPatchID(sourceName_); if (patchId < 0) { diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C index 554e482c21091587fd02c283205622f497935359..8b248991d5cce5caca462a6ecf920856691cc935 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.C @@ -49,7 +49,10 @@ sixDoFRigidBodyDisplacementPointPatchVectorField fixedValuePointPatchField<vector>(p, iF), motion_(), initialPoints_(p.localPoints()), - rhoInf_(1.0) + rhoInf_(1.0), + rhoName_("rho"), + lookupGravity_(-1), + g_(vector::zero) {} @@ -63,8 +66,23 @@ sixDoFRigidBodyDisplacementPointPatchVectorField : fixedValuePointPatchField<vector>(p, iF, dict), motion_(dict), - rhoInf_(readScalar(dict.lookup("rhoInf"))) + rhoInf_(1.0), + rhoName_(dict.lookupOrDefault<word>("rhoName", "rho")), + lookupGravity_(-1), + g_(vector::zero) { + if (rhoName_ == "rhoInf") + { + rhoInf_ = readScalar(dict.lookup("rhoInf")); + } + + if (dict.found("g")) + { + lookupGravity_ = -2; + + g_ = dict.lookup("g"); + } + if (!dict.found("value")) { updateCoeffs(); @@ -93,7 +111,10 @@ sixDoFRigidBodyDisplacementPointPatchVectorField fixedValuePointPatchField<vector>(ptf, p, iF, mapper), motion_(ptf.motion_), initialPoints_(ptf.initialPoints_, mapper), - rhoInf_(ptf.rhoInf_) + rhoInf_(ptf.rhoInf_), + rhoName_(ptf.rhoName_), + lookupGravity_(ptf.lookupGravity_), + g_(ptf.g_) {} @@ -107,7 +128,10 @@ sixDoFRigidBodyDisplacementPointPatchVectorField fixedValuePointPatchField<vector>(ptf, iF), motion_(ptf.motion_), initialPoints_(ptf.initialPoints_), - rhoInf_(ptf.rhoInf_) + rhoInf_(ptf.rhoInf_), + rhoName_(ptf.rhoName_), + lookupGravity_(ptf.lookupGravity_), + g_(ptf.g_) {} @@ -146,6 +170,33 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs() return; } + if (lookupGravity_ < 0) + { + if (db().foundObject<uniformDimensionedVectorField>("g")) + { + if (lookupGravity_ == -2) + { + FatalErrorIn + ( + "void sixDoFRigidBodyDisplacementPointPatchVectorField" + "::updateCoeffs()" + ) + << "Specifying the value of g in this boundary condition " + << "when g is available from the database is considered " + << "a fatal error to avoid the possibility of inconsistency" + << exit(FatalError); + } + else + { + lookupGravity_ = 1; + } + } + else + { + lookupGravity_ = 0; + } + } + const polyMesh& mesh = this->dimensionedInternalField().mesh()(); const Time& t = mesh.time(); const pointPatch& ptPatch = this->patch(); @@ -160,6 +211,7 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs() forcesDict.add("patches", wordList(1, ptPatch.name())); forcesDict.add("rhoInf", rhoInf_); + forcesDict.add("rhoName", rhoName_); forcesDict.add("CofR", motion_.centreOfMass()); forces f("forces", db(), forcesDict); @@ -168,19 +220,17 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs() // Get the forces on the patch faces at the current positions - vector gravity = vector::zero; - - if (db().foundObject<uniformDimensionedVectorField>("g")) + if (lookupGravity_ == 1) { uniformDimensionedVectorField g = db().lookupObject<uniformDimensionedVectorField>("g"); - gravity = g.value(); + g_ = g.value(); } motion_.updateForce ( - fm.first().first() + fm.first().second() + gravity*motion_.mass(), + fm.first().first() + fm.first().second() + g_*motion_.mass(), fm.second().first() + fm.second().second(), t.deltaTValue() ); @@ -197,10 +247,20 @@ void sixDoFRigidBodyDisplacementPointPatchVectorField::updateCoeffs() void sixDoFRigidBodyDisplacementPointPatchVectorField::write(Ostream& os) const { pointPatchField<vector>::write(os); + + os.writeKeyword("rhoInf") << rhoInf_ << token::END_STATEMENT << nl; + + os.writeKeyword("rhoName") << rhoName_ << token::END_STATEMENT << nl; + + if (lookupGravity_ == 0 || lookupGravity_ == -2) + { + os.writeKeyword("g") << g_ << token::END_STATEMENT << nl; + } + motion_.write(os); - os.writeKeyword("rhoInf") - << rhoInf_ << token::END_STATEMENT << nl; + initialPoints_.writeEntry("initialPoints", os); + writeEntry("value", os); } diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H index fa30a7eff2c0e1402087a2ba08a481ca00e8edd9..ca1a3715e494ce7bb8f08df757a1af8fac7ed552 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/sixDoFRigidBodyDisplacement/sixDoFRigidBodyDisplacementPointPatchVectorField.H @@ -60,9 +60,30 @@ class sixDoFRigidBodyDisplacementPointPatchVectorField pointField initialPoints_; //- Reference density required by the forces object for - // incompressible calculations + // incompressible calculations, required if rhoName == rhoInf scalar rhoInf_; + //- Name of density field, optional unless used for an + // incompressible simulation, when this needs to be specified + // as rhoInf + word rhoName_; + + //- State of gravity lookup: + // -1 = not determined yet, as the BC may be instantiated before g has + // been read into the db yet. Determination deferred until first + // call to updateCoeffs. A g keyword was not supplied to the + // dictionary. + // -2 = as for -1, but a gravity value was specified in the dictionary, + // specifying a value in the dictionary is considered a fatal + // error if g is available from the db. + // 0 = Use this boundary condition's own value of gravity, as not + // available from the db. + // 1 = Lookup gravity from db. + label lookupGravity_; + + //- Gravity vector to store when not available from the db + vector g_; + public: diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C index f63607c99cdf7b15fc7fb9bca4d3ed78c9d76351..7b7537eec3be52a83a81582738ae292d1cc2b2b6 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.C @@ -47,8 +47,7 @@ uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField : fixedValuePointPatchField<vector>(p, iF), motion_(), - initialPoints_(p.localPoints()), - rhoInf_(1.0) + initialPoints_(p.localPoints()) {} @@ -61,8 +60,7 @@ uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField ) : fixedValuePointPatchField<vector>(p, iF, dict), - motion_(dict), - rhoInf_(readScalar(dict.lookup("rhoInf"))) + motion_(dict) { if (!dict.found("value")) { @@ -91,8 +89,7 @@ uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField : fixedValuePointPatchField<vector>(ptf, p, iF, mapper), motion_(ptf.motion_), - initialPoints_(ptf.initialPoints_, mapper), - rhoInf_(ptf.rhoInf_) + initialPoints_(ptf.initialPoints_, mapper) {} @@ -105,8 +102,7 @@ uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField : fixedValuePointPatchField<vector>(ptf, iF), motion_(ptf.motion_), - initialPoints_(ptf.initialPoints_), - rhoInf_(ptf.rhoInf_) + initialPoints_(ptf.initialPoints_) {} @@ -182,8 +178,6 @@ void uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField::write { pointPatchField<vector>::write(os); motion_.write(os); - os.writeKeyword("rhoInf") - << rhoInf_ << token::END_STATEMENT << nl; initialPoints_.writeEntry("initialPoints", os); writeEntry("value", os); } diff --git a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H index 631c732a9315fbaeb5eacadab9dd95151c442bd7..d5a17c09c776e9a6c192941653bb263750e04fe0 100644 --- a/src/postProcessing/functionObjects/forces/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H +++ b/src/postProcessing/functionObjects/forces/pointPatchFields/derived/uncoupledSixDoFRigidBodyDisplacement/uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField.H @@ -59,11 +59,6 @@ class uncoupledSixDoFRigidBodyDisplacementPointPatchVectorField //- Initial positions of points on the patch pointField initialPoints_; - //- Reference density required by the forces object for - // incompressible calculations. Retained here to give - // dictionary compatibility with other sixDoF patches. - scalar rhoInf_; - public: diff --git a/src/postProcessing/postCalc/postCalc.C b/src/postProcessing/postCalc/postCalc.C index 32fe0f2269e24acc86f2ef2e9e278489b073210b..f33fe390e7c7b4e6aed1b11863855b5709b8c92b 100644 --- a/src/postProcessing/postCalc/postCalc.C +++ b/src/postProcessing/postCalc/postCalc.C @@ -65,7 +65,8 @@ int main(int argc, char *argv[]) Foam::argList::addOption ( "dict", - "dictionary name" + "name", + "dictionary to use" ); #include "setRootCase.H" diff --git a/src/randomProcesses/Kmesh/Kmesh.C b/src/randomProcesses/Kmesh/Kmesh.C index 00b46ac35ce98b5c93443b250da61393c1c9270e..a8bdac6341555970029d94ae91928e158f59c5ae 100644 --- a/src/randomProcesses/Kmesh/Kmesh.C +++ b/src/randomProcesses/Kmesh/Kmesh.C @@ -43,7 +43,7 @@ namespace Foam { return (k + j*nn[2] + i*nn[1]*nn[2]); } - //! @endcond fileScope + //! @endcond } // End namespace Foam diff --git a/src/randomProcesses/fft/fftRenumber.C b/src/randomProcesses/fft/fftRenumber.C index c88dfb12c6a89ac1a2845e8647fc37ed50a3f8e3..d18f19c6d69bd162a99ca6a04e3f94b4717ba0ee 100644 --- a/src/randomProcesses/fft/fftRenumber.C +++ b/src/randomProcesses/fft/fftRenumber.C @@ -115,7 +115,7 @@ void fftRenumber List<complex> renumData(data); label nnprod(1); - for (label i=0; i<nn.size(); i++) + forAll(nn, i) { nnprod *= nn[i]; } diff --git a/src/sampling/cuttingPlane/cuttingPlane.C b/src/sampling/cuttingPlane/cuttingPlane.C index 8e828460cec3749826cb94236b5e676b22b6fd13..38ae618576ebea8b0b21577a123a26ccef41a4ef 100644 --- a/src/sampling/cuttingPlane/cuttingPlane.C +++ b/src/sampling/cuttingPlane/cuttingPlane.C @@ -35,7 +35,7 @@ License //! @cond localScope const Foam::scalar zeroish = Foam::SMALL; const Foam::scalar positive = Foam::SMALL * 1E3; -//! @endcond localScope +//! @endcond // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // diff --git a/src/sampling/sampledSet/face/faceOnlySet.C b/src/sampling/sampledSet/face/faceOnlySet.C index bcc30e3ec161f51ad0eeb4899b513162a9b32802..d814258dbaf5e94cf4048e5cea383171ca12bfad 100644 --- a/src/sampling/sampledSet/face/faceOnlySet.C +++ b/src/sampling/sampledSet/face/faceOnlySet.C @@ -229,7 +229,7 @@ void Foam::faceOnlySet::calcSamples ); // fill sampleSegments - for(label i = samplingPts.size() - 1; i >= startSegmentI; --i) + for (label i = samplingPts.size() - 1; i >= startSegmentI; --i) { samplingSegments.append(segmentI); } diff --git a/src/sampling/sampledSet/uniform/uniformSet.C b/src/sampling/sampledSet/uniform/uniformSet.C index 877ec14392b460bb63decaf71195a08935963d4d..02e731e3e5ff8fa11af002fff74c576d847c4618 100644 --- a/src/sampling/sampledSet/uniform/uniformSet.C +++ b/src/sampling/sampledSet/uniform/uniformSet.C @@ -64,7 +64,7 @@ bool Foam::uniformSet::nextSample samplePt += offset; sampleI++; - for(; sampleI < nPoints_; sampleI++) + for (; sampleI < nPoints_; sampleI++) { scalar s = (samplePt - currentPt) & normOffset; @@ -328,7 +328,7 @@ void Foam::uniformSet::calcSamples ); // fill sampleSegments - for(label i = samplingPts.size() - 1; i >= startSegmentI; --i) + for (label i = samplingPts.size() - 1; i >= startSegmentI; --i) { samplingSegments.append(segmentI); } diff --git a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C index c337b4d3fe506cb637d8dfa9472d2f4b64b325ed..b0df5966f889b8fc33f935615f6f99efe2b29184 100644 --- a/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C +++ b/src/sampling/sampledSurface/isoSurface/sampledIsoSurface.C @@ -304,7 +304,7 @@ bool Foam::sampledIsoSurface::updateGeometry() const const polyBoundaryMesh& patches = mesh().boundaryMesh(); // Patch to put exposed internal faces into - label exposedPatchI = patches.findPatchID(exposedPatchName_); + const label exposedPatchI = patches.findPatchID(exposedPatchName_); if (debug) { diff --git a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C index 9be34f131fbf03ef392b662cd9c60adbfba04b1f..dc677cf823ead693952f861d8c61cb1875aeb8b5 100644 --- a/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C +++ b/src/sampling/sampledSurface/sampledCuttingPlane/sampledCuttingPlane.C @@ -67,7 +67,7 @@ void Foam::sampledCuttingPlane::createGeometry() const polyBoundaryMesh& patches = mesh().boundaryMesh(); // Patch to put exposed internal faces into - label exposedPatchI = patches.findPatchID(exposedPatchName_); + const label exposedPatchI = patches.findPatchID(exposedPatchName_); if (debug) { diff --git a/src/sampling/sampledSurface/sampledPatch/sampledPatch.C b/src/sampling/sampledSurface/sampledPatch/sampledPatch.C index 4dcc59c85c7dc1e1a8b44772a38108da14efe34f..aefa3038a5a29ff86a0262848a690c4180be78c0 100644 --- a/src/sampling/sampledSurface/sampledPatch/sampledPatch.C +++ b/src/sampling/sampledSurface/sampledPatch/sampledPatch.C @@ -111,7 +111,7 @@ bool Foam::sampledPatch::update() return false; } - label patchI = mesh().boundaryMesh().findPatchID(patchName_); + const label patchI = mesh().boundaryMesh().findPatchID(patchName_); if (patchI != -1) { diff --git a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L index dd596da23a448bb103294f778d7e5eaffcef4d20..f06e903988fcaffb758a097ba337295f3f97b7fe 100644 --- a/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L +++ b/src/surfMesh/surfaceFormats/stl/STLsurfaceFormatASCII.L @@ -44,7 +44,7 @@ int yyFlexLexer::yylex() << abort(FatalError); return 0; } -//! @endcond dummy +//! @endcond // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. @@ -58,7 +58,7 @@ int yyFlexLexer::yywrap() { return 1; } -//! @endcond dummy +//! @endcond //- A lexer for parsing STL ASCII files. diff --git a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C index 376d2cd199e563c2a962b0de80b8aaa4e1185f10..090b1091aeecdc4a041333c495c6fa489008fc3a 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C +++ b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.C @@ -1,1062 +1,1062 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 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 <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kinematicSingleLayer.H" -#include "fvm.H" -#include "fvcDiv.H" -#include "fvcLaplacian.H" -#include "fvcSnGrad.H" -#include "fvcReconstruct.H" -#include "fvcVolumeIntegrate.H" -#include "addToRunTimeSelectionTable.H" -#include "directMappedWallPolyPatch.H" - -// Sub-models -#include "injectionModel.H" - -// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // - -namespace Foam -{ - namespace surfaceFilmModels - { - defineTypeNameAndDebug(kinematicSingleLayer, 0); - addToRunTimeSelectionTable - ( - surfaceFilmModel, - kinematicSingleLayer, - mesh - ); - } -} - - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -bool Foam::surfaceFilmModels::kinematicSingleLayer::read() -{ - if (surfaceFilmModel::read()) - { - const dictionary& solution = filmRegion_.solutionDict().subDict("PISO"); - solution.lookup("momentumPredictor") >> momentumPredictor_; - solution.lookup("nOuterCorr") >> nOuterCorr_; - solution.lookup("nCorr") >> nCorr_; - solution.lookup("nNonOrthCorr") >> nNonOrthCorr_; - - coeffs_.lookup("Cf") >> Cf_; - coeffs_.lookup("deltaStable") >> deltaStable_; - - return true; - } - else - { - return false; - } -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::initialise() -{ - if (debug) - { - Pout<< "kinematicSingleLayer::initialise()" << endl; - } - - label nBoundaryFaces = 0; - DynamicList<label> primaryPatchIDs; - DynamicList<label> filmBottomPatchIDs; - const polyBoundaryMesh& bm = filmRegion_.boundaryMesh(); - forAll(bm, patchI) - { - const polyPatch& pp = bm[patchI]; - if (isA<directMappedWallPolyPatch>(pp)) - { - if (debug) - { - Pout<< "found " << directMappedWallPolyPatch::typeName - << " " << pp.name() << endl; - } - - filmBottomPatchIDs.append(patchI); - const directMappedWallPolyPatch& dwpp = - refCast<const directMappedWallPolyPatch>(pp); - - primaryPatchIDs.append - ( - mesh_.boundaryMesh().findPatchID(dwpp.samplePatch()) - ); - - const labelList& fCells = pp.faceCells(); - nBoundaryFaces += fCells.size(); - - // Cache patch normals - UIndirectList<vector>(nHat_, fCells) = pp.faceNormals(); - - // Cache mesh face areas - UIndirectList<scalar>(magSf_, fCells) = mag(pp.faceAreas()); - } - } - nHat_.correctBoundaryConditions(); - magSf_.correctBoundaryConditions(); - - primaryPatchIDs_.transfer(primaryPatchIDs); - filmBottomPatchIDs_.transfer(filmBottomPatchIDs); - - if (nBoundaryFaces == 0) - { - WarningIn("kinematicSingleLayer::initialise()") - << "Film model being applied without direct mapped boundary " - << "conditions" << endl; - } - - if (nBoundaryFaces != filmRegion_.nCells()) - { - FatalErrorIn("kinematicSingleLayer::initialise()") - << "Number of primary region coupled boundary faces not equal to " - << "the number of cells in the film region" << nl - << abort(FatalError); - } - - scalarField topMagSf(magSf_.size(), 0.0); - filmTopPatchIDs_.setSize(filmBottomPatchIDs_.size(), -1); - forAll(filmBottomPatchIDs_, i) - { - const label patchI = filmBottomPatchIDs_[i]; - const polyPatch& ppBottom = bm[patchI]; - if (ppBottom.size() > 0) - { - label cellId = bm[patchI].faceCells()[0]; - const cell& cFaces = filmRegion_.cells()[cellId]; - - label faceBottom = ppBottom.start(); - label faceTop = - cFaces.opposingFaceLabel(faceBottom, filmRegion_.faces()); - - label topPatchI = bm.whichPatch(faceTop); - filmTopPatchIDs_[i] = topPatchI; - const polyPatch& ppTop = bm[topPatchI]; - UIndirectList<scalar>(topMagSf, ppTop.faceCells()) = - mag(ppTop.faceAreas()); - } - } - - Pstream::listCombineGather(filmTopPatchIDs_, maxEqOp<label>()); - Pstream::listCombineScatter(filmTopPatchIDs_); - - magSf_.field() = 0.5*(magSf_ + topMagSf); - magSf_.correctBoundaryConditions(); -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer:: -resetPrimaryRegionSourceTerms() -{ - rhoSpPrimary_ == dimensionedScalar("zero", rhoSp_.dimensions(), 0.0); - USpPrimary_ == dimensionedVector("zero", USp_.dimensions(), vector::zero); - pSpPrimary_ == dimensionedScalar("zero", pSp_.dimensions(), 0.0); -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer:: -transferPrimaryRegionFields() -{ - // Update pressure and velocity from primary region via direct mapped - // (coupled) boundary conditions - UPrimary_.correctBoundaryConditions(); - pPrimary_.correctBoundaryConditions(); - - // Retrieve the source fields from the primary region via direct mapped - // (coupled) boundary conditions - // - fields require transfer of values for both patch AND to push the - // values into the first layer of internal cells - rhoSp_.correctBoundaryConditions(); - USp_.correctBoundaryConditions(); - pSp_.correctBoundaryConditions(); - - // Convert accummulated source terms into per unit area per unit time - // Note: boundary values will still have original (neat) values - const scalar deltaT = filmRegion_.time().deltaTValue(); - rhoSp_.field() /= magSf_*deltaT; - USp_.field() /= magSf_*deltaT; - pSp_.field() /= magSf_*deltaT; -} - - -Foam::tmp<Foam::volScalarField> -Foam::surfaceFilmModels::kinematicSingleLayer::pu() -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "pu", - filmRegion_.time().timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - pPrimary_ // pressure (mapped from primary region) - + pSp_ // accumulated particle impingement - - fvc::laplacian(sigma_, delta_) // surface tension - ) - ); -} - - -Foam::tmp<Foam::volScalarField> -Foam::surfaceFilmModels::kinematicSingleLayer::pp() -{ - return tmp<volScalarField> - ( - new volScalarField - ( - IOobject - ( - "pp", - filmRegion_.time().timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - -rho_*gNormClipped() // hydrostatic effect only - ) - ); -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::correctDetachedFilm() -{ - massForPrimary_ == dimensionedScalar("zero", dimMass, 0.0); - diametersForPrimary_ == dimensionedScalar("zero", dimLength, -1.0); - - const scalarField gNorm = this->gNorm(); - - forAll(gNorm, i) - { - if (gNorm[i] > SMALL) - { - scalar ddelta = max(0.0, delta_[i] - deltaStable_.value()); - massForPrimary_[i] = ddelta*rho_[i]*magSf_[i]; - } - } -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::updateSubmodels() -{ - correctDetachedFilm(); - - // Update injection model - mass returned is actual mass injected - injection_->correct(massForPrimary_, diametersForPrimary_); - - // Update cumulative detached mass counter - detachedMass_ += sum(massForPrimary_.field()); - - // Push values to boundaries ready for transfer to the primary region - massForPrimary_.correctBoundaryConditions(); - diametersForPrimary_.correctBoundaryConditions(); - - // Update source fields - const dimensionedScalar deltaT = filmRegion_.time().deltaT(); - rhoSp_ -= massForPrimary_/magSf_/deltaT; - USp_ -= massForPrimary_*U_/magSf_/deltaT; -} - - -Foam::scalar -Foam::surfaceFilmModels::kinematicSingleLayer::CourantNumber() const -{ - scalar CoNum = 0.0; - scalar meanCoNum = 0.0; - - if (filmRegion_.nInternalFaces()) - { - const scalar deltaT = time_.deltaTValue(); - - surfaceScalarField SfUfbyDelta = - filmRegion_.surfaceInterpolation::deltaCoeffs()*mag(phi_) - /fvc::interpolate - ( - rho_*(delta_ + dimensionedScalar("SMALL", dimLength, SMALL)) - ); - - CoNum = max(SfUfbyDelta/filmRegion_.magSf()).value()*deltaT; - - meanCoNum = (sum(SfUfbyDelta)/sum(filmRegion_.magSf())).value()*deltaT; - } - - Info<< " Courant number mean: " << meanCoNum << " max: " << CoNum - << endl; - - return CoNum; -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::continuityCheck() -{ - const volScalarField deltaRho0 = deltaRho_; - - solveContinuity(); - - if (debug) - { - volScalarField mass = deltaRho_*magSf_; - dimensionedScalar totalMass = - fvc::domainIntegrate(mass) - + dimensionedScalar("SMALL", dimMass*dimVolume, ROOTVSMALL); - - scalar sumLocalContErr = - ( - fvc::domainIntegrate(mag(mass - magSf_*deltaRho0))/totalMass - ).value(); - - scalar globalContErr = - ( - fvc::domainIntegrate(mass - magSf_*deltaRho0)/totalMass - ).value(); - - cumulativeContErr_ += globalContErr; - - Info<< "Surface film: " << type() << nl - << " time step continuity errors: sum local = " - << sumLocalContErr << ", global = " << globalContErr - << ", cumulative = " << cumulativeContErr_ << endl; - } -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::solveContinuity() -{ - if (debug) - { - Info<< "kinematicSingleLayer::solveContinuity()" << endl; - } - - solve - ( - fvm::ddt(deltaRho_) - + fvc::div(phi_) - == - rhoSp_ - ); -} - - -Foam::tmp<Foam::fvVectorMatrix> -Foam::surfaceFilmModels::kinematicSingleLayer::tau -( - volVectorField& U -) const -{ - DimensionedField<vector, volMesh> Uw - ( - IOobject - ( - "Uw", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - filmRegion_, - dimensionedVector("zero", dimVelocity, vector::zero) - ); - - for (label i=0; i<filmBottomPatchIDs_.size(); i++) - { - label patchI = filmBottomPatchIDs_[i]; - const polyPatch& pp = filmRegion_.boundaryMesh()[patchI]; - UIndirectList<vector>(Uw, pp.faceCells()) = - UPrimary_.boundaryField()[patchI]; - } - Uw -= nHat_*(Uw & nHat_); - - volVectorField Us - ( - IOobject - ( - "Us", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE, - false - ), - filmRegion_, - dimensionedVector("zero", dimVelocity, vector::zero) - ); - - // TODO: use wall functions - Us.dimensionedInternalField() = UPrimary_.dimensionedInternalField(); - Us -= nHat_*(Us & nHat_); - - volScalarField Cs("Cs", rho_*Cf_*mag(Us - U_)); - volScalarField Cw - ( - "Cw", - mu_/(0.5*(delta_ + dimensionedScalar("SMALL", dimLength, SMALL))) - ); - Cw.min(1.0e+06); - - return - ( - - fvm::Sp(Cs, U) + Cs*Us - - fvm::Sp(Cw, U) + Cw*Uw - ); -} - - -Foam::tmp<Foam::fvVectorMatrix> -Foam::surfaceFilmModels::kinematicSingleLayer::solveMomentum -( - const volScalarField& pu, - const volScalarField& pp -) -{ - if (debug) - { - Info<< "kinematicSingleLayer::solveMomentum()" << endl; - } - - // Momentum - tmp<fvVectorMatrix> tUEqn - ( - fvm::ddt(deltaRho_, U_) - + fvm::div(phi_, U_) - == - USp_ - + tau(U_) - ); - - fvVectorMatrix& UEqn = tUEqn(); - - UEqn.relax(); - - if (momentumPredictor_) - { - solve - ( - UEqn - == - fvc::reconstruct - ( - - fvc::interpolate(delta_) - * ( - filmRegion_.magSf() - * ( - fvc::snGrad(pu, "snGrad(p)") - + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_) - + fvc::snGrad(delta_)*fvc::interpolate(pp) - ) - - (fvc::interpolate(rho_*gTan()) & filmRegion_.Sf()) - ) - ) - ); - - // Remove any patch-normal components of velocity - U_ -= nHat_*(nHat_ & U_); - U_.correctBoundaryConditions(); - } - - return tUEqn; -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::solveThickness -( - const volScalarField& pu, - const volScalarField& pp, - const fvVectorMatrix& UEqn -) -{ - if (debug) - { - Info<< "kinematicSingleLayer::solveThickness()" << endl; - } - - volScalarField rUA = 1.0/UEqn.A(); - U_ = rUA*UEqn.H(); - - surfaceScalarField deltarUAf = fvc::interpolate(delta_*rUA); - surfaceScalarField rhof = fvc::interpolate(rho_); - - surfaceScalarField phiAdd - ( - "phiAdd", - filmRegion_.magSf() - * ( - fvc::snGrad(pu, "snGrad(p)") - + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_) - ) - - (fvc::interpolate(rho_*gTan()) & filmRegion_.Sf()) - ); - constrainFilmField(phiAdd, 0.0); - - surfaceScalarField phid - ( - "phid", - (fvc::interpolate(U_*rho_) & filmRegion_.Sf()) - - deltarUAf*phiAdd*rhof - ); - constrainFilmField(phid, 0.0); - - surfaceScalarField ddrhorUAppf = - fvc::interpolate(delta_)*deltarUAf*rhof*fvc::interpolate(pp); -// constrainFilmField(ddrhorUAppf, 0.0); - - for (int nonOrth=0; nonOrth<=nNonOrthCorr_; nonOrth++) - { - // Film thickness equation - fvScalarMatrix deltaEqn - ( - fvm::ddt(rho_, delta_) - + fvm::div(phid, delta_) - - fvm::laplacian(ddrhorUAppf, delta_) - == - rhoSp_ - ); - - deltaEqn.solve(); - - if (nonOrth == nNonOrthCorr_) - { - phiAdd += - fvc::interpolate(pp) - * fvc::snGrad(delta_) - * filmRegion_.magSf(); - - phi_ == deltaEqn.flux(); - } - } - - // Bound film thickness by a minimum of zero - delta_.max(0.0); - - // Update U field - U_ -= fvc::reconstruct(deltarUAf*phiAdd); - - // Remove any patch-normal components of velocity - U_ -= nHat_*(nHat_ & U_); - - U_.correctBoundaryConditions(); - - // Continuity check - continuityCheck(); -} - - -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer -( - const word& modelType, - const fvMesh& mesh, - const dimensionedVector& g -) -: - surfaceFilmModel(modelType, mesh, g), - filmRegion_ - ( - IOobject - ( - filmRegionName_, - time_.timeName(), - time_, - IOobject::MUST_READ - ) - ), - nHat_ - ( - IOobject - ( - "nHat", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - filmRegion_, - dimensionedVector("zero", dimless, vector::zero), - zeroGradientFvPatchVectorField::typeName - ), - magSf_ - ( - IOobject - ( - "magSf", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - filmRegion_, - dimensionedScalar("zero", dimArea, 0.0), - zeroGradientFvPatchScalarField::typeName - ), - primaryPatchIDs_(0), - filmTopPatchIDs_(0), - filmBottomPatchIDs_(0), - - momentumPredictor_(true), - nOuterCorr_(-1), - nCorr_(-1), - nNonOrthCorr_(-1), - cumulativeContErr_(0.0), - - Cf_(0.0), - deltaStable_("deltaStable", dimLength, 0.0), - - rho_ - ( - IOobject - ( - "rhof", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - filmRegion_, - dimensionedScalar(coeffs_.lookup("rho")) - ), - mu_ - ( - IOobject - ( - "muf", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - filmRegion_, - dimensionedScalar(coeffs_.lookup("mu")) - ), - sigma_ - ( - IOobject - ( - "sigmaf", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - filmRegion_, - dimensionedScalar(coeffs_.lookup("sigma")) - ), - - delta_ - ( - IOobject - ( - "deltaf", - time_.timeName(), - filmRegion_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - filmRegion_ - ), - U_ - ( - IOobject - ( - "Uf", - time_.timeName(), - filmRegion_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - filmRegion_ - ), - deltaRho_ - ( - IOobject - ( - delta_.name() + "*" + rho_.name(), - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - delta_*rho_, - zeroGradientFvPatchScalarField::typeName - ), - - phi_ - ( - IOobject - ( - "phi", - time_.timeName(), - filmRegion_, - IOobject::READ_IF_PRESENT, - IOobject::AUTO_WRITE - ), - fvc::interpolate(delta_*rho_*U_) & filmRegion_.Sf() - ), - - massForPrimary_ - ( - IOobject - ( - "massForPrimary", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - filmRegion_, - dimensionedScalar("zero", dimMass, 0.0), - zeroGradientFvPatchScalarField::typeName - ), - diametersForPrimary_ - ( - IOobject - ( - "diametersForPrimary", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - filmRegion_, - dimensionedScalar("zero", dimLength, -1.0), - zeroGradientFvPatchScalarField::typeName - ), - - USp_ - ( - IOobject - ( - "USpf", - time_.timeName(), - filmRegion_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - filmRegion_ - ), - pSp_ - ( - IOobject - ( - "pSpf", - time_.timeName(), - filmRegion_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - filmRegion_ - ), - rhoSp_ - ( - IOobject - ( - "rhoSpf", - time_.timeName(), - filmRegion_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - filmRegion_, - dimensionedScalar("zero", dimMass/dimTime/dimArea, 0.0), - pSp_.boundaryField().types() - ), - - USpPrimary_ - ( - IOobject - ( - USp_.name(), // must have same name as USp_ to enable mapping - time_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedVector("zero", USp_.dimensions(), vector::zero) - ), - pSpPrimary_ - ( - IOobject - ( - pSp_.name(), // must have same name as pSp_ to enable mapping - time_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("zero", pSp_.dimensions(), 0.0) - ), - rhoSpPrimary_ - ( - IOobject - ( - rhoSp_.name(), // must have same name as rhoSp_ to enable mapping - time_.timeName(), - mesh_, - IOobject::NO_READ, - IOobject::NO_WRITE - ), - mesh_, - dimensionedScalar("zero", rhoSp_.dimensions(), 0.0) - ), - - UPrimary_ - ( - IOobject - ( - "U", // must have same name as U on primary region to enable mapping - time_.timeName(), - filmRegion_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - filmRegion_ - ), - pPrimary_ - ( - IOobject - ( - "p", // must have same name as p on primary region to enable mapping - time_.timeName(), - filmRegion_, - IOobject::MUST_READ, - IOobject::AUTO_WRITE - ), - filmRegion_ - ), - - injection_(injectionModel::New(*this, coeffs_)), - - addedMass_(0.0), - detachedMass_(0.0) -{ - read(); - - initialise(); -} - - -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // - -Foam::surfaceFilmModels::kinematicSingleLayer::~kinematicSingleLayer() -{} - - -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // - -inline const Foam::fvMesh& -Foam::surfaceFilmModels::kinematicSingleLayer::film() const -{ - return filmRegion_; -} - - -const Foam::labelList& -Foam::surfaceFilmModels::kinematicSingleLayer::filmBottomPatchIDs() const -{ - return filmBottomPatchIDs_; -} - - -const Foam::labelList& -Foam::surfaceFilmModels::kinematicSingleLayer::filmTopPatchIDs() const -{ - return filmTopPatchIDs_; -} - - -const Foam::labelList& -Foam::surfaceFilmModels::kinematicSingleLayer::primaryPatchIDs() const -{ - return primaryPatchIDs_; -} - - -bool Foam::surfaceFilmModels::kinematicSingleLayer::isFilmPatch -( - const label patchI -) const -{ - if (!active_) - { - return false; - } - - forAll(primaryPatchIDs_, i) - { - if (primaryPatchIDs_[i] == patchI) - { - return true; - } - } - - return false; -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::addSources -( - const label patchI, - const label faceI, - const scalar massSource, - const vector& momentumSource, - const scalar pressureSource, - const scalar energySource -) -{ - if (debug) - { - Info<< "\nSurface film: " << type() << ": adding to film source:" << nl - << " mass = " << massSource << nl - << " momentum = " << momentumSource << nl - << " pressure = " << pressureSource << endl; - } - - rhoSpPrimary_.boundaryField()[patchI][faceI] += massSource; - USpPrimary_.boundaryField()[patchI][faceI] += momentumSource; - pSpPrimary_.boundaryField()[patchI][faceI] += pressureSource; - - addedMass_ += massSource; -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::evolveFilm() -{ - transferPrimaryRegionFields(); - - updateSubmodels(); - - // Solve continuity for deltaRho_ - solveContinuity(); - - for (int oCorr=0; oCorr<nOuterCorr_; oCorr++) - { - // Explicit pressure source contribution - tmp<volScalarField> pu = this->pu(); - - // Implicit pressure source coefficient - tmp<volScalarField> pp = this->pp(); - - // Solve for momentum for U_ - tmp<fvVectorMatrix> UEqn = solveMomentum(pu(), pp()); - - // Film thickness correction loop - for (int corr=1; corr<=nCorr_; corr++) - { - // Solve thickness for delta_ - solveThickness(pu(), pp(), UEqn()); - } - } - - // Update deltaRho_ with new delta_ - deltaRho_ == delta_*rho_; - - // Reset source terms for next time integration - resetPrimaryRegionSourceTerms(); -} - - -const Foam::volVectorField& -Foam::surfaceFilmModels::kinematicSingleLayer::U() const -{ - return U_; -} - - -const Foam::volScalarField& -Foam::surfaceFilmModels::kinematicSingleLayer::rho() const -{ - return rho_; -} - - -const Foam::volScalarField& -Foam::surfaceFilmModels::kinematicSingleLayer::T() const -{ - FatalErrorIn - ( - "const volScalarField& kinematicSingleLayer::T() const" - ) << "T field not available for " << type() << abort(FatalError); - - return reinterpret_cast<const volScalarField&>(null); -} - - -const Foam::volScalarField& -Foam::surfaceFilmModels::kinematicSingleLayer::cp() const -{ - FatalErrorIn - ( - "const volScalarField& kinematicSingleLayer::cp() const" - ) << "cp field not available for " << type() << abort(FatalError); - - return reinterpret_cast<const volScalarField&>(null); -} - - - -const Foam::volScalarField& -Foam::surfaceFilmModels::kinematicSingleLayer::massForPrimary() const -{ - return massForPrimary_; -} - - -const Foam::volScalarField& -Foam::surfaceFilmModels::kinematicSingleLayer::diametersForPrimary() const -{ - return diametersForPrimary_; -} - - -void Foam::surfaceFilmModels::kinematicSingleLayer::info() const -{ - Info<< "\nSurface film: " << type() << endl; - - // Output Courant number for info only - does not change time step - CourantNumber(); - - Info<< indent << "added mass = " - << returnReduce<scalar>(addedMass_, sumOp<scalar>()) << nl - << indent << "current mass = " - << gSum((deltaRho_*magSf_)()) << nl - << indent << "detached mass = " - << returnReduce<scalar>(detachedMass_, sumOp<scalar>()) << nl - << indent << "min/max(mag(U)) = " << min(mag(U_)).value() << ", " - << max(mag(U_)).value() << nl - << indent << "min/max(delta) = " << min(delta_).value() << ", " - << max(delta_).value() << nl; -} - - -// ************************************************************************* // +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2010 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "kinematicSingleLayer.H" +#include "fvm.H" +#include "fvcDiv.H" +#include "fvcLaplacian.H" +#include "fvcSnGrad.H" +#include "fvcReconstruct.H" +#include "fvcVolumeIntegrate.H" +#include "addToRunTimeSelectionTable.H" +#include "directMappedWallPolyPatch.H" + +// Sub-models +#include "injectionModel.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ + namespace surfaceFilmModels + { + defineTypeNameAndDebug(kinematicSingleLayer, 0); + addToRunTimeSelectionTable + ( + surfaceFilmModel, + kinematicSingleLayer, + mesh + ); + } +} + + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +bool Foam::surfaceFilmModels::kinematicSingleLayer::read() +{ + if (surfaceFilmModel::read()) + { + const dictionary& solution = filmRegion_.solutionDict().subDict("PISO"); + solution.lookup("momentumPredictor") >> momentumPredictor_; + solution.lookup("nOuterCorr") >> nOuterCorr_; + solution.lookup("nCorr") >> nCorr_; + solution.lookup("nNonOrthCorr") >> nNonOrthCorr_; + + coeffs_.lookup("Cf") >> Cf_; + coeffs_.lookup("deltaStable") >> deltaStable_; + + return true; + } + else + { + return false; + } +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer::initialise() +{ + if (debug) + { + Pout<< "kinematicSingleLayer::initialise()" << endl; + } + + label nBoundaryFaces = 0; + DynamicList<label> primaryPatchIDs; + DynamicList<label> filmBottomPatchIDs; + const polyBoundaryMesh& bm = filmRegion_.boundaryMesh(); + forAll(bm, patchI) + { + const polyPatch& pp = bm[patchI]; + if (isA<directMappedWallPolyPatch>(pp)) + { + if (debug) + { + Pout<< "found " << directMappedWallPolyPatch::typeName + << " " << pp.name() << endl; + } + + filmBottomPatchIDs.append(patchI); + const directMappedWallPolyPatch& dwpp = + refCast<const directMappedWallPolyPatch>(pp); + + primaryPatchIDs.append + ( + mesh_.boundaryMesh().findPatchID(dwpp.samplePatch()) + ); + + const labelList& fCells = pp.faceCells(); + nBoundaryFaces += fCells.size(); + + // Cache patch normals + UIndirectList<vector>(nHat_, fCells) = pp.faceNormals(); + + // Cache mesh face areas + UIndirectList<scalar>(magSf_, fCells) = mag(pp.faceAreas()); + } + } + nHat_.correctBoundaryConditions(); + magSf_.correctBoundaryConditions(); + + primaryPatchIDs_.transfer(primaryPatchIDs); + filmBottomPatchIDs_.transfer(filmBottomPatchIDs); + + if (nBoundaryFaces == 0) + { + WarningIn("kinematicSingleLayer::initialise()") + << "Film model being applied without direct mapped boundary " + << "conditions" << endl; + } + + if (nBoundaryFaces != filmRegion_.nCells()) + { + FatalErrorIn("kinematicSingleLayer::initialise()") + << "Number of primary region coupled boundary faces not equal to " + << "the number of cells in the film region" << nl + << abort(FatalError); + } + + scalarField topMagSf(magSf_.size(), 0.0); + filmTopPatchIDs_.setSize(filmBottomPatchIDs_.size(), -1); + forAll(filmBottomPatchIDs_, i) + { + const label patchI = filmBottomPatchIDs_[i]; + const polyPatch& ppBottom = bm[patchI]; + if (ppBottom.size() > 0) + { + label cellId = bm[patchI].faceCells()[0]; + const cell& cFaces = filmRegion_.cells()[cellId]; + + label faceBottom = ppBottom.start(); + label faceTop = + cFaces.opposingFaceLabel(faceBottom, filmRegion_.faces()); + + label topPatchI = bm.whichPatch(faceTop); + filmTopPatchIDs_[i] = topPatchI; + const polyPatch& ppTop = bm[topPatchI]; + UIndirectList<scalar>(topMagSf, ppTop.faceCells()) = + mag(ppTop.faceAreas()); + } + } + + Pstream::listCombineGather(filmTopPatchIDs_, maxEqOp<label>()); + Pstream::listCombineScatter(filmTopPatchIDs_); + + magSf_.field() = 0.5*(magSf_ + topMagSf); + magSf_.correctBoundaryConditions(); +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer:: +resetPrimaryRegionSourceTerms() +{ + rhoSpPrimary_ == dimensionedScalar("zero", rhoSp_.dimensions(), 0.0); + USpPrimary_ == dimensionedVector("zero", USp_.dimensions(), vector::zero); + pSpPrimary_ == dimensionedScalar("zero", pSp_.dimensions(), 0.0); +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer:: +transferPrimaryRegionFields() +{ + // Update pressure and velocity from primary region via direct mapped + // (coupled) boundary conditions + UPrimary_.correctBoundaryConditions(); + pPrimary_.correctBoundaryConditions(); + + // Retrieve the source fields from the primary region via direct mapped + // (coupled) boundary conditions + // - fields require transfer of values for both patch AND to push the + // values into the first layer of internal cells + rhoSp_.correctBoundaryConditions(); + USp_.correctBoundaryConditions(); + pSp_.correctBoundaryConditions(); + + // Convert accummulated source terms into per unit area per unit time + // Note: boundary values will still have original (neat) values + const scalar deltaT = filmRegion_.time().deltaTValue(); + rhoSp_.field() /= magSf_*deltaT; + USp_.field() /= magSf_*deltaT; + pSp_.field() /= magSf_*deltaT; +} + + +Foam::tmp<Foam::volScalarField> +Foam::surfaceFilmModels::kinematicSingleLayer::pu() +{ + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + "pu", + filmRegion_.time().timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + pPrimary_ // pressure (mapped from primary region) + + pSp_ // accumulated particle impingement + - fvc::laplacian(sigma_, delta_) // surface tension + ) + ); +} + + +Foam::tmp<Foam::volScalarField> +Foam::surfaceFilmModels::kinematicSingleLayer::pp() +{ + return tmp<volScalarField> + ( + new volScalarField + ( + IOobject + ( + "pp", + filmRegion_.time().timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + -rho_*gNormClipped() // hydrostatic effect only + ) + ); +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer::correctDetachedFilm() +{ + massForPrimary_ == dimensionedScalar("zero", dimMass, 0.0); + diametersForPrimary_ == dimensionedScalar("zero", dimLength, -1.0); + + const scalarField gNorm = this->gNorm(); + + forAll(gNorm, i) + { + if (gNorm[i] > SMALL) + { + scalar ddelta = max(0.0, delta_[i] - deltaStable_.value()); + massForPrimary_[i] = ddelta*rho_[i]*magSf_[i]; + } + } +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer::updateSubmodels() +{ + correctDetachedFilm(); + + // Update injection model - mass returned is actual mass injected + injection_->correct(massForPrimary_, diametersForPrimary_); + + // Update cumulative detached mass counter + detachedMass_ += sum(massForPrimary_.field()); + + // Push values to boundaries ready for transfer to the primary region + massForPrimary_.correctBoundaryConditions(); + diametersForPrimary_.correctBoundaryConditions(); + + // Update source fields + const dimensionedScalar deltaT = filmRegion_.time().deltaT(); + rhoSp_ -= massForPrimary_/magSf_/deltaT; + USp_ -= massForPrimary_*U_/magSf_/deltaT; +} + + +Foam::scalar +Foam::surfaceFilmModels::kinematicSingleLayer::CourantNumber() const +{ + scalar CoNum = 0.0; + scalar meanCoNum = 0.0; + + if (filmRegion_.nInternalFaces()) + { + const scalar deltaT = time_.deltaTValue(); + + surfaceScalarField SfUfbyDelta = + filmRegion_.surfaceInterpolation::deltaCoeffs()*mag(phi_) + /fvc::interpolate + ( + rho_*(delta_ + dimensionedScalar("SMALL", dimLength, SMALL)) + ); + + CoNum = max(SfUfbyDelta/filmRegion_.magSf()).value()*deltaT; + + meanCoNum = (sum(SfUfbyDelta)/sum(filmRegion_.magSf())).value()*deltaT; + } + + Info<< " Courant number mean: " << meanCoNum << " max: " << CoNum + << endl; + + return CoNum; +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer::continuityCheck() +{ + const volScalarField deltaRho0 = deltaRho_; + + solveContinuity(); + + if (debug) + { + volScalarField mass = deltaRho_*magSf_; + dimensionedScalar totalMass = + fvc::domainIntegrate(mass) + + dimensionedScalar("SMALL", dimMass*dimVolume, ROOTVSMALL); + + scalar sumLocalContErr = + ( + fvc::domainIntegrate(mag(mass - magSf_*deltaRho0))/totalMass + ).value(); + + scalar globalContErr = + ( + fvc::domainIntegrate(mass - magSf_*deltaRho0)/totalMass + ).value(); + + cumulativeContErr_ += globalContErr; + + Info<< "Surface film: " << type() << nl + << " time step continuity errors: sum local = " + << sumLocalContErr << ", global = " << globalContErr + << ", cumulative = " << cumulativeContErr_ << endl; + } +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer::solveContinuity() +{ + if (debug) + { + Info<< "kinematicSingleLayer::solveContinuity()" << endl; + } + + solve + ( + fvm::ddt(deltaRho_) + + fvc::div(phi_) + == + rhoSp_ + ); +} + + +Foam::tmp<Foam::fvVectorMatrix> +Foam::surfaceFilmModels::kinematicSingleLayer::tau +( + volVectorField& U +) const +{ + DimensionedField<vector, volMesh> Uw + ( + IOobject + ( + "Uw", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + filmRegion_, + dimensionedVector("zero", dimVelocity, vector::zero) + ); + + forAll(filmBottomPatchIDs_, i) + { + label patchI = filmBottomPatchIDs_[i]; + const polyPatch& pp = filmRegion_.boundaryMesh()[patchI]; + UIndirectList<vector>(Uw, pp.faceCells()) = + UPrimary_.boundaryField()[patchI]; + } + Uw -= nHat_*(Uw & nHat_); + + volVectorField Us + ( + IOobject + ( + "Us", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + filmRegion_, + dimensionedVector("zero", dimVelocity, vector::zero) + ); + + // TODO: use wall functions + Us.dimensionedInternalField() = UPrimary_.dimensionedInternalField(); + Us -= nHat_*(Us & nHat_); + + volScalarField Cs("Cs", rho_*Cf_*mag(Us - U_)); + volScalarField Cw + ( + "Cw", + mu_/(0.5*(delta_ + dimensionedScalar("SMALL", dimLength, SMALL))) + ); + Cw.min(1.0e+06); + + return + ( + - fvm::Sp(Cs, U) + Cs*Us + - fvm::Sp(Cw, U) + Cw*Uw + ); +} + + +Foam::tmp<Foam::fvVectorMatrix> +Foam::surfaceFilmModels::kinematicSingleLayer::solveMomentum +( + const volScalarField& pu, + const volScalarField& pp +) +{ + if (debug) + { + Info<< "kinematicSingleLayer::solveMomentum()" << endl; + } + + // Momentum + tmp<fvVectorMatrix> tUEqn + ( + fvm::ddt(deltaRho_, U_) + + fvm::div(phi_, U_) + == + USp_ + + tau(U_) + ); + + fvVectorMatrix& UEqn = tUEqn(); + + UEqn.relax(); + + if (momentumPredictor_) + { + solve + ( + UEqn + == + fvc::reconstruct + ( + - fvc::interpolate(delta_) + * ( + filmRegion_.magSf() + * ( + fvc::snGrad(pu, "snGrad(p)") + + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_) + + fvc::snGrad(delta_)*fvc::interpolate(pp) + ) + - (fvc::interpolate(rho_*gTan()) & filmRegion_.Sf()) + ) + ) + ); + + // Remove any patch-normal components of velocity + U_ -= nHat_*(nHat_ & U_); + U_.correctBoundaryConditions(); + } + + return tUEqn; +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer::solveThickness +( + const volScalarField& pu, + const volScalarField& pp, + const fvVectorMatrix& UEqn +) +{ + if (debug) + { + Info<< "kinematicSingleLayer::solveThickness()" << endl; + } + + volScalarField rUA = 1.0/UEqn.A(); + U_ = rUA*UEqn.H(); + + surfaceScalarField deltarUAf = fvc::interpolate(delta_*rUA); + surfaceScalarField rhof = fvc::interpolate(rho_); + + surfaceScalarField phiAdd + ( + "phiAdd", + filmRegion_.magSf() + * ( + fvc::snGrad(pu, "snGrad(p)") + + fvc::snGrad(pp, "snGrad(p)")*fvc::interpolate(delta_) + ) + - (fvc::interpolate(rho_*gTan()) & filmRegion_.Sf()) + ); + constrainFilmField(phiAdd, 0.0); + + surfaceScalarField phid + ( + "phid", + (fvc::interpolate(U_*rho_) & filmRegion_.Sf()) + - deltarUAf*phiAdd*rhof + ); + constrainFilmField(phid, 0.0); + + surfaceScalarField ddrhorUAppf = + fvc::interpolate(delta_)*deltarUAf*rhof*fvc::interpolate(pp); +// constrainFilmField(ddrhorUAppf, 0.0); + + for (int nonOrth=0; nonOrth<=nNonOrthCorr_; nonOrth++) + { + // Film thickness equation + fvScalarMatrix deltaEqn + ( + fvm::ddt(rho_, delta_) + + fvm::div(phid, delta_) + - fvm::laplacian(ddrhorUAppf, delta_) + == + rhoSp_ + ); + + deltaEqn.solve(); + + if (nonOrth == nNonOrthCorr_) + { + phiAdd += + fvc::interpolate(pp) + * fvc::snGrad(delta_) + * filmRegion_.magSf(); + + phi_ == deltaEqn.flux(); + } + } + + // Bound film thickness by a minimum of zero + delta_.max(0.0); + + // Update U field + U_ -= fvc::reconstruct(deltarUAf*phiAdd); + + // Remove any patch-normal components of velocity + U_ -= nHat_*(nHat_ & U_); + + U_.correctBoundaryConditions(); + + // Continuity check + continuityCheck(); +} + + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::kinematicSingleLayer::kinematicSingleLayer +( + const word& modelType, + const fvMesh& mesh, + const dimensionedVector& g +) +: + surfaceFilmModel(modelType, mesh, g), + filmRegion_ + ( + IOobject + ( + filmRegionName_, + time_.timeName(), + time_, + IOobject::MUST_READ + ) + ), + nHat_ + ( + IOobject + ( + "nHat", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmRegion_, + dimensionedVector("zero", dimless, vector::zero), + zeroGradientFvPatchVectorField::typeName + ), + magSf_ + ( + IOobject + ( + "magSf", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmRegion_, + dimensionedScalar("zero", dimArea, 0.0), + zeroGradientFvPatchScalarField::typeName + ), + primaryPatchIDs_(0), + filmTopPatchIDs_(0), + filmBottomPatchIDs_(0), + + momentumPredictor_(true), + nOuterCorr_(-1), + nCorr_(-1), + nNonOrthCorr_(-1), + cumulativeContErr_(0.0), + + Cf_(0.0), + deltaStable_("deltaStable", dimLength, 0.0), + + rho_ + ( + IOobject + ( + "rhof", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmRegion_, + dimensionedScalar(coeffs_.lookup("rho")) + ), + mu_ + ( + IOobject + ( + "muf", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmRegion_, + dimensionedScalar(coeffs_.lookup("mu")) + ), + sigma_ + ( + IOobject + ( + "sigmaf", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmRegion_, + dimensionedScalar(coeffs_.lookup("sigma")) + ), + + delta_ + ( + IOobject + ( + "deltaf", + time_.timeName(), + filmRegion_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + filmRegion_ + ), + U_ + ( + IOobject + ( + "Uf", + time_.timeName(), + filmRegion_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + filmRegion_ + ), + deltaRho_ + ( + IOobject + ( + delta_.name() + "*" + rho_.name(), + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + delta_*rho_, + zeroGradientFvPatchScalarField::typeName + ), + + phi_ + ( + IOobject + ( + "phi", + time_.timeName(), + filmRegion_, + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ), + fvc::interpolate(delta_*rho_*U_) & filmRegion_.Sf() + ), + + massForPrimary_ + ( + IOobject + ( + "massForPrimary", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmRegion_, + dimensionedScalar("zero", dimMass, 0.0), + zeroGradientFvPatchScalarField::typeName + ), + diametersForPrimary_ + ( + IOobject + ( + "diametersForPrimary", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmRegion_, + dimensionedScalar("zero", dimLength, -1.0), + zeroGradientFvPatchScalarField::typeName + ), + + USp_ + ( + IOobject + ( + "USpf", + time_.timeName(), + filmRegion_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + filmRegion_ + ), + pSp_ + ( + IOobject + ( + "pSpf", + time_.timeName(), + filmRegion_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + filmRegion_ + ), + rhoSp_ + ( + IOobject + ( + "rhoSpf", + time_.timeName(), + filmRegion_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + filmRegion_, + dimensionedScalar("zero", dimMass/dimTime/dimArea, 0.0), + pSp_.boundaryField().types() + ), + + USpPrimary_ + ( + IOobject + ( + USp_.name(), // must have same name as USp_ to enable mapping + time_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedVector("zero", USp_.dimensions(), vector::zero) + ), + pSpPrimary_ + ( + IOobject + ( + pSp_.name(), // must have same name as pSp_ to enable mapping + time_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("zero", pSp_.dimensions(), 0.0) + ), + rhoSpPrimary_ + ( + IOobject + ( + rhoSp_.name(), // must have same name as rhoSp_ to enable mapping + time_.timeName(), + mesh_, + IOobject::NO_READ, + IOobject::NO_WRITE + ), + mesh_, + dimensionedScalar("zero", rhoSp_.dimensions(), 0.0) + ), + + UPrimary_ + ( + IOobject + ( + "U", // must have same name as U on primary region to enable mapping + time_.timeName(), + filmRegion_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + filmRegion_ + ), + pPrimary_ + ( + IOobject + ( + "p", // must have same name as p on primary region to enable mapping + time_.timeName(), + filmRegion_, + IOobject::MUST_READ, + IOobject::AUTO_WRITE + ), + filmRegion_ + ), + + injection_(injectionModel::New(*this, coeffs_)), + + addedMass_(0.0), + detachedMass_(0.0) +{ + read(); + + initialise(); +} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::surfaceFilmModels::kinematicSingleLayer::~kinematicSingleLayer() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +inline const Foam::fvMesh& +Foam::surfaceFilmModels::kinematicSingleLayer::film() const +{ + return filmRegion_; +} + + +const Foam::labelList& +Foam::surfaceFilmModels::kinematicSingleLayer::filmBottomPatchIDs() const +{ + return filmBottomPatchIDs_; +} + + +const Foam::labelList& +Foam::surfaceFilmModels::kinematicSingleLayer::filmTopPatchIDs() const +{ + return filmTopPatchIDs_; +} + + +const Foam::labelList& +Foam::surfaceFilmModels::kinematicSingleLayer::primaryPatchIDs() const +{ + return primaryPatchIDs_; +} + + +bool Foam::surfaceFilmModels::kinematicSingleLayer::isFilmPatch +( + const label patchI +) const +{ + if (!active_) + { + return false; + } + + forAll(primaryPatchIDs_, i) + { + if (primaryPatchIDs_[i] == patchI) + { + return true; + } + } + + return false; +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer::addSources +( + const label patchI, + const label faceI, + const scalar massSource, + const vector& momentumSource, + const scalar pressureSource, + const scalar energySource +) +{ + if (debug) + { + Info<< "\nSurface film: " << type() << ": adding to film source:" << nl + << " mass = " << massSource << nl + << " momentum = " << momentumSource << nl + << " pressure = " << pressureSource << endl; + } + + rhoSpPrimary_.boundaryField()[patchI][faceI] += massSource; + USpPrimary_.boundaryField()[patchI][faceI] += momentumSource; + pSpPrimary_.boundaryField()[patchI][faceI] += pressureSource; + + addedMass_ += massSource; +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer::evolveFilm() +{ + transferPrimaryRegionFields(); + + updateSubmodels(); + + // Solve continuity for deltaRho_ + solveContinuity(); + + for (int oCorr=0; oCorr<nOuterCorr_; oCorr++) + { + // Explicit pressure source contribution + tmp<volScalarField> pu = this->pu(); + + // Implicit pressure source coefficient + tmp<volScalarField> pp = this->pp(); + + // Solve for momentum for U_ + tmp<fvVectorMatrix> UEqn = solveMomentum(pu(), pp()); + + // Film thickness correction loop + for (int corr=1; corr<=nCorr_; corr++) + { + // Solve thickness for delta_ + solveThickness(pu(), pp(), UEqn()); + } + } + + // Update deltaRho_ with new delta_ + deltaRho_ == delta_*rho_; + + // Reset source terms for next time integration + resetPrimaryRegionSourceTerms(); +} + + +const Foam::volVectorField& +Foam::surfaceFilmModels::kinematicSingleLayer::U() const +{ + return U_; +} + + +const Foam::volScalarField& +Foam::surfaceFilmModels::kinematicSingleLayer::rho() const +{ + return rho_; +} + + +const Foam::volScalarField& +Foam::surfaceFilmModels::kinematicSingleLayer::T() const +{ + FatalErrorIn + ( + "const volScalarField& kinematicSingleLayer::T() const" + ) << "T field not available for " << type() << abort(FatalError); + + return reinterpret_cast<const volScalarField&>(null); +} + + +const Foam::volScalarField& +Foam::surfaceFilmModels::kinematicSingleLayer::cp() const +{ + FatalErrorIn + ( + "const volScalarField& kinematicSingleLayer::cp() const" + ) << "cp field not available for " << type() << abort(FatalError); + + return reinterpret_cast<const volScalarField&>(null); +} + + + +const Foam::volScalarField& +Foam::surfaceFilmModels::kinematicSingleLayer::massForPrimary() const +{ + return massForPrimary_; +} + + +const Foam::volScalarField& +Foam::surfaceFilmModels::kinematicSingleLayer::diametersForPrimary() const +{ + return diametersForPrimary_; +} + + +void Foam::surfaceFilmModels::kinematicSingleLayer::info() const +{ + Info<< "\nSurface film: " << type() << endl; + + // Output Courant number for info only - does not change time step + CourantNumber(); + + Info<< indent << "added mass = " + << returnReduce<scalar>(addedMass_, sumOp<scalar>()) << nl + << indent << "current mass = " + << gSum((deltaRho_*magSf_)()) << nl + << indent << "detached mass = " + << returnReduce<scalar>(detachedMass_, sumOp<scalar>()) << nl + << indent << "min/max(mag(U)) = " << min(mag(U_)).value() << ", " + << max(mag(U_)).value() << nl + << indent << "min/max(delta) = " << min(delta_).value() << ", " + << max(delta_).value() << nl; +} + + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.H b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.H index aa8df0ce85909feceb881e1d2eb1ced5d97ce63c..095b713b59f58b09b31051c3dd68d914c85d1275 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.H +++ b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayer.H @@ -1,482 +1,482 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2009-2010 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 <http://www.gnu.org/licenses/>. - -Class - Foam::kinematicSingleLayer - -Description - Kinematic form of single-cell layer surface film model - -SourceFiles - kinematicSingleLayer.C - -\*---------------------------------------------------------------------------*/ - -#ifndef kinematicSingleLayer_H -#define kinematicSingleLayer_H - -#include "surfaceFilmModel.H" -#include "fvMesh.H" -#include "volFields.H" -#include "surfaceFields.H" -#include "fvMatrices.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ -namespace surfaceFilmModels -{ - -// Forward declaration of classes -class injectionModel; - -/*---------------------------------------------------------------------------*\ - Class kinematicSingleLayer Declaration -\*---------------------------------------------------------------------------*/ - -class kinematicSingleLayer -: - public surfaceFilmModel -{ -private: - - // Private member functions - - //- Disallow default bitwise copy construct - kinematicSingleLayer(const kinematicSingleLayer&); - - //- Disallow default bitwise assignment - void operator=(const kinematicSingleLayer&); - - -protected: - - // Protected data - - // Mesh databases - - //- Film region mesh database - fvMesh filmRegion_; - - //- Patch normal vectors - volVectorField nHat_; - - //- Face area magnitudes / [m2] - volScalarField magSf_; - - //- List of patch IDs on the primary region coupled with the film - // region - labelList primaryPatchIDs_; - - //- List of patch IDs on oppositte side of the film region - labelList filmTopPatchIDs_; - - //- List of patch IDs on the film region coupled with the primary - // region - labelList filmBottomPatchIDs_; - - - // Solution parameters - - //- Momentum predictor - Switch momentumPredictor_; - - //- Number of outer correctors - label nOuterCorr_; - - //- Number of PISO-like correctors - label nCorr_; - - //- Number of non-orthogonal correctors - label nNonOrthCorr_; - - //- Cumulative continuity error - scalar cumulativeContErr_; - - - // Model parameters - - //- Skin frition coefficient for film/main region interface - scalar Cf_; - - //- Stable film thickness - film cannot detach until this is reached - dimensionedScalar deltaStable_; - - - // Thermo properties - - //- Density / [kg/m3] - volScalarField rho_; - - //- Dynamic viscosity / [Pa.s] - volScalarField mu_; - - //- Surface tension / [m/s2] - volScalarField sigma_; - - - // Fields - - //- Film thickness / [m] - volScalarField delta_; - - //- Velocity / [m/s] - volVectorField U_; - - //- Film thickness*density (helper field) / [kg/m2] - volScalarField deltaRho_; - - //- Mass flux (includes film thickness) / [kg.m/s] - surfaceScalarField phi_; - - - // Transfer fields - to the primary region - - //- Return the film mass available for transfer - volScalarField massForPrimary_; - - //- Return the parcel diameters originating from film - volScalarField diametersForPrimary_; - - - // Source term fields - - // Film region - registered to the film region mesh - // Note: need boundary value mapped from primary region, and then - // pushed into the patch internal field - - //- Momementum / [kg/m/s2] - volVectorField USp_; - - //- Pressure / [Pa] - volScalarField pSp_; - - //- Mass / [kg/m2/s] - volScalarField rhoSp_; - - - // Primary region - registered to the primary region mesh - // Internal use only - not read-in - - //- Momementum / [kg/m/s2] - volVectorField USpPrimary_; - - //- Pressure / [Pa] - volScalarField pSpPrimary_; - - //- Mass / [kg/m2/s] - volScalarField rhoSpPrimary_; - - - // Fields mapped from primary region - registered to the film region - // Note: need both boundary AND patch internal fields to be mapped - - //- Velocity / [m/s] - volVectorField UPrimary_; - - //- Pressure / [Pa] - volScalarField pPrimary_; - - - // Sub-models - - //- Injection - autoPtr<injectionModel> injection_; - - - // Checks - - //- Cumulative mass added via sources [kg] - scalar addedMass_; - - - // Detached surface properties - - //- Cumulative mass detached [kg] - scalar detachedMass_; - - - // Protected member functions - - //- Initialise the film model - called on construction - void initialise(); - - //- Read control parameters from dictionary - virtual bool read(); - - //- Reset source term fields - virtual void resetPrimaryRegionSourceTerms(); - - //- Transfer fields from the primary region to the film region - virtual void transferPrimaryRegionFields(); - - //- Correct the source terms for film that detaches from film region - virtual void correctDetachedFilm(); - - // Explicit pressure source contribution - virtual tmp<volScalarField> pu(); - - // Implicit pressure source coefficient - virtual tmp<volScalarField> pp(); - - //- Update the film sub-models - virtual void updateSubmodels(); - - //- Courant number evaluation - virtual scalar CourantNumber() const; - - //- Continuity check - virtual void continuityCheck(); - - //- Return the stress term for the momentum equation - virtual tmp<fvVectorMatrix> tau(volVectorField& dU) const; - - //- Constrain a film region master/slave boundaries of a field to a - // given value - template<class Type> - void constrainFilmField - ( - Type& field, - const typename Type::cmptType& value - ); - - - // Equations - - //- Solve continuity equation - virtual void solveContinuity(); - - //- Solve for film velocity - virtual tmp<fvVectorMatrix> solveMomentum - ( - const volScalarField& pu, - const volScalarField& pp - ); - - //- Solve coupled velocity-thickness equations - virtual void solveThickness - ( - const volScalarField& pu, - const volScalarField& pp, - const fvVectorMatrix& UEqn - ); - - -public: - - //- Runtime type information - TypeName("kinematicSingleLayer"); - - - // Constructors - - //- Construct from components - kinematicSingleLayer - ( - const word& modelType, - const fvMesh& mesh, - const dimensionedVector& g - ); - - - //- Destructor - virtual ~kinematicSingleLayer(); - - - // Member Functions - - // Access - - //- Return the film mesh database - virtual const fvMesh& film() const; - - //- Return the patch normal vectors - inline const volVectorField& nHat() const; - - //- Return the face area magnitudes / [m2] - inline const volScalarField& magSf() const; - - //- Return the list of coupled patches on the film region - virtual const labelList& filmBottomPatchIDs() const; - - //- Return the list of patches oppositte coupled patches - virtual const labelList& filmTopPatchIDs() const; - - //- Return the list of coupled patches on the primary region - virtual const labelList& primaryPatchIDs() const; - - - // Solution parameters - - //- Return the momentum predictor - inline const Switch& momentumPredictor() const; - - //- Return the number of outer correctors - inline label nOuterCorr() const; - - //- Return the number of PISO correctors - inline label nCorr() const; - - //- Return the number of non-orthogonal correctors - inline label nNonOrthCorr() const; - - - // Model parameters - - //- Return the skin friction coefficient - inline scalar Cf() const; - - - // Thermo properties - - //- Return const access to the dynamic viscosity / [Pa.s] - inline const volScalarField& mu() const; - - //- Return const access to the surface tension / [m/s2] - inline const volScalarField& sigma() const; - - - // Fields - - //- Return const access to the film thickness / [m] - inline const volScalarField& delta() const; - - //- Return the film velocity [m/s] - virtual const volVectorField& U() const; - - //- Return the film density [kg/m3] - virtual const volScalarField& rho() const; - - //- Return the film temperature [K] - virtual const volScalarField& T() const; - - //- Return the film specific heat capacity [J/kg/K] - virtual const volScalarField& cp() const; - - - // Transfer fields - to the primary region - - //- Return the film mass available for transfer - virtual const volScalarField& massForPrimary() const; - - //- Return the parcel diameters originating from film - virtual const volScalarField& diametersForPrimary() const; - - - // External helper functions - - //- Return true if patchI on the primary region is a coupled patch - // to the film region - virtual bool isFilmPatch(const label patchI) const; - - //- External hook to add sources to the film - virtual void addSources - ( - const label patchI, // patchI on primary region - const label faceI, // faceI of patchI - const scalar massSource, // [kg] - const vector& momentumSource, // [kg.m/s] (tangential momentum) - const scalar pressureSource, // [kg.m/s] (normal momentum) - const scalar energySource = 0 // [J] - ); - - - // Source fields (read/write access) - - // Primary region - - //- Momementum / [kg/m/s2] - inline volVectorField& USpPrimary(); - - //- Pressure / [Pa] - inline volScalarField& pSpPrimary(); - - //- Mass / [kg/m2/s] - inline volScalarField& rhoSpPrimary(); - - - // Film region - - //- Momementum / [kg/m/s2] - inline volVectorField& USp(); - - //- Pressure / [Pa] - inline volScalarField& pSp(); - - //- Mass / [kg/m2/s] - inline volScalarField& rhoSp(); - - - // Sub-models - - //- Injection - inline injectionModel& injection(); - - - // Helper functions - - //- Return the gravity tangential component contributions - inline tmp<volVectorField> gTan() const; - - //- Return the gravity normal-to-patch component contribution - inline tmp<volScalarField> gNorm() const; - - //- Return the gravity normal-to-patch component contribution - // Clipped so that only non-zero if g & nHat_ < 0 - inline tmp<volScalarField> gNormClipped() const; - - - // Evolution - - //- Evolve the film equations - virtual void evolveFilm(); - - - // I-O - - //- Provide some feedback - virtual void info() const; -}; - - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace surfaceFilmModels -} // End namespace Foam - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#ifdef NoRepository -# include "kinematicSingleLayerTemplates.C" -#endif - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#include "kinematicSingleLayerI.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -#endif - -// ************************************************************************* // +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2009-2010 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 <http://www.gnu.org/licenses/>. + +Class + Foam::kinematicSingleLayer + +Description + Kinematic form of single-cell layer surface film model + +SourceFiles + kinematicSingleLayer.C + +\*---------------------------------------------------------------------------*/ + +#ifndef kinematicSingleLayer_H +#define kinematicSingleLayer_H + +#include "surfaceFilmModel.H" +#include "fvMesh.H" +#include "volFields.H" +#include "surfaceFields.H" +#include "fvMatrices.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ +namespace surfaceFilmModels +{ + +// Forward declaration of classes +class injectionModel; + +/*---------------------------------------------------------------------------*\ + Class kinematicSingleLayer Declaration +\*---------------------------------------------------------------------------*/ + +class kinematicSingleLayer +: + public surfaceFilmModel +{ +private: + + // Private member functions + + //- Disallow default bitwise copy construct + kinematicSingleLayer(const kinematicSingleLayer&); + + //- Disallow default bitwise assignment + void operator=(const kinematicSingleLayer&); + + +protected: + + // Protected data + + // Mesh databases + + //- Film region mesh database + fvMesh filmRegion_; + + //- Patch normal vectors + volVectorField nHat_; + + //- Face area magnitudes / [m2] + volScalarField magSf_; + + //- List of patch IDs on the primary region coupled with the film + // region + labelList primaryPatchIDs_; + + //- List of patch IDs on oppositte side of the film region + labelList filmTopPatchIDs_; + + //- List of patch IDs on the film region coupled with the primary + // region + labelList filmBottomPatchIDs_; + + + // Solution parameters + + //- Momentum predictor + Switch momentumPredictor_; + + //- Number of outer correctors + label nOuterCorr_; + + //- Number of PISO-like correctors + label nCorr_; + + //- Number of non-orthogonal correctors + label nNonOrthCorr_; + + //- Cumulative continuity error + scalar cumulativeContErr_; + + + // Model parameters + + //- Skin frition coefficient for film/main region interface + scalar Cf_; + + //- Stable film thickness - film cannot detach until this is reached + dimensionedScalar deltaStable_; + + + // Thermo properties + + //- Density / [kg/m3] + volScalarField rho_; + + //- Dynamic viscosity / [Pa.s] + volScalarField mu_; + + //- Surface tension / [m/s2] + volScalarField sigma_; + + + // Fields + + //- Film thickness / [m] + volScalarField delta_; + + //- Velocity / [m/s] + volVectorField U_; + + //- Film thickness*density (helper field) / [kg/m2] + volScalarField deltaRho_; + + //- Mass flux (includes film thickness) / [kg.m/s] + surfaceScalarField phi_; + + + // Transfer fields - to the primary region + + //- Return the film mass available for transfer + volScalarField massForPrimary_; + + //- Return the parcel diameters originating from film + volScalarField diametersForPrimary_; + + + // Source term fields + + // Film region - registered to the film region mesh + // Note: need boundary value mapped from primary region, and then + // pushed into the patch internal field + + //- Momementum / [kg/m/s2] + volVectorField USp_; + + //- Pressure / [Pa] + volScalarField pSp_; + + //- Mass / [kg/m2/s] + volScalarField rhoSp_; + + + // Primary region - registered to the primary region mesh + // Internal use only - not read-in + + //- Momementum / [kg/m/s2] + volVectorField USpPrimary_; + + //- Pressure / [Pa] + volScalarField pSpPrimary_; + + //- Mass / [kg/m2/s] + volScalarField rhoSpPrimary_; + + + // Fields mapped from primary region - registered to the film region + // Note: need both boundary AND patch internal fields to be mapped + + //- Velocity / [m/s] + volVectorField UPrimary_; + + //- Pressure / [Pa] + volScalarField pPrimary_; + + + // Sub-models + + //- Injection + autoPtr<injectionModel> injection_; + + + // Checks + + //- Cumulative mass added via sources [kg] + scalar addedMass_; + + + // Detached surface properties + + //- Cumulative mass detached [kg] + scalar detachedMass_; + + + // Protected member functions + + //- Initialise the film model - called on construction + void initialise(); + + //- Read control parameters from dictionary + virtual bool read(); + + //- Reset source term fields + virtual void resetPrimaryRegionSourceTerms(); + + //- Transfer fields from the primary region to the film region + virtual void transferPrimaryRegionFields(); + + //- Correct the source terms for film that detaches from film region + virtual void correctDetachedFilm(); + + // Explicit pressure source contribution + virtual tmp<volScalarField> pu(); + + // Implicit pressure source coefficient + virtual tmp<volScalarField> pp(); + + //- Update the film sub-models + virtual void updateSubmodels(); + + //- Courant number evaluation + virtual scalar CourantNumber() const; + + //- Continuity check + virtual void continuityCheck(); + + //- Return the stress term for the momentum equation + virtual tmp<fvVectorMatrix> tau(volVectorField& dU) const; + + //- Constrain a film region master/slave boundaries of a field to a + // given value + template<class Type> + void constrainFilmField + ( + Type& field, + const typename Type::cmptType& value + ); + + + // Equations + + //- Solve continuity equation + virtual void solveContinuity(); + + //- Solve for film velocity + virtual tmp<fvVectorMatrix> solveMomentum + ( + const volScalarField& pu, + const volScalarField& pp + ); + + //- Solve coupled velocity-thickness equations + virtual void solveThickness + ( + const volScalarField& pu, + const volScalarField& pp, + const fvVectorMatrix& UEqn + ); + + +public: + + //- Runtime type information + TypeName("kinematicSingleLayer"); + + + // Constructors + + //- Construct from components + kinematicSingleLayer + ( + const word& modelType, + const fvMesh& mesh, + const dimensionedVector& g + ); + + + //- Destructor + virtual ~kinematicSingleLayer(); + + + // Member Functions + + // Access + + //- Return the film mesh database + virtual const fvMesh& film() const; + + //- Return the patch normal vectors + inline const volVectorField& nHat() const; + + //- Return the face area magnitudes / [m2] + inline const volScalarField& magSf() const; + + //- Return the list of coupled patches on the film region + virtual const labelList& filmBottomPatchIDs() const; + + //- Return the list of patches oppositte coupled patches + virtual const labelList& filmTopPatchIDs() const; + + //- Return the list of coupled patches on the primary region + virtual const labelList& primaryPatchIDs() const; + + + // Solution parameters + + //- Return the momentum predictor + inline const Switch& momentumPredictor() const; + + //- Return the number of outer correctors + inline label nOuterCorr() const; + + //- Return the number of PISO correctors + inline label nCorr() const; + + //- Return the number of non-orthogonal correctors + inline label nNonOrthCorr() const; + + + // Model parameters + + //- Return the skin friction coefficient + inline scalar Cf() const; + + + // Thermo properties + + //- Return const access to the dynamic viscosity / [Pa.s] + inline const volScalarField& mu() const; + + //- Return const access to the surface tension / [m/s2] + inline const volScalarField& sigma() const; + + + // Fields + + //- Return const access to the film thickness / [m] + inline const volScalarField& delta() const; + + //- Return the film velocity [m/s] + virtual const volVectorField& U() const; + + //- Return the film density [kg/m3] + virtual const volScalarField& rho() const; + + //- Return the film temperature [K] + virtual const volScalarField& T() const; + + //- Return the film specific heat capacity [J/kg/K] + virtual const volScalarField& cp() const; + + + // Transfer fields - to the primary region + + //- Return the film mass available for transfer + virtual const volScalarField& massForPrimary() const; + + //- Return the parcel diameters originating from film + virtual const volScalarField& diametersForPrimary() const; + + + // External helper functions + + //- Return true if patchI on the primary region is a coupled patch + // to the film region + virtual bool isFilmPatch(const label patchI) const; + + //- External hook to add sources to the film + virtual void addSources + ( + const label patchI, // patchI on primary region + const label faceI, // faceI of patchI + const scalar massSource, // [kg] + const vector& momentumSource, // [kg.m/s] (tangential momentum) + const scalar pressureSource, // [kg.m/s] (normal momentum) + const scalar energySource = 0 // [J] + ); + + + // Source fields (read/write access) + + // Primary region + + //- Momementum / [kg/m/s2] + inline volVectorField& USpPrimary(); + + //- Pressure / [Pa] + inline volScalarField& pSpPrimary(); + + //- Mass / [kg/m2/s] + inline volScalarField& rhoSpPrimary(); + + + // Film region + + //- Momementum / [kg/m/s2] + inline volVectorField& USp(); + + //- Pressure / [Pa] + inline volScalarField& pSp(); + + //- Mass / [kg/m2/s] + inline volScalarField& rhoSp(); + + + // Sub-models + + //- Injection + inline injectionModel& injection(); + + + // Helper functions + + //- Return the gravity tangential component contributions + inline tmp<volVectorField> gTan() const; + + //- Return the gravity normal-to-patch component contribution + inline tmp<volScalarField> gNorm() const; + + //- Return the gravity normal-to-patch component contribution + // Clipped so that only non-zero if g & nHat_ < 0 + inline tmp<volScalarField> gNormClipped() const; + + + // Evolution + + //- Evolve the film equations + virtual void evolveFilm(); + + + // I-O + + //- Provide some feedback + virtual void info() const; +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace surfaceFilmModels +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository +# include "kinematicSingleLayerTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "kinematicSingleLayerI.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayerTemplates.C b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayerTemplates.C index de8a93b2708f59b6f70b955f581451f47810bdc7..91117356485ae457cd1caa93689dd867729d4a5d 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayerTemplates.C +++ b/src/surfaceFilmModels/surfaceFilmModel/kinematicSingleLayer/kinematicSingleLayerTemplates.C @@ -1,62 +1,62 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2010-2010 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 <http://www.gnu.org/licenses/>. - -\*---------------------------------------------------------------------------*/ - -#include "kinematicSingleLayer.H" - -// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // - -template<class Type> -void Foam::surfaceFilmModels::kinematicSingleLayer::constrainFilmField -( - Type& field, - const typename Type::cmptType& value -) -{ - forAll(filmBottomPatchIDs_, i) - { - label patchI = filmBottomPatchIDs_[i]; - field.boundaryField()[patchI] = value; - if (debug) - { - Info<< "Constraining " << field.name() - << " boundary " << field.boundaryField()[patchI].patch().name() - << " to " << value << endl; - } - } - forAll(filmTopPatchIDs_, i) - { - label patchI = filmTopPatchIDs_[i]; - field.boundaryField()[patchI] = value; - if (debug) - { - Info<< "Constraining " << field.name() - << " boundary " << field.boundaryField()[patchI].patch().name() - << " to " << value << endl; - } - } -} - - -// ************************************************************************* // +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2010-2010 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 <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "kinematicSingleLayer.H" + +// * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * // + +template<class Type> +void Foam::surfaceFilmModels::kinematicSingleLayer::constrainFilmField +( + Type& field, + const typename Type::cmptType& value +) +{ + forAll(filmBottomPatchIDs_, i) + { + label patchI = filmBottomPatchIDs_[i]; + field.boundaryField()[patchI] = value; + if (debug) + { + Info<< "Constraining " << field.name() + << " boundary " << field.boundaryField()[patchI].patch().name() + << " to " << value << endl; + } + } + forAll(filmTopPatchIDs_, i) + { + label patchI = filmTopPatchIDs_[i]; + field.boundaryField()[patchI] = value; + if (debug) + { + Info<< "Constraining " << field.name() + << " boundary " << field.boundaryField()[patchI].patch().name() + << " to " << value << endl; + } + } +} + + +// ************************************************************************* // diff --git a/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C b/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C index d870b19a34ad1604461ee98ec52211fc2430c5cf..b39c8eb22f1f2bf598820eebd608ee11f7897118 100644 --- a/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C +++ b/src/surfaceFilmModels/surfaceFilmModel/thermoSingleLayer/thermoSingleLayer.C @@ -137,7 +137,7 @@ Foam::tmp<Foam::fvScalarMatrix> Foam::surfaceFilmModels::thermoSingleLayer::q dimensionedScalar("zero", dimTemperature, 0.0) ); - for (label i=0; i<filmBottomPatchIDs_.size(); i++) + forAll(filmBottomPatchIDs_, i) { label patchI = filmBottomPatchIDs_[i]; const polyPatch& pp = filmRegion_.boundaryMesh()[patchI]; diff --git a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C index 6b99a8ce96296cab522fe1a56b584167c7dc5805..4055c27f5f65961e05a0d5d17d5c34db17b47e0b 100644 --- a/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C +++ b/src/thermophysicalModels/chemistryModel/chemistryModel/ODEChemistryModel/ODEChemistryModel.C @@ -160,8 +160,8 @@ Foam::scalar Foam::ODEChemistryModel<CompType, ThermoType>::omega pf = 1.0; pr = 1.0; - label Nl = R.lhs().size(); - label Nr = R.rhs().size(); + const label Nl = R.lhs().size(); + const label Nr = R.rhs().size(); label slRef = 0; lRef = R.lhs()[slRef].index; @@ -331,7 +331,7 @@ void Foam::ODEChemistryModel<CompType, ThermoType>::jacobian // length of the first argument must be nSpecie() dcdt = omega(c2, T, p); - for (label ri=0; ri<reactions_.size(); ri++) + forAll(reactions_, ri) { const Reaction<ThermoType>& R = reactions_[ri]; diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C index a1e4fd8ee6e9acdcb29692d33f73d3d090441ae5..007abf8647f3e66979140faa8e578dfdcfcccf9e 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/EulerImplicit/EulerImplicit.C @@ -75,7 +75,7 @@ Foam::scalar Foam::EulerImplicit<CompType, ThermoType>::solve RR.source()[i] = c[i]/dt; } - for (label i=0; i<this->model_.reactions().size(); i++) + forAll(this->model_.reactions(), i) { const Reaction<ThermoType>& R = this->model_.reactions()[i]; @@ -100,7 +100,7 @@ Foam::scalar Foam::EulerImplicit<CompType, ThermoType>::solve } } - for (label s=0; s<R.lhs().size(); s++) + forAll(R.lhs(), s) { label si = R.lhs()[s].index; scalar sl = R.lhs()[s].stoichCoeff; @@ -108,7 +108,7 @@ Foam::scalar Foam::EulerImplicit<CompType, ThermoType>::solve RR[si][lRef] += sl*pf*corr; } - for (label s=0; s<R.rhs().size(); s++) + forAll(R.rhs(), s) { label si = R.rhs()[s].index; scalar sr = R.rhs()[s].stoichCoeff; diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.C index 6e1a873d57c58bd07aacd37e4bf9ab6c8894eef7..8e4a0f2ed78ff1b4fcb84a5d1ff93c8f4fc04d8d 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/ode/ode.C @@ -86,7 +86,7 @@ Foam::scalar Foam::ode<CompType, ThermoType>::solve dtEst ); - for (label i=0; i<c.size(); i++) + forAll(c, i) { c[i] = max(0.0, c1[i]); } diff --git a/src/thermophysicalModels/chemistryModel/chemistrySolver/sequential/sequential.C b/src/thermophysicalModels/chemistryModel/chemistrySolver/sequential/sequential.C index a6e1def4241a232caa0fb900388b35bb2cb6a8d2..5ce4dfac26c9da1dc009a95a892193c5286179b4 100644 --- a/src/thermophysicalModels/chemistryModel/chemistrySolver/sequential/sequential.C +++ b/src/thermophysicalModels/chemistryModel/chemistrySolver/sequential/sequential.C @@ -66,7 +66,7 @@ Foam::scalar Foam::sequential<CompType, ThermoType>::solve scalar pf, cf, pb, cb; label lRef, rRef; - for (label i=0; i<this->model_.reactions().size(); i++) + forAll(this->model_.reactions(), i) { const Reaction<ThermoType>& R = this->model_.reactions()[i]; @@ -95,7 +95,7 @@ Foam::scalar Foam::sequential<CompType, ThermoType>::solve // update species - for (label s=0; s<R.lhs().size(); s++) + forAll(R.lhs(), s) { label si = R.lhs()[s].index; scalar sl = R.lhs()[s].stoichCoeff; @@ -103,7 +103,7 @@ Foam::scalar Foam::sequential<CompType, ThermoType>::solve c[si] = max(0.0, c[si]); } - for (label s=0; s<R.rhs().size(); s++) + forAll(R.rhs(), s) { label si = R.rhs()[s].index; scalar sr = R.rhs()[s].stoichCoeff; diff --git a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L index 6edaa29c2c60d5b5c2b2c0c91655dcf04b328e70..b36b09d787d7bf1bf4c9d89d281d40eca4d42190 100644 --- a/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L +++ b/src/thermophysicalModels/reactionThermo/chemistryReaders/chemkinReader/chemkinLexer.L @@ -47,7 +47,7 @@ int yyFlexLexer::yylex() return 0; } -//! @endcond dummy +//! @endcond // Dummy yywrap to keep yylex happy at compile time. @@ -62,7 +62,7 @@ int yyFlexLexer::yywrap() { return 1; } -//! @endcond dummy +//! @endcond Foam::string foamSpecieString(const char* YYText) diff --git a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C index 8a8700d29e2cc231470c3582cc07b7e3f69861e4..045c39b0bf01cae93662834b00a5cb59c34f1682 100644 --- a/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C +++ b/src/thermophysicalModels/specie/reaction/Reactions/Reaction/Reaction.C @@ -47,7 +47,7 @@ void Foam::Reaction<ReactionThermo>::setThermo ); } - for (label i=0; i<lhs_.size(); i++) + forAll(lhs_, i) { operator-= ( diff --git a/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C b/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C index ac416f50dac770f755035724c32eb7c68e5d32ec..44d22a111534bc5e0ce9b720934326af858d55f1 100644 --- a/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C +++ b/src/topoChangerFvMesh/linearValveFvMesh/linearValveFvMesh.C @@ -84,8 +84,7 @@ void Foam::linearValveFvMesh::addZonesAndModifiers() // Inner slider const word innerSliderName(motionDict_.subDict("slider").lookup("inside")); - const polyPatch& innerSlider = - boundaryMesh()[boundaryMesh().findPatchID(innerSliderName)]; + const polyPatch& innerSlider = boundaryMesh()[innerSliderName]; labelList isf(innerSlider.size()); @@ -105,8 +104,7 @@ void Foam::linearValveFvMesh::addZonesAndModifiers() // Outer slider const word outerSliderName(motionDict_.subDict("slider").lookup("outside")); - const polyPatch& outerSlider = - boundaryMesh()[boundaryMesh().findPatchID(outerSliderName)]; + const polyPatch& outerSlider = boundaryMesh()[outerSliderName]; labelList osf(outerSlider.size()); diff --git a/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C b/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C index 9723dcb3201cc2898b84141166183da1005aea83..636e440b31e8f1da04b7b698f55d51de4f8c9cf4 100644 --- a/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C +++ b/src/topoChangerFvMesh/linearValveLayersFvMesh/linearValveLayersFvMesh.C @@ -37,7 +37,6 @@ License namespace Foam { defineTypeNameAndDebug(linearValveLayersFvMesh, 0); - addToRunTimeSelectionTable(topoChangerFvMesh, linearValveLayersFvMesh, IOobject); } @@ -87,8 +86,7 @@ void Foam::linearValveLayersFvMesh::addZonesAndModifiers() // Inner slider const word innerSliderName(motionDict_.subDict("slider").lookup("inside")); - const polyPatch& innerSlider = - boundaryMesh()[boundaryMesh().findPatchID(innerSliderName)]; + const polyPatch& innerSlider = boundaryMesh()[innerSliderName]; labelList isf(innerSlider.size()); @@ -108,8 +106,7 @@ void Foam::linearValveLayersFvMesh::addZonesAndModifiers() // Outer slider const word outerSliderName(motionDict_.subDict("slider").lookup("outside")); - const polyPatch& outerSlider = - boundaryMesh()[boundaryMesh().findPatchID(outerSliderName)]; + const polyPatch& outerSlider = boundaryMesh()[outerSliderName]; labelList osf(outerSlider.size()); @@ -143,8 +140,7 @@ void Foam::linearValveLayersFvMesh::addZonesAndModifiers() motionDict_.subDict("layer").lookup("patch") ); - const polyPatch& layerPatch = - boundaryMesh()[boundaryMesh().findPatchID(layerPatchName)]; + const polyPatch& layerPatch = boundaryMesh()[layerPatchName]; labelList lpf(layerPatch.size()); @@ -317,8 +313,7 @@ Foam::tmp<Foam::pointField> Foam::linearValveLayersFvMesh::newPoints() const motionDict_.subDict("layer").lookup("patch") ); - const polyPatch& layerPatch = - boundaryMesh()[boundaryMesh().findPatchID(layerPatchName)]; + const polyPatch& layerPatch = boundaryMesh()[layerPatchName]; const labelList& patchPoints = layerPatch.meshPoints(); diff --git a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C index 693e080bd61df04d08873f2a05f41046dd4b1edc..6a050e1c701b66b84a5c961f3a3a35c233682e85 100644 --- a/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C +++ b/src/topoChangerFvMesh/mixerFvMesh/mixerFvMesh.C @@ -84,8 +84,7 @@ void Foam::mixerFvMesh::addZonesAndModifiers() // Inner slider const word innerSliderName(motionDict_.subDict("slider").lookup("inside")); - const polyPatch& innerSlider = - boundaryMesh()[boundaryMesh().findPatchID(innerSliderName)]; + const polyPatch& innerSlider = boundaryMesh()[innerSliderName]; labelList isf(innerSlider.size()); @@ -105,8 +104,7 @@ void Foam::mixerFvMesh::addZonesAndModifiers() // Outer slider const word outerSliderName(motionDict_.subDict("slider").lookup("outside")); - const polyPatch& outerSlider = - boundaryMesh()[boundaryMesh().findPatchID(outerSliderName)]; + const polyPatch& outerSlider = boundaryMesh()[outerSliderName]; labelList osf(outerSlider.size()); @@ -217,8 +215,7 @@ void Foam::mixerFvMesh::calcMovingMasks() const const cellList& c = cells(); const faceList& f = faces(); - const labelList& cellAddr = - cellZones()[cellZones().findZoneID("movingCells")]; + const labelList& cellAddr = cellZones()["movingCells"]; forAll(cellAddr, cellI) { @@ -242,8 +239,7 @@ void Foam::mixerFvMesh::calcMovingMasks() const + "Zone" ); - const labelList& innerSliderAddr = - faceZones()[faceZones().findZoneID(innerSliderZoneName)]; + const labelList& innerSliderAddr = faceZones()[innerSliderZoneName]; forAll(innerSliderAddr, faceI) { @@ -261,8 +257,7 @@ void Foam::mixerFvMesh::calcMovingMasks() const + "Zone" ); - const labelList& outerSliderAddr = - faceZones()[faceZones().findZoneID(outerSliderZoneName)]; + const labelList& outerSliderAddr = faceZones()[outerSliderZoneName]; forAll(outerSliderAddr, faceI) { diff --git a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C index 497c1ec8055d11c81a0cbfdb2cf66caaac903aa0..7de4dcce20f1f38f784852f51d2ad6ac06cb353a 100644 --- a/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C +++ b/src/topoChangerFvMesh/movingConeTopoFvMesh/movingConeTopoFvMesh.C @@ -290,18 +290,12 @@ Foam::movingConeTopoFvMesh::movingConeTopoFvMesh(const IOobject& io) curLeft_ = average ( - faceZones() - [ - faceZones().findZoneID("leftExtrusionFaces") - ]().localPoints() + faceZones()["leftExtrusionFaces"]().localPoints() ).x() - SMALL; curRight_ = average ( - faceZones() - [ - faceZones().findZoneID("rightExtrusionFaces") - ]().localPoints() + faceZones()["rightExtrusionFaces"]().localPoints() ).x() + SMALL; } @@ -448,18 +442,12 @@ bool Foam::movingConeTopoFvMesh::update() // curRight_ += curMotionVel_.x()*time().deltaTValue(); curLeft_ = average ( - faceZones() - [ - faceZones().findZoneID("leftExtrusionFaces") - ]().localPoints() + faceZones()["leftExtrusionFaces"]().localPoints() ).x() - SMALL; curRight_ = average ( - faceZones() - [ - faceZones().findZoneID("rightExtrusionFaces") - ]().localPoints() + faceZones()["rightExtrusionFaces"]().localPoints() ).x() + SMALL; diff --git a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C index 6980a538f631c9d2a9e907f5629b87bb88aaa2f8..42b672bdc45eade581bc971921fd628e76bef64f 100644 --- a/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C +++ b/src/transportModels/incompressible/incompressibleTwoPhaseMixture/twoPhaseMixture.C @@ -28,15 +28,11 @@ License #include "surfaceFields.H" #include "fvc.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ // * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * * // //- Calculate and return the laminar viscosity -void twoPhaseMixture::calcNu() +void Foam::twoPhaseMixture::calcNu() { nuModel1_->correct(); nuModel2_->correct(); @@ -54,7 +50,7 @@ void twoPhaseMixture::calcNu() // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -twoPhaseMixture::twoPhaseMixture +Foam::twoPhaseMixture::twoPhaseMixture ( const volVectorField& U, const surfaceScalarField& phi, @@ -114,7 +110,7 @@ twoPhaseMixture::twoPhaseMixture // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -tmp<volScalarField> twoPhaseMixture::mu() const +Foam::tmp<Foam::volScalarField> Foam::twoPhaseMixture::mu() const { volScalarField limitedAlpha1 = min(max(alpha1_, scalar(0)), scalar(1)); @@ -130,7 +126,7 @@ tmp<volScalarField> twoPhaseMixture::mu() const } -tmp<surfaceScalarField> twoPhaseMixture::muf() const +Foam::tmp<Foam::surfaceScalarField> Foam::twoPhaseMixture::muf() const { surfaceScalarField alpha1f = min(max(fvc::interpolate(alpha1_), scalar(0)), scalar(1)); @@ -147,7 +143,7 @@ tmp<surfaceScalarField> twoPhaseMixture::muf() const } -tmp<surfaceScalarField> twoPhaseMixture::nuf() const +Foam::tmp<Foam::surfaceScalarField> Foam::twoPhaseMixture::nuf() const { surfaceScalarField alpha1f = min(max(fvc::interpolate(alpha1_), scalar(0)), scalar(1)); @@ -166,7 +162,7 @@ tmp<surfaceScalarField> twoPhaseMixture::nuf() const } -bool twoPhaseMixture::read() +bool Foam::twoPhaseMixture::read() { if (transportModel::read()) { @@ -193,8 +189,4 @@ bool twoPhaseMixture::read() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/transportModels/incompressible/singlePhaseTransportModel/singlePhaseTransportModel.C b/src/transportModels/incompressible/singlePhaseTransportModel/singlePhaseTransportModel.C index 1214de8d12c84f06b496a3507ed75fff8b72e122..a964d4e117f0f2643226b4405257fb806e48274b 100644 --- a/src/transportModels/incompressible/singlePhaseTransportModel/singlePhaseTransportModel.C +++ b/src/transportModels/incompressible/singlePhaseTransportModel/singlePhaseTransportModel.C @@ -27,15 +27,10 @@ License #include "viscosityModel.H" #include "volFields.H" -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -namespace Foam -{ - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -singlePhaseTransportModel::singlePhaseTransportModel +Foam::singlePhaseTransportModel::singlePhaseTransportModel ( const volVectorField& U, const surfaceScalarField& phi @@ -48,25 +43,25 @@ singlePhaseTransportModel::singlePhaseTransportModel // * * * * * * * * * * * * * * * * Destructors * * * * * * * * * * * * * * * // -singlePhaseTransportModel::~singlePhaseTransportModel() +Foam::singlePhaseTransportModel::~singlePhaseTransportModel() {} // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -tmp<volScalarField> singlePhaseTransportModel::nu() const +Foam::tmp<Foam::volScalarField> Foam::singlePhaseTransportModel::nu() const { return viscosityModelPtr_->nu(); } -void singlePhaseTransportModel::correct() +void Foam::singlePhaseTransportModel::correct() { viscosityModelPtr_->correct(); } -bool singlePhaseTransportModel::read() +bool Foam::singlePhaseTransportModel::read() { if (regIOobject::read()) { @@ -79,8 +74,4 @@ bool singlePhaseTransportModel::read() } -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -} // End namespace Foam - // ************************************************************************* // diff --git a/src/triSurface/faceTriangulation/faceTriangulation.C b/src/triSurface/faceTriangulation/faceTriangulation.C index 17c28f230d59e299e90c35820ace0bb3ce778d24..e07deec729673871b4827b5aa5a87799d559492e 100644 --- a/src/triSurface/faceTriangulation/faceTriangulation.C +++ b/src/triSurface/faceTriangulation/faceTriangulation.C @@ -450,7 +450,7 @@ bool Foam::faceTriangulation::split label index1 = -1; label index2 = -1; - for (label iter = 0; iter < f.size(); iter++) + forAll(f, iter) { findDiagonal ( diff --git a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L index ecb53ba15e70378b412036d2e6d4b28bde854ea7..3ebe585cca08e372f685c3203f7c635dc4e52b82 100644 --- a/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L +++ b/src/triSurface/triSurface/interfaces/STL/readSTLASCII.L @@ -47,7 +47,7 @@ int yyFlexLexer::yylex() << abort(FatalError); return 0; } -//! @endcond dummy +//! @endcond // Dummy yywrap to keep yylex happy at compile time. // It is called by yylex but is not used as the mechanism to change file. @@ -61,7 +61,7 @@ int yyFlexLexer::yywrap() { return 1; } -//! @endcond dummy +//! @endcond class STLLexer diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C index d12a2b45ae6bb04dc29e2d5244c469445851fb05..f534cfef90e3c34c0228fa80b1e3f875abf0442d 100644 --- a/src/triSurface/triSurface/triSurface.C +++ b/src/triSurface/triSurface/triSurface.C @@ -33,10 +33,8 @@ License #include "PackedBoolList.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -namespace Foam -{ - defineTypeNameAndDebug(Foam::triSurface, 0); -} + +defineTypeNameAndDebug(Foam::triSurface, 0); Foam::fileName Foam::triSurface::triSurfInstance(const Time& d) diff --git a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict index 5e89caf1cb505d4b870787bedf074d1a5d836e5d..5c92e704da138a5ab9f4d2dd4ba7597ec8f42797 100644 --- a/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict +++ b/tutorials/heatTransfer/chtMultiRegionFoam/snappyMultiRegionHeater/system/snappyHexMeshDict @@ -130,7 +130,7 @@ castellatedMeshControls faceZone bottomAir; cellZone bottomAir; - zoneInside true; + cellZoneInside inside; } topAir @@ -140,7 +140,7 @@ castellatedMeshControls faceZone topAir; cellZone topAir; - zoneInside true; + cellZoneInside inside; } heater @@ -150,7 +150,7 @@ castellatedMeshControls faceZone heater; cellZone heater; - zoneInside true; + cellZoneInside inside; } leftSolid @@ -160,7 +160,7 @@ castellatedMeshControls faceZone leftSolid; cellZone leftSolid; - zoneInside true; + cellZoneInside inside; } rightSolid @@ -170,7 +170,7 @@ castellatedMeshControls faceZone rightSolid; cellZone rightSolid; - zoneInside true; + cellZoneInside inside; } } diff --git a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces deleted file mode 100644 index 38fa0208ed993427b2efc3666064c6b779a76487..0000000000000000000000000000000000000000 --- a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 faceSetDict_noBoundaryFaces; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name rotor; - -action delete; - -topoSetSources ( boundaryToFace { } ); - - -// ************************************************************************* // diff --git a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/faceSetDict_rotorFaces b/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/faceSetDict_rotorFaces deleted file mode 100644 index 3ccb7ad761db3fee6092b9ae449cec5f39dab7d7..0000000000000000000000000000000000000000 --- a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/faceSetDict_rotorFaces +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 faceSetDict_rotorFaces; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name rotor; - -action new; - -topoSetSources ( cellToFace { set rotor ; option all ; } ); - - -// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allclean b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..daafdf90aa2acf7e70397901afba87ecc7b9017e --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allclean @@ -0,0 +1,16 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +cd wingFlutter_snappyHexMesh +cleanCase + +cd ../wingFlutter2D_simpleFoam +cleanCase + +cd ../wingFlutter2D_pimpleDyMFoam +cleanCase +rm -rf 0 + diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allrun b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..23f224782ea73e3b0ac7b33a52420e25660e9175 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/Allrun @@ -0,0 +1,29 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +# Make 3D mesh in slab of cells. +cd wingFlutter_snappyHexMesh +runApplication blockMesh +runApplication snappyHexMesh -overwrite + +# Make a 2D mesh by extruding a patch and solve to steady state. +cd ../wingFlutter2D_simpleFoam +runApplication extrudeMesh +runApplication createPatch -overwrite +runApplication simpleFoam + +# Copy the mesh from the steady state case and map the results to a +# mesh motion case, then solve transient. +cd ../wingFlutter2D_pimpleDyMFoam +cp -r ../wingFlutter2D_simpleFoam/constant/polyMesh/* constant/polyMesh/ +cp -r 0.org 0 +runApplication mapFields ../wingFlutter2D_simpleFoam -sourceTime latestTime -consistent +mv 0/pointDisplacement.unmapped 0/pointDisplacement +runApplication decomposePar +runParallel pimpleDyMFoam 3 +runApplication reconstructPar + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/U b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/U new file mode 100644 index 0000000000000000000000000000000000000000..345f30007b004214f5e2d9dbe032e1e5313412b4 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/U @@ -0,0 +1,45 @@ +/*--------------------------------*- 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; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform $flowVelocity; + +boundaryField +{ + #include "include/fixedInlet" + + outlet + { + type inletOutlet; + inletValue uniform (0 0 0); + value $internalField; + } + + wing + { + type movingWallVelocity; + value uniform (0 0 0); + } + + #include "include/frontBackTopBottomPatches" +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/include/fixedInlet b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/include/fixedInlet new file mode 100644 index 0000000000000000000000000000000000000000..ccf1d6e897baf617a75af14cdf49e136cb168f4d --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/include/fixedInlet @@ -0,0 +1,15 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +inlet +{ + type fixedValue; + value $internalField; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/include/frontBackTopBottomPatches b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/include/frontBackTopBottomPatches new file mode 100644 index 0000000000000000000000000000000000000000..70336f846e6428ba9578120138cf680fb4fc4b05 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/include/frontBackTopBottomPatches @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +topAndBottom +{ + type slip; +} + +front +{ + type empty +} + +back +{ + type empty; +} + +// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/cellSetDict.3 b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/include/initialConditions similarity index 61% rename from tutorials/multiphase/cavitatingFoam/ras/throttle/system/cellSetDict.3 rename to tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/include/initialConditions index 87b315aafbb6e1334f0a4abcd7909a52a88ca10b..e0d098096aea7dcb37f78c607bd48210b3860f16 100644 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/cellSetDict.3 +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/include/initialConditions @@ -2,24 +2,14 @@ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | -| \\ / A nd | Web: www.OpenFOAM.org | +| \\ / A nd | Web: http://www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ -FoamFile -{ - version 2.0; - format ascii; - class dictionary; - location "system"; - object cellSetDict.3; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name c0; - -action new; - -topoSetSources ( boxToCell { box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ; } ); +flowVelocity (100 0 0); +pressure 0; +turbulentKE 37; +turbulentOmega 32; +#inputMode merge // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/k b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/k new file mode 100644 index 0000000000000000000000000000000000000000..8ba642effb82407c85cd573a4003cf5b64fc6c51 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/k @@ -0,0 +1,44 @@ +/*--------------------------------*- 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 k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform $turbulentKE; + +boundaryField +{ + #include "include/fixedInlet" + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + wing + { + type kqRWallFunction; + value $internalField; + } + + #include "include/frontBackTopBottomPatches" +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/nut b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/nut new file mode 100644 index 0000000000000000000000000000000000000000..27bfad4f3909450b4e2e115c1e20da313e5e0502 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/nut @@ -0,0 +1,38 @@ +/*--------------------------------*- 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 +{ + wing + { + type nutkWallFunction; + value uniform 0; + } + + "(front|back|topAndBottom|inlet|outlet)" + { + type calculated; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/omega b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/omega new file mode 100644 index 0000000000000000000000000000000000000000..2024b25ef7a61172628ed36c60ce313ccc428081 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/omega @@ -0,0 +1,44 @@ +/*--------------------------------*- 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 epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform $turbulentOmega; + +boundaryField +{ + #include "include/fixedInlet" + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + wing + { + type omegaWallFunction; + value $internalField; + } + + #include "include/frontBackTopBottomPatches" +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/p b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/p new file mode 100644 index 0000000000000000000000000000000000000000..78a5d1529945bb82c0ce7bd21e0e39bca8196f32 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/p @@ -0,0 +1,44 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform $pressure; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet + { + type fixedValue; + value $internalField; + } + + wing + { + type zeroGradient; + } + + #include "include/frontBackTopBottomPatches" +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/pointDisplacement b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/pointDisplacement new file mode 100644 index 0000000000000000000000000000000000000000..f51ea94a8d0b46e410b580d3d0d9f4c0804ee0e7 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/0.org/pointDisplacement @@ -0,0 +1,120 @@ +/*--------------------------------*- 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 pointVectorField; + location "0.01"; + object pointDisplacement; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +dimensions [0 1 0 0 0 0 0]; + +internalField uniform (0 0 0); + +boundaryField +{ + wing + { + type sixDoFRigidBodyDisplacement; + mass 22.9; + centreOfMass (0.4974612746 -0.01671895744 0.125); + momentOfInertia (1.958864357 3.920839234 2.057121362); + orientation + ( + 0.9953705935 0.09611129781 0 + -0.09611129781 0.9953705935 0 + 0 0 1 + ); + velocity (0 0 0); + acceleration (0 0 0); + angularMomentum (0 0 -0.5); + torque (0 0 0); + rhoName rhoInf; + rhoInf 1; + g (0 -9.81 0); + report on; + constraints + { + maxIterations 500; + + fixedLine1 + { + sixDoFRigidBodyMotionConstraint fixedLine; + tolerance 1e-9; + relaxationFactor 0.7; + fixedLineCoeffs + { + refPoint (0.25 0.007 0.125); + direction (0 1 0); + } + } + + fixedAxis1 + { + sixDoFRigidBodyMotionConstraint fixedAxis; + tolerance 1e-06; + relaxationFactor 0.7; + fixedAxisCoeffs + { + axis ( 0 0 1 ); + } + } + } + restraints + { + verticalSpring + { + sixDoFRigidBodyMotionRestraint linearSpring; + + linearSpringCoeffs + { + anchor (0.25 0.007 0.125); + refAttachmentPt (0.25 0.007 0.125); + stiffness 4000; + damping 2; + restLength 0; + } + } + axialSpring + { + sixDoFRigidBodyMotionRestraint linearAxialAngularSpring; + + linearAxialAngularSpringCoeffs + { + axis (0 0 1); + stiffness 700; + damping 0.5; + referenceOrientation $orientation; + } + } + } + value uniform (0 0 0); + } + + front + { + type empty; + } + + back + { + type empty; + } + + ".*" + { + type fixedValue; + value uniform (0 0 0); + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/faceSetDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/RASProperties similarity index 85% rename from tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/faceSetDict rename to tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/RASProperties index d4c9e000656215078417d03c0b5ee507e6e6e6fe..4e21ca67e4664818ae61d6e2810f816ea3613943 100644 --- a/tutorials/incompressible/MRFSimpleFoam/mixerVessel2D/system/faceSetDict +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/RASProperties @@ -10,16 +10,16 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; - object faceSetDict; + location "constant"; + object RASProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name rotor; +RASModel kOmegaSST; -action delete; +turbulence on; -topoSetSources ( boundaryToFace { } ); +printCoeffs on; // ************************************************************************* // diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/cellSetDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/dynamicMeshDict similarity index 79% rename from tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/cellSetDict rename to tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/dynamicMeshDict index bd2802d8bd1e987d85e9d4544c43da6b6a38886b..986a599c5f6fb54ca9ce0f46162ad9217b1e213d 100644 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/cellSetDict +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/dynamicMeshDict @@ -10,23 +10,17 @@ FoamFile version 2.0; format ascii; class dictionary; - object cellSetDict; + object motionProperties; } - // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name ignitionCells; +dynamicFvMesh dynamicMotionSolverFvMesh; + +motionSolverLibs ("libfvMotionSolvers.so"); -action new; +solver displacementLaplacian; -topoSetSources -( - sphereToCell - { - centre ( 0.125 0.375 0.05 ); - radius 0.005; - } -); +diffusivity inverseDistance (wing); // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/polyMesh/boundary b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..87c839b5cc87ad27afc6454cadeabdf17a56cac9 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/polyMesh/boundary @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +6 +( + topAndBottom + { + type patch; + nFaces 150; + startFace 76473; + } + inlet + { + type patch; + nFaces 48; + startFace 76623; + } + outlet + { + type patch; + nFaces 48; + startFace 76671; + } + front + { + type empty; + nFaces 38129; + startFace 76719; + } + back + { + type empty; + nFaces 38129; + startFace 114848; + } + wing + { + type wall; + nFaces 778; + startFace 152977; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.2 b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/transportProperties similarity index 88% rename from tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.2 rename to tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/transportProperties index 57cc0658f727238910e5a2351eae60f342221ff0..a9d8bf659c481e6b65403d6814dbbf361361b5ba 100644 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.2 +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/transportProperties @@ -10,15 +10,13 @@ FoamFile version 2.0; format ascii; class dictionary; - object cellSetDict; + object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name c0; +transportModel Newtonian; -action invert; - -topoSetSources (); +nu nu [0 2 -1 0 0 0 0] 1e-05; // ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/turbulenceProperties similarity index 84% rename from tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict rename to tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/turbulenceProperties index d4c9e000656215078417d03c0b5ee507e6e6e6fe..f6753662e27e414f4bfb666745b7888fef8510bb 100644 --- a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/constant/turbulenceProperties @@ -10,16 +10,12 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; - object faceSetDict; + location "constant"; + object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name rotor; - -action delete; - -topoSetSources ( boundaryToFace { } ); +simulationType RASModel; // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/controlDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..83a4748d219e7d56dfc4d510e565ab8b2321eb2f --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/controlDict @@ -0,0 +1,72 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application pimpleDyMFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 1; + +deltaT 1e-5; + +writeControl adjustableRunTime; + +writeInterval 5e-3; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 10; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +adjustTimeStep yes; + +maxCo 0.9; + +libs ("libforces.so"); + +functions +{ + forces + { + type forces; + functionObjectLibs ( "libforces.so" ); + outputControl timeStep; + outputInterval 10; + patches (wing); + pName p; + UName U; + rhoName rhoInf; + log true; + rhoInf 1; + CofR (0.25 0.007 0.125); + } +} + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/faceSetDict_rotorFaces b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/decomposeParDict similarity index 71% rename from tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/faceSetDict_rotorFaces rename to tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/decomposeParDict index 3ccb7ad761db3fee6092b9ae449cec5f39dab7d7..2dc0a0a25e2f99ce5eb53af57cf68543bf23eff6 100644 --- a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/faceSetDict_rotorFaces +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/decomposeParDict @@ -11,15 +11,35 @@ FoamFile format ascii; class dictionary; location "system"; - object faceSetDict_rotorFaces; + object decomposeParDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name rotor; +numberOfSubdomains 3; -action new; +method simple; -topoSetSources ( cellToFace { set rotor ; option all ; } ); +simpleCoeffs +{ + n ( 1 3 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 3 2 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile "cellDecomposition"; +} + +metisCoeffs +{ +} // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..2bee15799dbc02b91812c538ff4bb95babbc39d4 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/fvSchemes @@ -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 dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default Euler; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; + grad(U) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linearUpwind grad(U); + div(phi,k) Gauss limitedLinear 1; + div(phi,omega) Gauss limitedLinear 1; + div((nuEff*dev(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear limited 0.5; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/fvSolution b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..038b442397ebdf55f778c1d22f15909c56b38397 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_pimpleDyMFoam/system/fvSolution @@ -0,0 +1,88 @@ +/*--------------------------------*- 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 fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-7; + relTol 0.01; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + cacheAgglomeration on; + agglomerator faceAreaPair; + nCellsInCoarsestLevel 10; + mergeLevels 1; + } + + pFinal + { + solver GAMG; + tolerance 1e-7; + relTol 0; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + cacheAgglomeration on; + agglomerator faceAreaPair; + nCellsInCoarsestLevel 10; + mergeLevels 1; + } + + "(U|k|omega)" + { + solver PBiCG; + preconditioner DILU; + tolerance 1e-06; + relTol 0; + } + + cellDisplacement + { + solver GAMG; + tolerance 1e-5; + relTol 0; + smoother GaussSeidel; + cacheAgglomeration true; + nCellsInCoarsestLevel 10; + agglomerator faceAreaPair; + mergeLevels 1; + } +} + +PIMPLE +{ + nOuterCorrectors 2; + nCorrectors 1; + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + p 0.3; + U 0.7; + k 0.7; + omega 0.7; +} + +cache +{ + grad(U); +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/U b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/U new file mode 100644 index 0000000000000000000000000000000000000000..bd35fcfb40cc0394b19a543f3f1607549e463108 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/U @@ -0,0 +1,45 @@ +/*--------------------------------*- 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; + location "0"; + object U; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 1 -1 0 0 0 0]; + +internalField uniform $flowVelocity; + +boundaryField +{ + #include "include/fixedInlet" + + outlet + { + type inletOutlet; + inletValue uniform (0 0 0); + value $internalField; + } + + wing + { + type fixedValue; + value uniform (0 0 0); + } + + #include "include/frontBackTopBottomPatches" +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/include/fixedInlet b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/include/fixedInlet new file mode 100644 index 0000000000000000000000000000000000000000..ccf1d6e897baf617a75af14cdf49e136cb168f4d --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/include/fixedInlet @@ -0,0 +1,15 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +inlet +{ + type fixedValue; + value $internalField; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/include/frontBackTopBottomPatches b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/include/frontBackTopBottomPatches new file mode 100644 index 0000000000000000000000000000000000000000..70336f846e6428ba9578120138cf680fb4fc4b05 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/include/frontBackTopBottomPatches @@ -0,0 +1,24 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +topAndBottom +{ + type slip; +} + +front +{ + type empty +} + +back +{ + type empty; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/include/initialConditions b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/include/initialConditions new file mode 100644 index 0000000000000000000000000000000000000000..e0d098096aea7dcb37f78c607bd48210b3860f16 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/include/initialConditions @@ -0,0 +1,15 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: 1.6 | +| \\ / A nd | Web: http://www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ + +flowVelocity (100 0 0); +pressure 0; +turbulentKE 37; +turbulentOmega 32; +#inputMode merge + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/k b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/k new file mode 100644 index 0000000000000000000000000000000000000000..8ba642effb82407c85cd573a4003cf5b64fc6c51 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/k @@ -0,0 +1,44 @@ +/*--------------------------------*- 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 k; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform $turbulentKE; + +boundaryField +{ + #include "include/fixedInlet" + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + wing + { + type kqRWallFunction; + value $internalField; + } + + #include "include/frontBackTopBottomPatches" +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/nut b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/nut new file mode 100644 index 0000000000000000000000000000000000000000..27bfad4f3909450b4e2e115c1e20da313e5e0502 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/nut @@ -0,0 +1,38 @@ +/*--------------------------------*- 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 +{ + wing + { + type nutkWallFunction; + value uniform 0; + } + + "(front|back|topAndBottom|inlet|outlet)" + { + type calculated; + value uniform 0; + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/omega b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/omega new file mode 100644 index 0000000000000000000000000000000000000000..2024b25ef7a61172628ed36c60ce313ccc428081 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/omega @@ -0,0 +1,44 @@ +/*--------------------------------*- 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 epsilon; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 0 -1 0 0 0 0]; + +internalField uniform $turbulentOmega; + +boundaryField +{ + #include "include/fixedInlet" + + outlet + { + type inletOutlet; + inletValue $internalField; + value $internalField; + } + + wing + { + type omegaWallFunction; + value $internalField; + } + + #include "include/frontBackTopBottomPatches" +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/p b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/p new file mode 100644 index 0000000000000000000000000000000000000000..78a5d1529945bb82c0ce7bd21e0e39bca8196f32 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/0/p @@ -0,0 +1,44 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "include/initialConditions" + +dimensions [0 2 -2 0 0 0 0]; + +internalField uniform $pressure; + +boundaryField +{ + inlet + { + type zeroGradient; + } + + outlet + { + type fixedValue; + value $internalField; + } + + wing + { + type zeroGradient; + } + + #include "include/frontBackTopBottomPatches" +} + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/faceSetDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/RASProperties similarity index 85% rename from tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/faceSetDict rename to tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/RASProperties index d4c9e000656215078417d03c0b5ee507e6e6e6fe..4e21ca67e4664818ae61d6e2810f816ea3613943 100644 --- a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/faceSetDict +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/RASProperties @@ -10,16 +10,16 @@ FoamFile version 2.0; format ascii; class dictionary; - location "system"; - object faceSetDict; + location "constant"; + object RASProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name rotor; +RASModel kOmegaSST; -action delete; +turbulence on; -topoSetSources ( boundaryToFace { } ); +printCoeffs on; // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/extrudeProperties b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/extrudeProperties new file mode 100644 index 0000000000000000000000000000000000000000..bbb18ba9e66e35d9fad161d83d6564c048f9c3ec --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/extrudeProperties @@ -0,0 +1,47 @@ +/*--------------------------------*- 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 extrudeProperties; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// What to extrude: +// patch : from patch of another case ('sourceCase') + +constructFrom patch; +sourceCase "../wingFlutter_snappyHexMesh"; +sourcePatches (front); + +// If construct from patch: patch to use for back (can be same as sourcePatch) +exposedPatchName back; + +// Flip surface normals before usage. +flipNormals false; + +//- Linear extrusion in point-normal direction +extrudeModel linearNormal; + +nLayers 1; + +expansionRatio 1.0; + +linearNormalCoeffs +{ + thickness 0.05; +} + +// Do front and back need to be merged? Usually only makes sense for 360 +// degree wedges. +mergeFaces false; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/polyMesh/boundary b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..87c839b5cc87ad27afc6454cadeabdf17a56cac9 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/polyMesh/boundary @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +6 +( + topAndBottom + { + type patch; + nFaces 150; + startFace 76473; + } + inlet + { + type patch; + nFaces 48; + startFace 76623; + } + outlet + { + type patch; + nFaces 48; + startFace 76671; + } + front + { + type empty; + nFaces 38129; + startFace 76719; + } + back + { + type empty; + nFaces 38129; + startFace 114848; + } + wing + { + type wall; + nFaces 778; + startFace 152977; + } +) + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.1 b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/transportProperties similarity index 84% rename from tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.1 rename to tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/transportProperties index 90a225e6a9a91a84eb563e3ddfb54503a4b4d8d7..a9d8bf659c481e6b65403d6814dbbf361361b5ba 100644 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/cellSetDict.1 +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/constant/transportProperties @@ -10,21 +10,13 @@ FoamFile version 2.0; format ascii; class dictionary; - object cellSetDict; + object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name c0; +transportModel Newtonian; -action new; - -topoSetSources -( - boxToCell - { - box (0.35 0.35 0.44) (0.65 0.65 0.56); - } -); +nu nu [0 2 -1 0 0 0 0] 1e-05; // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/controlDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..7e8f0995ededc5071af3fc81aed256f026a31c52 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/controlDict @@ -0,0 +1,67 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application simpleFoam; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 3000; + +deltaT 1; + +writeControl runTime; + +writeInterval 100; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +functions +{ + forces + { + type forces; + functionObjectLibs ( "libforces.so" ); + outputControl timeStep; + outputInterval 10; + patches (wing); + pName p; + UName U; + rhoName rhoInf; + log true; + rhoInf 1; + CofR (0.4974612746 -0.01671895744 0.125); + } +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/createPatchDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/createPatchDict new file mode 100644 index 0000000000000000000000000000000000000000..b75b8e1075f5c2f01de1948ea2acfebffe48f939 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/createPatchDict @@ -0,0 +1,49 @@ +/*--------------------------------*- 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 createPatchDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Tolerance used in matching faces. Absolute tolerance is span of +// face times this factor. To load incorrectly matches meshes set this +// to a higher value. +matchTolerance 1E-3; + +// Do a synchronisation of coupled points after creation of any patches. +// Note: this does not work with points that are on multiple coupled patches +// with transformations. +pointSync true; + +// Patches to create. +patches +( + { + // Name of new patch + name wing; + + // Type of new patch + patchInfo + { + type wall; + } + + // How to construct: either from 'patches' or 'set' + constructFrom patches; + + // If constructFrom = patches : names of patches. Wildcards allowed. + patches ( wing_5degrees.obj_WALL10 ); + } +); + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..2eb6038d7f1eb31b8cb71726f352f8c9f69a026c --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/fvSchemes @@ -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 dictionary; + object fvSchemes; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +ddtSchemes +{ + default steadyState; +} + +gradSchemes +{ + default Gauss linear; + grad(p) Gauss linear; + grad(U) Gauss linear; +} + +divSchemes +{ + default none; + div(phi,U) Gauss linearUpwind grad(U); + div(phi,k) Gauss upwind; + div(phi,omega) Gauss upwind; + div((nuEff*dev(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default Gauss linear corrected; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p; +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/fvSolution b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..e99098b5b9c395c01a65884467579249c4e1dfa4 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter2D_simpleFoam/system/fvSolution @@ -0,0 +1,79 @@ +/*--------------------------------*- 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 fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +solvers +{ + p + { + solver GAMG; + tolerance 1e-7; + relTol 0.1; + smoother GaussSeidel; + nPreSweeps 0; + nPostSweeps 2; + cacheAgglomeration on; + agglomerator faceAreaPair; + nCellsInCoarsestLevel 10; + mergeLevels 1; + } + + U + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-8; + relTol 0.1; + nSweeps 1; + } + + k + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-8; + relTol 0.1; + nSweeps 1; + } + + omega + { + solver smoothSolver; + smoother GaussSeidel; + tolerance 1e-8; + relTol 0.1; + nSweeps 1; + } +} + +SIMPLE +{ + nNonOrthogonalCorrectors 0; +} + +relaxationFactors +{ + p 0.3; + U 0.7; + k 0.7; + omega 0.7; +} + +cache +{ + grad(U); +} + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/constant/polyMesh/blockMeshDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/constant/polyMesh/blockMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..1a5ba112ca6198044972c6f28b652185a097c227 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/constant/polyMesh/blockMeshDict @@ -0,0 +1,74 @@ +/*--------------------------------*- 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; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 1; + +vertices +( + (-2.5 -4.8 -0.1) + ( 10 -4.8 -0.1) + ( 10 4.8 -0.1) + (-2.5 4.8 -0.1) + (-2.5 -4.8 0.1) + ( 10 -4.8 0.1) + ( 10 4.8 0.1) + (-2.5 4.8 0.1) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (75 48 1) simpleGrading (1 1 1) +); + +edges +( +); + +patches +( + patch topAndBottom + ( + (3 7 6 2) + (1 5 4 0) + ) + + patch inlet + ( + (0 4 7 3) + ) + + patch outlet + ( + (2 6 5 1) + ) + + empty front + ( + (4 5 6 7) + ) + + empty back + ( + (0 3 2 1) + ) +); + +mergePatchPairs +( +); + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/constant/polyMesh/boundary b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/constant/polyMesh/boundary new file mode 100644 index 0000000000000000000000000000000000000000..450937dc95904651824be979ddd0b1e709f31f21 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/constant/polyMesh/boundary @@ -0,0 +1,58 @@ +/*--------------------------------*- C++ -*----------------------------------*\ +| ========= | | +| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | +| \\ / O peration | Version: dev | +| \\ / A nd | Web: www.OpenFOAM.org | +| \\/ M anipulation | | +\*---------------------------------------------------------------------------*/ +FoamFile +{ + version 2.0; + format ascii; + class polyBoundaryMesh; + location "constant/polyMesh"; + object boundary; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +6 +( + topAndBottom + { + type patch; + nFaces 150; + startFace 2098769; + } + inlet + { + type patch; + nFaces 48; + startFace 2098919; + } + outlet + { + type patch; + nFaces 48; + startFace 2098967; + } + front + { + type empty; + nFaces 38129; + startFace 2099015; + } + back + { + type empty; + nFaces 38120; + startFace 2137144; + } + wing_5degrees.obj_WALL10 + { + type wall; + nFaces 49792; + startFace 2175264; + } +) + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/constant/triSurface/wing_5degrees.obj b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/constant/triSurface/wing_5degrees.obj new file mode 100644 index 0000000000000000000000000000000000000000..4be2aac5f2f0b963d2ec6208458908df4fd04c50 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/constant/triSurface/wing_5degrees.obj @@ -0,0 +1,1054 @@ +# Wavefront OBJ file written 2010-05-13T09:12:43 +o wing_5degrees + +# points : 520 +# faces : 520 +# zones : 1 +# 0 WALL10 (nFaces: 520) + +# <points count="520"> +v 1.00488 -0.0890722 -0.5 +v 1.00488 -0.0890722 0.5 +v 0.999453 -0.0870827 0.5 +v 0.999453 -0.0870827 -0.5 +v 0.993747 -0.0849908 0.5 +v 0.993747 -0.0849908 -0.5 +v 0.98776 -0.0827959 0.5 +v 0.98776 -0.0827959 -0.5 +v 0.981475 -0.0804834 0.5 +v 0.981475 -0.0804834 -0.5 +v 0.974878 -0.0780483 0.5 +v 0.974878 -0.0780483 -0.5 +v 0.967936 -0.075535 0.5 +v 0.967936 -0.075535 -0.5 +v 0.960671 -0.0728297 0.5 +v 0.960671 -0.0728297 -0.5 +v 0.952986 -0.070149 0.5 +v 0.952986 -0.070149 -0.5 +v 0.944915 -0.067332 0.5 +v 0.944915 -0.067332 -0.5 +v 0.936442 -0.064377 0.5 +v 0.936442 -0.064377 -0.5 +v 0.927543 -0.0612777 0.5 +v 0.927543 -0.0612777 -0.5 +v 0.918171 -0.0581074 0.5 +v 0.918171 -0.0581074 -0.5 +v 0.908345 -0.0547308 0.5 +v 0.908345 -0.0547308 -0.5 +v 0.897978 -0.0513371 0.5 +v 0.897978 -0.0513371 -0.5 +v 0.887113 -0.0477115 0.5 +v 0.887113 -0.0477115 -0.5 +v 0.875671 -0.0440076 0.5 +v 0.875671 -0.0440076 -0.5 +v 0.863634 -0.0401898 0.5 +v 0.863634 -0.0401898 -0.5 +v 0.850988 -0.0362043 0.5 +v 0.850988 -0.0362043 -0.5 +v 0.837677 -0.0321259 0.5 +v 0.837677 -0.0321259 -0.5 +v 0.8237 -0.0278406 0.5 +v 0.8237 -0.0278406 -0.5 +v 0.808997 -0.0234314 0.5 +v 0.808997 -0.0234314 -0.5 +v 0.793536 -0.0188824 0.5 +v 0.793536 -0.0188824 -0.5 +v 0.777248 -0.0142896 0.5 +v 0.777248 -0.0142896 -0.5 +v 0.760144 -0.00947585 0.5 +v 0.760144 -0.00947585 -0.5 +v 0.742148 -0.0045544 0.5 +v 0.742148 -0.0045544 -0.5 +v 0.723207 0.000449948 0.5 +v 0.723207 0.000449948 -0.5 +v 0.703296 0.00561154 0.5 +v 0.703296 0.00561154 -0.5 +v 0.682345 0.010854 0.5 +v 0.682345 0.010854 -0.5 +v 0.660295 0.0161554 0.5 +v 0.660295 0.0161554 -0.5 +v 0.637103 0.0215548 0.5 +v 0.637103 0.0215548 -0.5 +v 0.606829 0.0282606 0.5 +v 0.606829 0.0282606 -0.5 +v 0.578018 0.0343978 0.5 +v 0.578018 0.0343978 -0.5 +v 0.550557 0.0397874 0.5 +v 0.550557 0.0397874 -0.5 +v 0.524436 0.0447356 0.5 +v 0.524436 0.0447356 -0.5 +v 0.499549 0.0490421 0.5 +v 0.499549 0.0490421 -0.5 +v 0.475869 0.05291 0.5 +v 0.475869 0.05291 -0.5 +v 0.45334 0.0563729 0.5 +v 0.45334 0.0563729 -0.5 +v 0.431911 0.059484 0.5 +v 0.431911 0.059484 -0.5 +v 0.411518 0.0621876 0.5 +v 0.411518 0.0621876 -0.5 +v 0.392118 0.0645445 0.5 +v 0.392118 0.0645445 -0.5 +v 0.373644 0.0664046 0.5 +v 0.373644 0.0664046 -0.5 +v 0.356081 0.0680196 0.5 +v 0.356081 0.0680196 -0.5 +v 0.339375 0.0692961 0.5 +v 0.339375 0.0692961 -0.5 +v 0.323487 0.0702815 0.5 +v 0.323487 0.0702815 -0.5 +v 0.308383 0.0710035 0.5 +v 0.308383 0.0710035 -0.5 +v 0.294024 0.0714698 0.5 +v 0.294024 0.0714698 -0.5 +v 0.28038 0.0717809 0.5 +v 0.28038 0.0717809 -0.5 +v 0.267416 0.0719191 0.5 +v 0.267416 0.0719191 -0.5 +v 0.255099 0.0718222 0.5 +v 0.255099 0.0718222 -0.5 +v 0.243399 0.0716511 0.5 +v 0.243399 0.0716511 -0.5 +v 0.232288 0.0713208 0.5 +v 0.232288 0.0713208 -0.5 +v 0.221735 0.0709249 0.5 +v 0.221735 0.0709249 -0.5 +v 0.211715 0.0704338 0.5 +v 0.211715 0.0704338 -0.5 +v 0.202202 0.0698513 0.5 +v 0.202202 0.0698513 -0.5 +v 0.19317 0.0692271 0.5 +v 0.19317 0.0692271 -0.5 +v 0.184599 0.0685108 0.5 +v 0.184599 0.0685108 -0.5 +v 0.176464 0.0677409 0.5 +v 0.176464 0.0677409 -0.5 +v 0.168741 0.0669472 0.5 +v 0.168741 0.0669472 -0.5 +v 0.161418 0.0660755 0.5 +v 0.161418 0.0660755 -0.5 +v 0.154469 0.0651852 0.5 +v 0.154469 0.0651852 -0.5 +v 0.145493 0.0640314 0.5 +v 0.145493 0.0640314 -0.5 +v 0.136995 0.0627463 0.5 +v 0.136995 0.0627463 -0.5 +v 0.128932 0.0614383 0.5 +v 0.128932 0.0614383 -0.5 +v 0.121282 0.0601525 0.5 +v 0.121282 0.0601525 -0.5 +v 0.114049 0.0587416 0.5 +v 0.114049 0.0587416 -0.5 +v 0.107186 0.0573482 0.5 +v 0.107186 0.0573482 -0.5 +v 0.100675 0.0559871 0.5 +v 0.100675 0.0559871 -0.5 +v 0.0945147 0.0545794 0.5 +v 0.0945147 0.0545794 -0.5 +v 0.0886858 0.0531426 0.5 +v 0.0886858 0.0531426 -0.5 +v 0.0831659 0.0517083 0.5 +v 0.0831659 0.0517083 -0.5 +v 0.0779342 0.0503006 0.5 +v 0.0779342 0.0503006 -0.5 +v 0.072975 0.0489224 0.5 +v 0.072975 0.0489224 -0.5 +v 0.0682798 0.0475559 0.5 +v 0.0682798 0.0475559 -0.5 +v 0.0638499 0.0461601 0.5 +v 0.0638499 0.0461601 -0.5 +v 0.0596656 0.0447577 0.5 +v 0.0596656 0.0447577 -0.5 +v 0.055694 0.0434126 0.5 +v 0.055694 0.0434126 -0.5 +v 0.0519364 0.0420932 0.5 +v 0.0519364 0.0420932 -0.5 +v 0.0484053 0.0407363 0.5 +v 0.0484053 0.0407363 -0.5 +v 0.0450779 0.0393756 0.5 +v 0.0450779 0.0393756 -0.5 +v 0.0419215 0.0380722 0.5 +v 0.0419215 0.0380722 -0.5 +v 0.0389288 0.0368211 0.5 +v 0.0389288 0.0368211 -0.5 +v 0.036102 0.0355928 0.5 +v 0.036102 0.0355928 -0.5 +v 0.0334425 0.034368 0.5 +v 0.0334425 0.034368 -0.5 +v 0.0309496 0.0331356 0.5 +v 0.0309496 0.0331356 -0.5 +v 0.0286117 0.0319047 0.5 +v 0.0286117 0.0319047 -0.5 +v 0.0264077 0.0307022 0.5 +v 0.0264077 0.0307022 -0.5 +v 0.0243248 0.02954 0.5 +v 0.0243248 0.02954 -0.5 +v 0.0223665 0.0284014 0.5 +v 0.0223665 0.0284014 -0.5 +v 0.0205353 0.0272716 0.5 +v 0.0205353 0.0272716 -0.5 +v 0.0188204 0.0261581 0.5 +v 0.0188204 0.0261581 -0.5 +v 0.0172057 0.0250781 0.5 +v 0.0172057 0.0250781 -0.5 +v 0.015681 0.0240389 0.5 +v 0.015681 0.0240389 -0.5 +v 0.0142472 0.0230307 0.5 +v 0.0142472 0.0230307 -0.5 +v 0.0129051 0.0220434 0.5 +v 0.0129051 0.0220434 -0.5 +v 0.0116567 0.0210699 0.5 +v 0.0116567 0.0210699 -0.5 +v 0.0105044 0.0201047 0.5 +v 0.0105044 0.0201047 -0.5 +v 0.00944864 0.0191444 0.5 +v 0.00944864 0.0191444 -0.5 +v 0.00847997 0.0181956 0.5 +v 0.00847997 0.0181956 -0.5 +v 0.00758214 0.0172702 0.5 +v 0.00758214 0.0172702 -0.5 +v 0.00674204 0.0163779 0.5 +v 0.00674204 0.0163779 -0.5 +v 0.00595671 0.0155186 0.5 +v 0.00595671 0.0155186 -0.5 +v 0.00523198 0.0146848 0.5 +v 0.00523198 0.0146848 -0.5 +v 0.00457157 0.0138701 0.5 +v 0.00457157 0.0138701 -0.5 +v 0.00397503 0.0130721 0.5 +v 0.00397503 0.0130721 -0.5 +v 0.00343506 0.0122936 0.5 +v 0.00343506 0.0122936 -0.5 +v 0.0029443 0.0115379 0.5 +v 0.0029443 0.0115379 -0.5 +v 0.0024965 0.010807 0.5 +v 0.0024965 0.010807 -0.5 +v 0.00209053 0.0101012 0.5 +v 0.00209053 0.0101012 -0.5 +v 0.00172938 0.00941821 0.5 +v 0.00172938 0.00941821 -0.5 +v 0.00141481 0.00875662 0.5 +v 0.00141481 0.00875662 -0.5 +v 0.00114703 0.00811509 0.5 +v 0.00114703 0.00811509 -0.5 +v 0.000922634 0.00749375 0.5 +v 0.000922634 0.00749375 -0.5 +v 0.00073432 0.00689421 0.5 +v 0.00073432 0.00689421 -0.5 +v 0.000575606 0.00631745 0.5 +v 0.000575606 0.00631745 -0.5 +v 0.000441178 0.00576428 0.5 +v 0.000441178 0.00576428 -0.5 +v 0.000326628 0.00523494 0.5 +v 0.000326628 0.00523494 -0.5 +v 0.000229331 0.00472926 0.5 +v 0.000229331 0.00472926 -0.5 +v 0.000147968 0.00424663 0.5 +v 0.000147968 0.00424663 -0.5 +v 8.13071e-05 0.00378656 0.5 +v 8.13071e-05 0.00378656 -0.5 +v 2.81186e-05 0.00334838 0.5 +v 2.81186e-05 0.00334838 -0.5 +v -1.28053e-05 0.00293132 0.5 +v -1.28053e-05 0.00293132 -0.5 +v -4.26138e-05 0.00253464 0.5 +v -4.26138e-05 0.00253464 -0.5 +v -6.24104e-05 0.00215753 0.5 +v -6.24104e-05 0.00215753 -0.5 +v -7.32354e-05 0.00179922 0.5 +v -7.32354e-05 0.00179922 -0.5 +v -7.6066e-05 0.00145891 0.5 +v -7.6066e-05 0.00145891 -0.5 +v -7.18149e-05 0.00113574 0.5 +v -7.18149e-05 0.00113574 -0.5 +v -6.13265e-05 0.000828962 0.5 +v -6.13265e-05 0.000828962 -0.5 +v -4.5388e-05 0.000537894 0.5 +v -4.5388e-05 0.000537894 -0.5 +v -2.47174e-05 0.000261729 0.5 +v -2.47174e-05 0.000261729 -0.5 +v 0.999428 -0.0886333 -0.5 +v 0.999428 -0.0886333 0.5 +v 0 0 0.5 +v 0 0 -0.5 +v 3.07731e-05 -0.000269468 0.5 +v 3.07731e-05 -0.000269468 -0.5 +v 6.87839e-05 -0.000551758 0.5 +v 6.87839e-05 -0.000551758 -0.5 +v 0.00011487 -0.000847395 0.5 +v 0.00011487 -0.000847395 -0.5 +v 0.000169958 -0.00115699 0.5 +v 0.000169958 -0.00115699 -0.5 +v 0.000235006 -0.00148084 0.5 +v 0.000235006 -0.00148084 -0.5 +v 0.000311085 -0.00181947 0.5 +v 0.000311085 -0.00181947 -0.5 +v 0.000399343 -0.00217329 0.5 +v 0.000399343 -0.00217329 -0.5 +v 0.000501006 -0.00254265 0.5 +v 0.000501006 -0.00254265 -0.5 +v 0.000617405 -0.00292793 0.5 +v 0.000617405 -0.00292793 -0.5 +v 0.000749918 -0.00332928 0.5 +v 0.000749918 -0.00332928 -0.5 +v 0.000900098 -0.00374706 0.5 +v 0.000900098 -0.00374706 -0.5 +v 0.00106951 -0.00418123 0.5 +v 0.00106951 -0.00418123 -0.5 +v 0.00125981 -0.00463173 0.5 +v 0.00125981 -0.00463173 -0.5 +v 0.00147278 -0.00509836 0.5 +v 0.00147278 -0.00509836 -0.5 +v 0.00171023 -0.00558073 0.5 +v 0.00171023 -0.00558073 -0.5 +v 0.0019741 -0.00607866 0.5 +v 0.0019741 -0.00607866 -0.5 +v 0.00226657 -0.00659235 0.5 +v 0.00226657 -0.00659235 -0.5 +v 0.00258985 -0.00712192 0.5 +v 0.00258985 -0.00712192 -0.5 +v 0.00294625 -0.00766749 0.5 +v 0.00294625 -0.00766749 -0.5 +v 0.0033381 -0.00822888 0.5 +v 0.0033381 -0.00822888 -0.5 +v 0.00376858 -0.00880495 0.5 +v 0.00376858 -0.00880495 -0.5 +v 0.00424144 -0.00939356 0.5 +v 0.00424144 -0.00939356 -0.5 +v 0.0047608 -0.00999197 0.5 +v 0.0047608 -0.00999197 -0.5 +v 0.00533108 -0.0105969 0.5 +v 0.00533108 -0.0105969 -0.5 +v 0.00595465 -0.0112076 0.5 +v 0.00595465 -0.0112076 -0.5 +v 0.00663108 -0.0118268 0.5 +v 0.00663108 -0.0118268 -0.5 +v 0.00735864 -0.0124589 0.5 +v 0.00735864 -0.0124589 -0.5 +v 0.00813479 -0.0131082 0.5 +v 0.00813479 -0.0131082 -0.5 +v 0.00896315 -0.0137726 0.5 +v 0.00896315 -0.0137726 -0.5 +v 0.00985143 -0.0144449 0.5 +v 0.00985143 -0.0144449 -0.5 +v 0.0108089 -0.0151156 0.5 +v 0.0108089 -0.0151156 -0.5 +v 0.0118417 -0.0157801 0.5 +v 0.0118417 -0.0157801 -0.5 +v 0.0129485 -0.0164439 0.5 +v 0.0129485 -0.0164439 -0.5 +v 0.0141258 -0.0171158 0.5 +v 0.0141258 -0.0171158 -0.5 +v 0.0153717 -0.0178024 0.5 +v 0.0153717 -0.0178024 -0.5 +v 0.0166914 -0.0185005 0.5 +v 0.0166914 -0.0185005 -0.5 +v 0.0180921 -0.0192037 0.5 +v 0.0180921 -0.0192037 -0.5 +v 0.01958 -0.019908 0.5 +v 0.01958 -0.019908 -0.5 +v 0.0211576 -0.0206151 0.5 +v 0.0211576 -0.0206151 -0.5 +v 0.0228265 -0.0213288 0.5 +v 0.0228265 -0.0213288 -0.5 +v 0.0245895 -0.0220523 0.5 +v 0.0245895 -0.0220523 -0.5 +v 0.0264506 -0.0227868 0.5 +v 0.0264506 -0.0227868 -0.5 +v 0.028415 -0.0235332 0.5 +v 0.028415 -0.0235332 -0.5 +v 0.0304905 -0.0242814 0.5 +v 0.0304905 -0.0242814 -0.5 +v 0.0326872 -0.0250146 0.5 +v 0.0326872 -0.0250146 -0.5 +v 0.0350128 -0.0257258 0.5 +v 0.0350128 -0.0257258 -0.5 +v 0.0374672 -0.0264333 0.5 +v 0.0374672 -0.0264333 -0.5 +v 0.0400497 -0.0271566 0.5 +v 0.0400497 -0.0271566 -0.5 +v 0.0427704 -0.0278802 0.5 +v 0.0427704 -0.0278802 -0.5 +v 0.0456434 -0.0285739 0.5 +v 0.0456434 -0.0285739 -0.5 +v 0.0486731 -0.0292495 0.5 +v 0.0486731 -0.0292495 -0.5 +v 0.0518554 -0.0299566 0.5 +v 0.0518554 -0.0299566 -0.5 +v 0.0551966 -0.030697 0.5 +v 0.0551966 -0.030697 -0.5 +v 0.0587179 -0.0314085 0.5 +v 0.0587179 -0.0314085 -0.5 +v 0.062431 -0.032078 0.5 +v 0.062431 -0.032078 -0.5 +v 0.0663314 -0.0327743 0.5 +v 0.0663314 -0.0327743 -0.5 +v 0.0704248 -0.033514 0.5 +v 0.0704248 -0.033514 -0.5 +v 0.0747335 -0.0342256 0.5 +v 0.0747335 -0.0342256 -0.5 +v 0.0792714 -0.0348902 0.5 +v 0.0792714 -0.0348902 -0.5 +v 0.0840416 -0.0355492 0.5 +v 0.0840416 -0.0355492 -0.5 +v 0.089054 -0.0362103 0.5 +v 0.089054 -0.0362103 -0.5 +v 0.0943226 -0.0368627 0.5 +v 0.0943226 -0.0368627 -0.5 +v 0.0998603 -0.0375041 0.5 +v 0.0998603 -0.0375041 -0.5 +v 0.105679 -0.0381355 0.5 +v 0.105679 -0.0381355 -0.5 +v 0.111793 -0.0387575 0.5 +v 0.111793 -0.0387575 -0.5 +v 0.118218 -0.0393567 0.5 +v 0.118218 -0.0393567 -0.5 +v 0.124968 -0.0399429 0.5 +v 0.124968 -0.0399429 -0.5 +v 0.132055 -0.0405782 0.5 +v 0.132055 -0.0405782 -0.5 +v 0.1395 -0.0411771 0.5 +v 0.1395 -0.0411771 -0.5 +v 0.147326 -0.041699 0.5 +v 0.147326 -0.041699 -0.5 +v 0.15451 -0.0421969 0.5 +v 0.15451 -0.0421969 -0.5 +v 0.162054 -0.042698 0.5 +v 0.162054 -0.042698 -0.5 +v 0.16998 -0.0431596 0.5 +v 0.16998 -0.0431596 -0.5 +v 0.178305 -0.0435984 0.5 +v 0.178305 -0.0435984 -0.5 +v 0.187045 -0.0440696 0.5 +v 0.187045 -0.0440696 -0.5 +v 0.196223 -0.0445349 0.5 +v 0.196223 -0.0445349 -0.5 +v 0.205864 -0.0449725 0.5 +v 0.205864 -0.0449725 -0.5 +v 0.215985 -0.045448 0.5 +v 0.215985 -0.045448 -0.5 +v 0.226615 -0.0458797 0.5 +v 0.226615 -0.0458797 -0.5 +v 0.237778 -0.0463184 0.5 +v 0.237778 -0.0463184 -0.5 +v 0.249497 -0.0468156 0.5 +v 0.249497 -0.0468156 -0.5 +v 0.261804 -0.0472732 0.5 +v 0.261804 -0.0472732 -0.5 +v 0.274727 -0.0477637 0.5 +v 0.274727 -0.0477637 -0.5 +v 0.288294 -0.0483182 0.5 +v 0.288294 -0.0483182 -0.5 +v 0.302542 -0.0488257 0.5 +v 0.302542 -0.0488257 -0.5 +v 0.317502 -0.0493844 0.5 +v 0.317502 -0.0493844 -0.5 +v 0.33321 -0.0499788 0.5 +v 0.33321 -0.0499788 -0.5 +v 0.349702 -0.0506056 0.5 +v 0.349702 -0.0506056 -0.5 +v 0.367015 -0.0513872 0.5 +v 0.367015 -0.0513872 -0.5 +v 0.385192 -0.0522281 0.5 +v 0.385192 -0.0522281 -0.5 +v 0.404277 -0.0531254 0.5 +v 0.404277 -0.0531254 -0.5 +v 0.424316 -0.0540817 0.5 +v 0.424316 -0.0540817 -0.5 +v 0.445357 -0.0550979 0.5 +v 0.445357 -0.0550979 -0.5 +v 0.467451 -0.0560874 0.5 +v 0.467451 -0.0560874 -0.5 +v 0.490649 -0.0571824 0.5 +v 0.490649 -0.0571824 -0.5 +v 0.51501 -0.0582757 0.5 +v 0.51501 -0.0582757 -0.5 +v 0.540585 -0.0594903 0.5 +v 0.540585 -0.0594903 -0.5 +v 0.567439 -0.0607815 0.5 +v 0.567439 -0.0607815 -0.5 +v 0.595635 -0.0621304 0.5 +v 0.595635 -0.0621304 -0.5 +v 0.625242 -0.0635352 0.5 +v 0.625242 -0.0635352 -0.5 +v 0.649433 -0.0648334 0.5 +v 0.649433 -0.0648334 -0.5 +v 0.672415 -0.0660494 0.5 +v 0.672415 -0.0660494 -0.5 +v 0.694245 -0.0672674 0.5 +v 0.694245 -0.0672674 -0.5 +v 0.714979 -0.0684936 0.5 +v 0.714979 -0.0684936 -0.5 +v 0.734678 -0.0696472 0.5 +v 0.734678 -0.0696472 -0.5 +v 0.753392 -0.070724 0.5 +v 0.753392 -0.070724 -0.5 +v 0.771162 -0.0718742 0.5 +v 0.771162 -0.0718742 -0.5 +v 0.788046 -0.0729552 0.5 +v 0.788046 -0.0729552 -0.5 +v 0.804086 -0.0739668 0.5 +v 0.804086 -0.0739668 -0.5 +v 0.819316 -0.0750462 0.5 +v 0.819316 -0.0750462 -0.5 +v 0.833785 -0.076061 0.5 +v 0.833785 -0.076061 -0.5 +v 0.847532 -0.0770175 0.5 +v 0.847532 -0.0770175 -0.5 +v 0.86059 -0.0779215 0.5 +v 0.86059 -0.0779215 -0.5 +v 0.872998 -0.0787716 0.5 +v 0.872998 -0.0787716 -0.5 +v 0.884776 -0.079698 0.5 +v 0.884776 -0.079698 -0.5 +v 0.89597 -0.0805061 0.5 +v 0.89597 -0.0805061 -0.5 +v 0.906605 -0.0812554 0.5 +v 0.906605 -0.0812554 -0.5 +v 0.916704 -0.0820352 0.5 +v 0.916704 -0.0820352 -0.5 +v 0.926301 -0.0827494 0.5 +v 0.926301 -0.0827494 -0.5 +v 0.935409 -0.0835384 0.5 +v 0.935409 -0.0835384 -0.5 +v 0.944071 -0.0841575 0.5 +v 0.944071 -0.0841575 -0.5 +v 0.952294 -0.0848264 0.5 +v 0.952294 -0.0848264 -0.5 +v 0.960109 -0.0854166 0.5 +v 0.960109 -0.0854166 -0.5 +v 0.967527 -0.0860602 0.5 +v 0.967527 -0.0860602 -0.5 +v 0.97458 -0.0865997 0.5 +v 0.97458 -0.0865997 -0.5 +v 0.981277 -0.0871547 0.5 +v 0.981277 -0.0871547 -0.5 +v 0.987637 -0.0876912 0.5 +v 0.987637 -0.0876912 -0.5 +v 0.993684 -0.0881407 0.5 +v 0.993684 -0.0881407 -0.5 +# </points> + +# <faces count="520"> +g WALL10 +f 1 2 3 +f 3 4 1 +f 4 3 5 +f 5 6 4 +f 6 5 7 +f 7 8 6 +f 8 7 9 +f 9 10 8 +f 10 9 11 +f 11 12 10 +f 12 11 13 +f 13 14 12 +f 14 13 15 +f 15 16 14 +f 16 15 17 +f 17 18 16 +f 18 17 19 +f 19 20 18 +f 20 19 21 +f 21 22 20 +f 22 21 23 +f 23 24 22 +f 24 23 25 +f 25 26 24 +f 26 25 27 +f 27 28 26 +f 28 27 29 +f 29 30 28 +f 30 29 31 +f 31 32 30 +f 32 31 33 +f 33 34 32 +f 34 33 35 +f 35 36 34 +f 36 35 37 +f 37 38 36 +f 38 37 39 +f 39 40 38 +f 40 39 41 +f 41 42 40 +f 42 41 43 +f 43 44 42 +f 44 43 45 +f 45 46 44 +f 46 45 47 +f 47 48 46 +f 48 47 49 +f 49 50 48 +f 50 49 51 +f 51 52 50 +f 52 51 53 +f 53 54 52 +f 54 53 55 +f 55 56 54 +f 56 55 57 +f 57 58 56 +f 58 57 59 +f 59 60 58 +f 60 59 61 +f 61 62 60 +f 62 61 63 +f 63 64 62 +f 64 63 65 +f 65 66 64 +f 66 65 67 +f 67 68 66 +f 68 67 69 +f 69 70 68 +f 70 69 71 +f 71 72 70 +f 72 71 73 +f 73 74 72 +f 74 73 75 +f 75 76 74 +f 76 75 77 +f 77 78 76 +f 78 77 79 +f 79 80 78 +f 80 79 81 +f 81 82 80 +f 82 81 83 +f 83 84 82 +f 84 83 85 +f 85 86 84 +f 86 85 87 +f 87 88 86 +f 88 87 89 +f 89 90 88 +f 90 89 91 +f 91 92 90 +f 92 91 93 +f 93 94 92 +f 94 93 95 +f 95 96 94 +f 96 95 97 +f 97 98 96 +f 98 97 99 +f 99 100 98 +f 100 99 101 +f 101 102 100 +f 102 101 103 +f 103 104 102 +f 104 103 105 +f 105 106 104 +f 106 105 107 +f 107 108 106 +f 108 107 109 +f 109 110 108 +f 110 109 111 +f 111 112 110 +f 112 111 113 +f 113 114 112 +f 114 113 115 +f 115 116 114 +f 116 115 117 +f 117 118 116 +f 118 117 119 +f 119 120 118 +f 120 119 121 +f 121 122 120 +f 122 121 123 +f 123 124 122 +f 124 123 125 +f 125 126 124 +f 126 125 127 +f 127 128 126 +f 128 127 129 +f 129 130 128 +f 130 129 131 +f 131 132 130 +f 132 131 133 +f 133 134 132 +f 134 133 135 +f 135 136 134 +f 136 135 137 +f 137 138 136 +f 138 137 139 +f 139 140 138 +f 140 139 141 +f 141 142 140 +f 142 141 143 +f 143 144 142 +f 144 143 145 +f 145 146 144 +f 146 145 147 +f 147 148 146 +f 148 147 149 +f 149 150 148 +f 150 149 151 +f 151 152 150 +f 152 151 153 +f 153 154 152 +f 154 153 155 +f 155 156 154 +f 156 155 157 +f 157 158 156 +f 158 157 159 +f 159 160 158 +f 160 159 161 +f 161 162 160 +f 162 161 163 +f 163 164 162 +f 164 163 165 +f 165 166 164 +f 166 165 167 +f 167 168 166 +f 168 167 169 +f 169 170 168 +f 170 169 171 +f 171 172 170 +f 172 171 173 +f 173 174 172 +f 174 173 175 +f 175 176 174 +f 176 175 177 +f 177 178 176 +f 178 177 179 +f 179 180 178 +f 180 179 181 +f 181 182 180 +f 182 181 183 +f 183 184 182 +f 184 183 185 +f 185 186 184 +f 186 185 187 +f 187 188 186 +f 188 187 189 +f 189 190 188 +f 190 189 191 +f 191 192 190 +f 192 191 193 +f 193 194 192 +f 194 193 195 +f 195 196 194 +f 196 195 197 +f 197 198 196 +f 198 197 199 +f 199 200 198 +f 200 199 201 +f 201 202 200 +f 202 201 203 +f 203 204 202 +f 204 203 205 +f 205 206 204 +f 206 205 207 +f 207 208 206 +f 208 207 209 +f 209 210 208 +f 210 209 211 +f 211 212 210 +f 212 211 213 +f 213 214 212 +f 214 213 215 +f 215 216 214 +f 216 215 217 +f 217 218 216 +f 218 217 219 +f 219 220 218 +f 220 219 221 +f 221 222 220 +f 222 221 223 +f 223 224 222 +f 224 223 225 +f 225 226 224 +f 226 225 227 +f 227 228 226 +f 228 227 229 +f 229 230 228 +f 230 229 231 +f 231 232 230 +f 232 231 233 +f 233 234 232 +f 234 233 235 +f 235 236 234 +f 236 235 237 +f 237 238 236 +f 238 237 239 +f 239 240 238 +f 240 239 241 +f 241 242 240 +f 242 241 243 +f 243 244 242 +f 244 243 245 +f 245 246 244 +f 246 245 247 +f 247 248 246 +f 248 247 249 +f 249 250 248 +f 250 249 251 +f 251 252 250 +f 252 251 253 +f 253 254 252 +f 254 253 255 +f 255 256 254 +f 256 255 257 +f 257 258 256 +f 258 257 259 +f 259 260 258 +f 261 262 2 +f 2 1 261 +f 260 259 263 +f 263 264 260 +f 264 263 265 +f 265 266 264 +f 266 265 267 +f 267 268 266 +f 268 267 269 +f 269 270 268 +f 270 269 271 +f 271 272 270 +f 272 271 273 +f 273 274 272 +f 274 273 275 +f 275 276 274 +f 276 275 277 +f 277 278 276 +f 278 277 279 +f 279 280 278 +f 280 279 281 +f 281 282 280 +f 282 281 283 +f 283 284 282 +f 284 283 285 +f 285 286 284 +f 286 285 287 +f 287 288 286 +f 288 287 289 +f 289 290 288 +f 290 289 291 +f 291 292 290 +f 292 291 293 +f 293 294 292 +f 294 293 295 +f 295 296 294 +f 296 295 297 +f 297 298 296 +f 298 297 299 +f 299 300 298 +f 300 299 301 +f 301 302 300 +f 302 301 303 +f 303 304 302 +f 304 303 305 +f 305 306 304 +f 306 305 307 +f 307 308 306 +f 308 307 309 +f 309 310 308 +f 310 309 311 +f 311 312 310 +f 312 311 313 +f 313 314 312 +f 314 313 315 +f 315 316 314 +f 316 315 317 +f 317 318 316 +f 318 317 319 +f 319 320 318 +f 320 319 321 +f 321 322 320 +f 322 321 323 +f 323 324 322 +f 324 323 325 +f 325 326 324 +f 326 325 327 +f 327 328 326 +f 328 327 329 +f 329 330 328 +f 330 329 331 +f 331 332 330 +f 332 331 333 +f 333 334 332 +f 334 333 335 +f 335 336 334 +f 336 335 337 +f 337 338 336 +f 338 337 339 +f 339 340 338 +f 340 339 341 +f 341 342 340 +f 342 341 343 +f 343 344 342 +f 344 343 345 +f 345 346 344 +f 346 345 347 +f 347 348 346 +f 348 347 349 +f 349 350 348 +f 350 349 351 +f 351 352 350 +f 352 351 353 +f 353 354 352 +f 354 353 355 +f 355 356 354 +f 356 355 357 +f 357 358 356 +f 358 357 359 +f 359 360 358 +f 360 359 361 +f 361 362 360 +f 362 361 363 +f 363 364 362 +f 364 363 365 +f 365 366 364 +f 366 365 367 +f 367 368 366 +f 368 367 369 +f 369 370 368 +f 370 369 371 +f 371 372 370 +f 372 371 373 +f 373 374 372 +f 374 373 375 +f 375 376 374 +f 376 375 377 +f 377 378 376 +f 378 377 379 +f 379 380 378 +f 380 379 381 +f 381 382 380 +f 382 381 383 +f 383 384 382 +f 384 383 385 +f 385 386 384 +f 386 385 387 +f 387 388 386 +f 388 387 389 +f 389 390 388 +f 390 389 391 +f 391 392 390 +f 392 391 393 +f 393 394 392 +f 394 393 395 +f 395 396 394 +f 396 395 397 +f 397 398 396 +f 398 397 399 +f 399 400 398 +f 400 399 401 +f 401 402 400 +f 402 401 403 +f 403 404 402 +f 404 403 405 +f 405 406 404 +f 406 405 407 +f 407 408 406 +f 408 407 409 +f 409 410 408 +f 410 409 411 +f 411 412 410 +f 412 411 413 +f 413 414 412 +f 414 413 415 +f 415 416 414 +f 416 415 417 +f 417 418 416 +f 418 417 419 +f 419 420 418 +f 420 419 421 +f 421 422 420 +f 422 421 423 +f 423 424 422 +f 424 423 425 +f 425 426 424 +f 426 425 427 +f 427 428 426 +f 428 427 429 +f 429 430 428 +f 430 429 431 +f 431 432 430 +f 432 431 433 +f 433 434 432 +f 434 433 435 +f 435 436 434 +f 436 435 437 +f 437 438 436 +f 438 437 439 +f 439 440 438 +f 440 439 441 +f 441 442 440 +f 442 441 443 +f 443 444 442 +f 444 443 445 +f 445 446 444 +f 446 445 447 +f 447 448 446 +f 448 447 449 +f 449 450 448 +f 450 449 451 +f 451 452 450 +f 452 451 453 +f 453 454 452 +f 454 453 455 +f 455 456 454 +f 456 455 457 +f 457 458 456 +f 458 457 459 +f 459 460 458 +f 460 459 461 +f 461 462 460 +f 462 461 463 +f 463 464 462 +f 464 463 465 +f 465 466 464 +f 466 465 467 +f 467 468 466 +f 468 467 469 +f 469 470 468 +f 470 469 471 +f 471 472 470 +f 472 471 473 +f 473 474 472 +f 474 473 475 +f 475 476 474 +f 476 475 477 +f 477 478 476 +f 478 477 479 +f 479 480 478 +f 480 479 481 +f 481 482 480 +f 482 481 483 +f 483 484 482 +f 484 483 485 +f 485 486 484 +f 486 485 487 +f 487 488 486 +f 488 487 489 +f 489 490 488 +f 490 489 491 +f 491 492 490 +f 492 491 493 +f 493 494 492 +f 494 493 495 +f 495 496 494 +f 496 495 497 +f 497 498 496 +f 498 497 499 +f 499 500 498 +f 500 499 501 +f 501 502 500 +f 502 501 503 +f 503 504 502 +f 504 503 505 +f 505 506 504 +f 506 505 507 +f 507 508 506 +f 508 507 509 +f 509 510 508 +f 510 509 511 +f 511 512 510 +f 512 511 513 +f 513 514 512 +f 514 513 515 +f 515 516 514 +f 516 515 517 +f 517 518 516 +f 518 517 519 +f 519 520 518 +f 520 519 262 +f 262 261 520 +# </faces> diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/controlDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..1259284a3dd89fb74d4b9604de1ad95bfc48653e --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/controlDict @@ -0,0 +1,50 @@ +/*--------------------------------*- 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; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application snappyHexMesh; + +startFrom latestTime; + +startTime 0; + +stopAt endTime; + +endTime 100; + +deltaT 1; + +writeControl runTime; + +writeInterval 1; + +purgeWrite 0; + +writeFormat ascii; + +writePrecision 6; + +writeCompression off; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable true; + +} + +// ************************************************************************* // diff --git a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/decomposeParDict similarity index 71% rename from tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces rename to tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/decomposeParDict index 38fa0208ed993427b2efc3666064c6b779a76487..2dc0a0a25e2f99ce5eb53af57cf68543bf23eff6 100644 --- a/tutorials/compressible/rhoPorousMRFPimpleFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/decomposeParDict @@ -11,15 +11,35 @@ FoamFile format ascii; class dictionary; location "system"; - object faceSetDict_noBoundaryFaces; + object decomposeParDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name rotor; +numberOfSubdomains 3; -action delete; +method simple; -topoSetSources ( boundaryToFace { } ); +simpleCoeffs +{ + n ( 1 3 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 3 2 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile "cellDecomposition"; +} + +metisCoeffs +{ +} // ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/fvSchemes b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/fvSchemes new file mode 100644 index 0000000000000000000000000000000000000000..ae2773bf8427d7793f43ab80d4ecaafa8668ced2 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/fvSchemes @@ -0,0 +1,70 @@ +/*--------------------------------*- 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; +} + +divSchemes +{ + default none; + div(phi,U) Gauss limitedLinearV 1; + div(phi,k) Gauss upwind; + div(phi,epsilon) Gauss upwind; + div(phi,R) Gauss upwind; + div(R) Gauss linear; + div(phid,p) Gauss limitedLinear 1; + div(phiU,p) Gauss limitedLinear 1; + div(phi,e) Gauss limitedLinear 1; + div((muEff*dev2(grad(U).T()))) Gauss linear; +} + +laplacianSchemes +{ + default none; + laplacian(muEff,U) Gauss linear limited 0.5; + laplacian(DkEff,k) Gauss linear limited 0.5; + laplacian(DREff,R) Gauss linear limited 0.5; + laplacian(DepsilonEff,epsilon) Gauss linear limited 0.5; + laplacian((rho*(1|A(U))),p) Gauss linear limited 0.5; + laplacian(alphaEff,e) Gauss linear limited 0.5; +} + +interpolationSchemes +{ + default linear; +} + +snGradSchemes +{ + default corrected; +} + +fluxRequired +{ + default no; + p; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/fvSolution b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..d85a6d5e98b59c810afe7590c7ed30a471c408d0 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/fvSolution @@ -0,0 +1,51 @@ +/*--------------------------------*- 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 PBiCG; + preconditioner DILU; + tolerance 1e-12; + relTol 0; + } + + rho + { + solver PCG; + preconditioner DIC; + tolerance 1e-08; + relTol 0; + } + + "(U|e|k|epsilon|R)" + { + $p; + tolerance 1e-08; + relTol 0; + } +} + +PISO +{ + nCorrectors 2; + nNonOrthogonalCorrectors 2; +} + + +// ************************************************************************* // diff --git a/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/snappyHexMeshDict b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/snappyHexMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..2300d79207167b29935dfe749886a76ea289e261 --- /dev/null +++ b/tutorials/incompressible/pimpleDyMFoam/wingFlutter/wingFlutter_snappyHexMesh/system/snappyHexMeshDict @@ -0,0 +1,326 @@ +/*--------------------------------*- 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 snappyHexMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// Which of the steps to run +castellatedMesh true; +snap true; +addLayers true; + + +// Geometry. Definition of all surfaces. All surfaces are of class +// searchableSurface. +// Surfaces are used +// - to specify refinement for any mesh cell intersecting it +// - to specify refinement for any mesh cell inside/outside/near +// - to 'snap' the mesh boundary to the surface +geometry +{ + wing_5degrees.obj + { + type triSurfaceMesh; + } + + refinementBox + { + type searchableBox; + min (-1 -1 -1); + max ( 5 1 1); + } +}; + + + +// Settings for the castellatedMesh generation. +castellatedMeshControls +{ + + // Refinement parameters + // ~~~~~~~~~~~~~~~~~~~~~ + + // If local number of cells is >= maxLocalCells on any processor + // switches from from refinement followed by balancing + // (current method) to (weighted) balancing before refinement. + maxLocalCells 1000000; + + // Overall cell limit (approximately). Refinement will stop immediately + // upon reaching this number so a refinement level might not complete. + // Note that this is the number of cells before removing the part which + // is not 'visible' from the keepPoint. The final number of cells might + // actually be a lot less. + maxGlobalCells 2000000; + + // The surface refinement loop might spend lots of iterations refining just a + // few cells. This setting will cause refinement to stop if <= minimumRefine + // are selected for refinement. Note: it will at least do one iteration + // (unless the number of cells to refine is 0) + minRefinementCells 100; + + // Number of buffer layers between different levels. + // 1 means normal 2:1 refinement restriction, larger means slower + // refinement. + nCellsBetweenLevels 6; + + + + // Explicit feature edge refinement + // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies a level for any cell intersected by its edges. + // This is a featureEdgeMesh, read from constant/triSurface for now. + features (); + + + + // Surface based refinement + // ~~~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies two levels for every surface. The first is the minimum level, + // every cell intersecting a surface gets refined up to the minimum level. + // The second level is the maximum level. Cells that 'see' multiple + // intersections where the intersections make an + // angle > resolveFeatureAngle get refined up to the maximum level. + + refinementSurfaces + { + wing_5degrees.obj + { + // Surface-wise min and max refinement level + level (6 6); + } + } + + // Resolve sharp angles on fridges + resolveFeatureAngle 30; + + + // Region-wise refinement + // ~~~~~~~~~~~~~~~~~~~~~~ + + // Specifies refinement level for cells in relation to a surface. One of + // three modes + // - distance. 'levels' specifies per distance to the surface the + // wanted refinement level. The distances need to be specified in + // descending order. + // - inside. 'levels' is only one entry and only the level is used. All + // cells inside the surface get refined up to the level. The surface + // needs to be closed for this to be possible. + // - outside. Same but cells outside. + + refinementRegions + { + refinementBox + { + mode inside; + levels ((1e15 3)); + } + } + + + // Mesh selection + // ~~~~~~~~~~~~~~ + + // After refinement patches get added for all refinementSurfaces and + // all cells intersecting the surfaces get put into these patches. The + // section reachable from the locationInMesh is kept. + // NOTE: This point should never be on a face, always inside a cell, even + // after refinement. + locationInMesh (-0.5 0 0); + + + // Whether any faceZones (as specified in the refinementSurfaces) + // are only on the boundary of corresponding cellZones or also allow + // free-standing zone faces. Not used if there are no faceZones. + allowFreeStandingZoneFaces true; +} + + + +// Settings for the snapping. +snapControls +{ + //- Number of patch smoothing iterations before finding correspondence + // to surface + nSmoothPatch 3; + + //- Relative distance for points to be attracted by surface feature point + // or edge. True distance is this factor times local + // maximum edge length. + tolerance 4.0; + + //- Number of mesh displacement relaxation iterations. + nSolveIter 30; + + //- Maximum number of snapping relaxation iterations. Should stop + // before upon reaching a correct mesh. + nRelaxIter 5; +} + + + +// Settings for the layer addition. +addLayersControls +{ + // Are the thickness parameters below relative to the undistorted + // size of the refined cell outside layer (true) or absolute sizes (false). + relativeSizes true; + + // Per final patch (so not geometry!) the layer information + layers + { + "wing.*" + { + nSurfaceLayers 3; + } + } + + // Expansion factor for layer mesh + expansionRatio 1.3; + + //- Wanted thickness of final added cell layer. If multiple layers + // is the + // thickness of the layer furthest away from the wall. + // Relative to undistorted size of cell outside layer. + // is the thickness of the layer furthest away from the wall. + // See relativeSizes parameter. + finalLayerThickness 0.7; + + //- Minimum thickness of cell layer. If for any reason layer + // cannot be above minThickness do not add layer. + // Relative to undistorted size of cell outside layer. + // See relativeSizes parameter. + minThickness 0.25; + + //- If points get not extruded do nGrow layers of connected faces that are + // also not grown. This helps convergence of the layer addition process + // close to features. + nGrow 0; + + + // Advanced settings + + //- When not to extrude surface. 0 is flat surface, 90 is when two faces + // make straight angle. + featureAngle 60; + + //- Maximum number of snapping relaxation iterations. Should stop + // before upon reaching a correct mesh. + nRelaxIter 5; + + // Number of smoothing iterations of surface normals + nSmoothSurfaceNormals 1; + + // Number of smoothing iterations of interior mesh movement direction + nSmoothNormals 3; + + // Smooth layer thickness over surface patches + nSmoothThickness 10; + + // Stop layer growth on highly warped cells + maxFaceThicknessRatio 0.5; + + // Reduce layer growth where ratio thickness to medial + // distance is large + maxThicknessToMedialRatio 0.3; + + // Angle used to pick up medial axis points + // Note: changed(corrected) w.r.t 16x! 90 degrees corresponds to 130 in 16x. + minMedianAxisAngle 90; + + // Create buffer region for new layer terminations + nBufferCellsNoExtrude 0; + + + // Overall max number of layer addition iterations. The mesher will exit + // if it reaches this number of iterations; possibly with an illegal + // mesh. + nLayerIter 50; +} + + + +// Generic mesh quality settings. At any undoable phase these determine +// where to undo. +meshQualityControls +{ + //- Maximum non-orthogonality allowed. Set to 180 to disable. + maxNonOrtho 65; + + //- Max skewness allowed. Set to <0 to disable. + maxBoundarySkewness 20; + maxInternalSkewness 4; + + //- Max concaveness allowed. Is angle (in degrees) below which concavity + // is allowed. 0 is straight face, <0 would be convex face. + // Set to 180 to disable. + maxConcave 80; + + //- Minimum pyramid volume. Is absolute volume of cell pyramid. + // Set to a sensible fraction of the smallest cell volume expected. + // Set to very negative number (e.g. -1E30) to disable. + minVol 1e-13; + + //- Minimum tet volume. Is absolute volume of the tet formed by the + // face-centre decomposition triangle and the cell centre. + // Set to a sensible fraction of the smallest cell volume expected. + // Set to very negative number (e.g. -1E30) to disable. + minTetVol 1e-20; + + //- Minimum face area. Set to <0 to disable. + minArea -1; + + //- Minimum face twist. Set to <-1 to disable. dot product of face normal + //- and face centre triangles normal + minTwist 0.05; + + //- minimum normalised cell determinant + //- 1 = hex, <= 0 = folded or flattened illegal cell + minDeterminant 0.001; + + //- minFaceWeight (0 -> 0.5) + minFaceWeight 0.05; + + //- minVolRatio (0 -> 1) + minVolRatio 0.01; + + //must be >0 for Fluent compatibility + minTriangleTwist -1; + + + // Advanced + + //- Number of error distribution iterations + nSmoothScale 4; + //- amount to scale back displacement at error points + errorReduction 0.75; +} + + +// Advanced + +// Flags for optional output +// 0 : only write final meshes +// 1 : write intermediate meshes +// 2 : write volScalarField with cellLevel for postprocessing +// 4 : write current intersections as .obj files +debug 0; + + +// Merge tolerance. Is fraction of overall bounding box of initial mesh. +// Note: the write tolerance needs to be higher than this. +mergeTolerance 1E-6; + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleSRFFoam/mixer/constant/polyMesh/blockMeshDict b/tutorials/incompressible/simpleSRFFoam/mixer/constant/polyMesh/blockMeshDict index 7a1e1ea2ee5925d64d9ac25f9446985d44466f3f..948100235fafe9a335b97bbe9ced9a7e2bdacc46 100644 --- a/tutorials/incompressible/simpleSRFFoam/mixer/constant/polyMesh/blockMeshDict +++ b/tutorials/incompressible/simpleSRFFoam/mixer/constant/polyMesh/blockMeshDict @@ -12,105 +12,105 @@ FoamFile class dictionary; object blockMeshDict; } - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -convertToMeters 0.1; - -vertices -( - ( 0.500 0.000 0.000) - ( 0.369 0.338 0.000) - ( 0.338 0.369 0.000) - ( 0.000 0.500 0.000) - ( 0.737 0.676 0.000) - ( 0.074 0.068 0.000) - ( 0.676 0.737 0.000) - ( 0.068 0.074 0.000) - ( 0.000 1.000 0.000) - ( 1.000 0.000 0.000) - ( 0.100 0.000 0.000) - ( 0.000 0.100 0.000) - ( 0.500 0.000 2.000) - ( 0.369 0.338 2.000) - ( 0.338 0.369 2.000) - ( 0.000 0.500 2.000) - ( 0.737 0.676 2.000) - ( 0.074 0.068 2.000) - ( 0.676 0.737 2.000) - ( 0.068 0.074 2.000) - ( 0.000 1.000 2.000) - ( 1.000 0.000 2.000) - ( 0.100 0.000 2.000) - ( 0.000 0.100 2.000) -); - -blocks -( - hex (1 0 9 4 13 12 21 16) (10 20 40) simpleGrading (1 1 1) - hex (2 1 4 6 14 13 16 18) (2 20 40) simpleGrading (1 1 1) - hex (3 2 6 8 15 14 18 20) (10 20 40) simpleGrading (1 1 1) - hex (5 10 0 1 17 22 12 13) (10 20 40) simpleGrading (1 1 1) - hex (11 7 2 3 23 19 14 15) (10 20 40) simpleGrading (1 1 1) -); - -edges -( - arc 0 1 ( 0.470 0.171 0.000 ) - arc 12 13 ( 0.470 0.171 2.000 ) - arc 2 3 ( 0.171 0.470 0.000 ) - arc 14 15 ( 0.171 0.470 2.000 ) - arc 9 4 ( 0.940 0.342 0.000 ) - arc 21 16 ( 0.940 0.342 2.000 ) - arc 5 10 ( 0.094 0.034 0.000 ) - arc 17 22 ( 0.094 0.034 2.000 ) - arc 6 8 ( 0.342 0.940 0.000 ) - arc 18 20 ( 0.342 0.940 2.000 ) - arc 11 7 ( 0.034 0.094 0.000 ) - arc 23 19 ( 0.034 0.094 2.000 ) -); - -patches -( - patch inlet - ( - (13 12 21 16) - (14 13 16 18) - (15 14 18 20) - (17 22 12 13) - (23 19 14 15) - ) - patch outlet - ( - (1 4 9 0) - (2 6 4 1) - (3 8 6 2) - (5 1 0 10) - (11 3 2 7) - ) - wall innerWall - ( - (2 1 13 14) - (5 10 22 17) - (5 17 13 1) - (11 7 19 23) - (7 2 14 19) - ) - wall outerWall - ( - (4 16 21 9) - (6 18 16 4) - (8 20 18 6) - ) - cyclic cyclic - ( - (0 9 21 12) - (10 0 12 22) - (3 15 20 8) - (11 23 15 3) - ) -); - -mergeMatchPairs -( -); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +convertToMeters 0.1; + +vertices +( + ( 0.500 0.000 0.000) + ( 0.369 0.338 0.000) + ( 0.338 0.369 0.000) + ( 0.000 0.500 0.000) + ( 0.737 0.676 0.000) + ( 0.074 0.068 0.000) + ( 0.676 0.737 0.000) + ( 0.068 0.074 0.000) + ( 0.000 1.000 0.000) + ( 1.000 0.000 0.000) + ( 0.100 0.000 0.000) + ( 0.000 0.100 0.000) + ( 0.500 0.000 2.000) + ( 0.369 0.338 2.000) + ( 0.338 0.369 2.000) + ( 0.000 0.500 2.000) + ( 0.737 0.676 2.000) + ( 0.074 0.068 2.000) + ( 0.676 0.737 2.000) + ( 0.068 0.074 2.000) + ( 0.000 1.000 2.000) + ( 1.000 0.000 2.000) + ( 0.100 0.000 2.000) + ( 0.000 0.100 2.000) +); + +blocks +( + hex (1 0 9 4 13 12 21 16) (10 20 40) simpleGrading (1 1 1) + hex (2 1 4 6 14 13 16 18) (2 20 40) simpleGrading (1 1 1) + hex (3 2 6 8 15 14 18 20) (10 20 40) simpleGrading (1 1 1) + hex (5 10 0 1 17 22 12 13) (10 20 40) simpleGrading (1 1 1) + hex (11 7 2 3 23 19 14 15) (10 20 40) simpleGrading (1 1 1) +); + +edges +( + arc 0 1 ( 0.470 0.171 0.000 ) + arc 12 13 ( 0.470 0.171 2.000 ) + arc 2 3 ( 0.171 0.470 0.000 ) + arc 14 15 ( 0.171 0.470 2.000 ) + arc 9 4 ( 0.940 0.342 0.000 ) + arc 21 16 ( 0.940 0.342 2.000 ) + arc 5 10 ( 0.094 0.034 0.000 ) + arc 17 22 ( 0.094 0.034 2.000 ) + arc 6 8 ( 0.342 0.940 0.000 ) + arc 18 20 ( 0.342 0.940 2.000 ) + arc 11 7 ( 0.034 0.094 0.000 ) + arc 23 19 ( 0.034 0.094 2.000 ) +); + +patches +( + patch inlet + ( + (13 12 21 16) + (14 13 16 18) + (15 14 18 20) + (17 22 12 13) + (23 19 14 15) + ) + patch outlet + ( + (1 4 9 0) + (2 6 4 1) + (3 8 6 2) + (5 1 0 10) + (11 3 2 7) + ) + wall innerWall + ( + (2 1 13 14) + (5 10 22 17) + (5 17 13 1) + (11 7 19 23) + (7 2 14 19) + ) + wall outerWall + ( + (4 16 21 9) + (6 18 16 4) + (8 20 18 6) + ) + cyclic cyclic + ( + (0 9 21 12) + (10 0 12 22) + (3 15 20 8) + (11 23 15 3) + ) +); + +mergeMatchPairs +( +); diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun index a67553deb14e863ee3f35a13ce357064e89f0591..666ec8f286754a2f2a0cf06c22d5f8b0734fe534 100755 --- a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/Allrun @@ -10,7 +10,7 @@ application=`getApplication` runApplication blockMesh # create ignition cells cellSet -runApplication cellSet +runApplication topoSet runApplication $application diff --git a/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/topoSetDict b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/topoSetDict new file mode 100644 index 0000000000000000000000000000000000000000..814c5a8f9e21d4398b60b8851dcdc32407e4460e --- /dev/null +++ b/tutorials/lagrangian/coalChemistryFoam/simplifiedSiwek/system/topoSetDict @@ -0,0 +1,35 @@ +/*--------------------------------*- 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 topoSetDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name ignitionCells; + type cellSet; + action new; + + source sphereToCell; + sourceInfo + { + centre ( 0.125 0.375 0.05 ); + radius 0.005; + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/Allclean b/tutorials/multiphase/cavitatingFoam/les/Allclean index fae8abfab6ac1ea15d5a90c621f49283fef00012..68db65d125ca2da943f0c82f7b0938c91ad68030 100755 --- a/tutorials/multiphase/cavitatingFoam/les/Allclean +++ b/tutorials/multiphase/cavitatingFoam/les/Allclean @@ -9,7 +9,7 @@ cd ${0%/*} || exit 1 # run from this directory rm -rf constant/polyMesh/sets > /dev/null 2>&1 rm -rf 0/polyMesh > /dev/null 2>&1 - rm system/cellSetDict > /dev/null 2>&1 + rm system/topoSetDict > /dev/null 2>&1 cleanCase ) @@ -21,7 +21,7 @@ cd ${0%/*} || exit 1 # run from this directory rm -rf constant/polyMesh/sets > /dev/null 2>&1 rm -rf 0 > /dev/null 2>&1 cp -r 0.org 0 - rm system/cellSetDict > /dev/null 2>&1 + rm system/topoSetDict > /dev/null 2>&1 rm -rf processor[0-9] > /dev/null 2>&1 cleanCase diff --git a/tutorials/multiphase/cavitatingFoam/les/Allrun b/tutorials/multiphase/cavitatingFoam/les/Allrun index caff26f5710565c3a7b6f59ac4700c0fa745bdff..2cf6a091a2f8b0f7ba1449ce22397946414ab3e6 100755 --- a/tutorials/multiphase/cavitatingFoam/les/Allrun +++ b/tutorials/multiphase/cavitatingFoam/les/Allrun @@ -12,8 +12,8 @@ refineMeshByCellSet() while [ $# -ge 1 ] do echo "creating cell set for primary zone - $1" - cp system/cellSetDict.$1 system/cellSetDict - cellSet > log.cellSet.$1 2>&1 + cp system/topoSetDict.$1 system/topoSetDict + topoSet > log.topoSet.$1 2>&1 echo "refining primary zone - $1" refineMesh -dict -overwrite > log.refineMesh.$1 2>&1 diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/topoSetDict.1 b/tutorials/multiphase/cavitatingFoam/les/throttle/system/topoSetDict.1 new file mode 100644 index 0000000000000000000000000000000000000000..99b65f210c7c27fb3976ab1e5dad3558274cc5a7 --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/topoSetDict.1 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 topoSetDict.1; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (0.004 -0.001 -1) (0.012 0.001 1); + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/topoSetDict.2 b/tutorials/multiphase/cavitatingFoam/les/throttle/system/topoSetDict.2 new file mode 100644 index 0000000000000000000000000000000000000000..f0bc41c9b68300016a53de364b11b3c0489a35dc --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/topoSetDict.2 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 topoSetDict.2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (0.0045 -0.00075 -1) (0.0095 0.00075 1); + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/topoSetDict.3 b/tutorials/multiphase/cavitatingFoam/les/throttle/system/topoSetDict.3 new file mode 100644 index 0000000000000000000000000000000000000000..fd1ed7949fdd33722bea117ac7de566891d77cb2 --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle/system/topoSetDict.3 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 topoSetDict.3; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (0.00475 -0.000375 -1) (0.009 0.000375 1); + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/cellSetDict.1 b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/cellSetDict.1 deleted file mode 100644 index 2eb73c024edbbc6e8953c6930c3c49ce9ee72a7d..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/cellSetDict.1 +++ /dev/null @@ -1,31 +0,0 @@ -/*--------------------------------*- 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 cellSetDict.1; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name c0; - -action new; - -topoSetSources -( - boxToCell - { - box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 ); - } -); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/cellSetDict.2 b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/cellSetDict.2 deleted file mode 100644 index 8a78bbba80f8c2d5a34714f97daf8843faa54f7b..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/cellSetDict.2 +++ /dev/null @@ -1,31 +0,0 @@ -/*--------------------------------*- 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 cellSetDict.2; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name c0; - -action new; - -topoSetSources -( - boxToCell - { - box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 ); - } -); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/cellSetDict.3 b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/cellSetDict.3 deleted file mode 100644 index 3eb51acdc42ca51002c6442bd8984a38c3627da5..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/cellSetDict.3 +++ /dev/null @@ -1,31 +0,0 @@ -/*--------------------------------*- 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 cellSetDict.3; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name c0; - -action new; - -topoSetSources -( - boxToCell - { - box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ); - } -); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/topoSetDict.1 b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/topoSetDict.1 new file mode 100644 index 0000000000000000000000000000000000000000..5fb3df6565ece84f5a38251f59a84d0e2dbe3860 --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/topoSetDict.1 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 topoSetDict.1; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 ); + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/topoSetDict.2 b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/topoSetDict.2 new file mode 100644 index 0000000000000000000000000000000000000000..59c77c8d37e80f2ae64461d987273a02552a46ed --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/topoSetDict.2 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 topoSetDict.2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 ); + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/topoSetDict.3 b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/topoSetDict.3 new file mode 100644 index 0000000000000000000000000000000000000000..1dcc0ebc3ff444aa4cd1ca5c60070350ddde9b86 --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/les/throttle3D/system/topoSetDict.3 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 topoSetDict.3; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ); + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/Allclean b/tutorials/multiphase/cavitatingFoam/ras/throttle/Allclean index 96f4954120902b82775fb4306988b750b9ffc867..c49b5e9af36de8c6afe806d2b5f32894dd24f8da 100755 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/Allclean +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/Allclean @@ -6,7 +6,7 @@ cd ${0%/*} || exit 1 # run from this directory rm -rf constant/polyMesh/sets > /dev/null 2>&1 rm -rf 0/polyMesh > /dev/null 2>&1 -rm system/cellSetDict > /dev/null 2>&1 +rm system/topoDict > /dev/null 2>&1 cleanCase # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/Allrun b/tutorials/multiphase/cavitatingFoam/ras/throttle/Allrun index 878222cf8073e32639ef1ac88124d48eec31a2ac..9f117b0ba86f3a54a3c558c64664c9187fe0a74f 100755 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/Allrun +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/Allrun @@ -11,8 +11,8 @@ refineMeshByCellSet() while [ $# -ge 1 ] do echo "creating cell set for primary zone - $1" - cp system/cellSetDict.$1 system/cellSetDict - cellSet > log.cellSet.$1 2>&1 + cp system/topoSetDict.$1 system/topoSetDict + topoSet > log.topoSet.$1 2>&1 echo "refining primary zone - $1" refineMesh -dict -overwrite > log.refineMesh.$1 2>&1 diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/cellSetDict.1 b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/cellSetDict.1 deleted file mode 100644 index 93a5a661f8b0caba56ddd379d7131af04004e721..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/cellSetDict.1 +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 cellSetDict.1; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name c0; - -action new; - -topoSetSources ( boxToCell { box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 ) ; } ); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/cellSetDict.2 b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/cellSetDict.2 deleted file mode 100644 index c7826d86894a81e56962ba3f119d563a69c624fe..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/cellSetDict.2 +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 cellSetDict.2; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name c0; - -action new; - -topoSetSources ( boxToCell { box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 ) ; } ); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict new file mode 100644 index 0000000000000000000000000000000000000000..e833aa533bfa66cd5e63313eb83434329fcdc5ca --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 topoSetDict.3; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ; + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/cellSetDict b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict.1 similarity index 78% rename from tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/cellSetDict rename to tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict.1 index 304f1d94454dc7c37c6311c0c4e79d9752a0a257..cfb66b9b728d222997f37a35498465a0002e3479 100644 --- a/tutorials/lagrangian/porousExplicitSourceReactingParcelFoam/filter/system/cellSetDict +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict.1 @@ -11,20 +11,21 @@ FoamFile format ascii; class dictionary; location "system"; - object cellSetDict; + object topoSetDict.1; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name filter; - -action new; - -topoSetSources +actions ( - // Cells with cell centre within box - boxToCell { - box (1.5 -1 -1) (2 1 1); + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0.004 -0.001 -1 ) ( 0.012 0.001 1 ) ; + } } ); diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict.2 b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict.2 new file mode 100644 index 0000000000000000000000000000000000000000..d3cf8a3aebeb421bad7cd503bfb8a64d426f14c1 --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict.2 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 topoSetDict.2; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0.0045 -0.00075 -1 ) ( 0.0095 0.00075 1 ) ; + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict.3 b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict.3 new file mode 100644 index 0000000000000000000000000000000000000000..e833aa533bfa66cd5e63313eb83434329fcdc5ca --- /dev/null +++ b/tutorials/multiphase/cavitatingFoam/ras/throttle/system/topoSetDict.3 @@ -0,0 +1,33 @@ +/*--------------------------------*- 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 topoSetDict.3; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0.00475 -0.000375 -1 ) ( 0.009 0.000375 1 ) ; + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean index 2c6db87c7f2bb23426b422dc88288ae44ead4a52..d16400a94f636d461b62f6f909c2d64d7e29c335 100755 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allclean @@ -4,7 +4,6 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -rm system/cellSetDict > /dev/null 2>&1 rm -rf 0 > /dev/null 2>&1 cleanCase diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun index 8016666d736b3578214f1f73ea686ba14240b8ce..5613186ba273788a02ac993acd72a66c0297b7f1 100755 --- a/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/Allrun @@ -7,19 +7,8 @@ cd ${0%/*} || exit 1 # run from this directory # Set application name application="interDyMFoam" -makeMeshByCellSet() -{ - while [ $# -ge 1 ] - do - echo "Running cellSet operation $1" - cp system/cellSetDict.$1 system/cellSetDict - cellSet > log.cellSet.$1 2>&1 - shift - done -} - runApplication blockMesh -makeMeshByCellSet 1 2 +runApplication topoSet runApplication subsetMesh -overwrite c0 -patch floatingObject cp -r 0.org 0 > /dev/null 2>&1 runApplication setFields diff --git a/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/topoSetDict b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/topoSetDict new file mode 100644 index 0000000000000000000000000000000000000000..7fdf7ca03a211e2ca66f32fcb6edf24eea0d4753 --- /dev/null +++ b/tutorials/multiphase/interDyMFoam/ras/floatingObject/system/topoSetDict @@ -0,0 +1,38 @@ +/*--------------------------------*- 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 topoSetDict; +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +actions +( + { + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box (0.35 0.35 0.44) (0.65 0.65 0.56); + } + } + + { + name c0; + type cellSet; + action invert; + } +); + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/makeMesh b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/makeMesh index b0be10d8e5f2b0525cec8f23c93585fde73f5879..8ef4993fdebc0faac8bb6c69426059aba4b3faac 100755 --- a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/makeMesh +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/makeMesh @@ -2,10 +2,5 @@ m4 < constant/polyMesh/blockMeshDict.m4 > constant/polyMesh/blockMeshDict blockMesh -cellSet -#- MRF determines its own faceZone if not supplied -#cp system/faceSetDict_rotorFaces system/faceSetDict -#faceSet -#cp system/faceSetDict_noBoundaryFaces system/faceSetDict -#faceSet +topoSet setsToZones -noFlipMap diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/cellSetDict b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/cellSetDict deleted file mode 100644 index ae58e6ff702f01cfe32e36bf109c1eb6b8c812ee..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/cellSetDict +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 cellSetDict; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name rotor; - -action new; - -topoSetSources ( zoneToCell { name rotor ; } ); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces deleted file mode 100644 index 38fa0208ed993427b2efc3666064c6b779a76487..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_noBoundaryFaces +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 faceSetDict_noBoundaryFaces; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name rotor; - -action delete; - -topoSetSources ( boundaryToFace { } ); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_rotorFaces b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_rotorFaces deleted file mode 100644 index 3ccb7ad761db3fee6092b9ae449cec5f39dab7d7..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/faceSetDict_rotorFaces +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 faceSetDict_rotorFaces; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name rotor; - -action new; - -topoSetSources ( cellToFace { set rotor ; option all ; } ); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/topoSetDict b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/topoSetDict new file mode 100644 index 0000000000000000000000000000000000000000..a36ee3b31a562295a51d7da5d1b33d105fe01e37 --- /dev/null +++ b/tutorials/multiphase/interFoam/MRFInterFoam/mixerVessel2D/system/topoSetDict @@ -0,0 +1,34 @@ +/*--------------------------------*- 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 topoSetDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + +actions +( + { + name rotor; + type cellSet; + action new; + source zoneToCell; + sourceInfo + { + name rotor; + } + } +); + + +// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allrun b/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allrun index c233dfa35686061c78ae2ff691c49d1637967800..cb29d4ff80133e1194304732b82d06ec83321824 100755 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allrun +++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/Allrun @@ -17,19 +17,19 @@ runRefineMesh() runApplication blockMesh i=1 -if [ -f log.cellSet ] +if [ -f log.topoSet ] then i=3 fi while [ "$i" -lt 3 ] do - if [ -f log.cellSet ] + if [ -f log.topoSet ] then - mv log.cellSet log.cellSet.1 + mv log.topoSet log.topoSet.1 fi - cp system/cellSetDict.${i} system/cellSetDict - runApplication cellSet + cp system/topoSetDict.${i} system/topoSetDict + runApplication topoSet runRefineMesh cp -r 1e-08/polyMesh/* constant/polyMesh rm -rf 1e-08 diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/cellSetDict b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/cellSetDict deleted file mode 100644 index f7d399ef0600ae835fc1774965faa89a606a6922..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/cellSetDict +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 cellSetDict.2; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name c0; - -action new; - -topoSetSources ( boxToCell { box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 ) ; } ); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/cellSetDict.1 b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/cellSetDict.1 deleted file mode 100644 index adf351bd6fafc5b5992ff39cfb71eb3eef2e660c..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/cellSetDict.1 +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 cellSetDict.1; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name c0; - -action new; - -topoSetSources ( boxToCell { box ( 0 0 -2e-05 ) ( 0.0036 0.0008 4e-05 ) ; } ); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/cellSetDict.2 b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/cellSetDict.2 deleted file mode 100644 index f7d399ef0600ae835fc1774965faa89a606a6922..0000000000000000000000000000000000000000 --- a/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/cellSetDict.2 +++ /dev/null @@ -1,25 +0,0 @@ -/*--------------------------------*- 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 cellSetDict.2; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -name c0; - -action new; - -topoSetSources ( boxToCell { box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 ) ; } ); - - -// ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/cellSetDict.1 b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/topoSetDict similarity index 78% rename from tutorials/multiphase/cavitatingFoam/les/throttle/system/cellSetDict.1 rename to tutorials/multiphase/interFoam/les/nozzleFlow2D/system/topoSetDict index 8b6a6950d8c9066c0d3c81bd0880c42a4627e453..e6dc5a068771145675c1318820a27620984b854f 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/cellSetDict.1 +++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/topoSetDict @@ -11,19 +11,21 @@ FoamFile format ascii; class dictionary; location "system"; - object cellSetDict.1; + object topoSetDict.2; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name c0; - -action new; - -topoSetSources +actions ( - boxToCell { - box (0.004 -0.001 -1) (0.012 0.001 1); + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 ); + } } ); diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/cellSetDict.3 b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/topoSetDict.1 similarity index 78% rename from tutorials/multiphase/cavitatingFoam/les/throttle/system/cellSetDict.3 rename to tutorials/multiphase/interFoam/les/nozzleFlow2D/system/topoSetDict.1 index 967c4deacc28e72510a92df3985d92c1ce74e469..02ae84ba2dae285b183e5b9c54d298d50d6c5b4a 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/cellSetDict.3 +++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/topoSetDict.1 @@ -11,21 +11,22 @@ FoamFile format ascii; class dictionary; location "system"; - object cellSetDict.3; + object topoSetDict.1; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name c0; - -action new; - -topoSetSources +actions ( - boxToCell { - box (0.00475 -0.000375 -1) (0.009 0.000375 1); + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0 0 -2e-05 ) ( 0.0036 0.0008 4e-05 ) ; + } } ); - // ************************************************************************* // diff --git a/tutorials/multiphase/cavitatingFoam/les/throttle/system/cellSetDict.2 b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/topoSetDict.2 similarity index 78% rename from tutorials/multiphase/cavitatingFoam/les/throttle/system/cellSetDict.2 rename to tutorials/multiphase/interFoam/les/nozzleFlow2D/system/topoSetDict.2 index 9c999712069c212a24b43e3986757b0484ebf4de..e6dc5a068771145675c1318820a27620984b854f 100644 --- a/tutorials/multiphase/cavitatingFoam/les/throttle/system/cellSetDict.2 +++ b/tutorials/multiphase/interFoam/les/nozzleFlow2D/system/topoSetDict.2 @@ -11,19 +11,21 @@ FoamFile format ascii; class dictionary; location "system"; - object cellSetDict.2; + object topoSetDict.2; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -name c0; - -action new; - -topoSetSources +actions ( - boxToCell { - box (0.0045 -0.00075 -1) (0.0095 0.00075 1); + name c0; + type cellSet; + action new; + source boxToCell; + sourceInfo + { + box ( 0 0 -2e-05 ) ( 0.0036 0.0003 2e-05 ); + } } ); diff --git a/wmake/src/wmkdependParser.cpp b/wmake/src/wmkdependParser.cpp index 62800c06f141fa26fd02cdcf5b3a4d1e8e1ec054..a76b75613e361ad2f3bc826a9759198079de2adc 100644 --- a/wmake/src/wmkdependParser.cpp +++ b/wmake/src/wmkdependParser.cpp @@ -204,8 +204,6 @@ void Parser::importDir(const std::string& name) //! @cond fileScope -// - // // Create by copying str - only used locally inline static wchar_t* coco_string_create(const wchar_t* str) @@ -225,7 +223,7 @@ inline static void coco_string_delete(wchar_t* &str) str = NULL; } // -//! @endcond fileScope +//! @endcond // ----------------------------------------------------------------------------