diff --git a/Allwmake b/Allwmake index 16edfd1f6fdac8bcedefc29b5890bfd7182017f0..91875325538af126680046f2b9d33164cde8d5a8 100755 --- a/Allwmake +++ b/Allwmake @@ -26,12 +26,12 @@ else fi # build OpenFOAM libraries and applications -src/Allwmake -applications/Allwmake +src/Allwmake $* +applications/Allwmake $* if [ "$1" = doc ] then - doc/Allwmake + doc/Allwmake $* fi # ----------------------------------------------------------------- end-of-file diff --git a/applications/Allwmake b/applications/Allwmake index 00bc326641b1ae1cab5bfec77832e161b8c79d29..7f7ac6718da35486635f1bf6665f989a82fce3ce 100755 --- a/applications/Allwmake +++ b/applications/Allwmake @@ -16,7 +16,7 @@ wmakeCheckPwd "$WM_PROJECT_DIR/applications" || { set -x -wmake all utilities -wmake all solvers +wmake all utilities $* +wmake all solvers $* # ----------------------------------------------------------------- end-of-file diff --git a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H index 109354319ec86260f129ea1b388ac56947d656f2..aaf4620e3c741e69f579556850044fcb9d3e931a 100644 --- a/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H +++ b/applications/solvers/combustion/PDRFoam/PDRModels/XiGModels/basicXiSubG/basicXiSubG.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,8 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::XiGModel::basicSubGrid - + Foam::XiGModels::basicSubGrid Description @@ -39,13 +38,14 @@ Description and the removal: - \f[ - k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}} - \frac{\Xi_{sub}-1}{\Xi_{sub}} \f] + \f[ + - k_{1} /frac{\vert \dwea{\vec{U}} \vert}{L_{sub}} + \frac{\Xi_{sub}-1}{\Xi_{sub}} + \f] Finally, \f$ G_{sub} \f$ is added to generation rate \f$ G_{in} \f$ due to the turbulence. - SourceFiles basicSubGrid.C @@ -64,7 +64,7 @@ namespace XiGModels { /*---------------------------------------------------------------------------*\ - Class basicSubGrid Declaration + Class basicSubGrid Declaration \*---------------------------------------------------------------------------*/ class basicSubGrid diff --git a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H index 4c7095a6edddd5569f13649a8cf536f0583c8426..1a4bb1ec0bde7d7cd63bf8a4cf3fd75e4d0a9260 100644 --- a/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H +++ b/applications/solvers/combustion/PDRFoam/XiModels/XiEqModels/SCOPEXiEq/SCOPEXiEq.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::XiEqModel::SCOPEXiEq + Foam::XiEqModels::SCOPEXiEq Description Simple SCOPEXiEq model for XiEq based on SCOPEXiEqs correlation @@ -120,7 +120,6 @@ public: //- Update properties from given dictionary virtual bool read(const dictionary& XiEqProperties); - }; diff --git a/applications/solvers/combustion/chemFoam/readInitialConditions.H b/applications/solvers/combustion/chemFoam/readInitialConditions.H index b25fd944c50504289bbf0aa801e2204e299c3596..8e340a7e164f73ac2799edc2fff7a77e69a9154b 100644 --- a/applications/solvers/combustion/chemFoam/readInitialConditions.H +++ b/applications/solvers/combustion/chemFoam/readInitialConditions.H @@ -87,7 +87,7 @@ forAll(Y, i) { Y[i] = Y0[i]; - h0 += Y0[i]*specieData[i].Hs(p[i], T0); + h0 += Y0[i]*specieData[i].Hs(p[0], T0); } thermo.he() = dimensionedScalar("h", dimEnergy/dimMass, h0); diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options index 365e64d1b131efbad40267c5bfa19437e3a3c3a6..ca2936633a853b0afc36638ec09517dac2008710 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/Make/options @@ -1,5 +1,8 @@ EXE_INC = \ -I../buoyantBoussinesqSimpleFoam \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ @@ -9,6 +12,8 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lfvOptions \ + -lsampling \ -lmeshTools \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H index 65c92dab513ab65654b36c7ff831c978360ebfd2..76b0ef0168efc036d87d0df0431bea4419ca5249 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/TEqn.H @@ -11,12 +11,18 @@ - fvm::laplacian(alphaEff, T) == radiation->ST(rhoCpRef, T) + + fvOptions(T) ); TEqn.relax(); + + fvOptions.constrain(TEqn); + TEqn.solve(); radiation->correct(); + fvOptions.correct(T); + rhok = 1.0 - beta*(T - TRef); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H index 07f46ec99825398ced8de01a55db2f2b9240ea9a..92768088b95c6a0fa603d85e3bd1754e54486a44 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/UEqn.H @@ -5,10 +5,14 @@ fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U) + == + fvOptions(U) ); UEqn.relax(); + fvOptions.constrain(UEqn); + if (pimple.momentumPredictor()) { solve @@ -23,4 +27,6 @@ )*mesh.magSf() ) ); + + fvOptions.correct(U); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C index 65dda0653e0917f509c141bb2ca45938d046a508..6168082e1de26c7b9f055685ebac0d9348036ec7 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqPimpleFoam/buoyantBoussinesqPimpleFoam.C @@ -48,8 +48,9 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "RASModel.H" -#include "pimpleControl.H" #include "radiationModel.H" +#include "fvIOoptionList.H" +#include "pimpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -61,6 +62,7 @@ int main(int argc, char *argv[]) #include "readGravitationalAcceleration.H" #include "createFields.H" #include "createIncompressibleRadiationModel.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" #include "readTimeControls.H" #include "CourantNo.H" diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options index 6905967f04ab0b07f7601937dec50540637ba628..6a6311e47cd49d05fbec8e81e4e9bd0503a3a701 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/Make/options @@ -1,5 +1,8 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ + -I$(LIB_SRC)/sampling/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ + -I$(LIB_SRC)/fvOptions/lnInclude \ -I$(LIB_SRC)/turbulenceModels \ -I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \ -I$(LIB_SRC)/transportModels \ @@ -7,7 +10,9 @@ EXE_INC = \ EXE_LIBS = \ -lfiniteVolume \ + -lsampling \ -lmeshTools \ + -lfvOptions \ -lincompressibleTurbulenceModel \ -lincompressibleRASModels \ -lincompressibleTransportModels diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H index a0c5d24b2bfdf09e47f82c65d67a1d8dafa2acfd..c495e58285a5366e6d4150ccd8d2d2b473545380 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/TEqn.H @@ -8,10 +8,17 @@ ( fvm::div(phi, T) - fvm::laplacian(alphaEff, T) + == + fvOptions(T) ); TEqn.relax(); + + fvOptions.constrain(TEqn); + TEqn.solve(); + fvOptions.correct(T); + rhok = 1.0 - beta*(T - TRef); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H index cbe464fc0235394649250b6c906387d858b9ba7f..dd516edf2f8ef9613eb9aa4fb57c8396e31d50b8 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/UEqn.H @@ -4,16 +4,20 @@ ( fvm::div(phi, U) + turbulence->divDevReff(U) + == + fvOptions(U) ); UEqn().relax(); + fvOptions.constrain(UEqn()); + if (simple.momentumPredictor()) { solve ( UEqn() - == + == fvc::reconstruct ( ( @@ -22,4 +26,6 @@ )*mesh.magSf() ) ); + + fvOptions.correct(U); } diff --git a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C index 4fc37efd28de3cccf916b810009a8fef36ed0be9..b0d2f98aebf66a1d69d0f55779b09c0560f76dc6 100644 --- a/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C +++ b/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam/buoyantBoussinesqSimpleFoam.C @@ -48,6 +48,7 @@ Description #include "fvCFD.H" #include "singlePhaseTransportModel.H" #include "RASModel.H" +#include "fvIOoptionList.H" #include "simpleControl.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -59,6 +60,7 @@ int main(int argc, char *argv[]) #include "createMesh.H" #include "readGravitationalAcceleration.H" #include "createFields.H" + #include "createFvOptions.H" #include "initContinuityErrs.H" simpleControl simple(mesh); diff --git a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C index 5297be327f2d6fe69f8725f0987f51a1b4c0f4aa..b2cd9ac54e7f208b666fbf528b17e319dcee5bfc 100644 --- a/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C +++ b/applications/solvers/heatTransfer/chtMultiRegionFoam/chtMultiRegionFoam.C @@ -26,21 +26,18 @@ Application Description Combination of heatConductionFoam and buoyantFoam for conjugate heat - transfer between a solid region and fluid region. It includes - porous media in the primary fluid region treated explicitly. + transfer between solid regions and fluid regions. Both regions include + the fvOptions framework. It handles secondary fluid or solid circuits which can be coupled thermally with the main fluid region. i.e radiators, etc. - The secondary fluid region is - \*---------------------------------------------------------------------------*/ #include "fvCFD.H" #include "rhoThermo.H" #include "turbulenceModel.H" #include "fixedGradientFvPatchFields.H" -#include "zeroGradientFvPatchFields.H" #include "regionProperties.H" #include "compressibleCourantNo.H" #include "solidRegionDiffNo.H" diff --git a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C index 000948514ef0ff61699665830a1e557743e315a2..de963fe3b262ed73a4c54c017719226e146232a9 100644 --- a/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C +++ b/applications/solvers/incompressible/pimpleFoam/pimpleFoam.C @@ -30,7 +30,7 @@ Description Sub-models include: - turbulence modelling, i.e. laminar, RAS or LES - - run-time selectable finitie volume options, e.g. MRF, explicit porosity + - run-time selectable finite volume options, e.g. MRF, explicit porosity \*---------------------------------------------------------------------------*/ diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/resetPhiPatches.H b/applications/solvers/incompressible/potentialFreeSurfaceFoam/resetPhiPatches.H deleted file mode 100644 index fe428b6e3bf606c25bacd523196415f6ff618a45..0000000000000000000000000000000000000000 --- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/resetPhiPatches.H +++ /dev/null @@ -1,8 +0,0 @@ -FieldField<fvsPatchField, scalar>& phibf = phi.boundaryField(); -const FieldField<fvPatchField, vector>& Ubf = U.boundaryField(); -const FieldField<fvsPatchField, vector>& Sfbf = mesh.Sf().boundaryField(); - -forAll(phibf, patchI) -{ - phibf[patchI] = (Ubf[patchI] & Sfbf[patchI]); -} diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/files b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/files similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/files rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/files diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/options b/applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/Make/options rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/Make/options diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/UEqn.H rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/UEqn.H diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/createFields.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/createFields.H rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/createFields.H diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H similarity index 88% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H index 888d06a88989e40f736992a85afd058f6b106aaf..11dfa8a5200efcf9e848c25d00844edf9b2a0f41 100644 --- a/applications/solvers/incompressible/potentialFreeSurfaceFoam/pEqn.H +++ b/applications/solvers/multiphase/potentialFreeSurfaceFoam/pEqn.H @@ -1,5 +1,3 @@ -#include "resetPhiPatches.H" - volScalarField rAU(1.0/UEqn().A()); surfaceScalarField rAUf("Dp", fvc::interpolate(rAU)); @@ -22,6 +20,9 @@ adjustPhi(phiHbyA, U, p_gh); fvOptions.relativeFlux(phiHbyA); +// Update the phi BCs from U before p BCs are updated +phi.boundaryField() = mesh.Sf().boundaryField() & U.boundaryField(); + // Non-orthogonal pressure corrector loop while (pimple.correctNonOrthogonal()) { diff --git a/applications/solvers/incompressible/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C b/applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C similarity index 100% rename from applications/solvers/incompressible/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C rename to applications/solvers/multiphase/potentialFreeSurfaceFoam/potentialFreeSurfaceFoam.C diff --git a/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C index a11b78772e22aaca4acd6fe9bd40fb66b2796c4a..2dd7905294c7982708b81b89d4f1735aced73587 100644 --- a/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C +++ b/applications/test/GAMGAgglomeration/Test-GAMGAgglomeration.C @@ -35,116 +35,6 @@ Description #include "meshTools.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -void checkConnectedAgglomeration -( - const lduMesh& mesh, - const labelUList& restrict, - const label nCoarse -) -{ - if (mesh.lduAddr().size() != restrict.size()) - { - FatalErrorIn - ( - "checkConnectedAgglomeration(const lduMesh&, const labelList&)" - ) << "nCells:" << mesh.lduAddr().size() - << " agglom:" << restrict.size() - << abort(FatalError); - } - - // Seed (master) for every region - labelList regionToMaster(nCoarse, -1); - labelList master(mesh.lduAddr().size(), -1); - forAll(restrict, cellI) - { - label region = restrict[cellI]; - if (regionToMaster[region] == -1) - { - // Set cell to be master for region - //Pout<< "For region " << region - // << " allocating local master " << cellI - // << endl; - regionToMaster[region] = cellI; - master[cellI] = cellI; - } - } - - // Now loop and transport master through region - const labelUList& lower = mesh.lduAddr().lowerAddr(); - const labelUList& upper = mesh.lduAddr().upperAddr(); - - while (true) - { - label nChanged = 0; - - forAll(lower, faceI) - { - label own = lower[faceI]; - label nei = upper[faceI]; - - if (restrict[own] == restrict[nei]) - { - // Region-internal face - - if (master[own] != -1) - { - if (master[nei] == -1) - { - master[nei] = master[own]; - nChanged++; - } - else if (master[nei] != master[own]) - { - FatalErrorIn("checkConnectedAgglomeration(..)") - << "problem" << abort(FatalError); - } - } - else if (master[nei] != -1) - { - master[own] = master[nei]; - nChanged++; - } - } - } - - reduce(nChanged, sumOp<label>()); - - if (nChanged == 0) - { - break; - } - } - - // Check that master is set for all cells - boolList singleRegion(nCoarse, true); - label nSet = nCoarse; - forAll(master, cellI) - { - if (master[cellI] == -1) - { - label region = restrict[cellI]; - if (singleRegion[region] == true) - { - singleRegion[region] = false; - nSet--; - } - } - } - - label totalNCoarse = returnReduce(nCoarse, sumOp<label>()); - label totalNVisited = returnReduce(nSet, sumOp<label>()); - - if (totalNVisited < totalNCoarse) - { - WarningIn("checkConnectedAgglomeration(..)") - << "out of " << totalNCoarse - << " agglomerated cells have " << totalNCoarse-totalNVisited - << " cells that are not a single connected region" << endl; - } -} - - // Main program: int main(int argc, char *argv[]) @@ -227,12 +117,28 @@ int main(int argc, char *argv[]) << " agglomerated size : " << returnReduce(coarseSize, sumOp<label>()) << endl; - checkConnectedAgglomeration + labelList newAddr; + label newCoarseSize = 0; + bool ok = GAMGAgglomeration::checkRestriction ( - agglom.meshLevel(level), + newAddr, + newCoarseSize, + + agglom.meshLevel(level).lduAddr(), addr, coarseSize ); + if (!ok) + { + WarningIn(args.executable()) + << "At level " << level + << " there are " << coarseSize + << " agglomerated cells but " << newCoarseSize + << " disconnected regions" << endl + << " This means that some agglomerations (coarse cells)" + << " consist of multiple disconnected regions." + << endl; + } forAll(addr, fineI) diff --git a/applications/test/Matrix/Test-Matrix.C b/applications/test/Matrix/Test-Matrix.C index 9663ae82174efaeba5ae64f9b3406814f3bb6157..380576d695a1c19ea68362ce2576f8589e7e846d 100644 --- a/applications/test/Matrix/Test-Matrix.C +++ b/applications/test/Matrix/Test-Matrix.C @@ -116,17 +116,19 @@ int main(int argc, char *argv[]) squareMatrix[2][1] = -43; squareMatrix[2][2] = 98; + const scalarSquareMatrix squareMatrixCopy = squareMatrix; Info<< nl << "Square Matrix = " << squareMatrix << endl; - scalarDiagonalMatrix rhs(3, 0); - rhs[0] = 1; - rhs[1] = 2; - rhs[2] = 3; + Info<< "det = " << det(squareMatrixCopy) << endl; - LUsolve(squareMatrix, rhs); + labelList rhs(3, 0); + label sign; + LUDecompose(squareMatrix, rhs, sign); Info<< "Decomposition = " << squareMatrix << endl; - Info<< "Solution = " << rhs << endl; + Info<< "Pivots = " << rhs << endl; + Info<< "Sign = " << sign << endl; + Info<< "det = " << detDecomposed(squareMatrix, sign) << endl; } Info<< "\nEnd\n" << endl; diff --git a/applications/utilities/mesh/generation/Allwmake b/applications/utilities/mesh/generation/Allwmake index 55623189f56b745b1bfa50a5bced9fdf19b566b7..8d8fa4ea77bef0ce1f89b23426ce6b3391c4829f 100755 --- a/applications/utilities/mesh/generation/Allwmake +++ b/applications/utilities/mesh/generation/Allwmake @@ -12,7 +12,7 @@ wmake snappyHexMesh if [ -d "$CGAL_ARCH_PATH" ] then foamyHexMesh/Allwmake - foamyHex2DMesh/Allwmake + foamyQuadMesh/Allwmake fi # ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C index 34f97162852a3deda8ff73ca112603abdc93009e..e87f64bc30a36963458a0c20e0a2a5cefbd83c1b 100644 --- a/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C +++ b/applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/extrudeToRegionMesh.C @@ -1783,7 +1783,7 @@ int main(int argc, char *argv[]) { extrudeMeshShadowFaces[nShadowFaces] = fz[j]; zoneShadowFlipMap[nShadowFaces] = fz.flipMap()[j]; - zoneShadowID[nShadowFaces] = zoneShadowIDs[i]; + zoneShadowID[nShadowFaces] = i; nShadowFaces++; } } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C index 00aa92630fcafe1d853c3208508484f7f10c9427..d78011c9db4ce3fbb157feffd44999abe19cdace 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.C @@ -26,6 +26,10 @@ License #include "DelaunayMesh.H" #include "labelPair.H" #include "PrintTable.H" +#include "pointIOField.H" +#include "scalarIOField.H" +#include "labelIOField.H" +#include "pointConversion.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -36,14 +40,121 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Triangulation> -Foam::DelaunayMesh<Triangulation>::DelaunayMesh() +Foam::DelaunayMesh<Triangulation>::DelaunayMesh(const Time& runTime) : Triangulation(), vertexCount_(0), - cellCount_(0) + cellCount_(0), + runTime_(runTime) {} +template<class Triangulation> +Foam::DelaunayMesh<Triangulation>::DelaunayMesh +( + const Time& runTime, + const word& meshName +) +: + Triangulation(), + vertexCount_(0), + cellCount_(0), + runTime_(runTime) +{ + pointIOField pts + ( + IOobject + ( + "points", + runTime.timeName(), + meshName/polyMesh::meshSubDir, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + labelIOField types + ( + IOobject + ( + "types", + runTime.timeName(), + meshName, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + labelIOField indices + ( + IOobject + ( + "indices", + runTime.timeName(), + meshName, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + labelIOField processorIndices + ( + IOobject + ( + "processorIndices", + runTime.timeName(), + meshName, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + if (pts.headerOk()) + { + forAll(pts, ptI) + { + Vertex_handle vh = this->insert(toPoint<Point>(pts[ptI])); + + if (indices.headerOk()) + { + vh->index() = indices[ptI]; + vertexCount()++; + } + else + { + vh->index() = getNewVertexIndex(); + } + + if (processorIndices.headerOk()) + { + vh->procIndex() = processorIndices[ptI]; + } + else + { + vh->procIndex() = Pstream::myProcNo(); + } + + if (types.headerOk()) + { + vh->type() = + static_cast<Foam::indexedVertexEnum::vertexType> + ( + types[ptI] + ); + } + else + { + vh->type() = Vb::vtUnassigned; + } + } + } +} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // template<class Triangulation> diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H index 383ee64baeeef0862b92aa70faa8fd1a5c9d65e9..1fbf19c1d6957cdc69fabcf678fd13071faac0f8 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMesh.H @@ -43,6 +43,7 @@ SourceFiles #include "boundBox.H" #include "indexedVertex.H" #include "CGALTriangulation3Ddefs.H" +#include "Time.H" #include "autoPtr.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -82,6 +83,12 @@ public: FixedList<label, 2>::Hash<> > labelPairHashSet; + typedef HashTable + < + label, + labelPair, + FixedList<label, 2>::Hash<> + > labelTolabelPairHashTable; private: @@ -95,6 +102,9 @@ private: // This allows a unique index to be assigned to each cell. mutable label cellCount_; + //- Reference to Time + const Time& runTime_; + //- Spatial sort traits to use with a pair of point pointers and an int. // Taken from a post on the CGAL lists: 2010-01/msg00004.html by // Sebastien Loriot (Geometry Factory). @@ -159,7 +169,13 @@ public: // Constructors //- Construct from components - DelaunayMesh(); + explicit DelaunayMesh(const Time& runTime); + + DelaunayMesh + ( + const Time& runTime, + const word& meshName + ); //- Destructor @@ -168,6 +184,14 @@ public: // Member Functions + inline const Time& time() const; + + inline void timeCheck + ( + const string& description, + const bool check = true + ) const; + inline label getNewVertexIndex() const; inline label getNewCellIndex() const; @@ -177,6 +201,7 @@ public: inline void resetCellCount(); inline label vertexCount() const; + inline label& vertexCount(); inline void resetVertexCount(); @@ -209,12 +234,12 @@ public: //- Create an fvMesh from the triangulation. // The mesh is not parallel consistent - only used for viewing - autoPtr<fvMesh> createMesh + autoPtr<polyMesh> createMesh ( const fileName& name, - const Time& runTime, - labelList& vertexMap, - labelList& cellMap + labelTolabelPairHashTable& vertexMap, + labelList& cellMap, + const bool writeDelaunayData = true ) const; }; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H index 733f1230f7202e774321b5c9e325aa4f45a74857..bf2277e356da608452c1b3c47cf8db1d90bc2a08 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshI.H @@ -36,6 +36,40 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // +template<class Triangulation> +inline const Foam::Time& Foam::DelaunayMesh<Triangulation>::time() const +{ + return runTime_; +} + + +template<class Triangulation> +void Foam::DelaunayMesh<Triangulation>::timeCheck +( + const string& description, + const bool check +) const +{ + if (check) + { + Info<< nl << "--- [ cpuTime " + << time().elapsedCpuTime() << " s, " + << "delta " << time().cpuTimeIncrement()<< " s"; + + if (description != word::null) + { + Info<< ", " << description << " "; + } + else + { + Info<< " "; + } + + Info<< "] --- " << endl; + } +} + + template<class Triangulation> inline Foam::label Foam::DelaunayMesh<Triangulation>::getNewVertexIndex() const { @@ -90,6 +124,12 @@ Foam::label Foam::DelaunayMesh<Triangulation>::vertexCount() const return vertexCount_; } +template<class Triangulation> +Foam::label& Foam::DelaunayMesh<Triangulation>::vertexCount() +{ + return vertexCount_; +} + template<class Triangulation> void Foam::DelaunayMesh<Triangulation>::resetVertexCount() diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C index bed42012cf7981ca2db868cadecf1ea86f35563e..1a341348b1a1d948a31a195672f888d515e871d9 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DelaunayMeshIO.C @@ -28,6 +28,7 @@ License #include "pointConversion.H" #include "wallPolyPatch.H" #include "processorPolyPatch.H" +#include "labelIOField.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -331,13 +332,13 @@ void Foam::DelaunayMesh<Triangulation>::printVertexInfo(Ostream& os) const template<class Triangulation> -Foam::autoPtr<Foam::fvMesh> +Foam::autoPtr<Foam::polyMesh> Foam::DelaunayMesh<Triangulation>::createMesh ( const fileName& name, - const Time& runTime, - labelList& vertexMap, - labelList& cellMap + labelTolabelPairHashTable& vertexMap, + labelList& cellMap, + const bool writeDelaunayData ) const { pointField points(Triangulation::number_of_vertices()); @@ -354,12 +355,54 @@ Foam::DelaunayMesh<Triangulation>::createMesh List<DynamicList<face> > patchFaces(1, DynamicList<face>()); List<DynamicList<label> > patchOwners(1, DynamicList<label>()); - vertexMap.setSize(vertexCount(), -1); + vertexMap.resize(vertexCount()); cellMap.setSize(Triangulation::number_of_finite_cells(), -1); // Calculate pts and a map of point index to location in pts. label vertI = 0; + labelIOField indices + ( + IOobject + ( + "indices", + time().timeName(), + name, + time(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Triangulation::number_of_vertices() + ); + + labelIOField types + ( + IOobject + ( + "types", + time().timeName(), + name, + time(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Triangulation::number_of_vertices() + ); + + labelIOField processorIndices + ( + IOobject + ( + "processorIndices", + time().timeName(), + name, + time(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + Triangulation::number_of_vertices() + ); + for ( Finite_vertices_iterator vit = Triangulation::finite_vertices_begin(); @@ -369,13 +412,20 @@ Foam::DelaunayMesh<Triangulation>::createMesh { if (!vit->farPoint()) { - vertexMap[vit->index()] = vertI; + vertexMap(labelPair(vit->index(), vit->procIndex())) = vertI; points[vertI] = topoint(vit->point()); + indices[vertI] = vit->index(); + types[vertI] = static_cast<label>(vit->type()); + processorIndices[vertI] = vit->procIndex(); vertI++; } } points.setSize(vertI); + indices.setSize(vertI); + types.setSize(vertI); + processorIndices.setSize(vertI); + // Index the cells label cellI = 0; @@ -391,6 +441,7 @@ Foam::DelaunayMesh<Triangulation>::createMesh ( !cit->hasFarPoint() && !Triangulation::is_infinite(cit) + && cit->real() ) { cellMap[cit->cellIndex()] = cellI++; @@ -424,7 +475,12 @@ Foam::DelaunayMesh<Triangulation>::createMesh label c1I = Cb::ctFar; bool c1Real = false; - if (!c1->hasFarPoint() && !Triangulation::is_infinite(c1)) + if + ( + !c1->hasFarPoint() + && !Triangulation::is_infinite(c1) + && c1->real() + ) { c1I = cellMap[c1->cellIndex()]; c1Real = true; @@ -432,7 +488,12 @@ Foam::DelaunayMesh<Triangulation>::createMesh label c2I = Cb::ctFar; bool c2Real = false; - if (!c2->hasFarPoint() && !Triangulation::is_infinite(c2)) + if + ( + !c2->hasFarPoint() + && !Triangulation::is_infinite(c2) + && c2->real() + ) { c2I = cellMap[c2->cellIndex()]; c2Real = true; @@ -451,10 +512,17 @@ Foam::DelaunayMesh<Triangulation>::createMesh { verticesOnTriFace[i] = vertexMap [ - c1->vertex + labelPair ( - Triangulation::vertex_triple_index(oppositeVertex, i) - )->index() + c1->vertex + ( + Triangulation::vertex_triple_index(oppositeVertex, i) + )->index(), + c1->vertex + ( + Triangulation::vertex_triple_index(oppositeVertex, i) + )->procIndex() + ) ]; } @@ -524,15 +592,15 @@ Foam::DelaunayMesh<Triangulation>::createMesh Info<< "Creating mesh" << endl; - autoPtr<fvMesh> meshPtr + autoPtr<polyMesh> meshPtr ( - new fvMesh + new polyMesh ( IOobject ( name, - runTime.timeName(), - runTime, + time().timeName(), + time(), IOobject::NO_READ, IOobject::NO_WRITE ), @@ -565,7 +633,14 @@ Foam::DelaunayMesh<Triangulation>::createMesh patches.setSize(nValidPatches); - meshPtr().addFvPatches(patches); + meshPtr().addPatches(patches); + + if (writeDelaunayData) + { + indices.write(); + types.write(); + processorIndices.write(); + } Info<< "Mesh created" << endl; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C index 277ed8caf2b96d2e0a33a086435d8d9375f8a4d6..4f7a07fab92de412ec0b49d0534e93dbf6a9c2f4 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.C @@ -126,9 +126,24 @@ Foam::DistributedDelaunayMesh<Triangulation>::buildMap // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // template<class Triangulation> -Foam::DistributedDelaunayMesh<Triangulation>::DistributedDelaunayMesh() +Foam::DistributedDelaunayMesh<Triangulation>::DistributedDelaunayMesh +( + const Time& runTime +) +: + DelaunayMesh<Triangulation>(runTime), + allBackgroundMeshBounds_() +{} + + +template<class Triangulation> +Foam::DistributedDelaunayMesh<Triangulation>::DistributedDelaunayMesh +( + const Time& runTime, + const word& meshName +) : - DelaunayMesh<Triangulation>(), + DelaunayMesh<Triangulation>(runTime, meshName), allBackgroundMeshBounds_() {} @@ -254,6 +269,60 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells /Pstream::nProcs() ); +// std::list<Cell_handle> infinite_cells; +// Triangulation::incident_cells +// ( +// Triangulation::infinite_vertex(), +// std::back_inserter(infinite_cells) +// ); +// +// for +// ( +// typename std::list<Cell_handle>::iterator vcit +// = infinite_cells.begin(); +// vcit != infinite_cells.end(); +// ++vcit +// ) +// { +// Cell_handle cit = *vcit; +// +// // Index of infinite vertex in this cell. +// int i = cit->index(Triangulation::infinite_vertex()); +// +// Cell_handle c = cit->neighbor(i); +// +// if (c->unassigned()) +// { +// c->cellIndex() = this->getNewCellIndex(); +// +// if (checkProcBoundaryCell(c, circumsphereOverlaps)) +// { +// cellToCheck.insert(c->cellIndex()); +// } +// } +// } +// +// +// for +// ( +// Finite_cells_iterator cit = Triangulation::finite_cells_begin(); +// cit != Triangulation::finite_cells_end(); +// ++cit +// ) +// { +// if (cit->parallelDualVertex()) +// { +// if (cit->unassigned()) +// { +// if (checkProcBoundaryCell(cit, circumsphereOverlaps)) +// { +// cellToCheck.insert(cit->cellIndex()); +// } +// } +// } +// } + + for ( All_cells_iterator cit = Triangulation::all_cells_begin(); @@ -315,12 +384,20 @@ void Foam::DistributedDelaunayMesh<Triangulation>::findProcessorBoundaryCells continue; } - checkProcBoundaryCell + if ( - citNeighbor, - circumsphereOverlaps - ); + checkProcBoundaryCell + ( + citNeighbor, + circumsphereOverlaps + ) + ) + { + cellToCheck.insert(citNeighbor->cellIndex()); + } } + + cellToCheck.unset(cit->cellIndex()); } } } @@ -521,7 +598,6 @@ Foam::label Foam::DistributedDelaunayMesh<Triangulation>::referVertices << originalParallelVertices[vI].procIndex() << " " << originalParallelVertices[vI].index() << endl; } - } } } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H index 1eaa483c74ba9965c84368d1797b97b6c6e11b7c..c2acbf8a089476fc8e85c4034e52d965843bcbd2 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/DelaunayMesh/DistributedDelaunayMesh.H @@ -135,13 +135,25 @@ public: // Constructors //- Construct from components - DistributedDelaunayMesh(); + explicit DistributedDelaunayMesh(const Time& runTime); + + DistributedDelaunayMesh + ( + const Time& runTime, + const word& meshName + ); //- Destructor ~DistributedDelaunayMesh(); + // Queries + + //- Use DelaunayMesh timeCheck function + using DelaunayMesh<Triangulation>::timeCheck; + + // Member Functions //- Build a mapDistribute for the supplied destination processor data diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C index a9770b50dac866981519df8a64ed91af4d6622d0..e14100cd0039c9d51059788051eadf6c0c7acda6 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/backgroundMeshDecomposition/backgroundMeshDecomposition.C @@ -791,10 +791,11 @@ Foam::backgroundMeshDecomposition::backgroundMeshDecomposition ( IOobject ( - fvMesh::defaultRegion, + "backgroundMeshDecomposition", runTime_.timeName(), runTime_, - IOobject::MUST_READ + IOobject::MUST_READ, + IOobject::AUTO_WRITE ) ), meshCutter_ diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C index 42e8a161f911eebc9c26f1104d977357b45e4463..52d14633b4312341aa6acc2bf8c12cc5c074a0cd 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.C @@ -27,7 +27,7 @@ License #include "cellSizeAndAlignmentControls.H" #include "pointIOField.H" #include "scalarIOField.H" -#include "tensorIOField.H" +#include "triadIOField.H" #include "tetrahedron.H" #include "plane.H" #include "transform.H" @@ -38,6 +38,8 @@ License namespace Foam { defineTypeNameAndDebug(cellShapeControlMesh, 0); + +word cellShapeControlMesh::meshSubDir = "cellShapeControlMesh"; } @@ -366,9 +368,89 @@ void Foam::cellShapeControlMesh::writeTriangulation() Foam::cellShapeControlMesh::cellShapeControlMesh(const Time& runTime) : + DistributedDelaunayMesh<CellSizeDelaunay> + ( + runTime, + meshSubDir + ), runTime_(runTime), defaultCellSize_(0.0) -{} +{ + if (this->vertexCount()) + { + fvMesh mesh + ( + IOobject + ( + meshSubDir, + runTime.timeName(), + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ) + ); + + if (mesh.nPoints() == this->vertexCount()) + { + pointScalarField sizes + ( + IOobject + ( + "sizes", + runTime.timeName(), + meshSubDir, + runTime, + IOobject::READ_IF_PRESENT, + IOobject::NO_WRITE + ), + pointMesh::New(mesh) + ); + + triadIOField alignments + ( + IOobject + ( + "alignments", + mesh.time().timeName(), + meshSubDir, + mesh.time(), + IOobject::READ_IF_PRESENT, + IOobject::AUTO_WRITE + ) + ); + + if + ( + sizes.size() == this->vertexCount() + && alignments.size() == this->vertexCount() + ) + { + label count = 0; + for + ( + Finite_vertices_iterator vit = finite_vertices_begin(); + vit != finite_vertices_end(); + ++vit + ) + { + vit->targetCellSize() = sizes[count]; + vit->alignment() = alignments[count]; + count++; + } + } + else + { + FatalErrorIn + ( + "Foam::cellShapeControlMesh::cellShapeControlMesh" + "(const Time&)" + ) << "Cell size point field is not the same size as the " + << "mesh." + << abort(FatalError); + } + } + } +} //Foam::triangulatedMesh::triangulatedMesh @@ -744,9 +826,7 @@ void Foam::cellShapeControlMesh::insertBoundingPoints void Foam::cellShapeControlMesh::write() const { - Info<< "Writing cell size and alignment mesh" << endl; - - const fileName name("cellSizeAndAlignmentMesh"); + Info<< "Writing " << meshSubDir << endl; // Reindex the cells label cellCount = 0; @@ -763,17 +843,16 @@ void Foam::cellShapeControlMesh::write() const } } - labelList vertexMap; + DelaunayMesh<CellSizeDelaunay>::labelTolabelPairHashTable vertexMap; labelList cellMap; - autoPtr<fvMesh> meshPtr = DelaunayMesh<CellSizeDelaunay>::createMesh + autoPtr<polyMesh> meshPtr = DelaunayMesh<CellSizeDelaunay>::createMesh ( - name, - runTime_, + meshSubDir, vertexMap, cellMap ); - const fvMesh& mesh = meshPtr(); + const polyMesh& mesh = meshPtr(); pointScalarField sizes ( @@ -781,7 +860,8 @@ void Foam::cellShapeControlMesh::write() const ( "sizes", mesh.time().timeName(), - mesh, + meshSubDir, + mesh.time(), IOobject::NO_READ, IOobject::AUTO_WRITE ), @@ -789,7 +869,22 @@ void Foam::cellShapeControlMesh::write() const scalar(0) ); - OFstream str(runTime_.path()/"alignments.obj"); + triadIOField alignments + ( + IOobject + ( + "alignments", + mesh.time().timeName(), + meshSubDir, + mesh.time(), + IOobject::NO_READ, + IOobject::AUTO_WRITE + ), + sizes.size() + ); + + // Write alignments +// OFstream str(runTime_.path()/"alignments.obj"); for ( @@ -801,35 +896,41 @@ void Foam::cellShapeControlMesh::write() const if (!vit->farPoint()) { // Populate sizes - sizes[vertexMap[vit->index()]] = vit->targetCellSize(); - - // Write alignments - const tensor& alignment = vit->alignment(); - pointFromPoint pt = topoint(vit->point()); - - if - ( - alignment.x() == triad::unset[0] - || alignment.y() == triad::unset[0] - || alignment.z() == triad::unset[0] - ) - { - Info<< "Bad alignment = " << vit->info(); + sizes[vertexMap[labelPair(vit->index(), vit->procIndex())]] = + vit->targetCellSize(); - vit->alignment() = tensor::I; + alignments[vertexMap[labelPair(vit->index(), vit->procIndex())]] = + vit->alignment(); - Info<< "New alignment = " << vit->info(); - - continue; - } - - meshTools::writeOBJ(str, pt, alignment.x() + pt); - meshTools::writeOBJ(str, pt, alignment.y() + pt); - meshTools::writeOBJ(str, pt, alignment.z() + pt); +// // Write alignments +// const tensor& alignment = vit->alignment(); +// pointFromPoint pt = topoint(vit->point()); +// +// if +// ( +// alignment.x() == triad::unset[0] +// || alignment.y() == triad::unset[0] +// || alignment.z() == triad::unset[0] +// ) +// { +// Info<< "Bad alignment = " << vit->info(); +// +// vit->alignment() = tensor::I; +// +// Info<< "New alignment = " << vit->info(); +// +// continue; +// } +// +// meshTools::writeOBJ(str, pt, alignment.x() + pt); +// meshTools::writeOBJ(str, pt, alignment.y() + pt); +// meshTools::writeOBJ(str, pt, alignment.z() + pt); } } mesh.write(); + sizes.write(); + alignments.write(); } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.H index effb7ee4482289d239b9ee40d409af6f5316522d..e6af5bde0f6520065df2c8b264cb1aa3461e71a1 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/cellShapeControlMesh/cellShapeControlMesh.H @@ -95,6 +95,9 @@ public: //- Runtime type information ClassName("cellShapeControlMesh"); + //- Return the mesh sub-directory name (usually "cellShapeControlMesh") + static word meshSubDir; + // Constructors diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.C index 8d4cac11ba2ec90cf08bb519de5f11aa359fb725..5a4b0c785a8b4821f40d45063975ee8ce605f324 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cellShapeControl/controlMeshRefinement/controlMeshRefinement.C @@ -223,6 +223,13 @@ void Foam::controlMeshRefinement::initialMeshPopulation const autoPtr<backgroundMeshDecomposition>& decomposition ) { + if (shapeController_.shapeControlMesh().vertexCount() > 0) + { + // Mesh already populated. + Info<< "Cell size and alignment mesh already populated." << endl; + return; + } + autoPtr<boundBox> overallBoundBox; // Need to pass in the background mesh decomposition so that can test if @@ -268,7 +275,7 @@ void Foam::controlMeshRefinement::initialMeshPopulation controlFunction.initialVertices(pts, sizes, alignments); - Info<< " Got initial vertices list" << endl; + Info<< " Got initial vertices list of size " << pts.size() << endl; List<Vb> vertices(pts.size()); diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C index 3331268257070aa3b8f96af05c668b980bdfef99..0c983bfdd8c30eb9acdd8568ccabaa8321589e40 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.C @@ -194,12 +194,24 @@ void Foam::conformalVoronoiMesh::insertPoints } } + label preReinsertionSize(number_of_vertices()); + rangeInsertWithInfo ( vertices.begin(), vertices.end(), - true + false + ); + + const label nReinserted = returnReduce + ( + label(number_of_vertices()) - preReinsertionSize, + sumOp<label>() ); + + Info<< " Reinserted " << nReinserted << " vertices out of " + << returnReduce(vertices.size(), sumOp<label>()) + << endl; } @@ -787,8 +799,8 @@ Foam::face Foam::conformalVoronoiMesh::buildDualFace << "Dual face uses circumcenter defined by a " << "Delaunay tetrahedron with no internal " << "or boundary points. Defining Delaunay edge ends: " - << topoint(vA->point()) << " " - << topoint(vB->point()) << nl + << vA->info() << " " + << vB->info() << nl << exit(FatalError); } @@ -969,7 +981,7 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh const dictionary& foamyHexMeshDict ) : - DistributedDelaunayMesh<Delaunay>(), + DistributedDelaunayMesh<Delaunay>(runTime), runTime_(runTime), rndGen_(64293*Pstream::myProcNo()), foamyHexMeshControls_(foamyHexMeshDict), @@ -1034,6 +1046,18 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh ) ), decomposition_() +{} + + +// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // + +Foam::conformalVoronoiMesh::~conformalVoronoiMesh() +{} + + +// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // + +void Foam::conformalVoronoiMesh::initialiseForMotion() { if (foamyHexMeshControls().objOutput()) { @@ -1049,7 +1073,10 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh runTime_, rndGen_, geometryToConformTo_, - foamyHexMeshDict.subDict("backgroundMeshDecomposition") + foamyHexMeshControls().foamyHexMeshDict().subDict + ( + "backgroundMeshDecomposition" + ) ) ); } @@ -1108,18 +1135,56 @@ Foam::conformalVoronoiMesh::conformalVoronoiMesh Foam::indexedVertexEnum::vtExternalFeaturePoint ); } - - //writeFixedPoints("fixedPointsStart.obj"); } -// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // +void Foam::conformalVoronoiMesh::initialiseForConformation() +{ + if (Pstream::parRun()) + { + decomposition_.reset + ( + new backgroundMeshDecomposition + ( + runTime_, + rndGen_, + geometryToConformTo_, + foamyHexMeshControls().foamyHexMeshDict().subDict + ( + "backgroundMeshDecomposition" + ) + ) + ); + } -Foam::conformalVoronoiMesh::~conformalVoronoiMesh() -{} + insertInitialPoints(); + insertFeaturePoints(); + + // Improve the guess that the backgroundMeshDecomposition makes with the + // initial positions. Use before building the surface conformation to + // better balance the surface conformation load. + distributeBackground(*this); + + buildSurfaceConformation(); + + // The introduction of the surface conformation may have distorted the + // balance of vertices, distribute if necessary. + distributeBackground(*this); + + if (Pstream::parRun()) + { + sync(decomposition_().procBounds()); + } + + cellSizeMeshOverlapsBackground(); + + if (foamyHexMeshControls().printVertexInfo()) + { + printVertexInfo(Info); + } +} -// * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // void Foam::conformalVoronoiMesh::move() { @@ -1630,6 +1695,8 @@ void Foam::conformalVoronoiMesh::move() ); } + DynamicList<Vertex_handle> pointsToRemove; + for ( Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); @@ -1640,15 +1707,18 @@ void Foam::conformalVoronoiMesh::move() if ( (vit->internalPoint() || vit->internalBoundaryPoint()) - && !vit->referred() + //&& !vit->referred() ) { - bool inside = geometryToConformTo_.inside - ( - topoint(vit->point()) - ); + const Foam::point& pt = topoint(vit->point()); + + bool inside = geometryToConformTo_.inside(pt); - if (!inside) + if + ( + !inside + || !geometryToConformTo_.globalBounds().contains(pt) + ) { if ( @@ -1658,13 +1728,16 @@ void Foam::conformalVoronoiMesh::move() { str().write(topoint(vit->point())); } - remove(vit); + + pointsToRemove.append(vit); internalPtIsOutside++; } } } - Info<< " " << internalPtIsOutside + remove(pointsToRemove.begin(), pointsToRemove.end()); + + Info<< " " << returnReduce(internalPtIsOutside, sumOp<label>()) << " internal points were inserted outside the domain. " << "They have been removed." << endl; } @@ -1739,32 +1812,6 @@ void Foam::conformalVoronoiMesh::move() if (time().outputTime()) { writeMesh(time().timeName()); - -// label cellI = 0; -// for -// ( -// Finite_cells_iterator cit = finite_cells_begin(); -// cit != finite_cells_end(); -// ++cit -// ) -// { -// if -// ( -// !cit->hasFarPoint() -// && !is_infinite(cit) -// ) -// { -// cit->cellIndex() = cellI++; -// } -// } -// -// labelList vertexMap; -// labelList cellMap; -// autoPtr<fvMesh> tetMesh = -// createMesh("tetMesh", runTime_, vertexMap, cellMap); -// -// tetMesh().write(); - //writeFixedPoints("fixedPointsStart_" + runTime_.timeName() + ".obj"); } updateSizesAndAlignments(pointsToInsert); diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H index c361819bbc75ced1f9ca37361cd694792dcc85dd..15b2bd485946cfef43e491bbf021684b08a678c1 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMesh.H @@ -317,7 +317,7 @@ private: void insertPoints ( List<Vb>& vertices, - bool distribute = true + bool distribute ); //- Create a point-pair at a ppDist distance either side of @@ -734,7 +734,8 @@ private: //- edge conformation location bool nearFeatureEdgeLocation ( - pointIndexHit& pHit + const pointIndexHit& pHit, + pointIndexHit& nearestEdgeHit ) const; //- Build or rebuild the edge location tree @@ -764,6 +765,7 @@ private: pointIndexHitAndFeatureDynList& featureEdgeHits, DynamicList<label>& surfaceToTreeShape, DynamicList<label>& edgeToTreeShape, + Map<scalar>& surfacePtToEdgePtDist, bool firstPass ) const; @@ -1037,6 +1039,10 @@ public: // Member Functions + void initialiseForMotion(); + + void initialiseForConformation(); + //- Move the vertices according to the controller, re-conforming to the // surface as required void move(); diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C index c82dbc094fe2d4f31489e4de6a761453cfc3e059..b5810855dfb1e6a652f607d522c5e4baadc70d60 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshCalcDualMesh.C @@ -1787,6 +1787,11 @@ void Foam::conformalVoronoiMesh::indexDualVertices } } + OBJstream snapping1("snapToSurface1.obj"); + OBJstream snapping2("snapToSurface2.obj"); + OFstream tetToSnapTo("tetsToSnapTo.obj"); + label offset = 0; + for ( Delaunay::Finite_cells_iterator cit = finite_cells_begin(); @@ -1892,6 +1897,88 @@ void Foam::conformalVoronoiMesh::indexDualVertices } } +// { +// // Snapping points far outside +// if (cit->boundaryDualVertex() && !cit->parallelDualVertex()) +// { +// pointFromPoint dual = cit->dual(); +// +// pointIndexHit hitInfo; +// label surfHit; +// +// // Find nearest surface point +// geometryToConformTo_.findSurfaceNearest +// ( +// dual, +// sqr(targetCellSize(dual)), +// hitInfo, +// surfHit +// ); +// +// if (!hitInfo.hit()) +// { +// // Project dual to nearest point on tet +// +// tetPointRef tet +// ( +// topoint(cit->vertex(0)->point()), +// topoint(cit->vertex(1)->point()), +// topoint(cit->vertex(2)->point()), +// topoint(cit->vertex(3)->point()) +// ); +// +// pointFromPoint nearestPointOnTet = +// tet.nearestPoint(dual).rawPoint(); +// +// // Get nearest point on surface from tet. +// geometryToConformTo_.findSurfaceNearest +// ( +// nearestPointOnTet, +// sqr(targetCellSize(nearestPointOnTet)), +// hitInfo, +// surfHit +// ); +// +// vector snapDir = nearestPointOnTet - dual; +// snapDir /= mag(snapDir) + SMALL; +// +// drawDelaunayCell(tetToSnapTo, cit, offset); +// offset += 1; +// +// vectorField norm(1); +// allGeometry_[surfHit].getNormal +// ( +// List<pointIndexHit>(1, hitInfo), +// norm +// ); +// norm[0] /= mag(norm[0]) + SMALL; +// +// if +// ( +// hitInfo.hit() +// && (mag(snapDir & norm[0]) > 0.5) +// ) +// { +// snapping1.write +// ( +// linePointRef(dual, nearestPointOnTet) +// ); +// +// snapping2.write +// ( +// linePointRef +// ( +// nearestPointOnTet, +// hitInfo.hitPoint() +// ) +// ); +// +// pts[cit->cellIndex()] = hitInfo.hitPoint(); +// } +// } +// } +// } + if (cit->boundaryDualVertex()) { if (cit->featureEdgeDualVertex()) @@ -2458,6 +2545,54 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches || (vB->internalOrBoundaryPoint() && !vB->referred()) ) { + if + ( + (vA->internalPoint() && vB->externalBoundaryPoint()) + || (vB->internalPoint() && vA->externalBoundaryPoint()) + ) + { + Cell_circulator ccStart = incident_cells(*eit); + Cell_circulator cc1 = ccStart; + Cell_circulator cc2 = cc1; + + cc2++; + + bool skipEdge = false; + + do + { + if + ( + cc1->hasFarPoint() || cc2->hasFarPoint() + || is_infinite(cc1) || is_infinite(cc2) + ) + { + Pout<< "Ignoring edge between internal and external: " + << vA->info() + << vB->info(); + + skipEdge = true; + break; + } + + cc1++; + cc2++; + + } while (cc1 != ccStart); + + + // Do not create faces if the internal point is outside! + // This occurs because the internal point is not determined to + // be outside in the inside/outside test. This is most likely + // due to the triangle.nearestPointClassify test not returning + // edge/point as the nearest type. + + if (skipEdge) + { + continue; + } + } + face newDualFace = buildDualFace(eit); if (newDualFace.size() >= 3) @@ -2673,7 +2808,7 @@ void Foam::conformalVoronoiMesh::createFacesOwnerNeighbourAndPatches patchPointPairSlaves[patchI].transfer(patchPPSlaves[patchI]); } -// if (foamyHexMeshControls().objOutput()) + if (foamyHexMeshControls().objOutput()) { Info<< "Writing processor interfaces" << endl; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C index da1c31dc69de5d09a95153b43366a10ae05cd087..cb60543a6b108836053d6f75ff7acaadbd8c4dfb 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshConformToSurface.C @@ -298,6 +298,8 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation() DynamicList<label> edgeToTreeShape(AtoV/4); DynamicList<label> surfaceToTreeShape(AtoV); + Map<scalar> surfacePtToEdgePtDist(AtoV/4); + for ( Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); @@ -332,6 +334,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation() featureEdgeHits, surfaceToTreeShape, edgeToTreeShape, + surfacePtToEdgePtDist, true ); } @@ -463,6 +466,8 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation() DynamicList<label> surfaceToTreeShape(AtoV/2); DynamicList<label> edgeToTreeShape(AtoV/4); + Map<scalar> surfacePtToEdgePtDist; + for ( Delaunay::Finite_vertices_iterator vit = finite_vertices_begin(); @@ -507,6 +512,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation() featureEdgeHits, surfaceToTreeShape, edgeToTreeShape, + surfacePtToEdgePtDist, false ); } @@ -552,6 +558,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation() featureEdgeHits, surfaceToTreeShape, edgeToTreeShape, + surfacePtToEdgePtDist, false ); } @@ -569,7 +576,20 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation() Vertex_handle vA = c->vertex(eit->second); Vertex_handle vB = c->vertex(eit->third); - if (vA->referred() || vB->referred()) + if + ( + vA->referred() + || vB->referred() + ) + { + continue; + } + + if + ( + (vA->internalPoint() && vA->referred()) + || (vB->internalPoint() && vB->referred()) + ) { continue; } @@ -617,6 +637,7 @@ void Foam::conformalVoronoiMesh::buildSurfaceConformation() featureEdgeHits, surfaceToTreeShape, edgeToTreeShape, + surfacePtToEdgePtDist, false ); } @@ -1907,14 +1928,16 @@ bool Foam::conformalVoronoiMesh::pointIsNearSurfaceLocation bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation ( - pointIndexHit& pHit + const pointIndexHit& pHit, + pointIndexHit& nearestEdgeHit ) const { - Foam::point pt = pHit.hitPoint(); + const Foam::point& pt = pHit.hitPoint(); const scalar exclusionRangeSqr = featureEdgeExclusionDistanceSqr(pt); - bool closeToFeatureEdge = pointIsNearFeatureEdgeLocation(pt); + bool closeToFeatureEdge = + pointIsNearFeatureEdgeLocation(pt, nearestEdgeHit); if (closeToFeatureEdge) { @@ -1957,15 +1980,11 @@ bool Foam::conformalVoronoiMesh::nearFeatureEdgeLocation if ( mag(cosAngle) < searchConeAngle - && ( - mag(lineBetweenPoints) - > foamyHexMeshControls().pointPairDistanceCoeff() - *targetCellSize(pt) - ) + && (mag(lineBetweenPoints) > pointPairDistance(pt)) ) { - pt = edgeHit.hitPoint(); - pHit.setPoint(pt); + //pt = edgeHit.hitPoint(); + //pHit.setPoint(pt); closeToFeatureEdge = false; } else @@ -2076,6 +2095,7 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits pointIndexHitAndFeatureDynList& featureEdgeHits, DynamicList<label>& surfaceToTreeShape, DynamicList<label>& edgeToTreeShape, + Map<scalar>& surfacePtToEdgePtDist, bool firstPass ) const { @@ -2161,12 +2181,12 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits if ( - !pointIsNearFeatureEdgeLocation - ( - edPt, - nearestEdgeHit - ) -// !nearFeatureEdgeLocation(edHit) +// !pointIsNearFeatureEdgeLocation +// ( +// edPt, +// nearestEdgeHit +// ) + !nearFeatureEdgeLocation(edHit, nearestEdgeHit) ) { appendToEdgeLocationTree(edPt); @@ -2182,55 +2202,47 @@ void Foam::conformalVoronoiMesh::addSurfaceAndEdgeHits ( pointIndexHitAndFeature(edHit, featureHit) ); + +// Info<< "Add " << existingEdgeLocations_.size() - 1 +// << " " << magSqr(edPt - surfPt) << endl; + + surfacePtToEdgePtDist.insert + ( + existingEdgeLocations_.size() - 1, + magSqr(edPt - surfPt) + ); + } + else if (firstPass) + { + label hitIndex = nearestEdgeHit.index(); + +// Info<< "Close to " << nearestEdgeHit << endl; + + if + ( + magSqr(edPt - surfPt) + < surfacePtToEdgePtDist[hitIndex] + ) + { + featureEdgeHits[hitIndex] = + pointIndexHitAndFeature(edHit, featureHit); + + existingEdgeLocations_[hitIndex] = + edHit.hitPoint(); + surfacePtToEdgePtDist[hitIndex] = + magSqr(edPt - surfPt); + + // Change edge location in featureEdgeHits + // remove index from edge tree + // reinsert new point into tree + edgeLocationTreePtr_().remove(hitIndex); + edgeLocationTreePtr_().insert + ( + hitIndex, + hitIndex + 1 + ); + } } -// else if (firstPass) -// { -// label hitIndex = nearestEdgeHit.index(); -// -// // Calc new edge location -//// Foam::point newPt = -//// 0.5 -//// *( -//// nearestEdgeHit.hitPoint() -//// + edHit.hitPoint() -//// ); -// -// pointIndexHit pHitOld = -// edgeLocationTreePtr_().findNearest -// ( -// nearestEdgeHit.hitPoint(), GREAT -// ); -// -// pointIndexHit pHitNew = -// edgeLocationTreePtr_().findNearest -// ( -// edHit.hitPoint(), GREAT -// ); -// -// if -// ( -// pHitNew.hitPoint() - pHitOld.hitPoint() -// ) -// { -// edHit.setPoint(pHit.hitPoint()); -// -// featureEdgeHits[hitIndex] = -// pointIndexHitAndFeature(edHit, featureHit); -// -// existingEdgeLocations_[hitIndex] = -// edHit.hitPoint(); -// -// // Change edge location in featureEdgeHits -// // remove index from edge tree -// // reinsert new point into tree -// edgeLocationTreePtr_().remove(hitIndex); -// edgeLocationTreePtr_().insert -// ( -// hitIndex, -// hitIndex + 1 -// ); -// } -// } } } } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C index 1703d0669f17ae8400cf3d13c0e718607d0a74ff..6dcf8275dec7cb6f8309bad1e16c03c8bae30a01 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshFeaturePoints.C @@ -873,17 +873,7 @@ void Foam::conformalVoronoiMesh::reinsertFeaturePoints(bool distribute) { Info<< nl << "Reinserting stored feature points" << endl; - label preReinsertionSize(number_of_vertices()); - insertPoints(featureVertices_, distribute); - - const label nReinserted = returnReduce - ( - label(number_of_vertices()) - preReinsertionSize, - sumOp<label>() - ); - - Info<< " Reinserted " << nReinserted << " vertices" << endl; } @@ -1458,8 +1448,6 @@ void Foam::conformalVoronoiMesh::createFeaturePoints(DynamicList<Vb>& pts) forAll(feMeshes, i) { - Info<< indent << "Edge mesh = " << feMeshes[i].name() << nl << endl; - const extendedFeatureEdgeMesh& feMesh(feMeshes[i]); for diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H index a669871e04eaa41ec81eb3cd59e04c228ef11452..a912515fb311b84588d33f190f6e51ca5b510dc5 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshI.H @@ -337,11 +337,10 @@ inline void Foam::conformalVoronoiMesh::createPointPair const Foam::point internalPt = surfPt - ppDistn; const Foam::point externalPt = surfPt + ppDistn; - if - ( - geometryToConformTo_.inside(internalPt) - && geometryToConformTo_.outside(externalPt) - ) + bool internalInside = geometryToConformTo_.inside(internalPt); + bool externalOutside = geometryToConformTo_.outside(externalPt); + + if (internalInside && externalOutside) { pts.append ( @@ -369,11 +368,8 @@ inline void Foam::conformalVoronoiMesh::createPointPair { Info<< "Warning: point pair not inside/outside" << nl << " surfPt = " << surfPt << nl - << " internal = " - << internalPt << " " << geometryToConformTo_.inside(internalPt) - << nl - << " external = " - << externalPt << " " << geometryToConformTo_.outside(externalPt) + << " internal = " << internalPt << " " << internalInside << nl + << " external = " << externalPt << " " << externalOutside << endl; } } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C index 473c2d1ef1b1c5995467c8f795e9b18ca7297ca2..3cef2304d6792e64a97b0746183391d5b06cdbb5 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/conformalVoronoiMeshIO.C @@ -101,7 +101,9 @@ void Foam::conformalVoronoiMesh::drawDelaunayCell // Supply offset as tet number offset *= 4; - os << "# cell index: " << label(c->cellIndex()) << endl; + os << "# cell index: " << label(c->cellIndex()) + << " INT_MIN = " << INT_MIN + << endl; os << "# circumradius " << mag(c->dual() - topoint(c->vertex(0)->point())) @@ -112,7 +114,15 @@ void Foam::conformalVoronoiMesh::drawDelaunayCell os << "# index / type / procIndex: " << label(c->vertex(i)->index()) << " " << label(c->vertex(i)->type()) << " " - << label(c->vertex(i)->procIndex()) << endl; + << label(c->vertex(i)->procIndex()) + << (is_infinite(c->vertex(i)) ? " # This vertex is infinite!" : "") + << + ( + c->vertex(i)->uninitialised() + ? " # This vertex is uninitialised!" + : "" + ) + << endl; meshTools::writeOBJ(os, topoint(c->vertex(i)->point())); } @@ -411,202 +421,247 @@ void Foam::conformalVoronoiMesh::writeMesh(const fileName& instance) } } - if (foamyHexMeshControls().writeTetDualMesh()) + if (foamyHexMeshControls().writeCellShapeControlMesh()) { - // Determine map from Delaunay vertex to Dual mesh - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - // From all Delaunay vertices to cell (positive index) - // or patch face (negative index) - labelList vertexToDualAddressing(number_of_vertices(), 0); - - forAll(cellToDelaunayVertex, cellI) - { - label vertI = cellToDelaunayVertex[cellI]; - - if (vertexToDualAddressing[vertI] != 0) - { - FatalErrorIn("conformalVoronoiMesh::writeMesh(..)") - << "Delaunay vertex " << vertI - << " from cell " << cellI - << " is already mapped to " - << vertexToDualAddressing[vertI] - << exit(FatalError); - } - vertexToDualAddressing[vertI] = cellI+1; - } - - forAll(patchToDelaunayVertex, patchI) - { - const labelList& patchVertices = patchToDelaunayVertex[patchI]; - - forAll(patchVertices, i) - { - label vertI = patchVertices[i]; - - if (vertexToDualAddressing[vertI] > 0) - { - FatalErrorIn("conformalVoronoiMesh::writeMesh(..)") - << "Delaunay vertex " << vertI - << " from patch " << patchI - << " local index " << i - << " is already mapped to cell " - << vertexToDualAddressing[vertI]-1 - << exit(FatalError); - } - - // Vertex might be used by multiple faces. Which one to - // use? For now last one wins. - label dualFaceI = dualPatchStarts[patchI]+i; - vertexToDualAddressing[vertI] = -dualFaceI-1; - } - } - - - // Calculate tet mesh addressing - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + cellShapeControls().shapeControlMesh().write(); + } - pointField points; - labelList boundaryPts(number_of_finite_cells(), -1); - // From tet point back to Delaunay vertex index - labelList pointToDelaunayVertex; - faceList faces; - labelList owner; - labelList neighbour; - wordList patchTypes; - wordList patchNames; - PtrList<dictionary> patchDicts; - pointField cellCentres; + if (foamyHexMeshControls().writeBackgroundMeshDecomposition()) + { + Info<< nl << "Writing " << "backgroundMeshDecomposition" << endl; - calcTetMesh + // Have to explicitly update the mesh instance. + const_cast<fvMesh&>(decomposition_().mesh()).setInstance ( - points, - pointToDelaunayVertex, - faces, - owner, - neighbour, - patchTypes, - patchNames, - patchDicts + time().timeName() ); + decomposition_().mesh().write(); + } - - // Calculate map from tet points to dual mesh cells/patch faces - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - labelIOList pointDualAddressing + if (foamyHexMeshControls().writeTetDualMesh()) + { + label cellI = 0; + for ( - IOobject - ( - "pointDualAddressing", - instance, - "tetDualMesh"/polyMesh::meshSubDir, - runTime_, - IOobject::NO_READ, - IOobject::AUTO_WRITE, - false - ), - UIndirectList<label> - ( - vertexToDualAddressing, - pointToDelaunayVertex - )() - ); - - label pointI = findIndex(pointDualAddressing, -1); - if (pointI != -1) - { - WarningIn - ( - "conformalVoronoiMesh::writeMesh\n" - "(\n" - " const fileName& instance,\n" - " bool filterFaces\n" - ")\n" - ) << "Delaunay vertex " << pointI - << " does not have a corresponding dual cell." << endl; - } - - Info<< "Writing map from tetDualMesh points to Voronoi mesh to " - << pointDualAddressing.objectPath() << endl; - pointDualAddressing.write(); - - - - // Write tet points corresponding to the Voronoi cell/face centre - // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + Finite_cells_iterator cit = finite_cells_begin(); + cit != finite_cells_end(); + ++cit + ) { - // Read Voronoi mesh - fvMesh mesh - ( - IOobject - ( - Foam::polyMesh::defaultRegion, - instance, - runTime_, - IOobject::MUST_READ - ) - ); - pointIOField dualPoints + if ( - IOobject - ( - "dualPoints", - instance, - "tetDualMesh"/polyMesh::meshSubDir, - runTime_, - IOobject::NO_READ, - IOobject::AUTO_WRITE, - false - ), - points - ); - - forAll(pointDualAddressing, pointI) + !cit->hasFarPoint() + && !is_infinite(cit) + ) { - label index = pointDualAddressing[pointI]; - - if (index > 0) - { - label cellI = index-1; - dualPoints[pointI] = mesh.cellCentres()[cellI]; - } - else if (index < 0) - { - label faceI = -index-1; - if (faceI >= mesh.nInternalFaces()) - { - dualPoints[pointI] = mesh.faceCentres()[faceI]; - } - } + cit->cellIndex() = cellI++; } - - Info<< "Writing new tetDualMesh points mapped onto Voronoi mesh to " - << dualPoints.objectPath() << endl - << "Replace the polyMesh/points with these." << endl; - dualPoints.write(); } + Info<< nl << "Writing " << "tetDualMesh" << endl; - Info<< nl << "Writing tetDualMesh to " << instance << endl; + DistributedDelaunayMesh<Delaunay>::labelTolabelPairHashTable vertexMap; + labelList cellMap; + autoPtr<polyMesh> tetMesh = + createMesh("tetDualMesh", vertexMap, cellMap); - PackedBoolList boundaryFacesToRemove; - writeMesh - ( - "tetDualMesh", - instance, - points, - boundaryPts, - faces, - owner, - neighbour, - patchTypes, - patchNames, - patchDicts, - cellCentres, - boundaryFacesToRemove - ); + tetMesh().write(); + +// // Determine map from Delaunay vertex to Dual mesh +// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// // From all Delaunay vertices to cell (positive index) +// // or patch face (negative index) +// labelList vertexToDualAddressing(number_of_vertices(), 0); +// +// forAll(cellToDelaunayVertex, cellI) +// { +// label vertI = cellToDelaunayVertex[cellI]; +// +// if (vertexToDualAddressing[vertI] != 0) +// { +// FatalErrorIn("conformalVoronoiMesh::writeMesh(..)") +// << "Delaunay vertex " << vertI +// << " from cell " << cellI +// << " is already mapped to " +// << vertexToDualAddressing[vertI] +// << exit(FatalError); +// } +// vertexToDualAddressing[vertI] = cellI+1; +// } +// +// forAll(patchToDelaunayVertex, patchI) +// { +// const labelList& patchVertices = patchToDelaunayVertex[patchI]; +// +// forAll(patchVertices, i) +// { +// label vertI = patchVertices[i]; +// +// if (vertexToDualAddressing[vertI] > 0) +// { +// FatalErrorIn("conformalVoronoiMesh::writeMesh(..)") +// << "Delaunay vertex " << vertI +// << " from patch " << patchI +// << " local index " << i +// << " is already mapped to cell " +// << vertexToDualAddressing[vertI]-1 +// << exit(FatalError); +// } +// +// // Vertex might be used by multiple faces. Which one to +// // use? For now last one wins. +// label dualFaceI = dualPatchStarts[patchI]+i; +// vertexToDualAddressing[vertI] = -dualFaceI-1; +// } +// } +// +// +// // Calculate tet mesh addressing +// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// pointField points; +// labelList boundaryPts(number_of_finite_cells(), -1); +// // From tet point back to Delaunay vertex index +// labelList pointToDelaunayVertex; +// faceList faces; +// labelList owner; +// labelList neighbour; +// wordList patchTypes; +// wordList patchNames; +// PtrList<dictionary> patchDicts; +// pointField cellCentres; +// +// calcTetMesh +// ( +// points, +// pointToDelaunayVertex, +// faces, +// owner, +// neighbour, +// patchTypes, +// patchNames, +// patchDicts +// ); +// +// +// +// // Calculate map from tet points to dual mesh cells/patch faces +// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// +// labelIOList pointDualAddressing +// ( +// IOobject +// ( +// "pointDualAddressing", +// instance, +// "tetDualMesh"/polyMesh::meshSubDir, +// runTime_, +// IOobject::NO_READ, +// IOobject::AUTO_WRITE, +// false +// ), +// UIndirectList<label> +// ( +// vertexToDualAddressing, +// pointToDelaunayVertex +// )() +// ); +// +// label pointI = findIndex(pointDualAddressing, -1); +// if (pointI != -1) +// { +// WarningIn +// ( +// "conformalVoronoiMesh::writeMesh\n" +// "(\n" +// " const fileName& instance,\n" +// " bool filterFaces\n" +// ")\n" +// ) << "Delaunay vertex " << pointI +// << " does not have a corresponding dual cell." << endl; +// } +// +// Info<< "Writing map from tetDualMesh points to Voronoi mesh to " +// << pointDualAddressing.objectPath() << endl; +// pointDualAddressing.write(); +// +// +// +// // Write tet points corresponding to the Voronoi cell/face centre +// // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +// { +// // Read Voronoi mesh +// fvMesh mesh +// ( +// IOobject +// ( +// Foam::polyMesh::defaultRegion, +// instance, +// runTime_, +// IOobject::MUST_READ +// ) +// ); +// pointIOField dualPoints +// ( +// IOobject +// ( +// "dualPoints", +// instance, +// "tetDualMesh"/polyMesh::meshSubDir, +// runTime_, +// IOobject::NO_READ, +// IOobject::AUTO_WRITE, +// false +// ), +// points +// ); +// +// forAll(pointDualAddressing, pointI) +// { +// label index = pointDualAddressing[pointI]; +// +// if (index > 0) +// { +// label cellI = index-1; +// dualPoints[pointI] = mesh.cellCentres()[cellI]; +// } +// else if (index < 0) +// { +// label faceI = -index-1; +// if (faceI >= mesh.nInternalFaces()) +// { +// dualPoints[pointI] = mesh.faceCentres()[faceI]; +// } +// } +// } +// +// Info<< "Writing tetDualMesh points mapped onto Voronoi mesh to " +// << dualPoints.objectPath() << endl +// << "Replace the polyMesh/points with these." << endl; +// dualPoints.write(); +// } +// +// +// Info<< nl << "Writing tetDualMesh to " << instance << endl; +// +// PackedBoolList boundaryFacesToRemove; +// writeMesh +// ( +// "tetDualMesh", +// instance, +// points, +// boundaryPts, +// faces, +// owner, +// neighbour, +// patchTypes, +// patchNames, +// patchDicts, +// cellCentres, +// boundaryFacesToRemove +// ); } } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.C index 36c84fd19a37caba1bb3b614dc07e986bc0b9e69..7be77f96cfdef99d9985874431bbc8639f0d36e6 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformalVoronoiMesh/indexedVertex/indexedVertex.C @@ -113,13 +113,12 @@ Foam::Ostream& Foam::operator<< const CGAL::indexedVertex<Gt, Vb>& p ) { - os << p.point() - << p.index() - << static_cast<int>(p.type()) - << p.procIndex() - << p.alignment() - << p.targetCellSize() - << token::SPACE + os << p.point() << ' ' + << p.index() << ' ' + << static_cast<int>(p.type()) << ' ' + << p.procIndex() << ' ' + << p.alignment() << ' ' + << p.targetCellSize() << ' ' << static_cast<int>(p.fixed()); return os; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C index d80f78d5be3f51553e213aed2a05ee3e1f46c767..e1afeb1d60e82b1c42330f3c049e2ec1ff6d2589 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/conformationSurfaces/conformationSurfaces.C @@ -706,8 +706,8 @@ Foam::Field<bool> Foam::conformationSurfaces::wellInside // Info<< surface.name() << " = " // << volumeType::names[surfaceVolumeTests[s][i]] << endl; - //if (surfaceVolumeTests[s][i] == volumeType::OUTSIDE) - if (surfaceVolumeTests[s][i] != volumeType::INSIDE) + if (surfaceVolumeTests[s][i] == volumeType::OUTSIDE) +// if (surfaceVolumeTests[s][i] != volumeType::INSIDE) { insidePoint[i] = false; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.C index 48cd76c23df3ae37f42cb69426d9542b942da966..04eb4f36634d6680bd933cc2f9f69b73d3645fc5 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.C @@ -247,6 +247,20 @@ Foam::cvControls::cvControls } writeTetDualMesh_ = Switch(filteringDict.lookup("writeTetDualMesh")); + + writeCellShapeControlMesh_ = + Switch(filteringDict.lookup("writeCellShapeControlMesh")); + + if (Pstream::parRun()) + { + writeBackgroundMeshDecomposition_ = + Switch(filteringDict.lookup("writeBackgroundMeshDecomposition")); + } + else + { + writeBackgroundMeshDecomposition_ = Switch(false); + } + } diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.H index 6c1c83e05ba1d3ed9fd47d19a8671fa367e9b7df..1f1fe356cda55357114c046bdc60d43cf7654aeb 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControls.H @@ -202,6 +202,10 @@ class cvControls //- Write tet mesh at output time (it always writes the Voronoi) Switch writeTetDualMesh_; + Switch writeCellShapeControlMesh_; + + Switch writeBackgroundMeshDecomposition_; + // Private Member Functions @@ -335,6 +339,12 @@ public: //- Write tetMesh at output time inline Switch writeTetDualMesh() const; + + //- Write cellShapeControlMesh at output time + inline Switch writeCellShapeControlMesh() const; + + //- Write backgroundMeshDecomposition at output time + inline Switch writeBackgroundMeshDecomposition() const; }; diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControlsI.H b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControlsI.H index ae05b421e207a4a6af8b08adb007e118397bb469..f4408f204e9d9fb7997313b604d8a4026aeecff1 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControlsI.H +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/cvControls/cvControlsI.H @@ -215,5 +215,15 @@ inline Foam::Switch Foam::cvControls::writeTetDualMesh() const return writeTetDualMesh_; } +inline Foam::Switch Foam::cvControls::writeCellShapeControlMesh() const +{ + return writeCellShapeControlMesh_; +} + +inline Foam::Switch Foam::cvControls::writeBackgroundMeshDecomposition() const +{ + return writeBackgroundMeshDecomposition_; +} + // ************************************************************************* // diff --git a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C index 32ce53d376550a1c862e471afc977ee38d0091d1..a44103923b4ec09045befa9ad5855423a6b23e74 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/conformalVoronoiMesh/initialPointsMethod/pointFile/pointFile.C @@ -58,7 +58,7 @@ List<Vb::Point> pointFile::initialPoints() const IOobject ( pointFileName_.name(), - foamyHexMesh_.time().constant(), + foamyHexMesh_.time().timeName(), foamyHexMesh_.time(), IOobject::MUST_READ, IOobject::NO_WRITE diff --git a/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C b/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C index 9c32ce867a2e2fe8d201e6deb870d8ee8530f874..f71a17cfcbddcae8873febeef01e42962e468d08 100644 --- a/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C +++ b/applications/utilities/mesh/generation/foamyHexMesh/foamyHexMesh.C @@ -45,18 +45,28 @@ int main(int argc, char *argv[]) "check all surface geometry for quality" ); + Foam::argList::addBoolOption + ( + "conformationOnly", + "conform to the initial points without any point motion" + ); + + #include "addOverwriteOption.H" + #include "setRootCase.H" #include "createTime.H" runTime.functionObjects().off(); const bool checkGeometry = args.optionFound("checkGeometry"); + const bool conformationOnly = args.optionFound("conformationOnly"); + const bool overwrite = args.optionFound("overwrite"); IOdictionary foamyHexMeshDict ( IOobject ( - "foamyHexMeshDict", + args.executable() + "Dict", runTime.system(), runTime, IOobject::MUST_READ_IF_MODIFIED, @@ -101,19 +111,38 @@ int main(int argc, char *argv[]) conformalVoronoiMesh::debug = true; + Info<< "Create mesh for time = " << runTime.timeName() << nl << endl; + conformalVoronoiMesh mesh(runTime, foamyHexMeshDict); - while (runTime.loop()) + if (conformationOnly) { - Info<< nl << "Time = " << runTime.timeName() << endl; + mesh.initialiseForConformation(); - mesh.move(); + if (!overwrite) + { + runTime++; + } - Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" - << " ClockTime = " << runTime.elapsedClockTime() << " s" - << endl; + mesh.writeMesh(runTime.timeName()); } + else + { + mesh.initialiseForMotion(); + + while (runTime.loop()) + { + Info<< nl << "Time = " << runTime.timeName() << endl; + + mesh.move(); + + Info<< nl << "ExecutionTime = " << runTime.elapsedCpuTime() << " s" + << " ClockTime = " << runTime.elapsedClockTime() << " s" + << endl; + } + } + Info<< nl << "End" << nl << endl; diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/Allwclean b/applications/utilities/mesh/generation/foamyQuadMesh/Allwclean similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/Allwclean rename to applications/utilities/mesh/generation/foamyQuadMesh/Allwclean diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/Allwmake b/applications/utilities/mesh/generation/foamyQuadMesh/Allwmake similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/Allwmake rename to applications/utilities/mesh/generation/foamyQuadMesh/Allwmake diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/CGALTriangulation2DKernel.H b/applications/utilities/mesh/generation/foamyQuadMesh/CGALTriangulation2DKernel.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/CGALTriangulation2DKernel.H rename to applications/utilities/mesh/generation/foamyQuadMesh/CGALTriangulation2DKernel.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/CGALTriangulation2Ddefs.H b/applications/utilities/mesh/generation/foamyQuadMesh/CGALTriangulation2Ddefs.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/CGALTriangulation2Ddefs.H rename to applications/utilities/mesh/generation/foamyQuadMesh/CGALTriangulation2Ddefs.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/CV2D.C b/applications/utilities/mesh/generation/foamyQuadMesh/CV2D.C similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/CV2D.C rename to applications/utilities/mesh/generation/foamyQuadMesh/CV2D.C diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/CV2D.H b/applications/utilities/mesh/generation/foamyQuadMesh/CV2D.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/CV2D.H rename to applications/utilities/mesh/generation/foamyQuadMesh/CV2D.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/CV2DI.H b/applications/utilities/mesh/generation/foamyQuadMesh/CV2DI.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/CV2DI.H rename to applications/utilities/mesh/generation/foamyQuadMesh/CV2DI.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/CV2DIO.C b/applications/utilities/mesh/generation/foamyQuadMesh/CV2DIO.C similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/CV2DIO.C rename to applications/utilities/mesh/generation/foamyQuadMesh/CV2DIO.C diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/Make/files b/applications/utilities/mesh/generation/foamyQuadMesh/Make/files similarity index 76% rename from applications/utilities/mesh/generation/foamyHex2DMesh/Make/files rename to applications/utilities/mesh/generation/foamyQuadMesh/Make/files index 01dfc1e22fb0c3fc4ca1ba19c5a158c7e58dbebf..0434c90c6632f87cad48bfae128d06f30c0d0adb 100755 --- a/applications/utilities/mesh/generation/foamyHex2DMesh/Make/files +++ b/applications/utilities/mesh/generation/foamyQuadMesh/Make/files @@ -7,6 +7,6 @@ insertSurfaceNearPointPairs.C insertBoundaryConformPointPairs.C CV2DIO.C shortEdgeFilter2D.C -foamyHex2DMesh.C +foamyQuadMesh.C -EXE = $(FOAM_APPBIN)/foamyHex2DMesh +EXE = $(FOAM_APPBIN)/foamyQuadMesh diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/Make/options b/applications/utilities/mesh/generation/foamyQuadMesh/Make/options similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/Make/options rename to applications/utilities/mesh/generation/foamyQuadMesh/Make/options diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/Make/files b/applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/Make/files similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/Make/files rename to applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/Make/files diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/Make/options b/applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/Make/options similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/Make/options rename to applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/Make/options diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.C b/applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.C similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.C rename to applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.C diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.H b/applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.H rename to applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControls.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControlsI.H b/applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControlsI.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControlsI.H rename to applications/utilities/mesh/generation/foamyQuadMesh/conformalVoronoi2DMesh/cv2DControls/cv2DControlsI.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/foamyHex2DMesh.C b/applications/utilities/mesh/generation/foamyQuadMesh/foamyQuadMesh.C similarity index 99% rename from applications/utilities/mesh/generation/foamyHex2DMesh/foamyHex2DMesh.C rename to applications/utilities/mesh/generation/foamyQuadMesh/foamyQuadMesh.C index 319f53691f6e830fd273505c0ba5d6776f059246..3fc2fb07f4951f3a7e5b7a7b60117da3ff65e6ba 100644 --- a/applications/utilities/mesh/generation/foamyHex2DMesh/foamyHex2DMesh.C +++ b/applications/utilities/mesh/generation/foamyQuadMesh/foamyQuadMesh.C @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Application - foamyHex2DMesh + foamyQuadMesh Description Conformal-Voronoi 2D extruding automatic mesher with grid or read diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/foamyHex2DMeshDict b/applications/utilities/mesh/generation/foamyQuadMesh/foamyQuadMeshDict similarity index 88% rename from applications/utilities/mesh/generation/foamyHex2DMesh/foamyHex2DMeshDict rename to applications/utilities/mesh/generation/foamyQuadMesh/foamyQuadMeshDict index 81bd5bca0cc14238fcdd7a281fd9feb380099923..3d61b2fabdaba5502ed48920a1793b963843e5b1 100644 --- a/applications/utilities/mesh/generation/foamyHex2DMesh/foamyHex2DMeshDict +++ b/applications/utilities/mesh/generation/foamyQuadMesh/foamyQuadMeshDict @@ -11,31 +11,18 @@ FoamFile format ascii; class dictionary; location "system"; - object foamyHex2DMeshDict; + object foamyQuadMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // geometry { - laurence_clean_preciser.stl + surfaceFile.stl { - name laurence_clean_preciser; - type closedTriSurfaceMesh; - //type triSurfaceMesh; + name surfaceFile; + type triSurfaceMesh; } -// refinementBox -// { -// type searchableBox; -// min (-0.5 0.35 -1000); -// max (-0.5 0.35 1000); -// } -// refinementSphere -// { -// type searchableSphere; -// centre (0.85 0.4 0.0); -// radius 0.01; -// } } surfaceConformation @@ -66,10 +53,10 @@ surfaceConformation geometryToConformTo { - laurence_clean_preciser + surfaceFile { featureMethod extendedFeatureEdgeMesh; - extendedFeatureEdgeMesh "laurence_clean_preciser.extendedFeatureEdgeMesh"; + extendedFeatureEdgeMesh "surfaceFile.extendedFeatureEdgeMesh"; } } @@ -94,7 +81,7 @@ motionControl cellSizeControlGeometry { - laurence_clean_preciser + surfaceFile { priority 1; mode bothSides; diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/indexedFace.H b/applications/utilities/mesh/generation/foamyQuadMesh/indexedFace.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/indexedFace.H rename to applications/utilities/mesh/generation/foamyQuadMesh/indexedFace.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/indexedFaceI.H b/applications/utilities/mesh/generation/foamyQuadMesh/indexedFaceI.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/indexedFaceI.H rename to applications/utilities/mesh/generation/foamyQuadMesh/indexedFaceI.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/indexedVertex.H b/applications/utilities/mesh/generation/foamyQuadMesh/indexedVertex.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/indexedVertex.H rename to applications/utilities/mesh/generation/foamyQuadMesh/indexedVertex.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/indexedVertexI.H b/applications/utilities/mesh/generation/foamyQuadMesh/indexedVertexI.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/indexedVertexI.H rename to applications/utilities/mesh/generation/foamyQuadMesh/indexedVertexI.H diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/insertBoundaryConformPointPairs.C b/applications/utilities/mesh/generation/foamyQuadMesh/insertBoundaryConformPointPairs.C similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/insertBoundaryConformPointPairs.C rename to applications/utilities/mesh/generation/foamyQuadMesh/insertBoundaryConformPointPairs.C diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/insertFeaturePoints.C b/applications/utilities/mesh/generation/foamyQuadMesh/insertFeaturePoints.C similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/insertFeaturePoints.C rename to applications/utilities/mesh/generation/foamyQuadMesh/insertFeaturePoints.C diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/insertSurfaceNearPointPairs.C b/applications/utilities/mesh/generation/foamyQuadMesh/insertSurfaceNearPointPairs.C similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/insertSurfaceNearPointPairs.C rename to applications/utilities/mesh/generation/foamyQuadMesh/insertSurfaceNearPointPairs.C diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/insertSurfaceNearestPointPairs.C b/applications/utilities/mesh/generation/foamyQuadMesh/insertSurfaceNearestPointPairs.C similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/insertSurfaceNearestPointPairs.C rename to applications/utilities/mesh/generation/foamyQuadMesh/insertSurfaceNearestPointPairs.C diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/shortEdgeFilter2D.C b/applications/utilities/mesh/generation/foamyQuadMesh/shortEdgeFilter2D.C similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/shortEdgeFilter2D.C rename to applications/utilities/mesh/generation/foamyQuadMesh/shortEdgeFilter2D.C diff --git a/applications/utilities/mesh/generation/foamyHex2DMesh/shortEdgeFilter2D.H b/applications/utilities/mesh/generation/foamyQuadMesh/shortEdgeFilter2D.H similarity index 100% rename from applications/utilities/mesh/generation/foamyHex2DMesh/shortEdgeFilter2D.H rename to applications/utilities/mesh/generation/foamyQuadMesh/shortEdgeFilter2D.H diff --git a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C index 6fb8e69b9694d21261a44b8513f033386f6cbc7e..21ba1cdfa1c7bbb13dc7d3cdc05710323cb8afd6 100644 --- a/applications/utilities/parallelProcessing/decomposePar/decomposePar.C +++ b/applications/utilities/parallelProcessing/decomposePar/decomposePar.C @@ -55,6 +55,9 @@ Usage \param -fields \n Use existing geometry decomposition and convert fields only. + \param -sets \n + Decompose cellSets, faceSets, pointSets. + \param -force \n Remove any existing \a processor subdirectories before decomposing the geometry. @@ -127,6 +130,11 @@ int main(int argc, char *argv[]) "use existing geometry decomposition and convert fields only" ); argList::addBoolOption + ( + "sets", + "decompose cellSets, faceSets, pointSets" + ); + argList::addBoolOption ( "force", "remove existing processor*/ subdirs before decomposing the geometry" @@ -146,6 +154,7 @@ int main(int argc, char *argv[]) bool writeCellDist = args.optionFound("cellDist"); bool copyUniform = args.optionFound("copyUniform"); bool decomposeFieldsOnly = args.optionFound("fields"); + bool decomposeSets = args.optionFound("sets"); bool forceOverwrite = args.optionFound("force"); bool ifRequiredDecomposition = args.optionFound("ifRequired"); @@ -312,7 +321,7 @@ int main(int argc, char *argv[]) { mesh.decomposeMesh(); - mesh.writeDecomposition(); + mesh.writeDecomposition(decomposeSets); if (writeCellDist) { diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C index 15cbd85d11eae6b7bc74b968312f7bdffab3d333..4eda411482090d25f72fd88f4f2c209d0f6a5fb7 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.C @@ -34,6 +34,10 @@ License #include "globalMeshData.H" #include "DynamicList.H" #include "fvFieldDecomposer.H" +#include "IOobjectList.H" +#include "cellSet.H" +#include "faceSet.H" +#include "pointSet.H" // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // @@ -123,7 +127,7 @@ Foam::domainDecomposition::~domainDecomposition() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::domainDecomposition::writeDecomposition() +bool Foam::domainDecomposition::writeDecomposition(const bool decomposeSets) { Info<< "\nConstructing processor meshes" << endl; @@ -160,6 +164,37 @@ bool Foam::domainDecomposition::writeDecomposition() } + PtrList<const cellSet> cellSets; + PtrList<const faceSet> faceSets; + PtrList<const pointSet> pointSets; + if (decomposeSets) + { + // Read sets + IOobjectList objects(*this, facesInstance(), "polyMesh/sets"); + { + IOobjectList cSets(objects.lookupClass(cellSet::typeName)); + forAllConstIter(IOobjectList, cSets, iter) + { + cellSets.append(new cellSet(*iter())); + } + } + { + IOobjectList fSets(objects.lookupClass(faceSet::typeName)); + forAllConstIter(IOobjectList, fSets, iter) + { + faceSets.append(new faceSet(*iter())); + } + } + { + IOobjectList pSets(objects.lookupClass(pointSet::typeName)); + forAllConstIter(IOobjectList, pSets, iter) + { + pointSets.append(new pointSet(*iter())); + } + } + } + + label maxProcCells = 0; label totProcFaces = 0; label maxProcPatches = 0; @@ -732,6 +767,52 @@ bool Foam::domainDecomposition::writeDecomposition() procMesh.write(); + + + if (decomposeSets) + { + forAll(cellSets, i) + { + const cellSet& cs = cellSets[i]; + cellSet set(procMesh, cs.name(), cs.size()/nProcs_); + forAll(curCellLabels, i) + { + if (cs.found(curCellLabels[i])) + { + set.insert(i); + } + } + set.write(); + } + forAll(faceSets, i) + { + const faceSet& cs = faceSets[i]; + faceSet set(procMesh, cs.name(), cs.size()/nProcs_); + forAll(curFaceLabels, i) + { + if (cs.found(mag(curFaceLabels[i])-1)) + { + set.insert(i); + } + } + set.write(); + } + forAll(pointSets, i) + { + const pointSet& cs = pointSets[i]; + pointSet set(procMesh, cs.name(), cs.size()/nProcs_); + forAll(curPointLabels, i) + { + if (cs.found(curPointLabels[i])) + { + set.insert(i); + } + } + set.write(); + } + } + + // Write points if pointsInstance differing from facesInstance if (facesInstancePointsPtr_.valid()) { diff --git a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H index e5fb53808605fc5db2fe797881726cb8289dfc38..9487aefef0322164300a47041eaf35b57ef53e6b 100644 --- a/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H +++ b/applications/utilities/parallelProcessing/decomposePar/domainDecomposition.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -172,7 +172,7 @@ public: void decomposeMesh(); //- Write decomposition - bool writeDecomposition(); + bool writeDecomposition(const bool decomposeSets); //- Cell-processor decomposition labels const labelList& cellToProc() const diff --git a/applications/utilities/parallelProcessing/reconstructPar/Make/options b/applications/utilities/parallelProcessing/reconstructPar/Make/options index e63099c8f5ffef3deafb479939a78366019a7a13..ece7c8b030bee4fab556a964b9da1eec4c51a64d 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/Make/options +++ b/applications/utilities/parallelProcessing/reconstructPar/Make/options @@ -1,6 +1,7 @@ EXE_INC = \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ + -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/parallel/reconstruct/reconstruct/lnInclude \ -I$(LIB_SRC)/regionModels/regionModel/lnInclude diff --git a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C index c4a15f97b673128ca0563250efb4b8bea1f81fcc..7c82ef91a2a572ec0264c670e6a106d80ca4b1dc 100644 --- a/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C +++ b/applications/utilities/parallelProcessing/reconstructPar/reconstructPar.C @@ -41,6 +41,10 @@ Description #include "pointFieldReconstructor.H" #include "reconstructLagrangian.H" +#include "cellSet.H" +#include "faceSet.H" +#include "pointSet.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // bool haveAllTimes @@ -99,6 +103,11 @@ int main(int argc, char *argv[]) "skip reconstructing lagrangian positions and fields" ); argList::addBoolOption + ( + "sets", + "reconstruct cellSets, faceSets, pointSets" + ); + argList::addBoolOption ( "newTimes", "only reconstruct new times (i.e. that do not exist already)" @@ -113,6 +122,9 @@ int main(int argc, char *argv[]) args.optionLookup("fields")() >> selectedFields; } + const bool reconstructSets = args.optionFound("sets"); + + const bool noLagrangian = args.optionFound("noLagrangian"); HashSet<word> selectedLagrangianFields; @@ -668,6 +680,148 @@ int main(int argc, char *argv[]) Info<< "No lagrangian fields" << nl << endl; } } + + + if (reconstructSets) + { + // Scan to find all sets + HashTable<label> cSetNames; + HashTable<label> fSetNames; + HashTable<label> pSetNames; + + forAll(procMeshes.meshes(), procI) + { + const fvMesh& procMesh = procMeshes.meshes()[procI]; + + IOobjectList objects + ( + procMesh, procMesh.facesInstance(), "polyMesh/sets" + ); + IOobjectList cSets(objects.lookupClass(cellSet::typeName)); + forAllConstIter(IOobjectList, cSets, iter) + { + cSetNames.insert(iter.key(), cSetNames.size()); + } + + IOobjectList fSets(objects.lookupClass(faceSet::typeName)); + forAllConstIter(IOobjectList, fSets, iter) + { + fSetNames.insert(iter.key(), fSetNames.size()); + } + IOobjectList pSets(objects.lookupClass(pointSet::typeName)); + forAllConstIter(IOobjectList, pSets, iter) + { + pSetNames.insert(iter.key(), pSetNames.size()); + } + } + + // Construct all sets + PtrList<cellSet> cellSets(cSetNames.size()); + PtrList<faceSet> faceSets(fSetNames.size()); + PtrList<pointSet> pointSets(pSetNames.size()); + + // Load sets + forAll(procMeshes.meshes(), procI) + { + const fvMesh& procMesh = procMeshes.meshes()[procI]; + + IOobjectList objects + ( + procMesh, procMesh.facesInstance(), "polyMesh/sets" + ); + + // cellSets + const labelList& cellMap = + procMeshes.cellProcAddressing()[procI]; + + IOobjectList cSets(objects.lookupClass(cellSet::typeName)); + forAllConstIter(IOobjectList, cSets, iter) + { + // Load cellSet + const cellSet procSet(*iter()); + label setI = cSetNames[iter.key()]; + if (!cellSets.set(setI)) + { + cellSets.set + ( + setI, + new cellSet(mesh, iter.key(), procSet.size()) + ); + } + cellSet& cSet = cellSets[setI]; + + forAllConstIter(cellSet, procSet, iter) + { + cSet.insert(cellMap[iter.key()]); + } + } + + // faceSets + const labelList& faceMap = + procMeshes.faceProcAddressing()[procI]; + + IOobjectList fSets(objects.lookupClass(faceSet::typeName)); + forAllConstIter(IOobjectList, fSets, iter) + { + // Load faceSet + const faceSet procSet(*iter()); + label setI = fSetNames[iter.key()]; + if (!faceSets.set(setI)) + { + faceSets.set + ( + setI, + new faceSet(mesh, iter.key(), procSet.size()) + ); + } + faceSet& fSet = faceSets[setI]; + + forAllConstIter(faceSet, procSet, iter) + { + fSet.insert(mag(faceMap[iter.key()])-1); + } + } + // pointSets + const labelList& pointMap = + procMeshes.pointProcAddressing()[procI]; + + IOobjectList pSets(objects.lookupClass(pointSet::typeName)); + forAllConstIter(IOobjectList, pSets, iter) + { + // Load pointSet + const pointSet propSet(*iter()); + label setI = pSetNames[iter.key()]; + if (!pointSets.set(setI)) + { + pointSets.set + ( + setI, + new pointSet(mesh, iter.key(), propSet.size()) + ); + } + pointSet& pSet = pointSets[setI]; + + forAllConstIter(pointSet, propSet, iter) + { + pSet.insert(pointMap[iter.key()]); + } + } + } + + // Write sets + forAll(cellSets, i) + { + cellSets[i].write(); + } + forAll(faceSets, i) + { + faceSets[i].write(); + } + forAll(pointSets, i) + { + pointSets[i].write(); + } + } } } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/Make/files b/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/Make/files deleted file mode 100644 index df6c4a0d23ce65c0f7540248df8501e8634e038e..0000000000000000000000000000000000000000 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/Make/files +++ /dev/null @@ -1,11 +0,0 @@ -vtkPV398Foam.C -vtkPV398FoamFields.C -vtkPV398FoamMesh.C -vtkPV398FoamMeshLagrangian.C -vtkPV398FoamMeshSet.C -vtkPV398FoamMeshVolume.C -vtkPV398FoamMeshZone.C -vtkPV398FoamUpdateInfo.C -vtkPV398FoamUtils.C - -LIB = $(FOAM_LIBBIN)/libvtkPV398Foam diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/Make/files b/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/Make/files deleted file mode 100644 index dce0b1f5431cddba7e3d1d872383cbc3da83b185..0000000000000000000000000000000000000000 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/Make/files +++ /dev/null @@ -1,5 +0,0 @@ -vtkPV398blockMesh.C -vtkPV398blockMeshConvert.C -vtkPV398blockMeshUtils.C - -LIB = $(FOAM_LIBBIN)/libvtkPV398blockMesh diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/Make/files b/applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/Make/files deleted file mode 100644 index 2b5d071cb3bc1aaabf44aa70b31e965daf83d594..0000000000000000000000000000000000000000 --- a/applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/Make/files +++ /dev/null @@ -1,3 +0,0 @@ -vtkPV398Readers.C - -LIB = $(FOAM_LIBBIN)/libvtkPV398Readers diff --git a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake index 03b352116e7dd678042468da06d6640c637f6cfe..54026dc9ef7c93c5ab6fc09ee682510ece753f4c 100755 --- a/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV3Readers/Allwmake @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory #set -x -if [ "$ParaView_VERSION" != "3.98.1" ] +if [ "$ParaView_VERSION" != "4.0.1" ] then if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/Allwclean b/applications/utilities/postProcessing/graphics/PV4Readers/Allwclean similarity index 63% rename from applications/utilities/postProcessing/graphics/PV398Readers/Allwclean rename to applications/utilities/postProcessing/graphics/PV4Readers/Allwclean index ba4eb0a015041229c45b07b61f9968fd5974032f..f1171eb61e617481ecdce36c381a1cc462515741 100755 --- a/applications/utilities/postProcessing/graphics/PV398Readers/Allwclean +++ b/applications/utilities/postProcessing/graphics/PV4Readers/Allwclean @@ -2,8 +2,8 @@ cd ${0%/*} || exit 1 # run from this directory set -x -wclean libso vtkPV398Readers -PV398blockMeshReader/Allwclean -PV398FoamReader/Allwclean +wclean libso vtkPV4Readers +PV4blockMeshReader/Allwclean +PV4FoamReader/Allwclean # ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake similarity index 70% rename from applications/utilities/postProcessing/graphics/PV398Readers/Allwmake rename to applications/utilities/postProcessing/graphics/PV4Readers/Allwmake index 1469999cb6fcaac52d16d5c5a0be15c74fb6a483..99d54fef06ce3092fab99f146c0e1653e9c7d9c5 100755 --- a/applications/utilities/postProcessing/graphics/PV398Readers/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV4Readers/Allwmake @@ -2,7 +2,7 @@ cd ${0%/*} || exit 1 # run from this directory #set -x -if [ "$ParaView_VERSION" == "3.98.1" ] +if [ "$ParaView_VERSION" == "4.0.1" ] then if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then @@ -14,14 +14,14 @@ if [ "$ParaView_VERSION" == "3.98.1" ] # ensure CMake gets the correct C++ compiler [ -n "$WM_CXX" ] && export CXX="$WM_CXX" - wmake libso vtkPV398Readers - PV398blockMeshReader/Allwmake - PV398FoamReader/Allwmake + wmake libso vtkPV4Readers + PV4blockMeshReader/Allwmake + PV4FoamReader/Allwmake else echo "ERROR: ParaView not found in $ParaView_DIR" fi else - echo "WARN: PV398 readers not building: ParaView_VERSION=$ParaView_VERSION" + echo "WARN: PV4 readers not building: ParaView_VERSION=$ParaView_VERSION" fi # ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/Allwclean b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean similarity index 65% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/Allwclean rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean index eda9ee566b20b05b59fbfb451656f5478d672e98..39520be1ab678cf5d03b92b32b04c56da14a1b00 100755 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/Allwclean +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwclean @@ -3,9 +3,9 @@ cd ${0%/*} || exit 1 # run from this directory set -x # deal with client/server vs combined plugins -rm -f $FOAM_LIBBIN/libPV398FoamReader* 2>/dev/null +rm -f $FOAM_LIBBIN/libPV4FoamReader* 2>/dev/null -rm -rf PV398FoamReader/Make -wclean libso vtkPV398Foam +rm -rf PV4FoamReader/Make +wclean libso vtkPV4Foam # ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake similarity index 85% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/Allwmake rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake index 77786eb58e8e28da13ba352d2a319ed91b68b901..dd88afc02982fba7df08e342beafa8a3a724073f 100755 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/Allwmake @@ -4,9 +4,9 @@ set -x if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then - wmake libso vtkPV398Foam + wmake libso vtkPV4Foam ( - cd PV398FoamReader + cd PV4FoamReader mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 cd Make/$WM_OPTIONS cmake ../.. diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt similarity index 72% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/CMakeLists.txt rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt index be5c2185b5bdd304bbc3ffcbdd6f1a7295913523..ed835d3b4792212bc964f00e68481699023110e0 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/CMakeLists.txt @@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES( $ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude $ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude $ENV{WM_PROJECT_DIR}/src/finiteVolume/lnInclude - ${PROJECT_SOURCE_DIR}/../vtkPV398Foam + ${PROJECT_SOURCE_DIR}/../vtkPV4Foam ) ADD_DEFINITIONS( @@ -41,45 +41,45 @@ SET( # # Extend the auto-generated panel -QT4_WRAP_CPP(MOC_SRCS pqPV398FoamReaderPanel.h) +QT4_WRAP_CPP(MOC_SRCS pqPV4FoamReaderPanel.h) ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS - CLASS_NAME pqPV398FoamReaderPanel - XML_NAME PV398FoamReader # name of SourceProxy in *SM.xml + CLASS_NAME pqPV4FoamReaderPanel + XML_NAME PV4FoamReader # name of SourceProxy in *SM.xml XML_GROUP sources ) ADD_PARAVIEW_PLUGIN( - PV398FoamReader_SM "1.0" - SERVER_MANAGER_XML PV398FoamReader_SM.xml - SERVER_MANAGER_SOURCES vtkPV398FoamReader.cxx + PV4FoamReader_SM "1.0" + SERVER_MANAGER_XML PV4FoamReader_SM.xml + SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx GUI_INTERFACES ${IFACES} - GUI_SOURCES pqPV398FoamReaderPanel.cxx + GUI_SOURCES pqPV4FoamReaderPanel.cxx ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} - GUI_RESOURCE_FILES PV398FoamReader.xml + GUI_RESOURCE_FILES PV4FoamReader.xml ) # # # # Define the server-side portion of the reader plugin # # # ADD_PARAVIEW_PLUGIN( -# PV398FoamReader_SM "1.0" -# SERVER_MANAGER_XML PV398FoamReader_SM.xml -# SERVER_MANAGER_SOURCES vtkPV398FoamReader.cxx +# PV4FoamReader_SM "1.0" +# SERVER_MANAGER_XML PV4FoamReader_SM.xml +# SERVER_MANAGER_SOURCES vtkPV4FoamReader.cxx # ) # # # # Define the client-side portion of the reader plugin # # # ADD_PARAVIEW_PLUGIN( -# PV398FoamReader "1.0" +# PV4FoamReader "1.0" # GUI_RESOURCES PV3FoamReader.qrc # ) # TARGET_LINK_LIBRARIES( - PV398FoamReader_SM + PV4FoamReader_SM OpenFOAM finiteVolume - vtkPV398Foam + vtkPV4Foam ) #----------------------------------------------------------------------------- diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/PV398FoamReader.qrc b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.qrc similarity index 64% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/PV398FoamReader.qrc rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.qrc index 8f22c858df31ab062f0c16dba27a0f514ea59032..c5bfc27b71bcdcb4455b206e3470a1e35556ef09 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/PV398FoamReader.qrc +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.qrc @@ -1,5 +1,5 @@ <RCC> <qresource prefix="/ParaViewResources" > - <file>PV398FoamReader.xml</file> + <file>PV4FoamReader.xml</file> </qresource> </RCC> diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/PV398FoamReader.xml b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.xml similarity index 79% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/PV398FoamReader.xml rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.xml index 866ef557b2bcda6f572b64f18b0579f042a87b02..bb940768de226774c9e098a90fd846e865d61e50 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/PV398FoamReader.xml +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader.xml @@ -1,5 +1,5 @@ <ParaViewReaders> - <Reader name="PV398FoamReader" + <Reader name="PV4FoamReader" extensions="OpenFOAM" file_description="OpenFOAM Reader"> </Reader> diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/PV398FoamReader_SM.xml b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml similarity index 99% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/PV398FoamReader_SM.xml rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml index 73849a78c9e0bd01b65af7da122e05f392ac9ba5..8f39ac67b7051f45813a4cf3ac3e6105d6f03e15 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/PV398FoamReader_SM.xml +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/PV4FoamReader_SM.xml @@ -1,8 +1,8 @@ <ServerManagerConfiguration> <ProxyGroup name="sources"> <SourceProxy - name="PV398FoamReader" - class="vtkPV398FoamReader"> + name="PV4FoamReader" + class="vtkPV4FoamReader"> <!-- File name - compulsory --> <StringVectorProperty diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/pqPV398FoamReaderPanel.cxx b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.cxx similarity index 95% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/pqPV398FoamReaderPanel.cxx rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.cxx index 758360192a00301c7c6e79bf5928553dc0e810cd..e911bb088e8dd8b08533c689f89095756a9f47a9 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/pqPV398FoamReaderPanel.cxx +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.cxx @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "pqPV398FoamReaderPanel.h" +#include "pqPV4FoamReaderPanel.h" // QT #include <QGridLayout> @@ -50,7 +50,7 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -pqPV398FoamReaderPanel::pqPV398FoamReaderPanel +pqPV4FoamReaderPanel::pqPV4FoamReaderPanel ( pqProxy *proxy, QWidget *p @@ -339,7 +339,7 @@ pqPV398FoamReaderPanel::pqPV398FoamReaderPanel // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -void pqPV398FoamReaderPanel::CacheMeshToggled() +void pqPV4FoamReaderPanel::CacheMeshToggled() { vtkSMIntVectorProperty::SafeDownCast ( @@ -348,7 +348,7 @@ void pqPV398FoamReaderPanel::CacheMeshToggled() } -void pqPV398FoamReaderPanel::RefreshPressed() +void pqPV4FoamReaderPanel::RefreshPressed() { // update everything vtkSMIntVectorProperty::SafeDownCast @@ -363,7 +363,7 @@ void pqPV398FoamReaderPanel::RefreshPressed() } -void pqPV398FoamReaderPanel::ZeroTimeToggled() +void pqPV4FoamReaderPanel::ZeroTimeToggled() { vtkSMIntVectorProperty::SafeDownCast ( @@ -374,7 +374,7 @@ void pqPV398FoamReaderPanel::ZeroTimeToggled() } -void pqPV398FoamReaderPanel::ShowPatchNamesToggled() +void pqPV4FoamReaderPanel::ShowPatchNamesToggled() { vtkSMIntVectorProperty::SafeDownCast ( @@ -391,7 +391,7 @@ void pqPV398FoamReaderPanel::ShowPatchNamesToggled() } -void pqPV398FoamReaderPanel::ShowGroupsOnlyToggled() +void pqPV4FoamReaderPanel::ShowGroupsOnlyToggled() { vtkSMProperty* prop; @@ -407,7 +407,7 @@ void pqPV398FoamReaderPanel::ShowGroupsOnlyToggled() } -void pqPV398FoamReaderPanel::IncludeSetsToggled() +void pqPV4FoamReaderPanel::IncludeSetsToggled() { vtkSMProperty* prop; @@ -423,7 +423,7 @@ void pqPV398FoamReaderPanel::IncludeSetsToggled() } -void pqPV398FoamReaderPanel::IncludeZonesToggled() +void pqPV4FoamReaderPanel::IncludeZonesToggled() { vtkSMProperty* prop; @@ -439,7 +439,7 @@ void pqPV398FoamReaderPanel::IncludeZonesToggled() } -void pqPV398FoamReaderPanel::ExtrapolatePatchesToggled() +void pqPV4FoamReaderPanel::ExtrapolatePatchesToggled() { vtkSMProperty* prop; @@ -452,7 +452,7 @@ void pqPV398FoamReaderPanel::ExtrapolatePatchesToggled() } -void pqPV398FoamReaderPanel::InterpolateVolFieldsToggled() +void pqPV4FoamReaderPanel::InterpolateVolFieldsToggled() { vtkSMProperty* prop; diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/pqPV398FoamReaderPanel.h b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.h similarity index 89% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/pqPV398FoamReaderPanel.h rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.h index 17c1b88893ca94974022884297ddbc61fbf94262..3f641e271d02ea2de5e963e619af627c094d2396 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/pqPV398FoamReaderPanel.h +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/pqPV4FoamReaderPanel.h @@ -22,19 +22,19 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - pqPV398FoamReaderPanel + pqPV4FoamReaderPanel Description GUI modifications for the ParaView reader panel - A custom panel for the PV398FoamReader. + A custom panel for the PV4FoamReader. SourceFiles - pqPV398FoamReaderPanel.cxx + pqPV4FoamReaderPanel.cxx \*---------------------------------------------------------------------------*/ -#ifndef pqPV398FoamReaderPanel_h -#define pqPV398FoamReaderPanel_h +#ifndef pqPV4FoamReaderPanel_h +#define pqPV4FoamReaderPanel_h #include "pqAutoGeneratedObjectPanel.h" @@ -51,10 +51,10 @@ class vtkSMSourceProxy; /*---------------------------------------------------------------------------*\ - Class pqPV398FoamReaderPanel Declaration + Class pqPV4FoamReaderPanel Declaration \*---------------------------------------------------------------------------*/ -class pqPV398FoamReaderPanel +class pqPV4FoamReaderPanel : public pqAutoGeneratedObjectPanel { @@ -105,11 +105,11 @@ public: // Constructors //- Construct from components - pqPV398FoamReaderPanel(pqProxy*, QWidget*); + pqPV4FoamReaderPanel(pqProxy*, QWidget*); //- Destructor - // virtual ~pqPV398FoamReaderPanel(); + // virtual ~pqPV4FoamReaderPanel(); }; diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/vtkPV398FoamReader.cxx b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.cxx similarity index 85% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/vtkPV398FoamReader.cxx rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.cxx index 435e5d51275c371745ed610e4aebb822a6d92124..176895b668503e02e83617c7ba125c546ea75891 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/vtkPV398FoamReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.cxx @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ -#include "vtkPV398FoamReader.h" +#include "vtkPV4FoamReader.h" #include "pqApplicationCore.h" #include "pqRenderView.h" @@ -40,18 +40,18 @@ License #include "vtkStringArray.h" // OpenFOAM includes -#include "vtkPV398Foam.H" +#include "vtkPV4Foam.H" #undef EXPERIMENTAL_TIME_CACHING // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -vtkStandardNewMacro(vtkPV398FoamReader); +vtkStandardNewMacro(vtkPV4FoamReader); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -vtkPV398FoamReader::vtkPV398FoamReader() +vtkPV4FoamReader::vtkPV4FoamReader() { Debug = 0; vtkDebugMacro(<<"Constructor"); @@ -63,7 +63,7 @@ vtkPV398FoamReader::vtkPV398FoamReader() output0_ = NULL; -#ifdef VTKPV398FOAM_DUALPORT +#ifdef VTKPV4FOAM_DUALPORT // Add second output for the Lagrangian this->SetNumberOfOutputPorts(2); vtkMultiBlockDataSet *lagrangian = vtkMultiBlockDataSet::New(); @@ -100,7 +100,7 @@ vtkPV398FoamReader::vtkPV398FoamReader() SelectionObserver = vtkCallbackCommand::New(); SelectionObserver->SetCallback ( - &vtkPV398FoamReader::SelectionModifiedCallback + &vtkPV4FoamReader::SelectionModifiedCallback ); SelectionObserver->SetClientData(this); @@ -129,7 +129,7 @@ vtkPV398FoamReader::vtkPV398FoamReader() // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -vtkPV398FoamReader::~vtkPV398FoamReader() +vtkPV4FoamReader::~vtkPV4FoamReader() { vtkDebugMacro(<<"Deconstructor"); @@ -168,7 +168,7 @@ vtkPV398FoamReader::~vtkPV398FoamReader() // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // Do everything except set the output info -int vtkPV398FoamReader::RequestInformation +int vtkPV4FoamReader::RequestInformation ( vtkInformation* vtkNotUsed(request), vtkInformationVector** vtkNotUsed(inputVector), @@ -177,7 +177,7 @@ int vtkPV398FoamReader::RequestInformation { vtkDebugMacro(<<"RequestInformation"); - if (Foam::vtkPV398Foam::debug) + if (Foam::vtkPV4Foam::debug) { cout<<"REQUEST_INFORMATION\n"; } @@ -190,7 +190,7 @@ int vtkPV398FoamReader::RequestInformation int nInfo = outputVector->GetNumberOfInformationObjects(); - if (Foam::vtkPV398Foam::debug) + if (Foam::vtkPV4Foam::debug) { cout<<"RequestInformation with " << nInfo << " item(s)\n"; for (int infoI = 0; infoI < nInfo; ++infoI) @@ -201,7 +201,7 @@ int vtkPV398FoamReader::RequestInformation if (!foamData_) { - foamData_ = new Foam::vtkPV398Foam(FileName, this); + foamData_ = new Foam::vtkPV4Foam(FileName, this); } else { @@ -238,7 +238,7 @@ int vtkPV398FoamReader::RequestInformation timeRange[0] = timeSteps[0]; timeRange[1] = timeSteps[nTimeSteps-1]; - if (Foam::vtkPV398Foam::debug > 1) + if (Foam::vtkPV4Foam::debug > 1) { cout<<"nTimeSteps " << nTimeSteps << "\n" <<"timeRange " << timeRange[0] << " to " << timeRange[1] @@ -268,7 +268,7 @@ int vtkPV398FoamReader::RequestInformation // Set the output info -int vtkPV398FoamReader::RequestData +int vtkPV4FoamReader::RequestData ( vtkInformation* vtkNotUsed(request), vtkInformationVector** vtkNotUsed(inputVector), @@ -292,7 +292,7 @@ int vtkPV398FoamReader::RequestData int nInfo = outputVector->GetNumberOfInformationObjects(); - if (Foam::vtkPV398Foam::debug) + if (Foam::vtkPV4Foam::debug) { cout<<"RequestData with " << nInfo << " item(s)\n"; for (int infoI = 0; infoI < nInfo; ++infoI) @@ -310,7 +310,7 @@ int vtkPV398FoamReader::RequestData // taking port0 as the lead for other outputs would be nice, but fails when // a filter is added - we need to check everything // but since PREVIOUS_UPDATE_TIME_STEPS() is protected, relay the logic - // to the vtkPV398Foam::setTime() method + // to the vtkPV4Foam::setTime() method for (int infoI = 0; infoI < nInfo; ++infoI) { vtkInformation *outInfo = outputVector->GetInformationObject(infoI); @@ -342,7 +342,7 @@ int vtkPV398FoamReader::RequestData ) ); - if (Foam::vtkPV398Foam::debug) + if (Foam::vtkPV4Foam::debug) { cout<< "update output with " << output->GetNumberOfBlocks() << " blocks\n"; @@ -370,7 +370,7 @@ int vtkPV398FoamReader::RequestData output->ShallowCopy(output0_); } - if (Foam::vtkPV398Foam::debug) + if (Foam::vtkPV4Foam::debug) { if (needsUpdate) { @@ -390,7 +390,7 @@ int vtkPV398FoamReader::RequestData #else -#ifdef VTKPV398FOAM_DUALPORT +#ifdef VTKPV4FOAM_DUALPORT foamData_->Update ( output, @@ -417,13 +417,13 @@ int vtkPV398FoamReader::RequestData } -void vtkPV398FoamReader::SetRefresh(int val) +void vtkPV4FoamReader::SetRefresh(int val) { Modified(); } -void vtkPV398FoamReader::SetIncludeSets(int val) +void vtkPV4FoamReader::SetIncludeSets(int val) { if (IncludeSets != val) { @@ -436,7 +436,7 @@ void vtkPV398FoamReader::SetIncludeSets(int val) } -void vtkPV398FoamReader::SetIncludeZones(int val) +void vtkPV4FoamReader::SetIncludeZones(int val) { if (IncludeZones != val) { @@ -449,7 +449,7 @@ void vtkPV398FoamReader::SetIncludeZones(int val) } -void vtkPV398FoamReader::SetShowPatchNames(int val) +void vtkPV4FoamReader::SetShowPatchNames(int val) { if (ShowPatchNames != val) { @@ -459,7 +459,7 @@ void vtkPV398FoamReader::SetShowPatchNames(int val) } -void vtkPV398FoamReader::SetShowGroupsOnly(int val) +void vtkPV4FoamReader::SetShowGroupsOnly(int val) { if (ShowGroupsOnly != val) { @@ -472,7 +472,7 @@ void vtkPV398FoamReader::SetShowGroupsOnly(int val) } -void vtkPV398FoamReader::updatePatchNamesView(const bool show) +void vtkPV4FoamReader::updatePatchNamesView(const bool show) { pqApplicationCore* appCore = pqApplicationCore::instance(); @@ -506,7 +506,7 @@ void vtkPV398FoamReader::updatePatchNamesView(const bool show) } -void vtkPV398FoamReader::PrintSelf(ostream& os, vtkIndent indent) +void vtkPV4FoamReader::PrintSelf(ostream& os, vtkIndent indent) { vtkDebugMacro(<<"PrintSelf"); @@ -522,7 +522,7 @@ void vtkPV398FoamReader::PrintSelf(ostream& os, vtkIndent indent) } -int vtkPV398FoamReader::GetTimeStep() +int vtkPV4FoamReader::GetTimeStep() { return foamData_ ? foamData_->timeIndex() : -1; } @@ -531,35 +531,35 @@ int vtkPV398FoamReader::GetTimeStep() // ---------------------------------------------------------------------- // Parts selection list control -vtkDataArraySelection* vtkPV398FoamReader::GetPartSelection() +vtkDataArraySelection* vtkPV4FoamReader::GetPartSelection() { vtkDebugMacro(<<"GetPartSelection"); return PartSelection; } -int vtkPV398FoamReader::GetNumberOfPartArrays() +int vtkPV4FoamReader::GetNumberOfPartArrays() { vtkDebugMacro(<<"GetNumberOfPartArrays"); return PartSelection->GetNumberOfArrays(); } -const char* vtkPV398FoamReader::GetPartArrayName(int index) +const char* vtkPV4FoamReader::GetPartArrayName(int index) { vtkDebugMacro(<<"GetPartArrayName"); return PartSelection->GetArrayName(index); } -int vtkPV398FoamReader::GetPartArrayStatus(const char* name) +int vtkPV4FoamReader::GetPartArrayStatus(const char* name) { vtkDebugMacro(<<"GetPartArrayStatus"); return PartSelection->ArrayIsEnabled(name); } -void vtkPV398FoamReader::SetPartArrayStatus(const char* name, int status) +void vtkPV4FoamReader::SetPartArrayStatus(const char* name, int status) { vtkDebugMacro("Set mesh part \"" << name << "\" status to: " << status); @@ -577,35 +577,35 @@ void vtkPV398FoamReader::SetPartArrayStatus(const char* name, int status) // ---------------------------------------------------------------------- // volField selection list control -vtkDataArraySelection* vtkPV398FoamReader::GetVolFieldSelection() +vtkDataArraySelection* vtkPV4FoamReader::GetVolFieldSelection() { vtkDebugMacro(<<"GetVolFieldSelection"); return VolFieldSelection; } -int vtkPV398FoamReader::GetNumberOfVolFieldArrays() +int vtkPV4FoamReader::GetNumberOfVolFieldArrays() { vtkDebugMacro(<<"GetNumberOfVolFieldArrays"); return VolFieldSelection->GetNumberOfArrays(); } -const char* vtkPV398FoamReader::GetVolFieldArrayName(int index) +const char* vtkPV4FoamReader::GetVolFieldArrayName(int index) { vtkDebugMacro(<<"GetVolFieldArrayName"); return VolFieldSelection->GetArrayName(index); } -int vtkPV398FoamReader::GetVolFieldArrayStatus(const char* name) +int vtkPV4FoamReader::GetVolFieldArrayStatus(const char* name) { vtkDebugMacro(<<"GetVolFieldArrayStatus"); return VolFieldSelection->ArrayIsEnabled(name); } -void vtkPV398FoamReader::SetVolFieldArrayStatus(const char* name, int status) +void vtkPV4FoamReader::SetVolFieldArrayStatus(const char* name, int status) { vtkDebugMacro(<<"SetVolFieldArrayStatus"); if (status) @@ -622,35 +622,35 @@ void vtkPV398FoamReader::SetVolFieldArrayStatus(const char* name, int status) // ---------------------------------------------------------------------- // pointField selection list control -vtkDataArraySelection* vtkPV398FoamReader::GetPointFieldSelection() +vtkDataArraySelection* vtkPV4FoamReader::GetPointFieldSelection() { vtkDebugMacro(<<"GetPointFieldSelection"); return PointFieldSelection; } -int vtkPV398FoamReader::GetNumberOfPointFieldArrays() +int vtkPV4FoamReader::GetNumberOfPointFieldArrays() { vtkDebugMacro(<<"GetNumberOfPointFieldArrays"); return PointFieldSelection->GetNumberOfArrays(); } -const char* vtkPV398FoamReader::GetPointFieldArrayName(int index) +const char* vtkPV4FoamReader::GetPointFieldArrayName(int index) { vtkDebugMacro(<<"GetPointFieldArrayName"); return PointFieldSelection->GetArrayName(index); } -int vtkPV398FoamReader::GetPointFieldArrayStatus(const char* name) +int vtkPV4FoamReader::GetPointFieldArrayStatus(const char* name) { vtkDebugMacro(<<"GetPointFieldArrayStatus"); return PointFieldSelection->ArrayIsEnabled(name); } -void vtkPV398FoamReader::SetPointFieldArrayStatus(const char* name, int status) +void vtkPV4FoamReader::SetPointFieldArrayStatus(const char* name, int status) { vtkDebugMacro(<<"SetPointFieldArrayStatus"); if (status) @@ -667,35 +667,35 @@ void vtkPV398FoamReader::SetPointFieldArrayStatus(const char* name, int status) // ---------------------------------------------------------------------- // lagrangianField selection list control -vtkDataArraySelection* vtkPV398FoamReader::GetLagrangianFieldSelection() +vtkDataArraySelection* vtkPV4FoamReader::GetLagrangianFieldSelection() { vtkDebugMacro(<<"GetLagrangianFieldSelection"); return LagrangianFieldSelection; } -int vtkPV398FoamReader::GetNumberOfLagrangianFieldArrays() +int vtkPV4FoamReader::GetNumberOfLagrangianFieldArrays() { vtkDebugMacro(<<"GetNumberOfLagrangianFieldArrays"); return LagrangianFieldSelection->GetNumberOfArrays(); } -const char* vtkPV398FoamReader::GetLagrangianFieldArrayName(int index) +const char* vtkPV4FoamReader::GetLagrangianFieldArrayName(int index) { vtkDebugMacro(<<"GetLagrangianFieldArrayName"); return LagrangianFieldSelection->GetArrayName(index); } -int vtkPV398FoamReader::GetLagrangianFieldArrayStatus(const char* name) +int vtkPV4FoamReader::GetLagrangianFieldArrayStatus(const char* name) { vtkDebugMacro(<<"GetLagrangianFieldArrayStatus"); return LagrangianFieldSelection->ArrayIsEnabled(name); } -void vtkPV398FoamReader::SetLagrangianFieldArrayStatus +void vtkPV4FoamReader::SetLagrangianFieldArrayStatus ( const char* name, int status @@ -715,7 +715,7 @@ void vtkPV398FoamReader::SetLagrangianFieldArrayStatus // ---------------------------------------------------------------------- -void vtkPV398FoamReader::SelectionModifiedCallback +void vtkPV4FoamReader::SelectionModifiedCallback ( vtkObject*, unsigned long, @@ -723,18 +723,18 @@ void vtkPV398FoamReader::SelectionModifiedCallback void* ) { - static_cast<vtkPV398FoamReader*>(clientdata)->SelectionModified(); + static_cast<vtkPV4FoamReader*>(clientdata)->SelectionModified(); } -void vtkPV398FoamReader::SelectionModified() +void vtkPV4FoamReader::SelectionModified() { vtkDebugMacro(<<"SelectionModified"); Modified(); } -int vtkPV398FoamReader::FillOutputPortInformation +int vtkPV4FoamReader::FillOutputPortInformation ( int port, vtkInformation* info diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/vtkPV398FoamReader.h b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.h similarity index 92% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/vtkPV398FoamReader.h rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.h index 21415bc44083ffd6d01f5ea935ae0b190cfa6617..0b898e3a9cc90138c56a42f013bbc765e62c7468 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/PV398FoamReader/vtkPV398FoamReader.h +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/PV4FoamReader/vtkPV4FoamReader.h @@ -22,21 +22,21 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - vtkPV398FoamReader + vtkPV4FoamReader Description reads a dataset in OpenFOAM format - vtkPV398blockMeshReader creates an multiblock dataset. + vtkPV4blockMeshReader creates an multiblock dataset. It uses the OpenFOAM infrastructure (fvMesh, etc) to handle mesh and field data. SourceFiles - vtkPV398blockMeshReader.cxx + vtkPV4blockMeshReader.cxx \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398FoamReader_h -#define vtkPV398FoamReader_h +#ifndef vtkPV4FoamReader_h +#define vtkPV4FoamReader_h // VTK includes #include "vtkMultiBlockDataSetAlgorithm.h" @@ -50,23 +50,23 @@ class vtkCallbackCommand; // OpenFOAM forward declarations namespace Foam { - class vtkPV398Foam; + class vtkPV4Foam; } /*---------------------------------------------------------------------------*\ - Class vtkPV398FoamReader Declaration + Class vtkPV4FoamReader Declaration \*---------------------------------------------------------------------------*/ -class vtkPV398FoamReader +class vtkPV4FoamReader : public vtkMultiBlockDataSetAlgorithm { public: - vtkTypeMacro(vtkPV398FoamReader, vtkMultiBlockDataSetAlgorithm); + vtkTypeMacro(vtkPV4FoamReader, vtkMultiBlockDataSetAlgorithm); void PrintSelf(ostream&, vtkIndent); - static vtkPV398FoamReader* New(); + static vtkPV4FoamReader* New(); // Description: // Get the current timestep and the timestep range. @@ -184,10 +184,10 @@ public: protected: //- Construct null - vtkPV398FoamReader(); + vtkPV4FoamReader(); //- Destructor - ~vtkPV398FoamReader(); + ~vtkPV4FoamReader(); //- Return information about mesh, times, etc without loading anything virtual int RequestInformation @@ -218,10 +218,10 @@ protected: private: //- Disallow default bitwise copy construct - vtkPV398FoamReader(const vtkPV398FoamReader&); + vtkPV4FoamReader(const vtkPV4FoamReader&); //- Disallow default bitwise assignment - void operator=(const vtkPV398FoamReader&); + void operator=(const vtkPV4FoamReader&); //- Add/remove patch names to/from the view void updatePatchNamesView(const bool show); @@ -251,7 +251,7 @@ private: vtkMultiBlockDataSet* output0_; //BTX - Foam::vtkPV398Foam* foamData_; + Foam::vtkPV4Foam* foamData_; //ETX }; diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/files b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..548c4b8a93c2c43c4561b0899c1a8718c6b22fff --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/files @@ -0,0 +1,11 @@ +vtkPV4Foam.C +vtkPV4FoamFields.C +vtkPV4FoamMesh.C +vtkPV4FoamMeshLagrangian.C +vtkPV4FoamMeshSet.C +vtkPV4FoamMeshVolume.C +vtkPV4FoamMeshZone.C +vtkPV4FoamUpdateInfo.C +vtkPV4FoamUtils.C + +LIB = $(FOAM_LIBBIN)/libvtkPV4Foam diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/Make/options b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/options similarity index 81% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/Make/options rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/options index 3b0bb17b3b68a52690ef0765b0d3b8648ba1ab8b..1ed6a9e569fd731725492c1c08241866a3f40367 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/Make/options +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/Make/options @@ -4,8 +4,8 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/finiteVolume/lnInclude \ -I$(LIB_SRC)/lagrangian/basic/lnInclude \ - -I../../vtkPV398Readers/lnInclude \ - -I../PV398FoamReader \ + -I../../vtkPV4Readers/lnInclude \ + -I../PV4FoamReader \ -I$(ParaView_INCLUDE_DIR) \ $(shell \ test -f $(ParaView_INCLUDE_DIR)/vtkPolyhedron.h && \ @@ -17,5 +17,5 @@ LIB_LIBS = \ -lfiniteVolume \ -lgenericPatchFields \ -llagrangian \ - -L$(FOAM_LIBBIN) -lvtkPV398Readers \ + -L$(FOAM_LIBBIN) -lvtkPV4Readers \ $(GLIBS) diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkDataArrayTemplateImplicit.txx b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkDataArrayTemplateImplicit.txx similarity index 100% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkDataArrayTemplateImplicit.txx rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkDataArrayTemplateImplicit.txx diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkOpenFOAMPoints.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMPoints.H similarity index 99% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkOpenFOAMPoints.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMPoints.H index aa0391408e686635a30ef47644bb68f060b39950..a41fe2730dafbd8806b79457d2a96c9e05dda245 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkOpenFOAMPoints.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMPoints.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - vtkPV398Foam + vtkPV4Foam \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkOpenFOAMTupleRemap.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMTupleRemap.H similarity index 99% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkOpenFOAMTupleRemap.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMTupleRemap.H index f5057359e690fd9bcbd563accc6db0d5a3d8ec39..b8358b57fe668f38d0ad4b4ba75bea30fb05074a 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkOpenFOAMTupleRemap.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkOpenFOAMTupleRemap.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - vtkPV398Foam + vtkPV4Foam \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398Foam.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.C similarity index 92% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398Foam.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.C index 54848ccc263b16eaf0d2976ea86b128214b233a0..960883af3414ed943bc0e57bd8338ccd7b30ad67 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398Foam.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.C @@ -23,8 +23,8 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" -#include "vtkPV398FoamReader.h" +#include "vtkPV4Foam.H" +#include "vtkPV4FoamReader.h" // OpenFOAM includes #include "fvMesh.H" @@ -42,16 +42,16 @@ License namespace Foam { -defineTypeNameAndDebug(vtkPV398Foam, 0); +defineTypeNameAndDebug(vtkPV4Foam, 0); } // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -#include "vtkPV398FoamAddToSelection.H" -#include "vtkPV398FoamUpdateInfoFields.H" +#include "vtkPV4FoamAddToSelection.H" +#include "vtkPV4FoamUpdateInfoFields.H" -void Foam::vtkPV398Foam::resetCounters() +void Foam::vtkPV4Foam::resetCounters() { // Reset array range information (ids and sizes) arrayRangeVolume_.reset(); @@ -66,7 +66,7 @@ void Foam::vtkPV398Foam::resetCounters() } -void Foam::vtkPV398Foam::reduceMemory() +void Foam::vtkPV4Foam::reduceMemory() { forAll(regionPolyDecomp_, i) { @@ -91,7 +91,7 @@ void Foam::vtkPV398Foam::reduceMemory() } -int Foam::vtkPV398Foam::setTime(int nRequest, const double requestTimes[]) +int Foam::vtkPV4Foam::setTime(int nRequest, const double requestTimes[]) { Time& runTime = dbPtr_(); @@ -116,7 +116,7 @@ int Foam::vtkPV398Foam::setTime(int nRequest, const double requestTimes[]) if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::setTime("; + Info<< "<beg> Foam::vtkPV4Foam::setTime("; for (int requestI = 0; requestI < nRequest; ++requestI) { if (requestI) @@ -160,7 +160,7 @@ int Foam::vtkPV398Foam::setTime(int nRequest, const double requestTimes[]) if (debug) { - Info<< "<end> Foam::vtkPV398Foam::setTime() - selectedTime=" + Info<< "<end> Foam::vtkPV4Foam::setTime() - selectedTime=" << Times[nearestIndex].name() << " index=" << timeIndex_ << "/" << Times.size() << " meshChanged=" << Switch(meshChanged_) @@ -171,11 +171,11 @@ int Foam::vtkPV398Foam::setTime(int nRequest, const double requestTimes[]) } -void Foam::vtkPV398Foam::updateMeshPartsStatus() +void Foam::vtkPV4Foam::updateMeshPartsStatus() { if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateMeshPartsStatus" << endl; + Info<< "<beg> Foam::vtkPV4Foam::updateMeshPartsStatus" << endl; } vtkDataArraySelection* selection = reader_->GetPartSelection(); @@ -212,17 +212,17 @@ void Foam::vtkPV398Foam::updateMeshPartsStatus() } if (debug) { - Info<< "<end> Foam::vtkPV398Foam::updateMeshPartsStatus" << endl; + Info<< "<end> Foam::vtkPV4Foam::updateMeshPartsStatus" << endl; } } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::vtkPV398Foam::vtkPV398Foam +Foam::vtkPV4Foam::vtkPV4Foam ( const char* const FileName, - vtkPV398FoamReader* reader + vtkPV4FoamReader* reader ) : reader_(reader), @@ -245,7 +245,7 @@ Foam::vtkPV398Foam::vtkPV398Foam { if (debug) { - Info<< "Foam::vtkPV398Foam::vtkPV398Foam - " << FileName << endl; + Info<< "Foam::vtkPV4Foam::vtkPV4Foam - " << FileName << endl; printMemory(); } @@ -329,11 +329,11 @@ Foam::vtkPV398Foam::vtkPV398Foam // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::vtkPV398Foam::~vtkPV398Foam() +Foam::vtkPV4Foam::~vtkPV4Foam() { if (debug) { - Info<< "<end> Foam::vtkPV398Foam::~vtkPV398Foam" << endl; + Info<< "<end> Foam::vtkPV4Foam::~vtkPV4Foam" << endl; } delete meshPtr_; @@ -342,11 +342,11 @@ Foam::vtkPV398Foam::~vtkPV398Foam() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::vtkPV398Foam::updateInfo() +void Foam::vtkPV4Foam::updateInfo() { if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateInfo" + Info<< "<beg> Foam::vtkPV4Foam::updateInfo" << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] timeIndex=" << timeIndex_ << endl; } @@ -409,17 +409,17 @@ void Foam::vtkPV398Foam::updateInfo() { // just for debug info getSelectedArrayEntries(partSelection); - Info<< "<end> Foam::vtkPV398Foam::updateInfo" << endl; + Info<< "<end> Foam::vtkPV4Foam::updateInfo" << endl; } } -void Foam::vtkPV398Foam::updateFoamMesh() +void Foam::vtkPV4Foam::updateFoamMesh() { if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateFoamMesh" << endl; + Info<< "<beg> Foam::vtkPV4Foam::updateFoamMesh" << endl; printMemory(); } @@ -463,13 +463,13 @@ void Foam::vtkPV398Foam::updateFoamMesh() if (debug) { - Info<< "<end> Foam::vtkPV398Foam::updateFoamMesh" << endl; + Info<< "<end> Foam::vtkPV4Foam::updateFoamMesh" << endl; printMemory(); } } -void Foam::vtkPV398Foam::Update +void Foam::vtkPV4Foam::Update ( vtkMultiBlockDataSet* output, vtkMultiBlockDataSet* lagrangianOutput @@ -477,7 +477,7 @@ void Foam::vtkPV398Foam::Update { if (debug) { - cout<< "<beg> Foam::vtkPV398Foam::Update - output with " + cout<< "<beg> Foam::vtkPV4Foam::Update - output with " << output->GetNumberOfBlocks() << " and " << lagrangianOutput->GetNumberOfBlocks() << " blocks\n"; output->Print(cout); @@ -518,7 +518,7 @@ void Foam::vtkPV398Foam::Update reader_->UpdateProgress(0.7); } -#ifdef VTKPV398FOAM_DUALPORT +#ifdef VTKPV4FOAM_DUALPORT // restart port1 at block=0 blockNo = 0; #endif @@ -540,7 +540,7 @@ void Foam::vtkPV398Foam::Update } -void Foam::vtkPV398Foam::CleanUp() +void Foam::vtkPV4Foam::CleanUp() { // reclaim some memory reduceMemory(); @@ -548,7 +548,7 @@ void Foam::vtkPV398Foam::CleanUp() } -double* Foam::vtkPV398Foam::findTimes(int& nTimeSteps) +double* Foam::vtkPV4Foam::findTimes(int& nTimeSteps) { int nTimes = 0; double* tsteps = NULL; @@ -621,7 +621,7 @@ double* Foam::vtkPV398Foam::findTimes(int& nTimeSteps) } -void Foam::vtkPV398Foam::renderPatchNames +void Foam::vtkPV4Foam::renderPatchNames ( vtkRenderer* renderer, const bool show @@ -819,7 +819,7 @@ void Foam::vtkPV398Foam::renderPatchNames } -void Foam::vtkPV398Foam::PrintSelf(ostream& os, vtkIndent indent) const +void Foam::vtkPV4Foam::PrintSelf(ostream& os, vtkIndent indent) const { os << indent << "Number of nodes: " << (meshPtr_ ? meshPtr_->nPoints() : 0) << "\n"; diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398Foam.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.H similarity index 94% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398Foam.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.H index e692fda6dfe628ccced28fdf361e9cd8f77d65d8..bd5c22a22f1828fc86349057d7c33a623c02270b 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398Foam.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4Foam.H @@ -22,39 +22,39 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::vtkPV398Foam + Foam::vtkPV4Foam Description Provides a reader interface for OpenFOAM to VTK interaction. SourceFiles - vtkPV398Foam.C - vtkPV398Foam.H - vtkPV398FoamFields.C - vtkPV398FoamMesh.C - vtkPV398FoamMeshLagrangian.C - vtkPV398FoamTemplates.C - vtkPV398FoamMeshSet.C - vtkPV398FoamMeshVolume.C - vtkPV398FoamMeshZone.C - vtkPV398FoamFaceField.H - vtkPV398FoamLagrangianFields.H - vtkPV398FoamPatchField.H - vtkPV398FoamPointFields.H - vtkPV398FoamPoints.H - vtkPV398FoamUpdateInfo.C - vtkPV398FoamUpdateInfoFields.H - vtkPV398FoamUtils.C - vtkPV398FoamVolFields.H - vtkPV398FoamAddToSelection.H + vtkPV4Foam.C + vtkPV4Foam.H + vtkPV4FoamFields.C + vtkPV4FoamMesh.C + vtkPV4FoamMeshLagrangian.C + vtkPV4FoamTemplates.C + vtkPV4FoamMeshSet.C + vtkPV4FoamMeshVolume.C + vtkPV4FoamMeshZone.C + vtkPV4FoamFaceField.H + vtkPV4FoamLagrangianFields.H + vtkPV4FoamPatchField.H + vtkPV4FoamPointFields.H + vtkPV4FoamPoints.H + vtkPV4FoamUpdateInfo.C + vtkPV4FoamUpdateInfoFields.H + vtkPV4FoamUtils.C + vtkPV4FoamVolFields.H + vtkPV4FoamAddToSelection.H // Needed by VTK: vtkDataArrayTemplateImplicit.txx \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398Foam_H -#define vtkPV398Foam_H +#ifndef vtkPV4Foam_H +#define vtkPV4Foam_H // do not include legacy strstream headers #ifndef VTK_EXCLUDE_STRSTREAM_HEADERS @@ -69,14 +69,14 @@ SourceFiles #include "PrimitivePatchInterpolation.H" #include "volPointInterpolation.H" -#undef VTKPV398FOAM_DUALPORT +#undef VTKPV4FOAM_DUALPORT // * * * * * * * * * * * * * Forward Declarations * * * * * * * * * * * * * // class vtkDataArraySelection; class vtkDataSet; class vtkPoints; -class vtkPV398FoamReader; +class vtkPV4FoamReader; class vtkRenderer; class vtkTextActor; class vtkMultiBlockDataSet; @@ -102,10 +102,10 @@ template<class Type> class IOField; template<class Type> class List; /*---------------------------------------------------------------------------*\ - Class vtkPV398Foam Declaration + Class vtkPV4Foam Declaration \*---------------------------------------------------------------------------*/ -class vtkPV398Foam +class vtkPV4Foam { // Private classes @@ -246,8 +246,8 @@ class vtkPV398Foam // Private Data - //- Access to the controlling vtkPV398FoamReader - vtkPV398FoamReader* reader_; + //- Access to the controlling vtkPV4FoamReader + vtkPV4FoamReader* reader_; //- OpenFOAM time control autoPtr<Time> dbPtr_; @@ -652,31 +652,31 @@ class vtkPV398Foam //- Disallow default bitwise copy construct - vtkPV398Foam(const vtkPV398Foam&); + vtkPV4Foam(const vtkPV4Foam&); //- Disallow default bitwise assignment - void operator=(const vtkPV398Foam&); + void operator=(const vtkPV4Foam&); public: //- Static data members - ClassName("vtkPV398Foam"); + ClassName("vtkPV4Foam"); // Constructors //- Construct from components - vtkPV398Foam + vtkPV4Foam ( const char* const FileName, - vtkPV398FoamReader* reader + vtkPV4FoamReader* reader ); //- Destructor - ~vtkPV398Foam(); + ~vtkPV4Foam(); // Member Functions @@ -731,7 +731,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository -# include "vtkPV398FoamTemplates.C" +# include "vtkPV4FoamTemplates.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamAddToSelection.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamAddToSelection.H similarity index 94% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamAddToSelection.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamAddToSelection.H index f69ed8c8cb768d0685cc86f02f18e0eb0e0492be..0dc9c1a463379b4f9cd1d05abb4711c33caf7f47 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamAddToSelection.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamAddToSelection.H @@ -23,8 +23,8 @@ License \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398FoamAddToSelection_H -#define vtkPV398FoamAddToSelection_H +#ifndef vtkPV4FoamAddToSelection_H +#define vtkPV4FoamAddToSelection_H // OpenFOAM includes #include "IOobjectList.H" @@ -36,7 +36,7 @@ License // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type> -Foam::label Foam::vtkPV398Foam::addToSelection +Foam::label Foam::vtkPV4Foam::addToSelection ( vtkDataArraySelection *select, const IOobjectList& objectLst, diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamFaceField.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFaceField.H similarity index 96% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamFaceField.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFaceField.H index 95721216d52ad05de2a518bf460373f9be00349d..b1f25f116a29315168a060af2423614cd7d02706 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamFaceField.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFaceField.H @@ -22,12 +22,12 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - vtkPV398Foam + vtkPV4Foam \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398FoamFaceField_H -#define vtkPV398FoamFaceField_H +#ifndef vtkPV4FoamFaceField_H +#define vtkPV4FoamFaceField_H // VTK includes #include "vtkCellData.h" @@ -40,7 +40,7 @@ InClass // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type> -void Foam::vtkPV398Foam::convertFaceField +void Foam::vtkPV4Foam::convertFaceField ( const GeometricField<Type, fvPatchField, volMesh>& tf, vtkMultiBlockDataSet* output, diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamFields.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFields.C similarity index 90% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamFields.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFields.C index c4b2df11d4ddac4f7f8162d9d44428931829ecc0..127f49d30614c8b62fa288b40c5a1cc78c3b2cbe 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamFields.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamFields.C @@ -23,11 +23,11 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" +#include "vtkPV4Foam.H" // OpenFOAM includes #include "IOobjectList.H" -#include "vtkPV398FoamReader.h" +#include "vtkPV4FoamReader.h" // VTK includes #include "vtkDataArraySelection.h" @@ -36,12 +36,12 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -#include "vtkPV398FoamVolFields.H" -#include "vtkPV398FoamPointFields.H" -#include "vtkPV398FoamLagrangianFields.H" +#include "vtkPV4FoamVolFields.H" +#include "vtkPV4FoamPointFields.H" +#include "vtkPV4FoamLagrangianFields.H" -void Foam::vtkPV398Foam::pruneObjectList +void Foam::vtkPV4Foam::pruneObjectList ( IOobjectList& objects, const wordHashSet& selected @@ -64,7 +64,7 @@ void Foam::vtkPV398Foam::pruneObjectList } -void Foam::vtkPV398Foam::convertVolFields +void Foam::vtkPV4Foam::convertVolFields ( vtkMultiBlockDataSet* output ) @@ -93,7 +93,7 @@ void Foam::vtkPV398Foam::convertVolFields if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertVolFields" << nl + Info<< "<beg> Foam::vtkPV4Foam::convertVolFields" << nl << "converting OpenFOAM volume fields" << endl; forAllConstIter(IOobjectList, objects, iter) { @@ -145,13 +145,13 @@ void Foam::vtkPV398Foam::convertVolFields if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertVolFields" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertVolFields" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertPointFields +void Foam::vtkPV4Foam::convertPointFields ( vtkMultiBlockDataSet* output ) @@ -184,7 +184,7 @@ void Foam::vtkPV398Foam::convertPointFields if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertPointFields" << nl + Info<< "<beg> Foam::vtkPV4Foam::convertPointFields" << nl << "converting OpenFOAM volume fields -> point fields" << endl; forAllConstIter(IOobjectList, objects, iter) { @@ -221,13 +221,13 @@ void Foam::vtkPV398Foam::convertPointFields if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertPointFields" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertPointFields" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertLagrangianFields +void Foam::vtkPV4Foam::convertLagrangianFields ( vtkMultiBlockDataSet* output ) @@ -247,7 +247,7 @@ void Foam::vtkPV398Foam::convertLagrangianFields if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertLagrangianFields" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertLagrangianFields" << endl; printMemory(); } @@ -316,7 +316,7 @@ void Foam::vtkPV398Foam::convertLagrangianFields if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertLagrangianFields" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertLagrangianFields" << endl; printMemory(); } } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamLagrangianFields.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamLagrangianFields.H similarity index 94% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamLagrangianFields.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamLagrangianFields.H index 8f6e4ea351646dbeef0f721da0eb5dcd2fcc75ef..9edea96c5598fdac9afac988eb43e0e7ffa219af 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamLagrangianFields.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamLagrangianFields.H @@ -22,12 +22,12 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - vtkPV398Foam + vtkPV4Foam \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398FoamLagrangianFields_H -#define vtkPV398FoamLagrangianFields_H +#ifndef vtkPV4FoamLagrangianFields_H +#define vtkPV4FoamLagrangianFields_H #include "Cloud.H" @@ -36,7 +36,7 @@ InClass // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type> -void Foam::vtkPV398Foam::convertLagrangianFields +void Foam::vtkPV4Foam::convertLagrangianFields ( const IOobjectList& objects, vtkMultiBlockDataSet* output, @@ -58,7 +58,7 @@ void Foam::vtkPV398Foam::convertLagrangianFields template<class Type> -void Foam::vtkPV398Foam::convertLagrangianField +void Foam::vtkPV4Foam::convertLagrangianField ( const IOField<Type>& tf, vtkMultiBlockDataSet* output, diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMesh.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMesh.C similarity index 89% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMesh.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMesh.C index c04f2be85a555c52be5a1f4fc3a8db339bbeddf8..379868404c4d253345b2611c6901793fda32062d 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMesh.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMesh.C @@ -23,14 +23,14 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" +#include "vtkPV4Foam.H" // OpenFOAM includes #include "cellSet.H" #include "faceSet.H" #include "pointSet.H" #include "fvMeshSubset.H" -#include "vtkPV398FoamReader.h" +#include "vtkPV4FoamReader.h" #include "uindirectPrimitivePatch.H" // VTK includes @@ -41,7 +41,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::vtkPV398Foam::convertMeshVolume +void Foam::vtkPV4Foam::convertMeshVolume ( vtkMultiBlockDataSet* output, int& blockNo @@ -57,7 +57,7 @@ void Foam::vtkPV398Foam::convertMeshVolume if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertMeshVolume" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertMeshVolume" << endl; printMemory(); } @@ -95,13 +95,13 @@ void Foam::vtkPV398Foam::convertMeshVolume if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertMeshVolume" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertMeshVolume" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertMeshLagrangian +void Foam::vtkPV4Foam::convertMeshLagrangian ( vtkMultiBlockDataSet* output, int& blockNo @@ -114,7 +114,7 @@ void Foam::vtkPV398Foam::convertMeshLagrangian if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertMeshLagrangian" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertMeshLagrangian" << endl; printMemory(); } @@ -146,13 +146,13 @@ void Foam::vtkPV398Foam::convertMeshLagrangian if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertMeshLagrangian" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertMeshLagrangian" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertMeshPatches +void Foam::vtkPV4Foam::convertMeshPatches ( vtkMultiBlockDataSet* output, int& blockNo @@ -166,7 +166,7 @@ void Foam::vtkPV398Foam::convertMeshPatches if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertMeshPatches" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertMeshPatches" << endl; printMemory(); } @@ -235,13 +235,13 @@ void Foam::vtkPV398Foam::convertMeshPatches if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertMeshPatches" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertMeshPatches" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertMeshCellZones +void Foam::vtkPV4Foam::convertMeshCellZones ( vtkMultiBlockDataSet* output, int& blockNo @@ -262,7 +262,7 @@ void Foam::vtkPV398Foam::convertMeshCellZones if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertMeshCellZones" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertMeshCellZones" << endl; printMemory(); } @@ -324,13 +324,13 @@ void Foam::vtkPV398Foam::convertMeshCellZones if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertMeshCellZones" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertMeshCellZones" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertMeshCellSets +void Foam::vtkPV4Foam::convertMeshCellSets ( vtkMultiBlockDataSet* output, int& blockNo @@ -346,7 +346,7 @@ void Foam::vtkPV398Foam::convertMeshCellSets if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertMeshCellSets" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertMeshCellSets" << endl; printMemory(); } @@ -406,13 +406,13 @@ void Foam::vtkPV398Foam::convertMeshCellSets if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertMeshCellSets" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertMeshCellSets" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertMeshFaceZones +void Foam::vtkPV4Foam::convertMeshFaceZones ( vtkMultiBlockDataSet* output, int& blockNo @@ -430,7 +430,7 @@ void Foam::vtkPV398Foam::convertMeshFaceZones if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertMeshFaceZones" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertMeshFaceZones" << endl; printMemory(); } @@ -470,13 +470,13 @@ void Foam::vtkPV398Foam::convertMeshFaceZones if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertMeshFaceZones" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertMeshFaceZones" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertMeshFaceSets +void Foam::vtkPV4Foam::convertMeshFaceSets ( vtkMultiBlockDataSet* output, int& blockNo @@ -489,7 +489,7 @@ void Foam::vtkPV398Foam::convertMeshFaceSets if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertMeshFaceSets" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertMeshFaceSets" << endl; printMemory(); } @@ -527,13 +527,13 @@ void Foam::vtkPV398Foam::convertMeshFaceSets if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertMeshFaceSets" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertMeshFaceSets" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertMeshPointZones +void Foam::vtkPV4Foam::convertMeshPointZones ( vtkMultiBlockDataSet* output, int& blockNo @@ -546,7 +546,7 @@ void Foam::vtkPV398Foam::convertMeshPointZones if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertMeshPointZones" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertMeshPointZones" << endl; printMemory(); } @@ -582,14 +582,14 @@ void Foam::vtkPV398Foam::convertMeshPointZones if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertMeshPointZones" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertMeshPointZones" << endl; printMemory(); } } -void Foam::vtkPV398Foam::convertMeshPointSets +void Foam::vtkPV4Foam::convertMeshPointSets ( vtkMultiBlockDataSet* output, int& blockNo @@ -602,7 +602,7 @@ void Foam::vtkPV398Foam::convertMeshPointSets if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::convertMeshPointSets" << endl; + Info<< "<beg> Foam::vtkPV4Foam::convertMeshPointSets" << endl; printMemory(); } @@ -640,7 +640,7 @@ void Foam::vtkPV398Foam::convertMeshPointSets if (debug) { - Info<< "<end> Foam::vtkPV398Foam::convertMeshPointSets" << endl; + Info<< "<end> Foam::vtkPV4Foam::convertMeshPointSets" << endl; printMemory(); } } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshLagrangian.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshLagrangian.C similarity index 93% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshLagrangian.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshLagrangian.C index 294c5422afc09625a7c981974bc455cda87cba45..9ade1f47e58d71f0559b15d7e5404f88d7ab1cc2 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshLagrangian.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshLagrangian.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" +#include "vtkPV4Foam.H" // OpenFOAM includes #include "Cloud.H" @@ -39,7 +39,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -vtkPolyData* Foam::vtkPV398Foam::lagrangianVTKMesh +vtkPolyData* Foam::vtkPV4Foam::lagrangianVTKMesh ( const fvMesh& mesh, const word& cloudName @@ -49,7 +49,7 @@ vtkPolyData* Foam::vtkPV398Foam::lagrangianVTKMesh if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::lagrangianVTKMesh - timePath " + Info<< "<beg> Foam::vtkPV4Foam::lagrangianVTKMesh - timePath " << mesh.time().timePath()/cloud::prefix/cloudName << endl; printMemory(); } @@ -98,7 +98,7 @@ vtkPolyData* Foam::vtkPV398Foam::lagrangianVTKMesh if (debug) { - Info<< "<end> Foam::vtkPV398Foam::lagrangianVTKMesh" << endl; + Info<< "<end> Foam::vtkPV4Foam::lagrangianVTKMesh" << endl; printMemory(); } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshSet.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshSet.C similarity index 89% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshSet.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshSet.C index a93e68d5c7118985be4c6d714904d535b0e9f394..2d5f3bdb79d79d658f01c915070da6c4fb708c92 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshSet.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshSet.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" +#include "vtkPV4Foam.H" // OpenFOAM includes #include "faceSet.H" @@ -37,7 +37,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -vtkPolyData* Foam::vtkPV398Foam::faceSetVTKMesh +vtkPolyData* Foam::vtkPV4Foam::faceSetVTKMesh ( const fvMesh& mesh, const faceSet& fSet @@ -47,7 +47,7 @@ vtkPolyData* Foam::vtkPV398Foam::faceSetVTKMesh if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::faceSetVTKMesh" << endl; + Info<< "<beg> Foam::vtkPV4Foam::faceSetVTKMesh" << endl; printMemory(); } @@ -100,7 +100,7 @@ vtkPolyData* Foam::vtkPV398Foam::faceSetVTKMesh if (debug) { - Info<< "<end> Foam::vtkPV398Foam::faceSetVTKMesh" << endl; + Info<< "<end> Foam::vtkPV4Foam::faceSetVTKMesh" << endl; printMemory(); } @@ -108,7 +108,7 @@ vtkPolyData* Foam::vtkPV398Foam::faceSetVTKMesh } -vtkPolyData* Foam::vtkPV398Foam::pointSetVTKMesh +vtkPolyData* Foam::vtkPV4Foam::pointSetVTKMesh ( const fvMesh& mesh, const pointSet& pSet @@ -118,7 +118,7 @@ vtkPolyData* Foam::vtkPV398Foam::pointSetVTKMesh if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::pointSetVTKMesh" << endl; + Info<< "<beg> Foam::vtkPV4Foam::pointSetVTKMesh" << endl; printMemory(); } @@ -137,7 +137,7 @@ vtkPolyData* Foam::vtkPV398Foam::pointSetVTKMesh if (debug) { - Info<< "<end> Foam::vtkPV398Foam::pointSetVTKMesh" << endl; + Info<< "<end> Foam::vtkPV4Foam::pointSetVTKMesh" << endl; printMemory(); } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshVolume.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C similarity index 98% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshVolume.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C index bfd56242f2361b5d8a3355f45f85c143ad538634..317b370082735a5fc48c516422a375bc0ff70292 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshVolume.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshVolume.C @@ -23,8 +23,8 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" -#include "vtkPV398FoamReader.h" +#include "vtkPV4Foam.H" +#include "vtkPV4FoamReader.h" // OpenFOAM includes #include "fvMesh.H" @@ -40,7 +40,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -vtkUnstructuredGrid* Foam::vtkPV398Foam::volumeVTKMesh +vtkUnstructuredGrid* Foam::vtkPV4Foam::volumeVTKMesh ( const fvMesh& mesh, polyDecomp& decompInfo @@ -57,7 +57,7 @@ vtkUnstructuredGrid* Foam::vtkPV398Foam::volumeVTKMesh if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::volumeVTKMesh" << endl; + Info<< "<beg> Foam::vtkPV4Foam::volumeVTKMesh" << endl; printMemory(); } @@ -470,7 +470,7 @@ vtkUnstructuredGrid* Foam::vtkPV398Foam::volumeVTKMesh if (debug) { - Info<< "<end> Foam::vtkPV398Foam::volumeVTKMesh" << endl; + Info<< "<end> Foam::vtkPV4Foam::volumeVTKMesh" << endl; printMemory(); } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshZone.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshZone.C similarity index 90% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshZone.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshZone.C index 8c59fd2a6c3b25a3ff4c258f32d638fe76a67793..78eb386b1a870474d0832bcf10cde356450107fe 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamMeshZone.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamMeshZone.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" +#include "vtkPV4Foam.H" // OpenFOAM includes #include "vtkOpenFOAMPoints.H" @@ -35,7 +35,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -vtkPolyData* Foam::vtkPV398Foam::pointZoneVTKMesh +vtkPolyData* Foam::vtkPV4Foam::pointZoneVTKMesh ( const fvMesh& mesh, const labelList& pointLabels @@ -45,7 +45,7 @@ vtkPolyData* Foam::vtkPV398Foam::pointZoneVTKMesh if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::pointZoneVTKMesh" << endl; + Info<< "<beg> Foam::vtkPV4Foam::pointZoneVTKMesh" << endl; printMemory(); } @@ -64,7 +64,7 @@ vtkPolyData* Foam::vtkPV398Foam::pointZoneVTKMesh if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::pointZoneVTKMesh" << endl; + Info<< "<beg> Foam::vtkPV4Foam::pointZoneVTKMesh" << endl; printMemory(); } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamPatchField.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPatchField.H similarity index 95% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamPatchField.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPatchField.H index 6223166dc8c8e9205bbd3f9e7df8cf7143af8036..982c9d80991a4faceb59325a5fd2ead4784977ef 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamPatchField.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPatchField.H @@ -22,12 +22,12 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - vtkPV398Foam + vtkPV4Foam \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398FoamPatchField_H -#define vtkPV398FoamPatchField_H +#ifndef vtkPV4FoamPatchField_H +#define vtkPV4FoamPatchField_H // VTK includes #include "vtkCellData.h" @@ -41,7 +41,7 @@ InClass // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type> -void Foam::vtkPV398Foam::convertPatchField +void Foam::vtkPV4Foam::convertPatchField ( const word& name, const Field<Type>& ptf, @@ -83,7 +83,7 @@ void Foam::vtkPV398Foam::convertPatchField // as above, but with PointData() template<class Type> -void Foam::vtkPV398Foam::convertPatchPointField +void Foam::vtkPV4Foam::convertPatchPointField ( const word& name, const Field<Type>& pptf, diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamPointFields.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPointFields.H similarity index 96% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamPointFields.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPointFields.H index 9cc93349e1d759631fb184cb0676711a86485012..05bc1b1bd664fbadd6896a6c047db7b8287a5b99 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamPointFields.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamPointFields.H @@ -22,12 +22,12 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - vtkPV398Foam + vtkPV4Foam \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398FoamPointFields_H -#define vtkPV398FoamPointFields_H +#ifndef vtkPV4FoamPointFields_H +#define vtkPV4FoamPointFields_H // OpenFOAM includes #include "interpolatePointToCell.H" @@ -37,7 +37,7 @@ InClass // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type> -void Foam::vtkPV398Foam::convertPointFields +void Foam::vtkPV4Foam::convertPointFields ( const fvMesh& mesh, const pointMesh& pMesh, @@ -62,7 +62,7 @@ void Foam::vtkPV398Foam::convertPointFields if (debug) { - Info<< "Foam::vtkPV398Foam::convertPointFields : " + Info<< "Foam::vtkPV4Foam::convertPointFields : " << fieldName << endl; } @@ -170,7 +170,7 @@ void Foam::vtkPV398Foam::convertPointFields template<class Type> -void Foam::vtkPV398Foam::convertPointFieldBlock +void Foam::vtkPV4Foam::convertPointFieldBlock ( const GeometricField<Type, pointPatchField, pointMesh>& ptf, vtkMultiBlockDataSet* output, @@ -199,7 +199,7 @@ void Foam::vtkPV398Foam::convertPointFieldBlock template<class Type> -void Foam::vtkPV398Foam::convertPointField +void Foam::vtkPV4Foam::convertPointField ( const GeometricField<Type, pointPatchField, pointMesh>& ptf, const GeometricField<Type, fvPatchField, volMesh>& tf, diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamTemplates.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamTemplates.C similarity index 91% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamTemplates.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamTemplates.C index 450a2e5b000e8b394c231e6f0eb9441d2fb85b04..bfdf3f5a9541fbc969647fee38c40c198dc326c7 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamTemplates.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamTemplates.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" +#include "vtkPV4Foam.H" // OpenFOAM includes #include "polyPatch.H" @@ -38,7 +38,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class PatchType> -vtkPolyData* Foam::vtkPV398Foam::patchVTKMesh +vtkPolyData* Foam::vtkPV4Foam::patchVTKMesh ( const word& name, const PatchType& p @@ -48,7 +48,7 @@ vtkPolyData* Foam::vtkPV398Foam::patchVTKMesh if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::patchVTKMesh - " << name << endl; + Info<< "<beg> Foam::vtkPV4Foam::patchVTKMesh - " << name << endl; printMemory(); } @@ -88,7 +88,7 @@ vtkPolyData* Foam::vtkPV398Foam::patchVTKMesh if (debug) { - Info<< "<end> Foam::vtkPV398Foam::patchVTKMesh - " << name << endl; + Info<< "<end> Foam::vtkPV4Foam::patchVTKMesh - " << name << endl; printMemory(); } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamUpdateInfo.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfo.C similarity index 92% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamUpdateInfo.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfo.C index fb155dc49e81eef94f469475338fe21eeb590ae6..9ed89ff9e3cf10d2797825be428abff6380efcb6 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamUpdateInfo.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfo.C @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" +#include "vtkPV4Foam.H" // OpenFOAM includes #include "cellSet.H" @@ -34,11 +34,11 @@ License #include "polyBoundaryMeshEntries.H" #include "entry.H" #include "Cloud.H" -#include "vtkPV398FoamReader.h" +#include "vtkPV4FoamReader.h" // local headers -#include "vtkPV398FoamAddToSelection.H" -#include "vtkPV398FoamUpdateInfoFields.H" +#include "vtkPV4FoamAddToSelection.H" +#include "vtkPV4FoamUpdateInfoFields.H" // VTK includes #include "vtkDataArraySelection.h" @@ -82,7 +82,7 @@ public: // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // template<class ZoneType> -Foam::wordList Foam::vtkPV398Foam::getZoneNames +Foam::wordList Foam::vtkPV4Foam::getZoneNames ( const ZoneMesh<ZoneType, polyMesh>& zmesh ) const @@ -103,7 +103,7 @@ Foam::wordList Foam::vtkPV398Foam::getZoneNames } -Foam::wordList Foam::vtkPV398Foam::getZoneNames(const word& zoneType) const +Foam::wordList Foam::vtkPV4Foam::getZoneNames(const word& zoneType) const { wordList names; @@ -139,14 +139,14 @@ Foam::wordList Foam::vtkPV398Foam::getZoneNames(const word& zoneType) const } -void Foam::vtkPV398Foam::updateInfoInternalMesh +void Foam::vtkPV4Foam::updateInfoInternalMesh ( vtkDataArraySelection* arraySelection ) { if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateInfoInternalMesh" << endl; + Info<< "<beg> Foam::vtkPV4Foam::updateInfoInternalMesh" << endl; } // Determine mesh parts (internalMesh, patches...) @@ -163,19 +163,19 @@ void Foam::vtkPV398Foam::updateInfoInternalMesh // just for debug info getSelectedArrayEntries(arraySelection); - Info<< "<end> Foam::vtkPV398Foam::updateInfoInternalMesh" << endl; + Info<< "<end> Foam::vtkPV4Foam::updateInfoInternalMesh" << endl; } } -void Foam::vtkPV398Foam::updateInfoLagrangian +void Foam::vtkPV4Foam::updateInfoLagrangian ( vtkDataArraySelection* arraySelection ) { if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateInfoLagrangian" << nl + Info<< "<beg> Foam::vtkPV4Foam::updateInfoLagrangian" << nl << " " << dbPtr_->timePath()/cloud::prefix << endl; } @@ -214,12 +214,12 @@ void Foam::vtkPV398Foam::updateInfoLagrangian // just for debug info getSelectedArrayEntries(arraySelection); - Info<< "<end> Foam::vtkPV398Foam::updateInfoLagrangian" << endl; + Info<< "<end> Foam::vtkPV4Foam::updateInfoLagrangian" << endl; } } -void Foam::vtkPV398Foam::updateInfoPatches +void Foam::vtkPV4Foam::updateInfoPatches ( vtkDataArraySelection* arraySelection, stringList& enabledEntries @@ -227,7 +227,7 @@ void Foam::vtkPV398Foam::updateInfoPatches { if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateInfoPatches" + Info<< "<beg> Foam::vtkPV4Foam::updateInfoPatches" << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; } @@ -458,12 +458,12 @@ void Foam::vtkPV398Foam::updateInfoPatches // just for debug info getSelectedArrayEntries(arraySelection); - Info<< "<end> Foam::vtkPV398Foam::updateInfoPatches" << endl; + Info<< "<end> Foam::vtkPV4Foam::updateInfoPatches" << endl; } } -void Foam::vtkPV398Foam::updateInfoZones +void Foam::vtkPV4Foam::updateInfoZones ( vtkDataArraySelection* arraySelection ) @@ -475,7 +475,7 @@ void Foam::vtkPV398Foam::updateInfoZones if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateInfoZones" + Info<< "<beg> Foam::vtkPV4Foam::updateInfoZones" << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; } @@ -554,12 +554,12 @@ void Foam::vtkPV398Foam::updateInfoZones // just for debug info getSelectedArrayEntries(arraySelection); - Info<< "<end> Foam::vtkPV398Foam::updateInfoZones" << endl; + Info<< "<end> Foam::vtkPV4Foam::updateInfoZones" << endl; } } -void Foam::vtkPV398Foam::updateInfoSets +void Foam::vtkPV4Foam::updateInfoSets ( vtkDataArraySelection* arraySelection ) @@ -571,7 +571,7 @@ void Foam::vtkPV398Foam::updateInfoSets if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateInfoSets" << endl; + Info<< "<beg> Foam::vtkPV4Foam::updateInfoSets" << endl; } // Add names of sets. Search for last time directory with a sets @@ -596,7 +596,7 @@ void Foam::vtkPV398Foam::updateInfoSets if (debug) { - Info<< " Foam::vtkPV398Foam::updateInfoSets read " + Info<< " Foam::vtkPV4Foam::updateInfoSets read " << objects.names() << " from " << setsInstance << endl; } @@ -630,16 +630,16 @@ void Foam::vtkPV398Foam::updateInfoSets // just for debug info getSelectedArrayEntries(arraySelection); - Info<< "<end> Foam::vtkPV398Foam::updateInfoSets" << endl; + Info<< "<end> Foam::vtkPV4Foam::updateInfoSets" << endl; } } -void Foam::vtkPV398Foam::updateInfoLagrangianFields() +void Foam::vtkPV4Foam::updateInfoLagrangianFields() { if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateInfoLagrangianFields" + Info<< "<beg> Foam::vtkPV4Foam::updateInfoLagrangianFields" << endl; } @@ -715,7 +715,7 @@ void Foam::vtkPV398Foam::updateInfoLagrangianFields() if (debug) { - Info<< "<end> Foam::vtkPV398Foam::updateInfoLagrangianFields - " + Info<< "<end> Foam::vtkPV4Foam::updateInfoLagrangianFields - " << "lagrangian objects.size() = " << objects.size() << endl; } } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamUpdateInfoFields.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfoFields.H similarity index 92% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamUpdateInfoFields.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfoFields.H index 0d864002c79b1096ca98f1834d2029b935e397c8..b191e1c52bc5e969e87ea260f3ab3f1c69e649eb 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamUpdateInfoFields.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUpdateInfoFields.H @@ -22,24 +22,24 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - vtkPV398Foam + vtkPV4Foam \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398FoamUpdateInfoFields_H -#define vtkPV398FoamUpdateInfoFields_H +#ifndef vtkPV4FoamUpdateInfoFields_H +#define vtkPV4FoamUpdateInfoFields_H // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<template<class> class patchType, class meshType> -void Foam::vtkPV398Foam::updateInfoFields +void Foam::vtkPV4Foam::updateInfoFields ( vtkDataArraySelection* select ) { if (debug) { - Info<< "<beg> Foam::vtkPV398Foam::updateInfoFields <" + Info<< "<beg> Foam::vtkPV4Foam::updateInfoFields <" << meshType::Mesh::typeName << "> [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; @@ -104,7 +104,7 @@ void Foam::vtkPV398Foam::updateInfoFields if (debug) { - Info<< "<end> Foam::vtkPV398Foam::updateInfoFields" << endl; + Info<< "<end> Foam::vtkPV4Foam::updateInfoFields" << endl; } } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamUtils.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUtils.C similarity index 92% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamUtils.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUtils.C index 0ca381b0d5acf6e71aae74462ce0c5f5ed0c403b..707914711bc053ad099d812bc18e781b1975934a 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamUtils.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamUtils.C @@ -26,8 +26,8 @@ Description \*---------------------------------------------------------------------------*/ -#include "vtkPV398Foam.H" -#include "vtkPV398FoamReader.h" +#include "vtkPV4Foam.H" +#include "vtkPV4FoamReader.h" // OpenFOAM includes #include "fvMesh.H" @@ -72,7 +72,7 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::vtkPV398Foam::AddToBlock +void Foam::vtkPV4Foam::AddToBlock ( vtkMultiBlockDataSet* output, vtkDataSet* dataset, @@ -90,7 +90,7 @@ void Foam::vtkPV398Foam::AddToBlock { if (blockDO) { - FatalErrorIn("Foam::vtkPV398Foam::AddToBlock") + FatalErrorIn("Foam::vtkPV4Foam::AddToBlock") << "Block already has a vtkDataSet assigned to it" << endl; return; @@ -132,7 +132,7 @@ void Foam::vtkPV398Foam::AddToBlock } -vtkDataSet* Foam::vtkPV398Foam::GetDataSetFromBlock +vtkDataSet* Foam::vtkPV4Foam::GetDataSetFromBlock ( vtkMultiBlockDataSet* output, const arrayRange& range, @@ -154,7 +154,7 @@ vtkDataSet* Foam::vtkPV398Foam::GetDataSetFromBlock // ununsed at the moment -Foam::label Foam::vtkPV398Foam::GetNumberOfDataSets +Foam::label Foam::vtkPV4Foam::GetNumberOfDataSets ( vtkMultiBlockDataSet* output, const arrayRange& range @@ -173,13 +173,13 @@ Foam::label Foam::vtkPV398Foam::GetNumberOfDataSets } -Foam::word Foam::vtkPV398Foam::getPartName(const int partId) +Foam::word Foam::vtkPV4Foam::getPartName(const int partId) { return getFirstWord(reader_->GetPartArrayName(partId)); } -Foam::wordHashSet Foam::vtkPV398Foam::getSelected +Foam::wordHashSet Foam::vtkPV4Foam::getSelected ( vtkDataArraySelection* select ) @@ -199,7 +199,7 @@ Foam::wordHashSet Foam::vtkPV398Foam::getSelected } -Foam::wordHashSet Foam::vtkPV398Foam::getSelected +Foam::wordHashSet Foam::vtkPV4Foam::getSelected ( vtkDataArraySelection* select, const arrayRange& range @@ -220,7 +220,7 @@ Foam::wordHashSet Foam::vtkPV398Foam::getSelected } -Foam::stringList Foam::vtkPV398Foam::getSelectedArrayEntries +Foam::stringList Foam::vtkPV4Foam::getSelectedArrayEntries ( vtkDataArraySelection* select ) @@ -259,7 +259,7 @@ Foam::stringList Foam::vtkPV398Foam::getSelectedArrayEntries } -Foam::stringList Foam::vtkPV398Foam::getSelectedArrayEntries +Foam::stringList Foam::vtkPV4Foam::getSelectedArrayEntries ( vtkDataArraySelection* select, const arrayRange& range @@ -298,7 +298,7 @@ Foam::stringList Foam::vtkPV398Foam::getSelectedArrayEntries } -void Foam::vtkPV398Foam::setSelectedArrayEntries +void Foam::vtkPV4Foam::setSelectedArrayEntries ( vtkDataArraySelection* select, const stringList& selections @@ -326,7 +326,7 @@ void Foam::vtkPV398Foam::setSelectedArrayEntries // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::vtkPV398Foam::printMemory() +void Foam::vtkPV4Foam::printMemory() { memInfo mem; diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamVolFields.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H similarity index 97% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamVolFields.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H index b1b92c0c72df8c8f2717767c76503cdeec7bb707..f4757a613732a9c38d14f46c9b18b21bfa28c6ab 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398FoamReader/vtkPV398Foam/vtkPV398FoamVolFields.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4FoamReader/vtkPV4Foam/vtkPV4FoamVolFields.H @@ -22,12 +22,12 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - vtkPV398Foam + vtkPV4Foam \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398FoamVolFields_H -#define vtkPV398FoamVolFields_H +#ifndef vtkPV4FoamVolFields_H +#define vtkPV4FoamVolFields_H // OpenFOAM includes #include "emptyFvPatchField.H" @@ -35,15 +35,15 @@ InClass #include "faceSet.H" #include "volPointInterpolation.H" -#include "vtkPV398FoamFaceField.H" -#include "vtkPV398FoamPatchField.H" +#include "vtkPV4FoamFaceField.H" +#include "vtkPV4FoamPatchField.H" #include "vtkOpenFOAMTupleRemap.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // template<class Type> -void Foam::vtkPV398Foam::convertVolFields +void Foam::vtkPV4Foam::convertVolFields ( const fvMesh& mesh, const PtrList<PrimitivePatchInterpolation<primitivePatch> >& ppInterpList, @@ -281,7 +281,7 @@ void Foam::vtkPV398Foam::convertVolFields template<class Type> -void Foam::vtkPV398Foam::convertVolFieldBlock +void Foam::vtkPV4Foam::convertVolFieldBlock ( const GeometricField<Type, fvPatchField, volMesh>& tf, autoPtr<GeometricField<Type, pointPatchField, pointMesh> >& ptfPtr, @@ -323,7 +323,7 @@ void Foam::vtkPV398Foam::convertVolFieldBlock template<class Type> -void Foam::vtkPV398Foam::convertVolField +void Foam::vtkPV4Foam::convertVolField ( const GeometricField<Type, fvPatchField, volMesh>& tf, vtkMultiBlockDataSet* output, diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/Allwclean b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean similarity index 61% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/Allwclean rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean index 7b2b10c51bb4af79108e45f92e9375f1b33a1033..9e3e5a3afae4cdc465534ad9e0676a2815ce5713 100755 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/Allwclean +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwclean @@ -3,9 +3,9 @@ cd ${0%/*} || exit 1 # run from this directory set -x # deal with client/server vs combined plugins -rm -f $FOAM_LIBBIN/libPV398blockMeshReader* 2>/dev/null +rm -f $FOAM_LIBBIN/libPV4blockMeshReader* 2>/dev/null -rm -rf PV398blockMeshReader/Make -wclean libso vtkPV398blockMesh +rm -rf PV4blockMeshReader/Make +wclean libso vtkPV4blockMesh # ----------------------------------------------------------------- end-of-file diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/Allwmake b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake similarity index 83% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/Allwmake rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake index 59d6ed048c48ebbeb80f9a84f622111cd6d60bed..645a9177246ba650dd6cedf255899da4e82e30d0 100755 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/Allwmake +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/Allwmake @@ -4,9 +4,9 @@ set -x if [ -d "$ParaView_DIR" -a -r "$ParaView_DIR" ] then - wmake libso vtkPV398blockMesh + wmake libso vtkPV4blockMesh ( - cd PV398blockMeshReader + cd PV4blockMeshReader mkdir -p Make/$WM_OPTIONS > /dev/null 2>&1 cd Make/$WM_OPTIONS cmake ../.. diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/CMakeLists.txt b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt similarity index 68% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/CMakeLists.txt rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt index c03aa2bb0f8b83162adb9c8be4516ec3081ab16b..4f4a810d5ca936af5a35f121dde9b1a92e05d433 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/CMakeLists.txt +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/CMakeLists.txt @@ -21,7 +21,7 @@ INCLUDE_DIRECTORIES( $ENV{WM_PROJECT_DIR}/src/OpenFOAM/lnInclude $ENV{WM_PROJECT_DIR}/src/OSspecific/$ENV{WM_OSTYPE}/lnInclude $ENV{WM_PROJECT_DIR}/src/meshing/blockMesh/lnInclude - ${PROJECT_SOURCE_DIR}/../vtkPV398blockMesh + ${PROJECT_SOURCE_DIR}/../vtkPV4blockMesh ) ADD_DEFINITIONS( @@ -40,47 +40,47 @@ SET( # # Extend the auto-generated panel -QT4_WRAP_CPP(MOC_SRCS pqPV398blockMeshReaderPanel.h) +QT4_WRAP_CPP(MOC_SRCS pqPV4blockMeshReaderPanel.h) ADD_PARAVIEW_OBJECT_PANEL(IFACES IFACE_SRCS - CLASS_NAME pqPV398blockMeshReaderPanel - XML_NAME PV398blockMeshReader # name of SourceProxy in *SM.xml + CLASS_NAME pqPV4blockMeshReaderPanel + XML_NAME PV4blockMeshReader # name of SourceProxy in *SM.xml XML_GROUP sources ) ADD_PARAVIEW_PLUGIN( - PV398blockMeshReader_SM "1.0" - SERVER_MANAGER_XML PV398blockMeshReader_SM.xml - SERVER_MANAGER_SOURCES vtkPV398blockMeshReader.cxx + PV4blockMeshReader_SM "1.0" + SERVER_MANAGER_XML PV4blockMeshReader_SM.xml + SERVER_MANAGER_SOURCES vtkPV4blockMeshReader.cxx GUI_INTERFACES ${IFACES} - GUI_SOURCES pqPV398blockMeshReaderPanel.cxx + GUI_SOURCES pqPV4blockMeshReaderPanel.cxx ${MOC_SRCS} ${UI_SRCS} ${IFACE_SRCS} - GUI_RESOURCE_FILES PV398blockMeshReader.xml + GUI_RESOURCE_FILES PV4blockMeshReader.xml ) # # # # Define the server-side portion of the reader plugin # # -# ADD_PARAVIEW_PLUGIN(PV398blockMeshReader_SM "1.0" -# SERVER_MANAGER_XML PV398blockMeshReader_SM.xml -# SERVER_MANAGER_SOURCES vtkPV398blockMeshReader.cxx +# ADD_PARAVIEW_PLUGIN(PV4blockMeshReader_SM "1.0" +# SERVER_MANAGER_XML PV4blockMeshReader_SM.xml +# SERVER_MANAGER_SOURCES vtkPV4blockMeshReader.cxx # ) # # # # Define the client-side portion of the reader plugin # # # ADD_PARAVIEW_PLUGIN( -# PV398blockMeshReader "1.0" -# GUI_RESOURCES PV398blockMeshReader.qrc +# PV4blockMeshReader "1.0" +# GUI_RESOURCES PV4blockMeshReader.qrc # ) # Build the client-side plugin TARGET_LINK_LIBRARIES( - PV398blockMeshReader_SM + PV4blockMeshReader_SM OpenFOAM blockMesh - vtkPV398blockMesh + vtkPV4blockMesh ) #----------------------------------------------------------------------------- diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/PV398blockMeshReader.qrc b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.qrc similarity index 61% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/PV398blockMeshReader.qrc rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.qrc index 5c0c189c5e8c4804790f59245d7fbf834667a1f9..5b5cc69b5278da7b8ed36fca36629d9ce4a066bf 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/PV398blockMeshReader.qrc +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.qrc @@ -1,5 +1,5 @@ <RCC> <qresource prefix="/ParaViewResources" > - <file>PV398blockMeshReader.xml</file> + <file>PV4blockMeshReader.xml</file> </qresource> </RCC> diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/PV398blockMeshReader.xml b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.xml similarity index 77% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/PV398blockMeshReader.xml rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.xml index e9153d5d6d9f5a0a04c603dcfff6f0e6bfd9ffca..0d4b97285eafc5a8574d2adb2ccc42d175d18c38 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/PV398blockMeshReader.xml +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader.xml @@ -1,5 +1,5 @@ <ParaViewReaders> - <Reader name="PV398blockMeshReader" + <Reader name="PV4blockMeshReader" extensions="blockMesh" file_description="OpenFOAM blockMesh reader"> </Reader> diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/PV398blockMeshReader_SM.xml b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml similarity index 97% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/PV398blockMeshReader_SM.xml rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml index 4ac661c96e448a8b6c4dd916dff7ecf808b73cd4..cc288ac7cac0bf3357276279d416c6c4e795daa1 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/PV398blockMeshReader_SM.xml +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/PV4blockMeshReader_SM.xml @@ -1,8 +1,8 @@ <ServerManagerConfiguration> <ProxyGroup name="sources"> <SourceProxy - name="PV398blockMeshReader" - class="vtkPV398blockMeshReader"> + name="PV4blockMeshReader" + class="vtkPV4blockMeshReader"> <!-- File name - compulsory --> <StringVectorProperty diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/pqPV398blockMeshReaderPanel.cxx b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.cxx similarity index 95% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/pqPV398blockMeshReaderPanel.cxx rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.cxx index 9d6ac19ae2404aa6eaea0209a34d5a716e09b0ab..b5f10f01fd6e0d1d12dd1e2140538416857dc087 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/pqPV398blockMeshReaderPanel.cxx +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.cxx @@ -23,7 +23,7 @@ License \*---------------------------------------------------------------------------*/ -#include "pqPV398blockMeshReaderPanel.h" +#include "pqPV4blockMeshReaderPanel.h" // QT #include <QGridLayout> @@ -50,7 +50,7 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -pqPV398blockMeshReaderPanel::pqPV398blockMeshReaderPanel +pqPV4blockMeshReaderPanel::pqPV4blockMeshReaderPanel ( pqProxy *proxy, QWidget *p @@ -90,7 +90,7 @@ pqPV398blockMeshReaderPanel::pqPV398blockMeshReaderPanel // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // -void pqPV398blockMeshReaderPanel::ShowPointNumbersToggled() +void pqPV4blockMeshReaderPanel::ShowPointNumbersToggled() { vtkSMIntVectorProperty::SafeDownCast ( diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/pqPV398blockMeshReaderPanel.h b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.h similarity index 84% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/pqPV398blockMeshReaderPanel.h rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.h index ec8a1b44d9c1c3069308fa1b5e127ebe447275f2..215787a00a4c2cdc4b6a2a0b86ee0692dc88c142 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/pqPV398blockMeshReaderPanel.h +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/pqPV4blockMeshReaderPanel.h @@ -22,19 +22,19 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - pqPV398blockMeshReaderPanel + pqPV4blockMeshReaderPanel Description GUI modifications for the ParaView reader panel - A custom panel for the PV398blockMeshReader. + A custom panel for the PV4blockMeshReader. SourceFiles - pqPV398blockMeshReaderPanel.cxx + pqPV4blockMeshReaderPanel.cxx \*---------------------------------------------------------------------------*/ -#ifndef pqPV398blockMeshReaderPanel_h -#define pqPV398blockMeshReaderPanel_h +#ifndef pqPV4blockMeshReaderPanel_h +#define pqPV4blockMeshReaderPanel_h #include "pqAutoGeneratedObjectPanel.h" @@ -50,10 +50,10 @@ class vtkSMSourceProxy; /*---------------------------------------------------------------------------*\ - Class pqPV398blockMeshReaderPanel Declaration + Class pqPV4blockMeshReaderPanel Declaration \*---------------------------------------------------------------------------*/ -class pqPV398blockMeshReaderPanel +class pqPV4blockMeshReaderPanel : public pqAutoGeneratedObjectPanel { @@ -74,11 +74,11 @@ public: // Constructors //- Construct from components - pqPV398blockMeshReaderPanel(pqProxy*, QWidget*); + pqPV4blockMeshReaderPanel(pqProxy*, QWidget*); //- Destructor - // virtual ~pqPV398blockMeshReaderPanel(); + // virtual ~pqPV4blockMeshReaderPanel(); }; diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/vtkPV398blockMeshReader.cxx b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.cxx similarity index 83% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/vtkPV398blockMeshReader.cxx rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.cxx index 5b08a352496de60b4172a662294455c12c4b5126..aa7667c78472afd45375bc42852c246d198fd6ef 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/vtkPV398blockMeshReader.cxx +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.cxx @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. \*---------------------------------------------------------------------------*/ -#include "vtkPV398blockMeshReader.h" +#include "vtkPV4blockMeshReader.h" #include "pqApplicationCore.h" #include "pqRenderView.h" @@ -40,16 +40,16 @@ License #include "vtkStringArray.h" // OpenFOAM includes -#include "vtkPV398blockMesh.H" +#include "vtkPV4blockMesh.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // -vtkStandardNewMacro(vtkPV398blockMeshReader); +vtkStandardNewMacro(vtkPV4blockMeshReader); // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -vtkPV398blockMeshReader::vtkPV398blockMeshReader() +vtkPV4blockMeshReader::vtkPV4blockMeshReader() { Debug = 0; vtkDebugMacro(<<"Constructor"); @@ -70,7 +70,7 @@ vtkPV398blockMeshReader::vtkPV398blockMeshReader() SelectionObserver = vtkCallbackCommand::New(); SelectionObserver->SetCallback ( - &vtkPV398blockMeshReader::SelectionModifiedCallback + &vtkPV4blockMeshReader::SelectionModifiedCallback ); SelectionObserver->SetClientData(this); @@ -91,7 +91,7 @@ vtkPV398blockMeshReader::vtkPV398blockMeshReader() // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -vtkPV398blockMeshReader::~vtkPV398blockMeshReader() +vtkPV4blockMeshReader::~vtkPV4blockMeshReader() { vtkDebugMacro(<<"Deconstructor"); @@ -118,7 +118,7 @@ vtkPV398blockMeshReader::~vtkPV398blockMeshReader() // * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * * // // Do everything except set the output info -int vtkPV398blockMeshReader::RequestInformation +int vtkPV4blockMeshReader::RequestInformation ( vtkInformation* vtkNotUsed(request), vtkInformationVector** vtkNotUsed(inputVector), @@ -127,7 +127,7 @@ int vtkPV398blockMeshReader::RequestInformation { vtkDebugMacro(<<"RequestInformation"); - if (Foam::vtkPV398blockMesh::debug) + if (Foam::vtkPV4blockMesh::debug) { cout<<"REQUEST_INFORMATION\n"; } @@ -140,7 +140,7 @@ int vtkPV398blockMeshReader::RequestInformation int nInfo = outputVector->GetNumberOfInformationObjects(); - if (Foam::vtkPV398blockMesh::debug) + if (Foam::vtkPV4blockMesh::debug) { cout<<"RequestInformation with " << nInfo << " item(s)\n"; for (int infoI = 0; infoI < nInfo; ++infoI) @@ -151,7 +151,7 @@ int vtkPV398blockMeshReader::RequestInformation if (!foamData_) { - foamData_ = new Foam::vtkPV398blockMesh(FileName, this); + foamData_ = new Foam::vtkPV4blockMesh(FileName, this); } else { @@ -175,7 +175,7 @@ int vtkPV398blockMeshReader::RequestInformation // Set the output info -int vtkPV398blockMeshReader::RequestData +int vtkPV4blockMeshReader::RequestData ( vtkInformation* vtkNotUsed(request), vtkInformationVector** vtkNotUsed(inputVector), @@ -199,7 +199,7 @@ int vtkPV398blockMeshReader::RequestData int nInfo = outputVector->GetNumberOfInformationObjects(); - if (Foam::vtkPV398blockMesh::debug) + if (Foam::vtkPV4blockMesh::debug) { cout<<"RequestData with " << nInfo << " item(s)\n"; for (int infoI = 0; infoI < nInfo; ++infoI) @@ -216,7 +216,7 @@ int vtkPV398blockMeshReader::RequestData ) ); - if (Foam::vtkPV398blockMesh::debug) + if (Foam::vtkPV4blockMesh::debug) { cout<< "update output with " << output->GetNumberOfBlocks() << " blocks\n"; @@ -234,7 +234,7 @@ int vtkPV398blockMeshReader::RequestData -void vtkPV398blockMeshReader::SetShowPointNumbers(const int val) +void vtkPV4blockMeshReader::SetShowPointNumbers(const int val) { if (ShowPointNumbers != val) { @@ -244,7 +244,7 @@ void vtkPV398blockMeshReader::SetShowPointNumbers(const int val) } -void vtkPV398blockMeshReader::updatePointNumbersView(const bool show) +void vtkPV4blockMeshReader::updatePointNumbersView(const bool show) { pqApplicationCore* appCore = pqApplicationCore::instance(); @@ -277,7 +277,7 @@ void vtkPV398blockMeshReader::updatePointNumbersView(const bool show) } -void vtkPV398blockMeshReader::PrintSelf(ostream& os, vtkIndent indent) +void vtkPV4blockMeshReader::PrintSelf(ostream& os, vtkIndent indent) { vtkDebugMacro(<<"PrintSelf"); @@ -292,35 +292,35 @@ void vtkPV398blockMeshReader::PrintSelf(ostream& os, vtkIndent indent) // ---------------------------------------------------------------------- // Block selection list control -vtkDataArraySelection* vtkPV398blockMeshReader::GetBlockSelection() +vtkDataArraySelection* vtkPV4blockMeshReader::GetBlockSelection() { vtkDebugMacro(<<"GetBlockSelection"); return BlockSelection; } -int vtkPV398blockMeshReader::GetNumberOfBlockArrays() +int vtkPV4blockMeshReader::GetNumberOfBlockArrays() { vtkDebugMacro(<<"GetNumberOfBlockArrays"); return BlockSelection->GetNumberOfArrays(); } -const char* vtkPV398blockMeshReader::GetBlockArrayName(int index) +const char* vtkPV4blockMeshReader::GetBlockArrayName(int index) { vtkDebugMacro(<<"GetBlockArrayName"); return BlockSelection->GetArrayName(index); } -int vtkPV398blockMeshReader::GetBlockArrayStatus(const char* name) +int vtkPV4blockMeshReader::GetBlockArrayStatus(const char* name) { vtkDebugMacro(<<"GetBlockArrayStatus"); return BlockSelection->ArrayIsEnabled(name); } -void vtkPV398blockMeshReader::SetBlockArrayStatus +void vtkPV4blockMeshReader::SetBlockArrayStatus ( const char* name, int status @@ -341,35 +341,35 @@ void vtkPV398blockMeshReader::SetBlockArrayStatus // ---------------------------------------------------------------------- // CurvedEdges selection list control -vtkDataArraySelection* vtkPV398blockMeshReader::GetCurvedEdgesSelection() +vtkDataArraySelection* vtkPV4blockMeshReader::GetCurvedEdgesSelection() { vtkDebugMacro(<<"GetCurvedEdgesSelection"); return CurvedEdgesSelection; } -int vtkPV398blockMeshReader::GetNumberOfCurvedEdgesArrays() +int vtkPV4blockMeshReader::GetNumberOfCurvedEdgesArrays() { vtkDebugMacro(<<"GetNumberOfCurvedEdgesArrays"); return CurvedEdgesSelection->GetNumberOfArrays(); } -const char* vtkPV398blockMeshReader::GetCurvedEdgesArrayName(int index) +const char* vtkPV4blockMeshReader::GetCurvedEdgesArrayName(int index) { vtkDebugMacro(<<"GetCurvedEdgesArrayName"); return CurvedEdgesSelection->GetArrayName(index); } -int vtkPV398blockMeshReader::GetCurvedEdgesArrayStatus(const char* name) +int vtkPV4blockMeshReader::GetCurvedEdgesArrayStatus(const char* name) { vtkDebugMacro(<<"GetCurvedEdgesArrayStatus"); return CurvedEdgesSelection->ArrayIsEnabled(name); } -void vtkPV398blockMeshReader::SetCurvedEdgesArrayStatus +void vtkPV4blockMeshReader::SetCurvedEdgesArrayStatus ( const char* name, int status @@ -389,7 +389,7 @@ void vtkPV398blockMeshReader::SetCurvedEdgesArrayStatus // ---------------------------------------------------------------------- -void vtkPV398blockMeshReader::SelectionModifiedCallback +void vtkPV4blockMeshReader::SelectionModifiedCallback ( vtkObject*, unsigned long, @@ -397,11 +397,11 @@ void vtkPV398blockMeshReader::SelectionModifiedCallback void* ) { - static_cast<vtkPV398blockMeshReader*>(clientdata)->Modified(); + static_cast<vtkPV4blockMeshReader*>(clientdata)->Modified(); } -int vtkPV398blockMeshReader::FillOutputPortInformation +int vtkPV4blockMeshReader::FillOutputPortInformation ( int port, vtkInformation* info diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/vtkPV398blockMeshReader.h b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.h similarity index 87% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/vtkPV398blockMeshReader.h rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.h index 6238ce650216058856bc6e55749e559a626763b9..ba0deee4ff971fbb7fc2ed9278548d5da1729c39 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/PV398blockMeshReader/vtkPV398blockMeshReader.h +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/PV4blockMeshReader/vtkPV4blockMeshReader.h @@ -22,21 +22,21 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - vtkPV398blockMeshReader + vtkPV4blockMeshReader Description reads a dataset in OpenFOAM bockMesh format - vtkPV398blockMeshReader creates an multiblock dataset. + vtkPV4blockMeshReader creates an multiblock dataset. It uses the OpenFOAM infrastructure (blockMesh). SourceFiles - vtkPV398blockMeshReader.cxx + vtkPV4blockMeshReader.cxx \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398blockMeshReader_h -#define vtkPV398blockMeshReader_h +#ifndef vtkPV4blockMeshReader_h +#define vtkPV4blockMeshReader_h // VTK includes #include "vtkMultiBlockDataSetAlgorithm.h" @@ -49,22 +49,22 @@ class vtkCallbackCommand; namespace Foam { - class vtkPV398blockMesh; + class vtkPV4blockMesh; } /*---------------------------------------------------------------------------*\ - Class vtkPV398blockMeshReader Declaration + Class vtkPV4blockMeshReader Declaration \*---------------------------------------------------------------------------*/ -class vtkPV398blockMeshReader +class vtkPV4blockMeshReader : public vtkMultiBlockDataSetAlgorithm { public: - vtkTypeMacro(vtkPV398blockMeshReader, vtkMultiBlockDataSetAlgorithm); + vtkTypeMacro(vtkPV4blockMeshReader, vtkMultiBlockDataSetAlgorithm); void PrintSelf(ostream&, vtkIndent); - static vtkPV398blockMeshReader* New(); + static vtkPV4blockMeshReader* New(); // Description: // Set/Get the filename. @@ -113,10 +113,10 @@ public: protected: //- Construct null - vtkPV398blockMeshReader(); + vtkPV4blockMeshReader(); //- Destructor - ~vtkPV398blockMeshReader(); + ~vtkPV4blockMeshReader(); //- Return information about mesh, times, etc without loading anything virtual int RequestInformation @@ -146,10 +146,10 @@ protected: private: //- Disallow default bitwise copy construct - vtkPV398blockMeshReader(const vtkPV398blockMeshReader&); + vtkPV4blockMeshReader(const vtkPV4blockMeshReader&); //- Disallow default bitwise assignment - void operator=(const vtkPV398blockMeshReader&); + void operator=(const vtkPV4blockMeshReader&); //- Add/remove point numbers to/from the view void updatePointNumbersView(const bool show); @@ -166,7 +166,7 @@ private: vtkDataArraySelection* CurvedEdgesSelection; //BTX - Foam::vtkPV398blockMesh* foamData_; + Foam::vtkPV4blockMesh* foamData_; //ETX }; diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/files b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..510637fa3f8110a84a2dbada30ec005fd24c3655 --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/files @@ -0,0 +1,5 @@ +vtkPV4blockMesh.C +vtkPV4blockMeshConvert.C +vtkPV4blockMeshUtils.C + +LIB = $(FOAM_LIBBIN)/libvtkPV4blockMesh diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/Make/options b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/options similarity index 63% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/Make/options rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/options index b1613989de3c12c88f8fb0a0906f7dd8afc637e8..b1c25d894d66689f8124143ff503287b1e0d0142 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/Make/options +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/Make/options @@ -2,11 +2,11 @@ EXE_INC = \ -I$(LIB_SRC)/meshTools/lnInclude \ -I$(LIB_SRC)/mesh/blockMesh/lnInclude \ -I$(ParaView_INCLUDE_DIR) \ - -I../../vtkPV398Readers/lnInclude \ - -I../PV398blockMeshReader + -I../../vtkPV4Readers/lnInclude \ + -I../PV4blockMeshReader LIB_LIBS = \ -lmeshTools \ -lblockMesh \ - -L$(FOAM_LIBBIN) -lvtkPV398Readers \ + -L$(FOAM_LIBBIN) -lvtkPV4Readers \ $(GLIBS) diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkDataArrayTemplateImplicit.txx b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkDataArrayTemplateImplicit.txx similarity index 100% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkDataArrayTemplateImplicit.txx rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkDataArrayTemplateImplicit.txx diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkOpenFOAMPoints.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkOpenFOAMPoints.H similarity index 98% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkOpenFOAMPoints.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkOpenFOAMPoints.H index c7ef0c9601e160cab0873e5c682e5ed13a5d93d9..d97dfed2dc988f19725a01e4835d409042582c40 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkOpenFOAMPoints.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkOpenFOAMPoints.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. InClass - vtkPV398blockMesh + vtkPV4blockMesh \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMesh.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.C similarity index 89% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMesh.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.C index ebeddae80c7f01c603ca78d8b9561bd1ef1c6a88..780da22770807cde1763c503b1d10f994ab0d66f 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMesh.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.C @@ -23,8 +23,8 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398blockMesh.H" -#include "vtkPV398blockMeshReader.h" +#include "vtkPV4blockMesh.H" +#include "vtkPV4blockMeshReader.h" // OpenFOAM includes #include "blockMesh.H" @@ -43,13 +43,13 @@ License namespace Foam { -defineTypeNameAndDebug(vtkPV398blockMesh, 0); +defineTypeNameAndDebug(vtkPV4blockMesh, 0); } // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::vtkPV398blockMesh::resetCounters() +void Foam::vtkPV4blockMesh::resetCounters() { // Reset mesh part ids and sizes arrayRangeBlocks_.reset(); @@ -58,14 +58,14 @@ void Foam::vtkPV398blockMesh::resetCounters() } -void Foam::vtkPV398blockMesh::updateInfoBlocks +void Foam::vtkPV4blockMesh::updateInfoBlocks ( vtkDataArraySelection* arraySelection ) { if (debug) { - Info<< "<beg> Foam::vtkPV398blockMesh::updateInfoBlocks" + Info<< "<beg> Foam::vtkPV4blockMesh::updateInfoBlocks" << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; } @@ -96,19 +96,19 @@ void Foam::vtkPV398blockMesh::updateInfoBlocks // just for debug info getSelectedArrayEntries(arraySelection); - Info<< "<end> Foam::vtkPV398blockMesh::updateInfoBlocks" << endl; + Info<< "<end> Foam::vtkPV4blockMesh::updateInfoBlocks" << endl; } } -void Foam::vtkPV398blockMesh::updateInfoEdges +void Foam::vtkPV4blockMesh::updateInfoEdges ( vtkDataArraySelection* arraySelection ) { if (debug) { - Info<< "<beg> Foam::vtkPV398blockMesh::updateInfoEdges" + Info<< "<beg> Foam::vtkPV4blockMesh::updateInfoEdges" << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "]" << endl; } @@ -136,17 +136,17 @@ void Foam::vtkPV398blockMesh::updateInfoEdges // just for debug info getSelectedArrayEntries(arraySelection); - Info<< "<end> Foam::vtkPV398blockMesh::updateInfoEdges" << endl; + Info<< "<end> Foam::vtkPV4blockMesh::updateInfoEdges" << endl; } } // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::vtkPV398blockMesh::vtkPV398blockMesh +Foam::vtkPV4blockMesh::vtkPV4blockMesh ( const char* const FileName, - vtkPV398blockMeshReader* reader + vtkPV4blockMeshReader* reader ) : reader_(reader), @@ -160,7 +160,7 @@ Foam::vtkPV398blockMesh::vtkPV398blockMesh { if (debug) { - Info<< "Foam::vtkPV398blockMesh::vtkPV398blockMesh - " + Info<< "Foam::vtkPV4blockMesh::vtkPV4blockMesh - " << FileName << endl; } @@ -243,11 +243,11 @@ Foam::vtkPV398blockMesh::vtkPV398blockMesh // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // -Foam::vtkPV398blockMesh::~vtkPV398blockMesh() +Foam::vtkPV4blockMesh::~vtkPV4blockMesh() { if (debug) { - Info<< "<end> Foam::vtkPV398blockMesh::~vtkPV398blockMesh" << endl; + Info<< "<end> Foam::vtkPV4blockMesh::~vtkPV4blockMesh" << endl; } // Hmm. pointNumberTextActors are not getting removed @@ -264,11 +264,11 @@ Foam::vtkPV398blockMesh::~vtkPV398blockMesh() // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::vtkPV398blockMesh::updateInfo() +void Foam::vtkPV4blockMesh::updateInfo() { if (debug) { - Info<< "<beg> Foam::vtkPV398blockMesh::updateInfo" + Info<< "<beg> Foam::vtkPV4blockMesh::updateInfo" << " [meshPtr=" << (meshPtr_ ? "set" : "NULL") << "] " << endl; } @@ -314,16 +314,16 @@ void Foam::vtkPV398blockMesh::updateInfo() if (debug) { - Info<< "<end> Foam::vtkPV398blockMesh::updateInfo" << endl; + Info<< "<end> Foam::vtkPV4blockMesh::updateInfo" << endl; } } -void Foam::vtkPV398blockMesh::updateFoamMesh() +void Foam::vtkPV4blockMesh::updateFoamMesh() { if (debug) { - Info<< "<beg> Foam::vtkPV398blockMesh::updateFoamMesh" << endl; + Info<< "<beg> Foam::vtkPV4blockMesh::updateFoamMesh" << endl; } // Check to see if the OpenFOAM mesh has been created @@ -355,12 +355,12 @@ void Foam::vtkPV398blockMesh::updateFoamMesh() if (debug) { - Info<< "<end> Foam::vtkPV398blockMesh::updateFoamMesh" << endl; + Info<< "<end> Foam::vtkPV4blockMesh::updateFoamMesh" << endl; } } -void Foam::vtkPV398blockMesh::Update +void Foam::vtkPV4blockMesh::Update ( vtkMultiBlockDataSet* output ) @@ -391,13 +391,13 @@ void Foam::vtkPV398blockMesh::Update } -void Foam::vtkPV398blockMesh::CleanUp() +void Foam::vtkPV4blockMesh::CleanUp() { reader_->UpdateProgress(1.0); } -void Foam::vtkPV398blockMesh::renderPointNumbers +void Foam::vtkPV4blockMesh::renderPointNumbers ( vtkRenderer* renderer, const bool show @@ -456,7 +456,7 @@ void Foam::vtkPV398blockMesh::renderPointNumbers -void Foam::vtkPV398blockMesh::PrintSelf(ostream& os, vtkIndent indent) const +void Foam::vtkPV4blockMesh::PrintSelf(ostream& os, vtkIndent indent) const { #if 0 os << indent << "Number of nodes: " diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMesh.H b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.H similarity index 93% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMesh.H rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.H index 46020d4eb3262f861f2ccb8d2a645d53aef62023..37c83a6f42187d57fb3087647861e39161060024 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMesh.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMesh.H @@ -22,24 +22,24 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::vtkPV398blockMesh + Foam::vtkPV4blockMesh Description Provides a reader interface for OpenFOAM blockMesh to VTK interaction SourceFiles - vtkPV398blockMesh.C - vtkPV398blockMeshConvert.C - vtkPV398blockMeshUpdate.C - vtkPV398blockMeshUtils.C + vtkPV4blockMesh.C + vtkPV4blockMeshConvert.C + vtkPV4blockMeshUpdate.C + vtkPV4blockMeshUtils.C // Needed by VTK: vtkDataArrayTemplateImplicit.txx \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398blockMesh_H -#define vtkPV398blockMesh_H +#ifndef vtkPV4blockMesh_H +#define vtkPV4blockMesh_H // do not include legacy strstream headers #ifndef VTK_EXCLUDE_STRSTREAM_HEADERS @@ -58,7 +58,7 @@ SourceFiles class vtkDataArraySelection; class vtkDataSet; class vtkPoints; -class vtkPV398blockMeshReader; +class vtkPV4blockMeshReader; class vtkRenderer; class vtkTextActor; class vtkMultiBlockDataSet; @@ -79,10 +79,10 @@ class blockMesh; template<class Type> class List; /*---------------------------------------------------------------------------*\ - Class vtkPV398blockMesh Declaration + Class vtkPV4blockMesh Declaration \*---------------------------------------------------------------------------*/ -class vtkPV398blockMesh +class vtkPV4blockMesh { // Private classes @@ -164,8 +164,8 @@ class vtkPV398blockMesh // Private Data - //- Access to the controlling vtkPV398blockMeshReader - vtkPV398blockMeshReader* reader_; + //- Access to the controlling vtkPV4blockMeshReader + vtkPV4blockMeshReader* reader_; //- OpenFOAM time control autoPtr<Time> dbPtr_; @@ -294,31 +294,31 @@ class vtkPV398blockMesh //- Disallow default bitwise copy construct - vtkPV398blockMesh(const vtkPV398blockMesh&); + vtkPV4blockMesh(const vtkPV4blockMesh&); //- Disallow default bitwise assignment - void operator=(const vtkPV398blockMesh&); + void operator=(const vtkPV4blockMesh&); public: //- Static data members - ClassName("vtkPV398blockMesh"); + ClassName("vtkPV4blockMesh"); // Constructors //- Construct from components - vtkPV398blockMesh + vtkPV4blockMesh ( const char* const FileName, - vtkPV398blockMeshReader* reader + vtkPV4blockMeshReader* reader ); //- Destructor - ~vtkPV398blockMesh(); + ~vtkPV4blockMesh(); // Member Functions diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMeshConvert.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshConvert.C similarity index 92% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMeshConvert.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshConvert.C index b9d96fdcc29a5f49d24678cb367af1673ee2eddf..d0552eb96d90196e84055bb7d4e22c8a0152babd 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMeshConvert.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshConvert.C @@ -23,8 +23,8 @@ License \*---------------------------------------------------------------------------*/ -#include "vtkPV398blockMesh.H" -#include "vtkPV398blockMeshReader.h" +#include "vtkPV4blockMesh.H" +#include "vtkPV4blockMeshReader.h" // OpenFOAM includes #include "blockMesh.H" @@ -43,7 +43,7 @@ License // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -void Foam::vtkPV398blockMesh::convertMeshBlocks +void Foam::vtkPV4blockMesh::convertMeshBlocks ( vtkMultiBlockDataSet* output, int& blockNo @@ -59,7 +59,7 @@ void Foam::vtkPV398blockMesh::convertMeshBlocks if (debug) { - Info<< "<beg> Foam::vtkPV398blockMesh::convertMeshBlocks" << endl; + Info<< "<beg> Foam::vtkPV4blockMesh::convertMeshBlocks" << endl; } int blockI = 0; @@ -130,12 +130,12 @@ void Foam::vtkPV398blockMesh::convertMeshBlocks if (debug) { - Info<< "<end> Foam::vtkPV398blockMesh::convertMeshBlocks" << endl; + Info<< "<end> Foam::vtkPV4blockMesh::convertMeshBlocks" << endl; } } -void Foam::vtkPV398blockMesh::convertMeshEdges +void Foam::vtkPV4blockMesh::convertMeshEdges ( vtkMultiBlockDataSet* output, int& blockNo @@ -240,13 +240,13 @@ void Foam::vtkPV398blockMesh::convertMeshEdges if (debug) { - Info<< "<end> Foam::vtkPV398blockMesh::convertMeshEdges" << endl; + Info<< "<end> Foam::vtkPV4blockMesh::convertMeshEdges" << endl; } } -void Foam::vtkPV398blockMesh::convertMeshCorners +void Foam::vtkPV4blockMesh::convertMeshCorners ( vtkMultiBlockDataSet* output, int& blockNo @@ -261,7 +261,7 @@ void Foam::vtkPV398blockMesh::convertMeshCorners if (debug) { - Info<< "<beg> Foam::vtkPV398blockMesh::convertMeshCorners" << endl; + Info<< "<beg> Foam::vtkPV4blockMesh::convertMeshCorners" << endl; } if (true) // or some flag or other condition @@ -311,7 +311,7 @@ void Foam::vtkPV398blockMesh::convertMeshCorners if (debug) { - Info<< "<end> Foam::vtkPV398blockMesh::convertMeshCorners" << endl; + Info<< "<end> Foam::vtkPV4blockMesh::convertMeshCorners" << endl; } } diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMeshUtils.C b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshUtils.C similarity index 90% rename from applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMeshUtils.C rename to applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshUtils.C index d2556575af6a86f41c5c28988b30bea99c4efb4f..d0a55bbd7b11ad6761f3aacd5919fd60df17f729 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/PV398blockMeshReader/vtkPV398blockMesh/vtkPV398blockMeshUtils.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/PV4blockMeshReader/vtkPV4blockMesh/vtkPV4blockMeshUtils.C @@ -26,8 +26,8 @@ Description \*---------------------------------------------------------------------------*/ -#include "vtkPV398blockMesh.H" -#include "vtkPV398blockMeshReader.h" +#include "vtkPV4blockMesh.H" +#include "vtkPV4blockMeshReader.h" // VTK includes #include "vtkDataArraySelection.h" @@ -66,7 +66,7 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::vtkPV398blockMesh::AddToBlock +void Foam::vtkPV4blockMesh::AddToBlock ( vtkMultiBlockDataSet* output, vtkDataSet* dataset, @@ -84,7 +84,7 @@ void Foam::vtkPV398blockMesh::AddToBlock { if (blockDO) { - FatalErrorIn("Foam::vtkPV398blockMesh::AddToBlock") + FatalErrorIn("Foam::vtkPV4blockMesh::AddToBlock") << "Block already has a vtkDataSet assigned to it" << endl; return; @@ -126,7 +126,7 @@ void Foam::vtkPV398blockMesh::AddToBlock } -vtkDataSet* Foam::vtkPV398blockMesh::GetDataSetFromBlock +vtkDataSet* Foam::vtkPV4blockMesh::GetDataSetFromBlock ( vtkMultiBlockDataSet* output, const arrayRange& range, @@ -148,7 +148,7 @@ vtkDataSet* Foam::vtkPV398blockMesh::GetDataSetFromBlock // ununsed at the moment -Foam::label Foam::vtkPV398blockMesh::GetNumberOfDataSets +Foam::label Foam::vtkPV4blockMesh::GetNumberOfDataSets ( vtkMultiBlockDataSet* output, const arrayRange& range @@ -167,7 +167,7 @@ Foam::label Foam::vtkPV398blockMesh::GetNumberOfDataSets } -Foam::wordHashSet Foam::vtkPV398blockMesh::getSelected +Foam::wordHashSet Foam::vtkPV4blockMesh::getSelected ( vtkDataArraySelection* select ) @@ -187,7 +187,7 @@ Foam::wordHashSet Foam::vtkPV398blockMesh::getSelected } -Foam::wordHashSet Foam::vtkPV398blockMesh::getSelected +Foam::wordHashSet Foam::vtkPV4blockMesh::getSelected ( vtkDataArraySelection* select, const arrayRange& range @@ -208,7 +208,7 @@ Foam::wordHashSet Foam::vtkPV398blockMesh::getSelected } -Foam::stringList Foam::vtkPV398blockMesh::getSelectedArrayEntries +Foam::stringList Foam::vtkPV4blockMesh::getSelectedArrayEntries ( vtkDataArraySelection* select ) @@ -247,7 +247,7 @@ Foam::stringList Foam::vtkPV398blockMesh::getSelectedArrayEntries } -Foam::stringList Foam::vtkPV398blockMesh::getSelectedArrayEntries +Foam::stringList Foam::vtkPV4blockMesh::getSelectedArrayEntries ( vtkDataArraySelection* select, const arrayRange& range @@ -286,7 +286,7 @@ Foam::stringList Foam::vtkPV398blockMesh::getSelectedArrayEntries } -void Foam::vtkPV398blockMesh::setSelectedArrayEntries +void Foam::vtkPV4blockMesh::setSelectedArrayEntries ( vtkDataArraySelection* select, const stringList& selections @@ -312,7 +312,7 @@ void Foam::vtkPV398blockMesh::setSelectedArrayEntries } -void Foam::vtkPV398blockMesh::updateBoolListStatus +void Foam::vtkPV4blockMesh::updateBoolListStatus ( boolList& status, vtkDataArraySelection* selection @@ -320,7 +320,7 @@ void Foam::vtkPV398blockMesh::updateBoolListStatus { if (debug) { - Info<< "<beg> Foam::vtkPV398blockMesh::updateBoolListStatus" << endl; + Info<< "<beg> Foam::vtkPV4blockMesh::updateBoolListStatus" << endl; } const label nElem = selection->GetNumberOfArrays(); @@ -345,7 +345,7 @@ void Foam::vtkPV398blockMesh::updateBoolListStatus } if (debug) { - Info<< "<end> Foam::vtkPV398blockMesh::updateBoolListStatus" << endl; + Info<< "<end> Foam::vtkPV4blockMesh::updateBoolListStatus" << endl; } } diff --git a/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/files b/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/files new file mode 100644 index 0000000000000000000000000000000000000000..39feee713db0cdd440171cbcb2fd48cd95d530fd --- /dev/null +++ b/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/files @@ -0,0 +1,3 @@ +vtkPV4Readers.C + +LIB = $(FOAM_LIBBIN)/libvtkPV4Readers diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/Make/options b/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/options similarity index 100% rename from applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/Make/options rename to applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/Make/options diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/vtkPV398Readers.C b/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.C similarity index 91% rename from applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/vtkPV398Readers.C rename to applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.C index 2bdfb92a8c809b4bdf86e893ad0cdf9927f490f7..710fcc361ba5dc415633dc2cc89c8447fbdf138c 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/vtkPV398Readers.C +++ b/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.C @@ -26,7 +26,7 @@ Description \*---------------------------------------------------------------------------*/ -#include "vtkPV398Readers.H" +#include "vtkPV4Readers.H" // OpenFOAM includes #include "IFstream.H" @@ -41,7 +41,7 @@ Description namespace Foam { -defineTypeNameAndDebug(vtkPV398Readers, 0); +defineTypeNameAndDebug(vtkPV4Readers, 0); } @@ -75,7 +75,7 @@ namespace Foam // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -void Foam::vtkPV398Readers::AddToBlock +void Foam::vtkPV4Readers::AddToBlock ( vtkMultiBlockDataSet* output, vtkDataSet* dataset, @@ -93,7 +93,7 @@ void Foam::vtkPV398Readers::AddToBlock { if (blockDO) { - FatalErrorIn("Foam::vtkPV398Readers::AddToBlock") + FatalErrorIn("Foam::vtkPV4Readers::AddToBlock") << "Block already has a vtkDataSet assigned to it" << endl; return; @@ -135,7 +135,7 @@ void Foam::vtkPV398Readers::AddToBlock } -vtkDataSet* Foam::vtkPV398Readers::GetDataSetFromBlock +vtkDataSet* Foam::vtkPV4Readers::GetDataSetFromBlock ( vtkMultiBlockDataSet* output, const partInfo& selector, @@ -157,7 +157,7 @@ vtkDataSet* Foam::vtkPV398Readers::GetDataSetFromBlock // ununsed at the moment -Foam::label Foam::vtkPV398Readers::GetNumberOfDataSets +Foam::label Foam::vtkPV4Readers::GetNumberOfDataSets ( vtkMultiBlockDataSet* output, const partInfo& selector @@ -176,13 +176,13 @@ Foam::label Foam::vtkPV398Readers::GetNumberOfDataSets } -// Foam::word Foam::vtkPV398Readers::getPartName(int partId) +// Foam::word Foam::vtkPV4Readers::getPartName(int partId) // { // return getFirstWord(reader_->GetPartArrayName(partId)); // } -Foam::wordHashSet Foam::vtkPV398Readers::getSelected +Foam::wordHashSet Foam::vtkPV4Readers::getSelected ( vtkDataArraySelection* select ) @@ -202,7 +202,7 @@ Foam::wordHashSet Foam::vtkPV398Readers::getSelected } -Foam::wordHashSet Foam::vtkPV398Readers::getSelected +Foam::wordHashSet Foam::vtkPV4Readers::getSelected ( vtkDataArraySelection* select, const partInfo& selector @@ -223,7 +223,7 @@ Foam::wordHashSet Foam::vtkPV398Readers::getSelected } -Foam::stringList Foam::vtkPV398Readers::getSelectedArrayEntries +Foam::stringList Foam::vtkPV4Readers::getSelectedArrayEntries ( vtkDataArraySelection* select ) @@ -262,7 +262,7 @@ Foam::stringList Foam::vtkPV398Readers::getSelectedArrayEntries } -Foam::stringList Foam::vtkPV398Readers::getSelectedArrayEntries +Foam::stringList Foam::vtkPV4Readers::getSelectedArrayEntries ( vtkDataArraySelection* select, const partInfo& selector @@ -301,7 +301,7 @@ Foam::stringList Foam::vtkPV398Readers::getSelectedArrayEntries } -void Foam::vtkPV398Readers::setSelectedArrayEntries +void Foam::vtkPV4Readers::setSelectedArrayEntries ( vtkDataArraySelection* select, const stringList& selections diff --git a/applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/vtkPV398Readers.H b/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.H similarity index 96% rename from applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/vtkPV398Readers.H rename to applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.H index a5ab69a45281734d71ef141f890798d01d56b103..8ab4b94f2c1b8a075a627fc3b34125895673e0c8 100644 --- a/applications/utilities/postProcessing/graphics/PV398Readers/vtkPV398Readers/vtkPV398Readers.H +++ b/applications/utilities/postProcessing/graphics/PV4Readers/vtkPV4Readers/vtkPV4Readers.H @@ -22,19 +22,19 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Namespace - Foam::vtkPV398Readers + Foam::vtkPV4Readers Description A collection of helper functions when building a reader interface in ParaView3. SourceFiles - vtkPV398Readers.C + vtkPV4Readers.C \*---------------------------------------------------------------------------*/ -#ifndef vtkPV398Readers_H -#define vtkPV398Readers_H +#ifndef vtkPV4Readers_H +#define vtkPV4Readers_H // do not include legacy strstream headers #ifndef VTK_EXCLUDE_STRSTREAM_HEADERS @@ -53,7 +53,7 @@ SourceFiles class vtkDataArraySelection; class vtkDataSet; class vtkPoints; -class vtkPV398FoamReader; +class vtkPV4FoamReader; class vtkRenderer; class vtkTextActor; class vtkMultiBlockDataSet; @@ -66,10 +66,10 @@ class vtkIndent; namespace Foam { -namespace vtkPV398Readers +namespace vtkPV4Readers { //- Declare name of the class and its debug switch - NamespaceName("vtkPV398Readers"); + NamespaceName("vtkPV4Readers"); //- Bookkeeping for GUI checklists and the multi-block organization class partInfo @@ -217,7 +217,7 @@ namespace vtkPV398Readers // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace vtkPV398 +} // End namespace vtkPV4 } // End namespace Foam diff --git a/applications/utilities/postProcessing/noise/noise.C b/applications/utilities/postProcessing/noise/noise.C index 9c19aadb99ad4a53cc59125b318972c05f4010f9..79a5521510f467a7b72ce5dd7489f35c5513b01d 100644 --- a/applications/utilities/postProcessing/noise/noise.C +++ b/applications/utilities/postProcessing/noise/noise.C @@ -60,12 +60,18 @@ Description nw | Number of sampling windows | no | 100 fl | Lower frequency band | no | 25 fU | Upper frequency band | no | 10000 - graphFormat | Output grapch format | no | raw + graphFormat | Output graph format | no | raw \endtable + Current graph outputs include: + - FFT of the pressure data + - narrow-band PFL (pressure-fluctuation level) spectrum + - one-third-octave-band PFL spectrum + - one-third-octave-band pressure spectrum SeeAlso CSV.H + noiseFFT.H \*---------------------------------------------------------------------------*/ diff --git a/applications/utilities/postProcessing/velocityField/Pe/Pe.C b/applications/utilities/postProcessing/velocityField/Pe/Pe.C index 0c4f61729cef4986ef4d7893400c08c43ab7bf3d..544a1169210c0440292739b835d4c1b8d4cce1bf 100644 --- a/applications/utilities/postProcessing/velocityField/Pe/Pe.C +++ b/applications/utilities/postProcessing/velocityField/Pe/Pe.C @@ -130,7 +130,7 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) mesh.magSf() * mesh.surfaceInterpolation::deltaCoeffs() * fvc::interpolate(RASModel->nuEff()) - ) + ) ) ); } @@ -192,8 +192,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) mesh, IOobject::NO_READ ), - mesh.surfaceInterpolation::deltaCoeffs() - * (mag(phi)/mesh.magSf())*(runTime.deltaT()/nu) + mag(phi) + /( + mesh.magSf() + * mesh.surfaceInterpolation::deltaCoeffs() + * nu + ) ) ); } @@ -317,8 +321,12 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) mesh, IOobject::NO_READ ), - mesh.surfaceInterpolation::deltaCoeffs() - * (mag(phi)/(mesh.magSf()))*(runTime.deltaT()/mu) + mag(phi) + /( + mesh.magSf() + * mesh.surfaceInterpolation::deltaCoeffs() + * mu + ) ) ); } @@ -330,26 +338,6 @@ void Foam::calc(const argList& args, const Time& runTime, const fvMesh& mesh) << abort(FatalError); } - - // can also check how many cells exceed a particular Pe limit - /* - { - label count = 0; - label PeLimit = 200; - forAll(PePtr(), i) - { - if (PePtr()[i] > PeLimit) - { - count++; - } - - } - - Info<< "Fraction > " << PeLimit << " = " - << scalar(count)/Pe.size() << endl; - } - */ - Info<< "Pe max : " << max(PePtr()).value() << endl; if (writeResults) diff --git a/applications/utilities/surface/surfaceCheck/surfaceCheck.C b/applications/utilities/surface/surfaceCheck/surfaceCheck.C index a01705595849555fb88428ec101d8e796c1f4ba5..29707e303c585fad79c58c4e22faf047015fd62c 100644 --- a/applications/utilities/surface/surfaceCheck/surfaceCheck.C +++ b/applications/utilities/surface/surfaceCheck/surfaceCheck.C @@ -653,6 +653,36 @@ int main(int argc, char *argv[]) Info<< "Checking self-intersection." << endl; triSurfaceSearch querySurf(surf); + + //{ + // OBJstream intStream("selfInter2.obj"); + // const indexedOctree<treeDataTriSurface>& tree = querySurf.tree(); + // forAll(surf.edges(), edgeI) + // { + // const edge& e = surf.edges()[edgeI]; + // + // pointIndexHit hitInfo + // ( + // tree.findLine + // ( + // surf.points()[surf.meshPoints()[e[0]]], + // surf.points()[surf.meshPoints()[e[1]]], + // treeDataTriSurface::findSelfIntersectOp + // ( + // tree, + // edgeI + // ) + // ) + // ); + // + // if (hitInfo.hit()) + // { + // Pout<< "Found hit:" << hitInfo.hitPoint() << endl; + // intStream.write(hitInfo.hitPoint()); + // } + // } + //} + surfaceIntersection inter(querySurf); if (inter.cutEdges().empty() && inter.cutPoints().empty()) diff --git a/bin/paraFoam4 b/bin/paraFoam4 new file mode 100755 index 0000000000000000000000000000000000000000..56faaa913b7ce49ce5956763ea1d8a4bf4cddb39 --- /dev/null +++ b/bin/paraFoam4 @@ -0,0 +1,271 @@ +#!/bin/sh +#------------------------------------------------------------------------------ +# ========= | +# \\ / F ield | OpenFOAM: The Open Source CFD Toolbox +# \\ / O peration | +# \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation +# \\/ 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/>. +# +# Script +# paraFoam +# +# Description +# start paraview with the OpenFOAM libraries +# +# Note +# combining -block or -builtin options with the -region option yields +# undefined behaviour +#------------------------------------------------------------------------------ +usage() { + exec 1>&2 + while [ "$#" -ge 1 ]; do echo "$1"; shift; done + cat<<USAGE + +Usage: ${0##*/} [OPTION] [PARAVIEW_OPTION] +options: + -block use blockMesh reader (uses .blockMesh extension) + -builtin use VTK builtin OpenFOAM reader (uses .foam extension) + -case <dir> specify alternative case directory, default is the cwd + -region <name> specify alternative mesh region + -touch only create the file (eg, .blockMesh, .OpenFOAM, etc) + -touchAll create .blockMesh, .OpenFOAM files (and for all regions) + -help print the usage + + +paraview options start with a double dashes + +* start paraview $ParaView_VERSION with the OpenFOAM libraries + +USAGE + exit 1 +} + +# We want to do nice exit when running paraview to give paraview opportunity +# to clean up +unset FOAM_ABORT + +unset regionName optTouch + +# Hack: change all locale to 'C' i.e. using '.' for decimal point. This is +# only needed temporarily until paraview is locale aware. (git version is +# already 2010-07) +export LC_ALL=C + +# reader extension +extension=OpenFOAM + +requirePV=1 + +# parse options +while [ "$#" -gt 0 ] +do + case "$1" in + -h | -help) + usage + ;; + -block | -blockMesh) + extension=blockMesh + shift + ;; + -builtin) + extension=foam + requirePV=0 + shift + ;; + -case) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + cd "$2" 2>/dev/null || usage "directory does not exist: '$2'" + shift 2 + ;; + -region) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + regionName=$2 + shift 2 + ;; + -touch) + optTouch=true + requirePV=0 + shift + ;; + -touchAll) + optTouch=all + requirePV=0 + shift + ;; + --) + shift + break # stop here, treat balance as paraview options + ;; + --*) + break # stop here, treat this and balance as paraview options + ;; + *) + usage "unknown option/argument: '$*'" + ;; + esac +done + + +# +# check that reader module has been built +# +if [ $requirePV -eq 1 -a ! -f $PV_PLUGIN_PATH/libPV4FoamReader_SM.so ] +then + cat<< BUILDREADER + +FATAL ERROR: ParaView reader module libraries do not exist + +Please build the reader module before continuing: +cd \$FOAM_UTILITIES/postProcessing/graphics/PV4Readers +./Allwclean +./Allwmake + +BUILDREADER + exit 1 +fi + +# +# check for --data=... argument +# +hasDataArg() +{ + hasData=false + while [ "$#" -gt 0 ] + do + case "$1" in + (--data=*) + hasData=true + break + ;; + esac + shift + done +} + +hasDataArg $@ + + +# get a sensible caseName from the directory name +caseName=${PWD##*/} +caseFile="$caseName.$extension" +fvControls="system" + +if [ -n "$regionName" ] +then + if [ ! -d constant/$regionName ] + then + echo "FATAL ERROR: Region $regionName does not exist" + exit 1 + else + caseFile="$caseName{$regionName}.$extension" + fvControls="$fvControls/$regionName" + fi +fi + +case "${optTouch:-false}" in +all) + extension=OpenFOAM + if [ -f constant/polyMesh/blockMeshDict ] + then + touch "$caseName.blockMesh" + echo "created '$caseName.blockMesh'" + fi + touch "$caseName.$extension" + echo "created '$caseName.$extension'" + # discover probable regions + for region in constant/* + do + if [ -d $region -a -d $region/polyMesh ] + then + regionName=${region##*/} + touch "$caseName{$regionName}.$extension" + echo "created '$caseName{$regionName}.$extension'" + fi + done + exit 0 + ;; +true) + touch "$caseFile" + echo "created '$caseFile'" + exit 0 + ;; +esac + + +# parent directory for normal or parallel results +case "$caseName" in + processor*) parentDir=".." ;; + *) parentDir="." ;; +esac + + +if [ "${hasData:-false}" = true ] +then + + # has --data=.., send directly to paraview + exec paraview "$@" + +else + + # check existence of essential files + warn="WARN file does not exist:" + case $extension in + blockMesh) + for check in \ + system/controlDict \ + constant/polyMesh/blockMeshDict \ + ; + do + [ -s "$parentDir/$check" ] || { + [ -n "$warn" ] && echo "$warn" 1>&2 + echo " $parentDir/$check" 1>&2 + unset warn + } + done + ;; + + builtin | OpenFOAM) + for check in \ + system/controlDict \ + $fvControls/fvSchemes \ + $fvControls/fvSolution \ + ; + do + [ -s "$parentDir/$check" ] || { + [ -n "$warn" ] && echo "$warn" 1>&2 + echo " $parentDir/$check" 1>&2 + unset warn + } + done + ;; + esac + + # only create/remove caseFile if it didn't already exist + [ -e $caseFile ] || { + trap "rm -f $caseFile 2>/dev/null; exit 0" EXIT TERM INT + touch "$caseFile" + echo "created temporary '$caseFile'" + } + + # For now filter out any ld.so errors. Caused by non-system compiler? + paraview --data="$caseFile" "$@" 2>&1 | fgrep -v 'Inconsistency detected by ld.so' +fi + + +#------------------------------------------------------------------------------ diff --git a/bin/tools/foamConfigurePaths b/bin/tools/foamConfigurePaths index 254f5e4380ff7273d682b41e311b20ada7787d86..34c6fc200431223d26407fbbefe37d22ff7f78f4 100755 --- a/bin/tools/foamConfigurePaths +++ b/bin/tools/foamConfigurePaths @@ -41,6 +41,8 @@ usage: ${0##*/} --archOption arch specify architecture option (only 32 or 64 applicable) --paraviewInstall dir specify ParaView_DIR (e.g. /opt/paraviewopenfoam3120) --paraviewVersion ver specify ParaView_VERSION (e.g. 3.12.0) + --scotchArchPath dir specify SCOTCH_ARCH_PATH (e.g. /opt/OpenFOAM-scotch-6.0.0/) + --scotchVersion ver specify SCOTCH_VERSION (e.g. 6.0.0) * hardcode paths to installation @@ -49,32 +51,6 @@ USAGE } -# Function to do replacement on file. Checks if any replacement has been done. -# inlineSed <file> <sedCommand> <description> -#_inlineSed() -#{ -# [ -f "$1" ] || { -# echo "Missing file: $1" -# exit 1 -# } -# -# backup="temp.$$" -# cp $1 $backup -# sed -i -e "$2" $1 -# -# if cmp $1 $backup > /dev/null 2>&1 -# then -# echo "Failed: $3 in $1" -# rm $backup 2>/dev/null -# exit 1 -# else -# echo "Okay: $3 in $1" -# rm $backup 2>/dev/null -# fi -# -# return 0 -#} - # Function to do replacement on file. Checks if any replacement has been done. # _inlineSed <file> <regexp> <replacement> <msg> _inlineSed() @@ -103,7 +79,8 @@ _inlineSed() [ -f etc/bashrc ] || usage "Please run from top-level directory of installation" -unset foamInstall projectName projectVersion archOption paraviewInstall +unset foamInstall projectName projectVersion archOption +unset paraviewInstall scotchArchPath # parse options while [ "$#" -gt 0 ] @@ -172,7 +149,7 @@ do etc/config/paraview.sh \ 'ParaView_DIR=.*' \ 'ParaView_DIR='"$paraviewInstall" \ - "Replacing ParaView_DIR setting by '$paraviewInstall'" + "Replacing ParaView_DIR setting by '$paraviewInstall'" shift 2 ;; -paraviewVersion | --paraviewVersion) @@ -186,13 +163,36 @@ do "Replacing ParaView_VERSION setting by '$paraviewVersion'" shift 2 ;; + -scotchVersion | --scotchVersion) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + scotchVersion="$2" + _inlineSed \ + etc/config/scotch.sh \ + 'SCOTCH_VERSION=.*' \ + 'SCOTCH_VERSION='"$scotchVersion" \ + "Replacing SCOTCH_VERSION setting by '$scotchVersion'" + shift 2 + ;; + -scotchArchPath | --scotchArchPath) + [ "$#" -ge 2 ] || usage "'$1' option requires an argument" + scotchArchPath="$2" + _inlineSed \ + etc/config/scotch.sh \ + 'SCOTCH_ARCH_PATH=.*' \ + 'SCOTCH_ARCH_PATH='"$scotchArchPath" \ + "Replacing SCOTCH_ARCH_PATH setting by '$scotchArchPath'" + shift 2 + ;; *) usage "unknown option/argument: '$*'" ;; esac done -[ -n "$foamInstall" -o -n "$projectName" -o -n "$projectVersion" -o -n "$archOption" -o -n "$paraviewInstall" -o -n "$paraviewVersion" ] || usage "Please specify at least one configure option" +[ -n "$foamInstall" -o -n "$projectName" -o -n "$projectVersion" -o -n "$archOption" \ +-o -n "$paraviewInstall" -o -n "$paraviewVersion" \ +-o -n "$scotchVersion" -o -n "$scotchArchPath" \ +] || usage "Please specify at least one configure option" #echo "Replacing WM_PROJECT setting by '$projectName'" #sed -i -e 's@WM_PROJECT=.*@WM_PROJECT='"$projectName@" etc/bashrc diff --git a/etc/caseDicts/foamyHexMeshDict b/etc/caseDicts/foamyHexMeshDict index d6f87bf6a34631c2d01076b61af5c2a89823851e..c866c832adc595f601186d31873d2f7469f09410 100644 --- a/etc/caseDicts/foamyHexMeshDict +++ b/etc/caseDicts/foamyHexMeshDict @@ -78,6 +78,7 @@ motionControl objOutput no; timeChecks no; + printVertexInfo off; maxLoadUnbalance 0.2; @@ -106,9 +107,11 @@ motionControl polyMeshFiltering { - filterEdges on; - filterFaces off; - writeTetDualMesh false; + filterEdges on; + filterFaces off; + writeTetDualMesh true; + writeCellShapeControlMesh true; + writeBackgroundMeshDecomposition true; } diff --git a/etc/codeTemplates/dynamicCode/functionObjectTemplate.C b/etc/codeTemplates/dynamicCode/functionObjectTemplate.C index b44bdfb8dc108aef8117866a63186a02b9dd642f..91b31dda2b3aaead0b902dfaedc5e69413f06c2a 100644 --- a/etc/codeTemplates/dynamicCode/functionObjectTemplate.C +++ b/etc/codeTemplates/dynamicCode/functionObjectTemplate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -123,6 +123,19 @@ void ${typeName}FunctionObject::end() } +void ${typeName}FunctionObject::timeSet() +{ + if (${verbose:-false}) + { + Info<<"timeSet ${typeName} sha1: ${SHA1sum}\n"; + } + +//{{{ begin codeTime + ${codeTimeSet} +//}}} end code +} + + void ${typeName}FunctionObject::write() { if (${verbose:-false}) diff --git a/etc/codeTemplates/dynamicCode/functionObjectTemplate.H b/etc/codeTemplates/dynamicCode/functionObjectTemplate.H index 211c0868ec37c06cc6fb6700e996a6aa6c682b8d..a139f25a8b4bf7f7c03f300c93c0571b446ba72e 100644 --- a/etc/codeTemplates/dynamicCode/functionObjectTemplate.H +++ b/etc/codeTemplates/dynamicCode/functionObjectTemplate.H @@ -127,6 +127,9 @@ public: //- Write, execute the "writeCalls" virtual void write(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Update for changes of mesh virtual void updateMesh(const mapPolyMesh&) {} diff --git a/etc/config/paraview398.sh b/etc/config/paraview4.sh similarity index 98% rename from etc/config/paraview398.sh rename to etc/config/paraview4.sh index ab1dda6d9c8fab5938f5440758d3bd28a438a6fa..da695ad1e0a3a0d8e8315a032d305d5bed010beb 100644 --- a/etc/config/paraview398.sh +++ b/etc/config/paraview4.sh @@ -51,8 +51,7 @@ done #- ParaView version, automatically determine major version -#export ParaView_VERSION=3.12.0 -export ParaView_VERSION=3.98.1 +export ParaView_VERSION=4.0.1 export ParaView_MAJOR=detect diff --git a/src/Allwmake b/src/Allwmake index 55b8981ce2b0f3570a3d0b6b55f8a17e1102e9f2..d5177cfafc50a7bc1cd0c52cafc7c730ccc24bfc 100755 --- a/src/Allwmake +++ b/src/Allwmake @@ -24,7 +24,7 @@ wmakeLnInclude OpenFOAM wmakeLnInclude OSspecific/${WM_OSTYPE:-POSIX} Pstream/Allwmake $* -OSspecific/${WM_OSTYPE:-POSIX}/Allwmake +OSspecific/${WM_OSTYPE:-POSIX}/Allwmake $* wmake $makeType OpenFOAM wmake $makeType fileFormats diff --git a/src/OSspecific/POSIX/Allwmake b/src/OSspecific/POSIX/Allwmake index c68f08943620ea05e2053fc204d45e1fd171e466..52a54646f06c808c4b53f2d955aa820cac45b81a 100755 --- a/src/OSspecific/POSIX/Allwmake +++ b/src/OSspecific/POSIX/Allwmake @@ -1,5 +1,6 @@ #!/bin/sh cd ${0%/*} || exit 1 # run from this directory +makeType=${1:-libo} unset COMP_FLAGS LINK_FLAGS @@ -19,6 +20,6 @@ fi # make (non-shared) object -wmake libo +wmake $makeType # ----------------------------------------------------------------- end-of-file diff --git a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H index ff6e106377aff725f21da957a762a980549a0516..8e803839905de31e8726b7834182413c3c4d384d 100644 --- a/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H +++ b/src/OpenFOAM/containers/LinkedLists/accessTypes/UILList/UILList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,6 +79,9 @@ public: class const_iterator; friend class const_iterator; + class const_reverse_iterator; + friend class const_reverse_iterator; + // Constructors @@ -254,6 +257,48 @@ public: }; + // STL const_reverse_iterator + + typedef typename LListBase::const_reverse_iterator + LListBase_const_reverse_iterator; + + //- An STL-conforming const_reverse_iterator + class const_reverse_iterator + : + public LListBase_const_reverse_iterator + { + + public: + + //- Construct from base const_reverse_iterator + const_reverse_iterator(LListBase_const_reverse_iterator baseIter) + : + LListBase_const_reverse_iterator(baseIter) + {} + + + // Member operators + + const T& operator*() + { + return + static_cast<const T&> + (LListBase_const_reverse_iterator::operator*()); + } + + const T& operator()() + { + return operator*(); + } + + const_reverse_iterator& operator++() + { + LListBase_const_reverse_iterator::operator++(); + return *this; + } + }; + + // STL member operators //- Equality operation on ULists of the same type. diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.C b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.C index 95476fd89a7a15f71cf9bd8d6f78596cfcbec95d..4757dbb0f7f9d3f69001bba8cd38699486f8c607 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.C +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -42,6 +42,12 @@ Foam::DLListBase::const_iterator Foam::DLListBase::endConstIter_ reinterpret_cast<const link*>(0) ); +Foam::DLListBase::const_reverse_iterator Foam::DLListBase::endConstRevIter_ +( + static_cast<const DLListBase&>(DLListBase()), + reinterpret_cast<const link*>(0) +); + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H index 3af1b2b1bcb2059998106459585bec95ac840f24..2894931bcee5ebbed869a88aee243fb272de8874 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBase.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -100,6 +100,9 @@ public: class const_iterator; friend class const_iterator; + class const_reverse_iterator; + friend class const_reverse_iterator; + // Constructors @@ -260,6 +263,43 @@ public: inline const_iterator begin() const; inline const const_iterator& end() const; + // STL const_reverse_iterator + + //- An STL-conforming const_reverse_iterator + class const_reverse_iterator + { + // Private data + + //- Reference to the list this is an reverse_iterator for + const DLListBase& curList_; + + //- Current element + const link* curElmt_; + + public: + + //- Construct for a given DLListBase and link + inline const_reverse_iterator(const DLListBase&, const link*); + + // Member operators + + inline void operator=(const const_reverse_iterator&); + + inline bool operator==(const const_reverse_iterator&) const; + inline bool operator!=(const const_reverse_iterator&) const; + + inline const link& operator*(); + + inline const_reverse_iterator& operator++(); + inline const_reverse_iterator operator++(int); + }; + + inline const_reverse_iterator crbegin() const; + inline const const_reverse_iterator& crend() const; + + inline const_reverse_iterator rbegin() const; + inline const const_reverse_iterator& rend() const; + private: //- iterator returned by end() @@ -268,6 +308,9 @@ private: //- const_iterator returned by end() static const_iterator endConstIter_; + //- const_reverse_iterator returned by end() + static const_reverse_iterator endConstRevIter_; + }; diff --git a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H index 9e7eeacd233e29b34d6c38e1268008b552c7e028..fd33c5efacf0d9072a236dee8e0094c5ce9f57c5 100644 --- a/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H +++ b/src/OpenFOAM/containers/LinkedLists/linkTypes/DLListBase/DLListBaseI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -383,4 +383,111 @@ Foam::DLListBase::end() const } +// * * * * * * * * * * STL const_reverse_iterator * * * * * * * * * * * * * // + +inline Foam::DLListBase::const_reverse_iterator::const_reverse_iterator +( + const DLListBase& s, + const link* elmt +) +: + curList_(s), + curElmt_(elmt) +{} + + +inline void Foam::DLListBase::const_reverse_iterator::operator= +( + const const_reverse_iterator& iter +) +{ + curElmt_ = iter.curElmt_; +} + + +inline bool Foam::DLListBase::const_reverse_iterator::operator== +( + const const_reverse_iterator& iter +) const +{ + return curElmt_ == iter.curElmt_; +} + + +inline bool Foam::DLListBase::const_reverse_iterator::operator!= +( + const const_reverse_iterator& iter +) const +{ + return curElmt_ != iter.curElmt_; +} + + +inline const Foam::DLListBase::link& +Foam::DLListBase::const_reverse_iterator::operator*() +{ + return *curElmt_; +} + + +inline Foam::DLListBase::const_reverse_iterator& +Foam::DLListBase::const_reverse_iterator::operator++() +{ + if (curElmt_ == curList_.first_) + { + curElmt_ = 0; + } + else + { + curElmt_ = curElmt_->prev_; + } + + return *this; +} + + +inline Foam::DLListBase::const_reverse_iterator +Foam::DLListBase::const_reverse_iterator::operator++(int) +{ + const_reverse_iterator tmp = *this; + ++*this; + return tmp; +} + + +inline Foam::DLListBase::const_reverse_iterator +Foam::DLListBase::crbegin() const +{ + if (size()) + { + return const_reverse_iterator(*this, last()); + } + else + { + return endConstRevIter_; + } +} + + +inline const Foam::DLListBase::const_reverse_iterator& +Foam::DLListBase::crend() const +{ + return endConstRevIter_; +} + + +inline Foam::DLListBase::const_reverse_iterator +Foam::DLListBase::rbegin() const +{ + return this->crbegin(); +} + + +inline const Foam::DLListBase::const_reverse_iterator& +Foam::DLListBase::rend() const +{ + return endConstRevIter_; +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H index 7dfd4717e79635af6aa131d625e102bafdbd984f..94f7f89dbc751a48ce9390fd89c7278e498dec1f 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrList.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -189,6 +189,11 @@ public: // allocated entries. void clear(); + //- Append an element at the end of the list + inline void append(const T*); + inline void append(const autoPtr<T>&); + inline void append(const tmp<T>&); + //- Transfer the contents of the argument PtrList into this PtrList // and annul the argument list. void transfer(PtrList<T>&); diff --git a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H index 979e862d4a7c59e8eeb26e69d741bcbf750cd19e..74fafa6da5344b5e8e5804bb74a5ab4e2d05fb0d 100644 --- a/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H +++ b/src/OpenFOAM/containers/Lists/PtrList/PtrListI.H @@ -79,6 +79,32 @@ inline void Foam::PtrList<T>::resize(const label newSize) } +template<class T> +inline void Foam::PtrList<T>::append(const T* ptr) +{ + label sz = size(); + this->setSize(sz+1); + ptrs_[sz] = ptr; +} + + +template<class T> +inline void Foam::PtrList<T>::append(const autoPtr<T>& aptr) +{ + return append(const_cast<autoPtr<T>&>(aptr).ptr()); +} + + +template<class T> +inline void Foam::PtrList<T>::append +( + const tmp<T>& t +) +{ + return append(const_cast<tmp<T>&>(t).ptr()); +} + + template<class T> inline bool Foam::PtrList<T>::set(const label i) const { diff --git a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C index 638d3e209505df01596b77ccd532268e8afe47a0..5c9fd3210ddbd335194458b0fabece9916696d16 100644 --- a/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C +++ b/src/OpenFOAM/db/IOobject/IOobjectWriteHeader.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,6 +28,7 @@ Description \*---------------------------------------------------------------------------*/ #include "IOobject.H" +#include "objectRegistry.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -53,7 +54,7 @@ bool Foam::IOobject::writeHeader(Ostream& os, const word& type) const os << " note " << note() << ";\n"; } - os << " location " << instance()/local() << ";\n" + os << " location " << instance()/db().dbDir()/local() << ";\n" << " object " << name() << ";\n" << "}" << nl; diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H index 4e5c991131c37b00b2fee78d6858d3971ebd4bf7..8d2ef11dfc4778814c7558751c6954e95c782aa4 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H +++ b/src/OpenFOAM/db/IOstreams/Sstreams/OSstream.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,7 +30,6 @@ Description SourceFiles OSstreamI.H OSstream.C - chkStream.C \*---------------------------------------------------------------------------*/ diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/state.C b/src/OpenFOAM/db/IOstreams/Sstreams/state.C deleted file mode 100644 index fd591185096a55403c9d537f10d514ba93755a40..0000000000000000000000000000000000000000 --- a/src/OpenFOAM/db/IOstreams/Sstreams/state.C +++ /dev/null @@ -1,122 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation - \\/ 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 - Implementation of parser: test the state of either an istream or an - ostream. Report an error if there is one. - -\*---------------------------------------------------------------------------*/ - -#include "error.H" -#include "token.H" -#include "int.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -// Print state of ostream. - -void Foam::state(ostream& to, const string& s) -{ - state_value osState = state_value(to.rdstate()); - - switch (osState) - { - case _good: // Do not anything 'unusual'. - break; - - case _eof: - Info - << "Output stream: premature end of stream", s << endl; - break; - - case _fail: - SeriousErrorIn("state(ostream& to, const string& s)") - << "Output stream failure (bad format?)", s << endl; - break; - - case (_fail + _eof) : - SeriousErrorIn("state(ostream& to, const string& s)") - << "Output stream failure and end of stream", s << endl; - break; - - case _bad: - SeriousErrorIn("state(ostream& to, const string& s)") - << "Serious output stream failure", s << endl; - break; - - default: - SeriousErrorIn("state(ostream& to, const string& s)") - << "Output stream failure of unknown type", s << endl - << "Stream state value = ", osState << endl; - break; - } - - return; -} - - -// Print state of istream. -void Foam::state(istream& from, const string& s) -{ - state_value isState = state_value(from.rdstate()); - - switch (isState) - { - case _good: // Do not anything 'unusual'. - break; - - case _eof: - Info - << "Input stream: premature end of stream", s << endl; - Info<< "If all else well, possibly a quote mark missing" << endl; - break; - - case _fail: - SeriousErrorIn("state(istream& from, const string& s)") - << "Input stream failure (bad format?)", s << endl; - Info<< "If all else well, possibly a quote mark missing" << endl; - break; - - case (_fail + _eof) : - SeriousErrorIn("state(istream& from, const string& s)") - << "Input stream failure and end of stream", s << endl; - Info<< "If all else well, possibly a quote mark missing" << endl; - break; - - case _bad: - SeriousErrorIn("state(istream& from, const string& s)") - << "Serious input stream failure", s << endl; - break; - - default: - SeriousErrorIn("state(istream& from, const string& s)") - << "Input stream failure of unknown type", s << endl; - SeriousErrorIn("state(istream& from, const string& s)") - << "Stream state value = ", isState << endl; - break; - } - - return; -} - - -// ************************************************************************* // diff --git a/src/OpenFOAM/db/Time/Time.C b/src/OpenFOAM/db/Time/Time.C index 14eb3f361629ec936af055375ec0b47ed009f11d..5c589c8f2840245c088844e046f42eab3d1df415 100644 --- a/src/OpenFOAM/db/Time/Time.C +++ b/src/OpenFOAM/db/Time/Time.C @@ -1220,6 +1220,7 @@ Foam::Time& Foam::Time::operator++() writeOnce_ = false; } + functionObjects_.timeSet(); } return *this; diff --git a/src/OpenFOAM/db/Time/TimeIO.C b/src/OpenFOAM/db/Time/TimeIO.C index 8b5761858db2d7c74047f9fb306330b5b211ec7a..8aa894def75dbe8ddb358acf6ed96caa0e0a7b72 100644 --- a/src/OpenFOAM/db/Time/TimeIO.C +++ b/src/OpenFOAM/db/Time/TimeIO.C @@ -618,11 +618,11 @@ bool Foam::Time::writeObject ) ); - timeDict.add("value", value()); + timeDict.add("value", timeToUserTime(value())); timeDict.add("name", string(tmName)); timeDict.add("index", timeIndex_); - timeDict.add("deltaT", deltaT_); - timeDict.add("deltaT0", deltaT0_); + timeDict.add("deltaT", timeToUserTime(deltaT_)); + timeDict.add("deltaT0", timeToUserTime(deltaT0_)); timeDict.regIOobject::writeObject(fmt, ver, cmp); bool writeOK = objectRegistry::writeObject(fmt, ver, cmp); diff --git a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C index bd4d0b3d618931ffb4b2acfb0910084dac79858a..7c6b95ec98034797a6651c7b4655b72af70c4177 100644 --- a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C +++ b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -202,6 +202,18 @@ bool Foam::OutputFilterFunctionObject<OutputFilter>::end() } +template<class OutputFilter> +bool Foam::OutputFilterFunctionObject<OutputFilter>::timeSet() +{ + if (active()) + { + ptr_->timeSet(); + } + + return true; +} + + template<class OutputFilter> bool Foam::OutputFilterFunctionObject<OutputFilter>::read ( diff --git a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H index 87ade4b2824afbe9d366f03c9b51c115a38a59d9..78d1c47be72e11bd10f546f882bebe8f5130cbc2 100644 --- a/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H +++ b/src/OpenFOAM/db/functionObjects/OutputFilterFunctionObject/OutputFilterFunctionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -201,6 +201,8 @@ public: //- Called when Time::run() determines that the time-loop exits virtual bool end(); + //- Called when time was set at the end of the Time::operator++ + virtual bool timeSet(); //- Read and set the function object if its data have changed virtual bool read(const dictionary&); diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C index 2e67818359d979413f71b50e8be58be676787579..31e1d920628c04ffa4d1b0ead97bd721c409d699 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -120,6 +120,12 @@ bool Foam::functionObject::end() } +bool Foam::functionObject::timeSet() +{ + return false; +} + + Foam::autoPtr<Foam::functionObject> Foam::functionObject::iNew::operator() ( const word& name, diff --git a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H index a7c027b5b3b617c23d3e2a090fcfb48dfb371064..47438c32158da6f63fecab804121d125b31ed83b 100644 --- a/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H +++ b/src/OpenFOAM/db/functionObjects/functionObject/functionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -157,6 +157,9 @@ public: // By default it simply calls execute(). virtual bool end(); + //- Called when time was set at the end of the Time::operator++ + virtual bool timeSet(); + //- Read and set the function object if its data have changed virtual bool read(const dictionary&) = 0; diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C index 799e4b626ebb9fca4903238db7d8de119401ccd7..1e7553a760fa7b6badfcc12aba329638c0cfaf26 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -190,6 +190,27 @@ bool Foam::functionObjectList::end() } +bool Foam::functionObjectList::timeSet() +{ + bool ok = true; + + if (execution_) + { + if (!updated_) + { + read(); + } + + forAll(*this, objectI) + { + ok = operator[](objectI).timeSet() && ok; + } + } + + return ok; +} + + bool Foam::functionObjectList::read() { bool ok = true; diff --git a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H index 923e8501a4290314527f8ed267826229f66e790e..4df2c4d263246f66bc70e6fa65b6581d8b6fda5a 100644 --- a/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H +++ b/src/OpenFOAM/db/functionObjects/functionObjectList/functionObjectList.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -163,6 +163,9 @@ public: //- Called when Time::run() determines that the time-loop exits virtual bool end(); + //- Called when time was set at the end of the Time::operator++ + virtual bool timeSet(); + //- Read and set the function objects if their data have changed virtual bool read(); diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C index fd79d3835ad671233d47b1b93671c3aab57be7b6..7c68958b1563f683c3d7a743a320e3136650ee9c 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -628,197 +628,245 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, divide) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define PRODUCT_OPERATOR(product, op, opFunc) \ - \ -template<template<class> class Field, class Type1, class Type2> \ -void opFunc \ -( \ - FieldField<Field, typename product<Type1, Type2>::type>& f, \ - const FieldField<Field, Type1>& f1, \ - const FieldField<Field, Type2>& f2 \ -) \ -{ \ - forAll(f, i) \ - { \ - opFunc(f[i], f1[i], f2[i]); \ - } \ -} \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const FieldField<Field, Type1>& f1, \ - const FieldField<Field, Type2>& f2 \ -) \ -{ \ - typedef typename product<Type1, Type2>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - FieldField<Field, productType>::NewCalculatedType(f1) \ - ); \ - opFunc(tRes(), f1, f2); \ - return tRes; \ -} \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const FieldField<Field, Type1>& f1, \ - const tmp<FieldField<Field, Type2> >& tf2 \ -) \ -{ \ - typedef typename product<Type1, Type2>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpFieldField<Field, productType, Type2>::New(tf2) \ - ); \ - opFunc(tRes(), f1, tf2()); \ - reuseTmpFieldField<Field, productType, Type2>::clear(tf2); \ - return tRes; \ -} \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type1> >& tf1, \ - const FieldField<Field, Type2>& f2 \ -) \ -{ \ - typedef typename product<Type1, Type2>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpFieldField<Field, productType, Type1>::New(tf1) \ - ); \ - opFunc(tRes(), tf1(), f2); \ - reuseTmpFieldField<Field, productType, Type1>::clear(tf1); \ - return tRes; \ -} \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type1> >& tf1, \ - const tmp<FieldField<Field, Type2> >& tf2 \ -) \ -{ \ - typedef typename product<Type1, Type2>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpTmpFieldField<Field, productType, Type1, Type1, Type2>::New \ - (tf1, tf2) \ - ); \ - opFunc(tRes(), tf1(), tf2()); \ - reuseTmpTmpFieldField<Field, productType, Type1, Type1, Type2>::clear \ - (tf1, tf2); \ - return tRes; \ -} \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -void opFunc \ -( \ - FieldField<Field, typename product<Type, Form>::type>& f, \ - const FieldField<Field, Type>& f1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -) \ -{ \ - forAll(f, i) \ - { \ - opFunc(f[i], f1[i], vs); \ - } \ -} \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -tmp<FieldField<Field, typename product<Type, Form>::type> > \ -operator op \ -( \ - const FieldField<Field, Type>& f1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -) \ -{ \ - typedef typename product<Type, Form>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - FieldField<Field, productType>::NewCalculatedType(f1) \ - ); \ - opFunc(tRes(), f1, static_cast<const Form&>(vs)); \ - return tRes; \ -} \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -tmp<FieldField<Field, typename product<Type, Form>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type> >& tf1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -) \ -{ \ - typedef typename product<Type, Form>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpFieldField<Field, productType, Type>::New(tf1) \ - ); \ - opFunc(tRes(), tf1(), static_cast<const Form&>(vs)); \ - reuseTmpFieldField<Field, productType, Type>::clear(tf1); \ - return tRes; \ -} \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -void opFunc \ -( \ - FieldField<Field, typename product<Form, Type>::type>& f, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const FieldField<Field, Type>& f1 \ -) \ -{ \ - forAll(f, i) \ - { \ - opFunc(f[i], vs, f1[i]); \ - } \ -} \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -tmp<FieldField<Field, typename product<Form, Type>::type> > \ -operator op \ -( \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const FieldField<Field, Type>& f1 \ -) \ -{ \ - typedef typename product<Form, Type>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - FieldField<Field, productType>::NewCalculatedType(f1) \ - ); \ - opFunc(tRes(), static_cast<const Form&>(vs), f1); \ - return tRes; \ -} \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -tmp<FieldField<Field, typename product<Form, Type>::type> > \ -operator op \ -( \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const tmp<FieldField<Field, Type> >& tf1 \ -) \ -{ \ - typedef typename product<Form, Type>::type productType; \ - tmp<FieldField<Field, productType> > tRes \ - ( \ - reuseTmpFieldField<Field, productType, Type>::New(tf1) \ - ); \ - opFunc(tRes(), static_cast<const Form&>(vs), tf1()); \ - reuseTmpFieldField<Field, productType, Type>::clear(tf1); \ - return tRes; \ +#define PRODUCT_OPERATOR(product, op, opFunc) \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +void opFunc \ +( \ + FieldField<Field1, typename product<Type1, Type2>::type>& f, \ + const FieldField<Field1, Type1>& f1, \ + const FieldField<Field2, Type2>& f2 \ +) \ +{ \ + forAll(f, i) \ + { \ + opFunc(f[i], f1[i], f2[i]); \ + } \ +} \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field1, Type1>& f1, \ + const FieldField<Field2, Type2>& f2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field1, productType> > tRes \ + ( \ + FieldField<Field1, productType>::NewCalculatedType(f1) \ + ); \ + opFunc(tRes(), f1, f2); \ + return tRes; \ +} \ + \ +template<template<class> class Field, class Type1, class Type2> \ +tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field, Type1>& f1, \ + const tmp<FieldField<Field, Type2> >& tf2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + reuseTmpFieldField<Field, productType, Type2>::New(tf2) \ + ); \ + opFunc(tRes(), f1, tf2()); \ + reuseTmpFieldField<Field, productType, Type2>::clear(tf2); \ + return tRes; \ +} \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field1, Type1>& f1, \ + const tmp<FieldField<Field2, Type2> >& tf2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field1, productType> > tRes \ + ( \ + FieldField<Field1, productType>::NewCalculatedType(f1) \ + ); \ + opFunc(tRes(), f1, tf2()); \ + tf2.clear(); \ + return tRes; \ +} \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field1, Type1> >& tf1, \ + const FieldField<Field2, Type2>& f2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field1, productType> > tRes \ + ( \ + reuseTmpFieldField<Field1, productType, Type1>::New(tf1) \ + ); \ + opFunc(tRes(), tf1(), f2); \ + reuseTmpFieldField<Field1, productType, Type1>::clear(tf1); \ + return tRes; \ +} \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field1, Type1> >& tf1, \ + const tmp<FieldField<Field2, Type2> >& tf2 \ +) \ +{ \ + typedef typename product<Type1, Type2>::type productType; \ + tmp<FieldField<Field1, productType> > tRes \ + ( \ + reuseTmpTmpFieldField<Field1, productType, Type1, Type1, Type2>::New \ + (tf1, tf2) \ + ); \ + opFunc(tRes(), tf1(), tf2()); \ + reuseTmpTmpFieldField<Field1, productType, Type1, Type1, Type2>::clear \ + (tf1, tf2); \ + return tRes; \ +} \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +void opFunc \ +( \ + FieldField<Field, typename product<Type, Form>::type>& f, \ + const FieldField<Field, Type>& f1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +) \ +{ \ + forAll(f, i) \ + { \ + opFunc(f[i], f1[i], vs); \ + } \ +} \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +tmp<FieldField<Field, typename product<Type, Form>::type> > \ +operator op \ +( \ + const FieldField<Field, Type>& f1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +) \ +{ \ + typedef typename product<Type, Form>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + FieldField<Field, productType>::NewCalculatedType(f1) \ + ); \ + opFunc(tRes(), f1, static_cast<const Form&>(vs)); \ + return tRes; \ +} \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +tmp<FieldField<Field, typename product<Type, Form>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field, Type> >& tf1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +) \ +{ \ + typedef typename product<Type, Form>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + reuseTmpFieldField<Field, productType, Type>::New(tf1) \ + ); \ + opFunc(tRes(), tf1(), static_cast<const Form&>(vs)); \ + reuseTmpFieldField<Field, productType, Type>::clear(tf1); \ + return tRes; \ +} \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +void opFunc \ +( \ + FieldField<Field, typename product<Form, Type>::type>& f, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const FieldField<Field, Type>& f1 \ +) \ +{ \ + forAll(f, i) \ + { \ + opFunc(f[i], vs, f1[i]); \ + } \ +} \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +tmp<FieldField<Field, typename product<Form, Type>::type> > \ +operator op \ +( \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const FieldField<Field, Type>& f1 \ +) \ +{ \ + typedef typename product<Form, Type>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + FieldField<Field, productType>::NewCalculatedType(f1) \ + ); \ + opFunc(tRes(), static_cast<const Form&>(vs), f1); \ + return tRes; \ +} \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +tmp<FieldField<Field, typename product<Form, Type>::type> > \ +operator op \ +( \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const tmp<FieldField<Field, Type> >& tf1 \ +) \ +{ \ + typedef typename product<Form, Type>::type productType; \ + tmp<FieldField<Field, productType> > tRes \ + ( \ + reuseTmpFieldField<Field, productType, Type>::New(tf1) \ + ); \ + opFunc(tRes(), static_cast<const Form&>(vs), tf1()); \ + reuseTmpFieldField<Field, productType, Type>::clear(tf1); \ + return tRes; \ } PRODUCT_OPERATOR(typeOfSum, +, add) diff --git a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H index ba4be61880014e3a033f5377db3e7940406b6b03..65f68b34ec02174d1f19775db5cd7a56306d3245 100644 --- a/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H +++ b/src/OpenFOAM/fields/FieldFields/FieldField/FieldFieldFunctions.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -267,100 +267,138 @@ BINARY_TYPE_OPERATOR_FS(Type, Type, scalar, /, divide) // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -#define PRODUCT_OPERATOR(product, op, opFunc) \ - \ -template<template<class> class Field, class Type1, class Type2> \ -void opFunc \ -( \ - FieldField<Field, typename product<Type1, Type2>::type>& f, \ - const FieldField<Field, Type1>& f1, \ - const FieldField<Field, Type2>& f2 \ -); \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const FieldField<Field, Type1>& f1, \ - const FieldField<Field, Type2>& f2 \ -); \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const FieldField<Field, Type1>& f1, \ - const tmp<FieldField<Field, Type2> >& tf2 \ -); \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type1> >& tf1, \ - const FieldField<Field, Type2>& f2 \ -); \ - \ -template<template<class> class Field, class Type1, class Type2> \ -tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type1> >& tf1, \ - const tmp<FieldField<Field, Type2> >& tf2 \ -); \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -void opFunc \ -( \ - FieldField<Field, typename product<Type, Form>::type>& f, \ - const FieldField<Field, Type>& f1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -); \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -tmp<FieldField<Field, typename product<Type, Form>::type> > \ -operator op \ -( \ - const FieldField<Field, Type>& f1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -); \ - \ -template \ -<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ -tmp<FieldField<Field, typename product<Type, Form>::type> > \ -operator op \ -( \ - const tmp<FieldField<Field, Type> >& tf1, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs \ -); \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -void opFunc \ -( \ - FieldField<Field, typename product<Form, Type>::type>& f, \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const FieldField<Field, Type>& f1 \ -); \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -tmp<FieldField<Field, typename product<Form, Type>::type> > \ -operator op \ -( \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const FieldField<Field, Type>& f1 \ -); \ - \ -template \ -<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ -tmp<FieldField<Field, typename product<Form, Type>::type> > \ -operator op \ -( \ - const VectorSpace<Form,Cmpt,nCmpt>& vs, \ - const tmp<FieldField<Field, Type> >& tf1 \ +#define PRODUCT_OPERATOR(product, op, opFunc) \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +void opFunc \ +( \ + FieldField<Field1, typename product<Type1, Type2>::type>& f, \ + const FieldField<Field1, Type1>& f1, \ + const FieldField<Field2, Type2>& f2 \ +); \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field1, Type1>& f1, \ + const FieldField<Field2, Type2>& f2 \ +); \ + \ +template<template<class> class Field, class Type1, class Type2> \ +tmp<FieldField<Field, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field, Type1>& f1, \ + const tmp<FieldField<Field, Type2> >& tf2 \ +); \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const FieldField<Field1, Type1>& f1, \ + const tmp<FieldField<Field2, Type2> >& tf2 \ +); \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field1, Type1> >& tf1, \ + const FieldField<Field2, Type2>& f2 \ +); \ + \ +template \ +< \ + template<class> class Field1, \ + template<class> class Field2, \ + class Type1, \ + class Type2 \ +> \ +tmp<FieldField<Field1, typename product<Type1, Type2>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field1, Type1> >& tf1, \ + const tmp<FieldField<Field2, Type2> >& tf2 \ +); \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +void opFunc \ +( \ + FieldField<Field, typename product<Type, Form>::type>& f, \ + const FieldField<Field, Type>& f1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +); \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +tmp<FieldField<Field, typename product<Type, Form>::type> > \ +operator op \ +( \ + const FieldField<Field, Type>& f1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +); \ + \ +template \ +<template<class> class Field, class Type, class Form, class Cmpt, int nCmpt> \ +tmp<FieldField<Field, typename product<Type, Form>::type> > \ +operator op \ +( \ + const tmp<FieldField<Field, Type> >& tf1, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs \ +); \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +void opFunc \ +( \ + FieldField<Field, typename product<Form, Type>::type>& f, \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const FieldField<Field, Type>& f1 \ +); \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +tmp<FieldField<Field, typename product<Form, Type>::type> > \ +operator op \ +( \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const FieldField<Field, Type>& f1 \ +); \ + \ +template \ +<template<class> class Field, class Form, class Cmpt, int nCmpt, class Type> \ +tmp<FieldField<Field, typename product<Form, Type>::type> > \ +operator op \ +( \ + const VectorSpace<Form,Cmpt,nCmpt>& vs, \ + const tmp<FieldField<Field, Type> >& tf1 \ ); PRODUCT_OPERATOR(typeOfSum, +, add) diff --git a/src/OpenFOAM/fields/Fields/scalarField/scalarField.C b/src/OpenFOAM/fields/Fields/scalarField/scalarField.C index 96e41d9571b52fa074b7761241c3ac2f1893f19c..7ae37531de2feca06a17ffc6ec7d24c41b5f3ff7 100644 --- a/src/OpenFOAM/fields/Fields/scalarField/scalarField.C +++ b/src/OpenFOAM/fields/Fields/scalarField/scalarField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -27,6 +27,7 @@ Description \*---------------------------------------------------------------------------*/ #include "scalarField.H" +#include "unitConversion.H" #define TEMPLATE #include "FieldFunctionsM.C" @@ -155,6 +156,11 @@ UNARY_FUNCTION(scalar, scalar, j1) UNARY_FUNCTION(scalar, scalar, y0) UNARY_FUNCTION(scalar, scalar, y1) +UNARY_FUNCTION(scalar, scalar, degToRad) +UNARY_FUNCTION(scalar, scalar, radToDeg) +UNARY_FUNCTION(scalar, scalar, atmToPa) +UNARY_FUNCTION(scalar, scalar, paToAtm) + #define BesselFunc(func) \ void func(scalarField& res, const int n, const UList<scalar>& sf) \ diff --git a/src/OpenFOAM/fields/Fields/scalarField/scalarField.H b/src/OpenFOAM/fields/Fields/scalarField/scalarField.H index ff322d3fe416d07ecfa4261f36c326bda25eed78..f30938e9b6830bfd9beee5baaf671534b3e9de07 100644 --- a/src/OpenFOAM/fields/Fields/scalarField/scalarField.H +++ b/src/OpenFOAM/fields/Fields/scalarField/scalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,6 +130,10 @@ UNARY_FUNCTION(scalar, scalar, j1) UNARY_FUNCTION(scalar, scalar, y0) UNARY_FUNCTION(scalar, scalar, y1) +UNARY_FUNCTION(scalar, scalar, degToRad) +UNARY_FUNCTION(scalar, scalar, radToDeg) +UNARY_FUNCTION(scalar, scalar, atmToPa) +UNARY_FUNCTION(scalar, scalar, paToAtm) #define BesselFunc(func) \ void func(scalarField& Res, const int n, const UList<scalar>& sf); \ diff --git a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C index c024d98389b64ee3d8b573ba119c58e3f6a0cb96..a13a24b0d466c66a03478401620311cb6249f718 100644 --- a/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C +++ b/src/OpenFOAM/fields/GeometricFields/GeometricField/GeometricBoundaryField.C @@ -50,7 +50,8 @@ readField } - // 1. Handle explicit patch names + // 1. Handle explicit patch names. Note that there can be only one explicit + // patch name since is key of dictionary. forAllConstIter(dictionary, dict, iter) { if (iter().isDict() && !iter().keyword().isPattern()) @@ -76,33 +77,45 @@ readField // 2. Patch-groups. (using non-wild card entries of dictionaries) // (patchnames already matched above) - // Note: in order of entries in the dictionary (first patchGroups wins) - forAllConstIter(dictionary, dict, iter) + // Note: in reverse order of entries in the dictionary (last + // patchGroups wins). This is so is consistent with dictionary wildcard + // behaviour + if (dict.size()) { - if (iter().isDict() && !iter().keyword().isPattern()) + for + ( + IDLList<entry>::const_reverse_iterator iter = dict.rbegin(); + iter != dict.rend(); + ++iter + ) { - const labelList patchIDs = bmesh_.findIndices - ( - iter().keyword(), - true // use patchGroups - ); + const entry& e = iter(); - forAll(patchIDs, i) + if (e.isDict() && !e.keyword().isPattern()) { - label patchi = patchIDs[i]; + const labelList patchIDs = bmesh_.findIndices + ( + e.keyword(), + true // use patchGroups + ); - if (!this->set(patchi)) + forAll(patchIDs, i) { - this->set - ( - patchi, - PatchField<Type>::New + label patchi = patchIDs[i]; + + if (!this->set(patchi)) + { + this->set ( - bmesh_[patchi], - field, - iter().dict() - ) - ); + patchi, + PatchField<Type>::New + ( + bmesh_[patchi], + field, + e.dict() + ) + ); + } } } } diff --git a/src/OpenFOAM/global/argList/argList.C b/src/OpenFOAM/global/argList/argList.C index b75a8864ada42c32cd5fe2bbf3185460377848ca..d3c021d4cb9baceee2113be84996b6c44f64ca1f 100644 --- a/src/OpenFOAM/global/argList/argList.C +++ b/src/OpenFOAM/global/argList/argList.C @@ -473,14 +473,14 @@ Foam::argList::argList bool initialise ) : + parRunControl_(args.parRunControl_), args_(args.args_), options_(options), executable_(args.executable_), rootPath_(args.rootPath_), globalCase_(args.globalCase_), case_(args.case_), - argListStr_(args.argListStr_), - parRunControl_(args.parRunControl_) + argListStr_(args.argListStr_) { parse(checkArgs, checkOpts, initialise); } diff --git a/src/OpenFOAM/global/argList/argList.H b/src/OpenFOAM/global/argList/argList.H index c7e07026bdc860a0a20b1e8cdf1eceb956dee860..ed4b07e205deed3c2078894cddb9022eb48502d9 100644 --- a/src/OpenFOAM/global/argList/argList.H +++ b/src/OpenFOAM/global/argList/argList.H @@ -105,6 +105,10 @@ class argList // Private data static bool bannerEnabled; + //- Switch on/off parallel mode. Has to be first to be constructed + // so destructor is done last. + ParRunControl parRunControl_; + stringList args_; HashTable<string> options_; @@ -114,8 +118,6 @@ class argList fileName case_; string argListStr_; - ParRunControl parRunControl_; - // Signal handlers sigFpe sigFpe_; sigInt sigInt_; diff --git a/src/OpenFOAM/db/IOstreams/Sstreams/chkStream.C b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C similarity index 56% rename from src/OpenFOAM/db/IOstreams/Sstreams/chkStream.C rename to src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C index 94c4db91aeac7dedef34b9b52c7158ca70d55578..439257fcb6a9f9b5ee28416558c058303c541c11 100644 --- a/src/OpenFOAM/db/IOstreams/Sstreams/chkStream.C +++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -21,38 +21,53 @@ License You should have received a copy of the GNU General Public License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. -Description - Checks stream state,ing error. - \*---------------------------------------------------------------------------*/ -#include "error.H" -#include "token.H" +#include "SquareMatrix.H" +#include "labelList.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -bool Foam::checkStream(istream& is, const string& fnName) +template<class Type> +Foam::scalar Foam::detDecomposed +( + const SquareMatrix<Type>& matrix, + const label sign +) { - if (!is.good()) + scalar diagProduct = 1.0; + + for (label i = 0; i < matrix.n(); ++i) { - state(is, fnName); - Info<< "Bad object in istream?", fnName << endl; + diagProduct *= matrix[i][i]; } - return good(); + return sign*diagProduct; } -bool Foam::checkStream(ostream& os, const string& fnName) +template<class Type> +Foam::scalar Foam::det(const SquareMatrix<Type>& matrix) { - if (!os.good()) - { - state(os, fnName); - Info<< "Bad object in ostream?", fnName << endl; - } + SquareMatrix<Type> matrixTmp = matrix; + + labelList pivotIndices(matrix.n()); + label sign; + LUDecompose(matrixTmp, pivotIndices, sign); - return good(); + return detDecomposed(matrixTmp, sign); } -// ************************************************************************* // +template<class Type> +Foam::scalar Foam::det(SquareMatrix<Type>& matrix) +{ + labelList pivotIndices(matrix.n()); + label sign; + LUDecompose(matrix, pivotIndices, sign); + + return detDecomposed(matrix, sign); +} + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H index 660f39321e1506c53064a41fcdad187a11923b99..531b649588b27286ea9f3316e0fbf429f8ff46cc 100644 --- a/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H +++ b/src/OpenFOAM/matrices/SquareMatrix/SquareMatrix.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -81,6 +81,21 @@ public: }; +// Global functions + +//- Return the LU decomposed SquareMatrix det +template<class Type> +scalar detDecomposed(const SquareMatrix<Type>&, const label sign); + +//- Return the SquareMatrix det +template<class Type> +scalar det(const SquareMatrix<Type>&); + +//- Return the SquareMatrix det and the LU decomposition in the original matrix +template<class Type> +scalar det(SquareMatrix<Type>&); + + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam @@ -91,6 +106,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "SquareMatrix.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C index dd51eb645b8daf05e192f4d88eb393dfff5d5968..66a495f6b21d7408b56a166f017bdb6db0ef41e1 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.C @@ -535,4 +535,123 @@ const Foam::labelListListList& Foam::GAMGAgglomeration::boundaryFaceMap } +bool Foam::GAMGAgglomeration::checkRestriction +( + labelList& newRestrict, + label& nNewCoarse, + const lduAddressing& fineAddressing, + const labelUList& restrict, + const label nCoarse +) +{ + if (fineAddressing.size() != restrict.size()) + { + FatalErrorIn + ( + "checkRestriction(..)" + ) << "nCells:" << fineAddressing.size() + << " agglom:" << restrict.size() + << abort(FatalError); + } + + // Seed (master) for every region + labelList master(identity(fineAddressing.size())); + + // Now loop and transport master through region + const labelUList& lower = fineAddressing.lowerAddr(); + const labelUList& upper = fineAddressing.upperAddr(); + + while (true) + { + label nChanged = 0; + + forAll(lower, faceI) + { + label own = lower[faceI]; + label nei = upper[faceI]; + + if (restrict[own] == restrict[nei]) + { + // coarse-mesh-internal face + + if (master[own] < master[nei]) + { + master[nei] = master[own]; + nChanged++; + } + else if (master[own] > master[nei]) + { + master[own] = master[nei]; + nChanged++; + } + } + } + + reduce(nChanged, sumOp<label>()); + + if (nChanged == 0) + { + break; + } + } + + + // Count number of regions/masters per coarse cell + labelListList coarseToMasters(nCoarse); + nNewCoarse = 0; + forAll(restrict, cellI) + { + labelList& masters = coarseToMasters[restrict[cellI]]; + + if (findIndex(masters, master[cellI]) == -1) + { + masters.append(master[cellI]); + nNewCoarse++; + } + } + + if (nNewCoarse > nCoarse) + { + //WarningIn("GAMGAgglomeration::checkRestriction(..)") + // << "Have " << nCoarse + // << " agglomerated cells but " << nNewCoarse + // << " disconnected regions" << endl; + + // Keep coarseToMasters[0] the original coarse, allocate new ones + // for the others + labelListList coarseToNewCoarse(coarseToMasters.size()); + + nNewCoarse = nCoarse; + + forAll(coarseToMasters, coarseI) + { + const labelList& masters = coarseToMasters[coarseI]; + + labelList& newCoarse = coarseToNewCoarse[coarseI]; + newCoarse.setSize(masters.size()); + newCoarse[0] = coarseI; + for (label i = 1; i < newCoarse.size(); i++) + { + newCoarse[i] = nNewCoarse++; + } + } + + newRestrict.setSize(fineAddressing.size()); + forAll(restrict, cellI) + { + label coarseI = restrict[cellI]; + + label index = findIndex(coarseToMasters[coarseI], master[cellI]); + newRestrict[cellI] = coarseToNewCoarse[coarseI][index]; + } + + return false; + } + else + { + return true; + } +} + + // ************************************************************************* // diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H index 4f6ad8af07c91a6bb01660b6101419ac474ae8d4..37cf4a91973f0a366fba4c0968b13034103c58c9 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/GAMGAgglomeration/GAMGAgglomeration.H @@ -474,6 +474,16 @@ public: const labelListListList& boundaryFaceMap(const label fineLeveli) const; + //- Given restriction determines if coarse cells are connected. + // Return ok is so, otherwise creates new restriction that is + static bool checkRestriction + ( + labelList& newRestrict, + label& nNewCoarse, + const lduAddressing& fineAddressing, + const labelUList& restrict, + const label nCoarse + ); }; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C index b0f5e757da00dc48579fb4eb6bc28d361a267eb7..508c0c3f946a2a6ef586194ea881cab8eb7ca485 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomerate.C @@ -26,7 +26,96 @@ License #include "pairGAMGAgglomeration.H" #include "lduAddressing.H" -// * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // +// * * * * * * * * * * * * * Protected Member Functions * * * * * * * * * * // + +void Foam::pairGAMGAgglomeration::agglomerate +( + const lduMesh& mesh, + const scalarField& faceWeights +) +{ + // Start geometric agglomeration from the given faceWeights + scalarField* faceWeightsPtr = const_cast<scalarField*>(&faceWeights); + + // Agglomerate until the required number of cells in the coarsest level + // is reached + + label nPairLevels = 0; + label nCreatedLevels = 0; + + while (nCreatedLevels < maxLevels_ - 1) + { + label nCoarseCells = -1; + + tmp<labelField> finalAgglomPtr = agglomerate + ( + nCoarseCells, + meshLevel(nCreatedLevels).lduAddr(), + *faceWeightsPtr + ); + + if (continueAgglomerating(nCoarseCells)) + { + nCells_[nCreatedLevels] = nCoarseCells; + restrictAddressing_.set(nCreatedLevels, finalAgglomPtr); + } + else + { + break; + } + + agglomerateLduAddressing(nCreatedLevels); + + // Agglomerate the faceWeights field for the next level + { + scalarField* aggFaceWeightsPtr + ( + new scalarField + ( + meshLevels_[nCreatedLevels].upperAddr().size(), + 0.0 + ) + ); + + restrictFaceField + ( + *aggFaceWeightsPtr, + *faceWeightsPtr, + nCreatedLevels + ); + + if (nCreatedLevels) + { + delete faceWeightsPtr; + } + + faceWeightsPtr = aggFaceWeightsPtr; + } + + if (nPairLevels % mergeLevels_) + { + combineLevels(nCreatedLevels); + } + else + { + nCreatedLevels++; + } + + nPairLevels++; + } + + // Shrink the storage of the levels to those created + compactLevels(nCreatedLevels); + + // Delete temporary geometry storage + if (nCreatedLevels) + { + delete faceWeightsPtr; + } +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate ( @@ -95,9 +184,13 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate labelField& coarseCellMap = tcoarseCellMap(); nCoarseCells = 0; + label celli; - for (label celli=0; celli<nFineCells; celli++) + for (label cellfi=0; cellfi<nFineCells; cellfi++) { + // Change cell ordering depending on direction for this level + celli = forward_ ? cellfi : nFineCells - cellfi - 1; + if (coarseCellMap[celli] < 0) { label matchFaceNo = -1; @@ -171,11 +264,13 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate } } - // Check that all cells are part of clusters, // if not create single-cell "clusters" for each - for (label celli=0; celli<nFineCells; celli++) + for (label cellfi=0; cellfi<nFineCells; cellfi++) { + // Change cell ordering depending on direction for this level + celli = forward_ ? cellfi : nFineCells - cellfi - 1; + if (coarseCellMap[celli] < 0) { coarseCellMap[celli] = nCoarseCells; @@ -183,105 +278,23 @@ Foam::tmp<Foam::labelField> Foam::pairGAMGAgglomeration::agglomerate } } - // Reverse the map ordering to improve the next level of agglomeration - // (doesn't always help and is sometimes detrimental) - nCoarseCells--; - - forAll(coarseCellMap, celli) - { - coarseCellMap[celli] = nCoarseCells - coarseCellMap[celli]; - } - - nCoarseCells++; - - return tcoarseCellMap; -} - - -void Foam::pairGAMGAgglomeration::agglomerate -( - const lduMesh& mesh, - const scalarField& faceWeights -) -{ - // Start geometric agglomeration from the given faceWeights - scalarField* faceWeightsPtr = const_cast<scalarField*>(&faceWeights); - - // Agglomerate until the required number of cells in the coarsest level - // is reached - - label nPairLevels = 0; - label nCreatedLevels = 0; - - while (nCreatedLevels < maxLevels_ - 1) + if (!forward_) { - label nCoarseCells = -1; - - tmp<labelField> finalAgglomPtr = agglomerate - ( - nCoarseCells, - meshLevel(nCreatedLevels).lduAddr(), - *faceWeightsPtr - ); - - if (continueAgglomerating(nCoarseCells)) - { - nCells_[nCreatedLevels] = nCoarseCells; - restrictAddressing_.set(nCreatedLevels, finalAgglomPtr); - } - else - { - break; - } - - agglomerateLduAddressing(nCreatedLevels); - - // Agglomerate the faceWeights field for the next level - { - scalarField* aggFaceWeightsPtr - ( - new scalarField - ( - meshLevels_[nCreatedLevels].upperAddr().size(), - 0.0 - ) - ); - - restrictFaceField - ( - *aggFaceWeightsPtr, - *faceWeightsPtr, - nCreatedLevels - ); - - if (nCreatedLevels) - { - delete faceWeightsPtr; - } + nCoarseCells--; - faceWeightsPtr = aggFaceWeightsPtr; - } - - if (nPairLevels % mergeLevels_) - { - combineLevels(nCreatedLevels); - } - else + forAll(coarseCellMap, celli) { - nCreatedLevels++; + coarseCellMap[celli] = nCoarseCells - coarseCellMap[celli]; } - nPairLevels++; + nCoarseCells++; } - // Shrink the storage of the levels to those created - compactLevels(nCreatedLevels); + // Reverse the map ordering for the next level + // to improve the next level of agglomeration + forward_ = !forward_; - // Delete temporary geometry storage - if (nCreatedLevels) - { - delete faceWeightsPtr; - } + return tcoarseCellMap; } 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 1c4cbfcd7f6fcbbcc6387508cc516274bfa4d8b0..31359e692c3414f1cc1aa37fa7ea672bfb9580f1 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,7 +29,8 @@ License namespace Foam { -defineTypeNameAndDebug(pairGAMGAgglomeration, 0); + defineTypeNameAndDebug(pairGAMGAgglomeration, 0); + bool pairGAMGAgglomeration::forward_(true); } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H index 59de4b1e4df3378afc478508e1f22247e6b4f097..02d6c5f1c4440dd5e95f67746eee82c14e06218b 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGAgglomerations/pairGAMGAgglomeration/pairGAMGAgglomeration.H @@ -56,6 +56,9 @@ class pairGAMGAgglomeration //- Number of levels to merge, 1 = don't merge, 2 = merge pairs etc. label mergeLevels_; + //- Direction of cell loop for the current level + static bool forward_; + protected: @@ -97,7 +100,6 @@ public: const lduAddressing& fineMatrixAddressing, const scalarField& faceWeights ); - }; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H index ed49d0082709b67c3c115a0efa9f8080c92872eb..7f462840f5b0965438ef97620bb19ddcfaa65499 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolver.H @@ -230,7 +230,8 @@ class GAMGSolver const lduMatrix& m, const FieldField<Field, scalar>& interfaceBouCoeffs, const lduInterfaceFieldPtrsList& interfaces, - const scalarField& source, + const labelList& restrictAddressing, + const scalarField& psiC, const direction cmpt ) const; diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C index a24612645b17f51f3363ec744307bad5c9c2747b..3cdf3a6e4e6e29bb38c3c43f7ad7fbdf86f22f65 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverInterpolate.C @@ -34,7 +34,8 @@ void Foam::GAMGSolver::interpolate const lduMatrix& m, const FieldField<Field, scalar>& interfaceBouCoeffs, const lduInterfaceFieldPtrsList& interfaces, - const scalarField& source, + const labelList& restrictAddressing, + const scalarField& psiC, const direction cmpt ) const { @@ -80,6 +81,26 @@ void Foam::GAMGSolver::interpolate { psiPtr[celli] = -ApsiPtr[celli]/(diagPtr[celli]); } + + register const label nCCells = psiC.size(); + scalarField corrC(nCCells, 0); + scalarField diagC(nCCells, 0); + + for (register label celli=0; celli<nCells; celli++) + { + corrC[restrictAddressing[celli]] += diagPtr[celli]*psiPtr[celli]; + diagC[restrictAddressing[celli]] += diagPtr[celli]; + } + + for (register label ccelli=0; ccelli<nCCells; ccelli++) + { + corrC[ccelli] = psiC[ccelli] - corrC[ccelli]/diagC[ccelli]; + } + + for (register label celli=0; celli<nCells; celli++) + { + psiPtr[celli] += corrC[restrictAddressing[celli]]; + } } diff --git a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C index 9677a17a9bb93738e3f595a5482e7fdf34b28595..a3e22411d93905c53bd211bf826f6909096da5d6 100644 --- a/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C +++ b/src/OpenFOAM/matrices/lduMatrix/solvers/GAMG/GAMGSolverSolve.C @@ -313,7 +313,7 @@ void Foam::GAMGSolver::Vcycle scalarField& ACfRef = const_cast<scalarField&>(ACf.operator const scalarField&()); - if (interpolateCorrection_) + if (interpolateCorrection_) //&& leveli < coarsestLevel - 2) { interpolate ( @@ -322,7 +322,8 @@ void Foam::GAMGSolver::Vcycle matrixLevels_[leveli], interfaceLevelsBouCoeffs_[leveli], interfaceLevels_[leveli], - coarseSources[leveli], + agglomeration_.restrictAddressing(leveli + 1), + coarseCorrFields[leveli + 1], cmpt ); } @@ -382,7 +383,8 @@ void Foam::GAMGSolver::Vcycle matrix_, interfaceBouCoeffs_, interfaces_, - finestResidual, + agglomeration_.restrictAddressing(0), + coarseCorrFields[0], cmpt ); } diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C index 68a6955d71fa5a182d845096210f088294679672..87a9d02347f7d2c7f05b210b2b4d471e752d16d7 100644 --- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C +++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.C @@ -33,9 +33,22 @@ void Foam::LUDecompose scalarSquareMatrix& matrix, labelList& pivotIndices ) +{ + label sign; + LUDecompose(matrix, pivotIndices, sign); +} + + +void Foam::LUDecompose +( + scalarSquareMatrix& matrix, + labelList& pivotIndices, + label& sign +) { label n = matrix.n(); scalar vv[n]; + sign = 1; for (register label i=0; i<n; i++) { @@ -113,6 +126,7 @@ void Foam::LUDecompose Swap(matrixj[k], matrixiMax[k]); } + sign *= -1; vv[iMax] = vv[j]; } diff --git a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H index 3eecda8ebf582d8d19c22686921be2d55a82c5eb..9dbdb8b65d9a4efa04472b5b1155935b5c547581 100644 --- a/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H +++ b/src/OpenFOAM/matrices/scalarMatrices/scalarMatrices.H @@ -79,6 +79,15 @@ void LUDecompose labelList& pivotIndices ); +//- LU decompose the matrix with pivoting. +// sign is -1 for odd number of row interchanges and 1 for even number. +void LUDecompose +( + scalarSquareMatrix& matrix, + labelList& pivotIndices, + label& sign +); + //- LU decompose the matrix into a lower (L) and upper (U) part. U = L.T() void LUDecompose(scalarSymmetricSquareMatrix& matrix); diff --git a/src/OpenFOAM/memory/autoPtr/autoPtr.H b/src/OpenFOAM/memory/autoPtr/autoPtr.H index 0d5944128ef5760da6eda3d50fc93709d8e0202d..c3ea064fb11d207d0a49bc11b0228e945c71c8ad 100644 --- a/src/OpenFOAM/memory/autoPtr/autoPtr.H +++ b/src/OpenFOAM/memory/autoPtr/autoPtr.H @@ -63,11 +63,11 @@ public: //- Store object pointer inline explicit autoPtr(T* = 0); - //- Construct as copy by transfering pointer to this autoPtr and + //- Construct as copy by transferring pointer to this autoPtr and // setting the arguments pointer to NULL inline autoPtr(const autoPtr<T>&); - //- Construct either by transfering pointer or cloning. Should + //- Construct either by transferring pointer or cloning. Should // only be called with type that supports cloning. inline autoPtr(const autoPtr<T>&, const bool reUse); diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.H index 80ad9195472e75aff4979797485949d8467a2d24..f1d07d79b98d0c9b38c02013efd183f1cb37e993 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/basic/coupled/coupledPointPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -98,16 +98,6 @@ public: //- Destructor virtual ~coupledPointPatch(); - - // Member Functions - - // Access - - //- Return true because this patch is coupled - virtual bool coupled() const - { - return true; - } }; diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H index da777d683c53287bc9ee0942c9c989919d8bd7ad..6699795bfc87ef14a76bda87cdef1681f0a4bc5a 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/constraint/processor/processorPointPatch.H @@ -115,19 +115,6 @@ public: // Member functions - //- Return true if running parallel - virtual bool coupled() const - { - if (Pstream::parRun()) - { - return true; - } - else - { - return false; - } - } - //- Return message tag to use for communication virtual int tag() const { diff --git a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H index c59234c66c5d5143ba7a9db32d5dc191f0f6531a..f5958be5e042a026501c846355be1a04022ac72f 100644 --- a/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H +++ b/src/OpenFOAM/meshes/pointMesh/pointPatches/facePointPatch/facePointPatch.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -171,6 +171,12 @@ public: return polyPatch_.index(); } + //- Return true if this patch field is coupled + virtual bool coupled() const + { + return polyPatch_.coupled(); + } + //- Return mesh points virtual const labelList& meshPoints() const { diff --git a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.H b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.H index 7f23facd04ec02eb0b43abb1b64ee2702f5be88e..ef500b4b8b8d8639f82630955cb5c60d4ca3825f 100644 --- a/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.H +++ b/src/OpenFOAM/meshes/polyMesh/polyMeshCheck/polyMeshTools.H @@ -63,16 +63,6 @@ public: const vectorField& cellCtrs ); -// static tmp<scalarField> faceOrthogonality(const polyMesh& mesh) -// { -// return faceOrthogonality -// ( -// mesh, -// mesh.faceAreas(), -// mesh.cellCentres() -// ); -// } - //- Generate skewness field static tmp<scalarField> faceSkewness ( @@ -83,18 +73,6 @@ public: const vectorField& cellCtrs ); -// static tmp<scalarField> faceSkewness(const polyMesh& mesh) -// { -// return faceSkewness -// ( -// mesh, -// mesh.points(), -// mesh.faceCentres(), -// mesh.faceAreas(), -// mesh.cellCentres() -// ); -// } - //- Generate interpolation factors field static tmp<scalarField> faceWeights ( diff --git a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C index 2615d21705fa1b453b1bd693eb8911a7f2e3cc4f..7e3850891d248c4510607a386bd44f06ecf8bb5f 100644 --- a/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C +++ b/src/OpenFOAM/meshes/polyMesh/zones/faceZone/faceZone.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenCFD Ltd. \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -171,6 +171,20 @@ void Foam::faceZone::checkAddressing() const << " size of flip map: " << flipMap_.size() << abort(FatalError); } + + const labelList& mf = *this; + + bool hasWarned = false; + forAll(mf, i) + { + if (!hasWarned && (mf[i] < 0 || mf[i] >= zoneMesh().mesh().nFaces())) + { + WarningIn("void Foam::faceZone::checkAddressing() const") + << "Illegal face index " << mf[i] << " outside range 0.." + << zoneMesh().mesh().nFaces()-1 << endl; + hasWarned = true; + } + } } diff --git a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H index 1900aee38728abaebbf70ea16e6596969a47ebcc..6ecdfddbabfc8d07d8fbf2dc445efbf951a65ee8 100644 --- a/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H +++ b/src/OpenFOAM/meshes/primitiveShapes/tetrahedron/tetrahedron.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -252,7 +252,7 @@ public: List<scalar>& bary ) const; - //- Return nearest point to p on tetrahedron. Is p itself + //- Return nearest point to p on tetrahedron. Is p itself // if inside. inline pointHit nearestPoint(const point& p) const; diff --git a/src/combustionModels/combustionModel/combustionModelNew.C b/src/combustionModels/combustionModel/combustionModelNew.C deleted file mode 100644 index 5a3c8e1243146e78b9b6c381b03760545e6210fd..0000000000000000000000000000000000000000 --- a/src/combustionModels/combustionModel/combustionModelNew.C +++ /dev/null @@ -1,66 +0,0 @@ -/*---------------------------------------------------------------------------*\ - ========= | - \\ / F ield | OpenFOAM: The Open Source CFD Toolbox - \\ / O peration | - \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation - \\/ 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 "combustionModel.H" - -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -Foam::autoPtr<Foam::combustionModel> Foam::combustionModel::New -( - const dictionary& combustionProperties, - psiReactionThermo& thermo, - const compressible::turbulenceModel& turbulence, - const surfaceScalarField& phi, - const volScalarField& rho -) -{ - word combustionModelTypeName = combustionProperties.lookup - ( - "combustionModel" - ); - - Info<< "Selecting combustion model " << combustionModelTypeName << endl; - - dictionaryConstructorTable::iterator cstrIter = - dictionaryConstructorTablePtr_->find(combustionModelTypeName); - - if (cstrIter == dictionaryConstructorTablePtr_->end()) - { - FatalErrorIn - ( - "combustionModel::New" - ) << "Unknown combustionModel type " - << combustionModelTypeName << endl << endl - << "Valid combustionModels are : " << endl - << dictionaryConstructorTablePtr_->toc() - << exit(FatalError); - } - - return autoPtr<combustionModel> - (cstrIter()(combustionProperties, thermo, turbulence, phi, rho)); -} - - -// ************************************************************************* // diff --git a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C index a04890d59bbbfff561ae0e19712acd9df11e8575..0c18d84e4fd1d94d7f6e29c75fd6e8e476881b53 100644 --- a/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C +++ b/src/dynamicMesh/polyMeshFilter/polyMeshFilter.C @@ -550,6 +550,16 @@ Foam::label Foam::polyMeshFilter::filter(const label nOriginalBadFaces) // Maintain the number of times a point has been part of a bad face labelList pointErrorCount(mesh_.nPoints(), 0); + PackedBoolList newErrorPoint(mesh_.nPoints()); + edgeCollapser::checkMeshQuality + ( + mesh_, + meshQualityCoeffDict_, + newErrorPoint + ); + + bool newBadFaces = true; + // Main loop // ~~~~~~~~~ // It tries and do some collapses, checks the resulting mesh and @@ -559,7 +569,8 @@ Foam::label Foam::polyMeshFilter::filter(const label nOriginalBadFaces) while ( nOuterIterations < maxIterations_ - && nBadFaces > nOriginalBadFaces + //&& nBadFaces > nOriginalBadFaces + && newBadFaces ) { Info<< nl << "Outer Iteration = " << nOuterIterations++ << nl @@ -902,6 +913,21 @@ Foam::label Foam::polyMeshFilter::filter(const label nOriginalBadFaces) isErrorPoint, pointErrorCount ); + + newBadFaces = false; + forAll(mesh_.points(), pI) + { + if (isErrorPoint[origToCurrentPointMap[pI]]) + { + if (!newErrorPoint[pI]) + { + newBadFaces = true; + break; + } + } + } + + reduce(newBadFaces, orOp<bool>()); } else { diff --git a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshTemplates.C b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshTemplates.C index f916a36959e961a20d74f70f7857d85b657a6169..01b02a650acf8f5ed8f129e9dc734454862c31ff 100644 --- a/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshTemplates.C +++ b/src/edgeMesh/extendedFeatureEdgeMesh/extendedFeatureEdgeMeshTemplates.C @@ -45,7 +45,7 @@ void Foam::extendedFeatureEdgeMesh::sortPointsAndEdges const edgeList& sFeatEds(surf.edges()); const labelListList edgeFaces = PatchTools::sortedEdgeFaces(surf); const vectorField& faceNormals = surf.faceNormals(); - const labelListList& pointEdges = PatchTools::sortedPointEdges(surf); + const labelListList pointEdges = PatchTools::sortedPointEdges(surf); // Extract and reorder the data from surfaceFeatures diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C index 738f87d0a86506bbd13622545308f3ac2467d34a..81d722a57bbbfc29865c834d75b1b5158466904b 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C +++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.C @@ -88,7 +88,17 @@ Foam::porosityModel::porosityModel const word& cellZoneName ) : - MeshObject<fvMesh, Foam::UpdateableMeshObject, porosityModel>(mesh), + regIOobject + ( + IOobject + ( + name, + mesh.time().timeName(), + mesh, + IOobject::NO_READ, + IOobject::NO_WRITE + ) + ), name_(name), mesh_(mesh), dict_(dict), diff --git a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H index 36a5a9eafb0d8b3d2bef7a015e074c3616757f6f..06df0bfdae4fba64418f66cb9c2889c2280b1cf0 100644 --- a/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H +++ b/src/finiteVolume/cfdTools/general/porosityModel/porosityModel/porosityModel.H @@ -36,7 +36,6 @@ SourceFiles #ifndef porosityModel_H #define porosityModel_H -#include "MeshObject.H" #include "fvMesh.H" #include "dictionary.H" #include "fvMatricesFwd.H" @@ -56,7 +55,7 @@ namespace Foam class porosityModel : - public MeshObject<fvMesh, UpdateableMeshObject, porosityModel> + public regIOobject { private: diff --git a/src/finiteVolume/fvMesh/fvMesh.C b/src/finiteVolume/fvMesh/fvMesh.C index f42499c3f4cf7e1e69e4634cf57ce7d232c585d4..6713435149ace5dc9d1d20378be3f5886a27aabf 100644 --- a/src/finiteVolume/fvMesh/fvMesh.C +++ b/src/finiteVolume/fvMesh/fvMesh.C @@ -679,7 +679,13 @@ bool Foam::fvMesh::writeObjects //- Write mesh using IO settings from the time bool Foam::fvMesh::write() const { - return polyMesh::write(); + bool ok = true; + if (phiPtr_) + { + ok = phiPtr_->write(); + } + + return ok && polyMesh::write(); } diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C index 75b7e5084c0d78675d65ea62354c152d380caf96..311df77f7dac967114acf8f507ac77c994423e14 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomerate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -30,11 +30,6 @@ Description #include "fvMesh.H" #include "syncTools.H" -//extern "C" -//{ -//# include "mgridgen.h" -//} - // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // void Foam::MGridGenGAMGAgglomeration:: @@ -43,7 +38,7 @@ makeCompactCellFaceAddressingAndFaceWeights const lduAddressing& fineAddressing, List<idxtype>& cellCells, List<idxtype>& cellCellOffsets, - const vectorField& Si, + const scalarField& magSi, List<scalar>& faceWeights ) { @@ -92,8 +87,8 @@ makeCompactCellFaceAddressingAndFaceWeights cellCells[l1] = nei; cellCells[l2] = own; - faceWeights[l1] = mag(Si[facei]); - faceWeights[l2] = mag(Si[facei]); + faceWeights[l1] = magSi[facei]; + faceWeights[l2] = magSi[facei]; } } @@ -105,8 +100,8 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate const label maxSize, const lduAddressing& fineAddressing, const scalarField& V, - const vectorField& Sf, - const scalarField& Sb + const scalarField& magSf, + const scalarField& magSb ) { const label nFineCells = fineAddressing.size(); @@ -124,15 +119,15 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate fineAddressing, cellCells, cellCellOffsets, - Sf, + magSf, faceWeights ); // agglomeration options. List<int> options(4, 0); - options[0] = 4; // globular agglom - options[1] = 6; // objective F3 and F2 - options[2] = 128; // debugging output level + options[0] = 4; // globular agglom + options[1] = 6; // objective F3 and F2 + options[2] = 128; // debugging output level options[3] = fvMesh_.nGeometricD(); // Dimensionality of the grid @@ -145,7 +140,7 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate nFineCells, cellCellOffsets.begin(), const_cast<scalar*>(V.begin()), - const_cast<scalar*>(Sb.begin()), + const_cast<scalar*>(magSb.begin()), cellCells.begin(), faceWeights.begin(), minSize, @@ -156,6 +151,25 @@ Foam::tmp<Foam::labelField> Foam::MGridGenGAMGAgglomeration::agglomerate finalAgglom.begin() ); + { + label nNewCoarseCells = 0; + labelList newRestrictAddr; + bool ok = checkRestriction + ( + newRestrictAddr, + nNewCoarseCells, + fineAddressing, + finalAgglom, + nCoarseCells + ); + + if (!ok) + { + nCoarseCells = nNewCoarseCells; + finalAgglom.transfer(newRestrictAddr); + } + } + return tmp<labelField>(new labelField(finalAgglom)); } diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C index 59c45bc11b29424d529c7389d850b7710cfc6f82..dd912465a0ca32ed9fba08b4bed8ec9402d63759 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.C @@ -25,6 +25,7 @@ License #include "MGridGenGAMGAgglomeration.H" #include "fvMesh.H" +#include "processorPolyPatch.H" #include "addToRunTimeSelectionTable.H" // * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // @@ -59,17 +60,20 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration // Start geometric agglomeration from the cell volumes and areas of the mesh scalarField* VPtr = const_cast<scalarField*>(&fvMesh_.cellVolumes()); - SubField<vector> Sf(fvMesh_.faceAreas(), fvMesh_.nInternalFaces()); - vectorField* SfPtr = const_cast<vectorField*> + + scalarField magFaceAreas(sqrt(3.0)*mag(fvMesh_.faceAreas())); + SubField<scalar> magSf(magFaceAreas, fvMesh_.nInternalFaces()); + + scalarField* magSfPtr = const_cast<scalarField*> ( - &Sf.operator const vectorField&() + &magSf.operator const scalarField&() ); // Create the boundary area cell field - scalarField* SbPtr(new scalarField(fvMesh_.nCells(), 0)); + scalarField* magSbPtr(new scalarField(fvMesh_.nCells(), 0)); { - scalarField& Sb = *SbPtr; + scalarField& magSb = *magSbPtr; const labelList& own = fvMesh_.faceOwner(); const vectorField& Sf = fvMesh_.faceAreas(); @@ -78,11 +82,32 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration { if (!fvMesh_.isInternalFace(facei)) { - Sb[own[facei]] += mag(Sf[facei]); + magSb[own[facei]] += mag(Sf[facei]); } } } + /* + { + scalarField& magSb = *magSbPtr; + const polyBoundaryMesh& patches = fvMesh_.boundaryMesh(); + + forAll(patches, patchi) + { + const polyPatch& pp = patches[patchi]; + + if (!(Pstream::parRun() && isA<processorPolyPatch>(pp))) + { + const labelUList& faceCells = pp.faceCells(); + const vectorField& pSf = pp.faceAreas(); + forAll(faceCells, pfi) + { + magSb[faceCells[pfi]] += mag(pSf[pfi]); + } + } + } + } + */ // Agglomerate until the required number of cells in the coarsest level // is reached @@ -100,8 +125,8 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration maxSize, meshLevel(nCreatedLevels).lduAddr(), *VPtr, - *SfPtr, - *SbPtr + *magSfPtr, + *magSbPtr ); if (continueAgglomerating(nCoarseCells)) @@ -136,37 +161,37 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration // Agglomerate the face areas field for the next level { - vectorField* aggSfPtr + scalarField* aggMagSfPtr ( - new vectorField + new scalarField ( meshLevels_[nCreatedLevels].upperAddr().size(), - vector::zero + 0 ) ); - restrictFaceField(*aggSfPtr, *SfPtr, nCreatedLevels); + restrictFaceField(*aggMagSfPtr, *magSfPtr, nCreatedLevels); if (nCreatedLevels) { - delete SfPtr; + delete magSfPtr; } - SfPtr = aggSfPtr; + magSfPtr = aggMagSfPtr; } // Agglomerate the cell boundary areas field for the next level { - scalarField* aggSbPtr + scalarField* aggMagSbPtr ( new scalarField(meshLevels_[nCreatedLevels].size()) ); // Restrict but no parallel agglomeration (not supported) - restrictField(*aggSbPtr, *SbPtr, nCreatedLevels, false); + restrictField(*aggMagSbPtr, *magSbPtr, nCreatedLevels, false); - delete SbPtr; - SbPtr = aggSbPtr; + delete magSbPtr; + magSbPtr = aggMagSbPtr; } nCreatedLevels++; @@ -179,9 +204,9 @@ Foam::MGridGenGAMGAgglomeration::MGridGenGAMGAgglomeration if (nCreatedLevels) { delete VPtr; - delete SfPtr; + delete magSfPtr; } - delete SbPtr; + delete magSbPtr; } diff --git a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H index ea6b5e9c19231dce65aa78fdcb164b1d5ea66394..5ed8e2a401c11c640a0ceaaccedc755a84f4c3f7 100644 --- a/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H +++ b/src/fvAgglomerationMethods/MGridGenGamgAgglomeration/MGridGenGAMGAgglomeration.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -73,7 +73,7 @@ class MGridGenGAMGAgglomeration const lduAddressing& fineAddressing, List<idxtype>& cellCells, List<idxtype>& cellCellOffsets, - const vectorField& Si, + const scalarField& magSi, List<scalar>& faceWeights ); @@ -85,8 +85,8 @@ class MGridGenGAMGAgglomeration const label maxSize, const lduAddressing& fineAddressing, const scalarField& V, - const vectorField& Sf, - const scalarField& Sb + const scalarField& magSf, + const scalarField& magSb ); diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H index ec49b1e2231b138a5ccdaa85bfe47a865dd149da..b5da0b5b3b5c629a6ad47d667f990e93e7a6b041 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/interpolation/displacementInterpolationMotionSolver.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -36,9 +36,6 @@ Description Tables are in the \a constant/tables directory. -Note - could be a motionSolver - does not use any fvMesh structure. - SourceFiles displacementInterpolationMotionSolver.C diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C index f491ee586d78e25e5b1fa96f866d14f45560ff56..3ea1d3ed39e0fd91908d8537eb659311c12e9642 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -253,6 +253,18 @@ Foam::displacementLayeredMotionMotionSolver::faceZoneEvaluate // Only on boundary faces - follow boundary conditions fld = vectorField(pointDisplacement_, meshPoints); } + else if (type == "uniformFollow") + { + // Reads name of name of patch. Then get average point dislacement on + // patch. That becomes the value of fld. + const word patchName(dict.lookup("patch")); + label patchID = mesh().boundaryMesh().findPatchID(patchName); + pointField pdf + ( + pointDisplacement_.boundaryField()[patchID].patchInternalField() + ); + fld = gAverage(pdf); + } else { FatalIOErrorIn @@ -399,22 +411,6 @@ Info<< "For cellZone:" << cellZoneI // Implement real bc. patchDisp[patchI].correctBoundaryConditions(); - -//Info<< "Writing displacement for faceZone " << fz.name() -// << " to " << patchDisp[patchI].name() << endl; -//patchDisp[patchI].write(); - -// // Copy into pointDisplacement for other fields to use -// forAll(isZonePoint, pointI) -// { -// if (isZonePoint[pointI]) -// { -// pointDisplacement_[pointI] = patchDisp[patchI][pointI]; -// } -// } -// pointDisplacement_.correctBoundaryConditions(); - - patchI++; } @@ -423,37 +419,40 @@ Info<< "For cellZone:" << cellZoneI // ~~~~~ // solving the interior is just interpolating -// // Get normalised distance -// pointScalarField distance -// ( -// IOobject -// ( -// "distance", -// mesh().time().timeName(), -// mesh(), -// IOobject::NO_READ, -// IOobject::NO_WRITE, -// false -// ), -// pointMesh::New(mesh()), -// dimensionedScalar("distance", dimLength, 0.0) -// ); -// forAll(distance, pointI) -// { -// if (isZonePoint[pointI]) -// { -// scalar d1 = patchDist[0][pointI]; -// scalar d2 = patchDist[1][pointI]; -// if (d1+d2 > SMALL) -// { -// scalar s = d1/(d1+d2); -// distance[pointI] = s; -// } -// } -// } -// Info<< "Writing distance pointScalarField to " << mesh().time().timeName() -// << endl; -// distance.write(); + if (debug) + { + // Get normalised distance + pointScalarField distance + ( + IOobject + ( + "distance", + mesh().time().timeName(), + mesh(), + IOobject::NO_READ, + IOobject::NO_WRITE, + false + ), + pointMesh::New(mesh()), + dimensionedScalar("distance", dimLength, 0.0) + ); + forAll(distance, pointI) + { + if (isZonePoint[pointI]) + { + scalar d1 = patchDist[0][pointI]; + scalar d2 = patchDist[1][pointI]; + if (d1+d2 > SMALL) + { + scalar s = d1/(d1+d2); + distance[pointI] = s; + } + } + } + Info<< "Writing distance pointScalarField to " + << mesh().time().timeName() << endl; + distance.write(); + } // Average forAll(pointDisplacement_, pointI) @@ -470,7 +469,6 @@ Info<< "For cellZone:" << cellZoneI + s*patchDisp[1][pointI]; } } - pointDisplacement_.correctBoundaryConditions(); } @@ -484,9 +482,7 @@ displacementLayeredMotionMotionSolver ) : displacementMotionSolver(mesh, dict, typeName) -{ - pointDisplacement_.correctBoundaryConditions(); -} +{} // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // @@ -518,6 +514,9 @@ void Foam::displacementLayeredMotionMotionSolver::solve() // the motionSolver accordingly movePoints(mesh().points()); + // Apply boundary conditions + pointDisplacement_.boundaryField().updateCoeffs(); + // Apply all regions (=cellZones) const dictionary& regionDicts = coeffDict().subDict("regions"); @@ -544,6 +543,9 @@ void Foam::displacementLayeredMotionMotionSolver::solve() cellZoneSolve(zoneI, regionDict); } + + // Update pointDisplacement for solved values + pointDisplacement_.correctBoundaryConditions(); } diff --git a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H index 0f29c4f88fd84b46bbf12ecea0a95ea7cd8ca228..1aa7884f52b879d743c4ea30db1828af67dc0777 100644 --- a/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H +++ b/src/fvMotionSolver/fvMotionSolvers/displacement/layeredSolver/displacementLayeredMotionMotionSolver.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,11 +28,6 @@ Description Mesh motion solver for an (multi-block) extruded fvMesh. Gets given the structure of the mesh blocks and boundary conditions on these blocks. - Note: should not be an fvMotionSolver but just a motionSolver. Only here - so we can reuse displacementFvMotionSolver functionality (e.g. surface - following boundary conditions) - - The displacementLayeredMotionCoeffs subdict of dynamicMeshDict specifies per region (=cellZone) the boundary conditions on two opposing patches (=faceZones). It then interpolates the boundary values using topological @@ -44,6 +39,9 @@ Description Use this for faceZones on boundary faces (so it uses the proper boundary conditions on the pointDisplacement). + uniformFollow: like 'follow' but takes the average value of + a specified 'patch' (which is not necessarily colocated) + fixedValue: fixed value. timeVaryingUniformFixedValue: table-driven fixed value. diff --git a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C index 8a3cd26b68b5501a79d192de54e8f70983f1b171..bd9eb4c0063397f7774221c4fe95ed14c2e462b6 100644 --- a/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C +++ b/src/fvMotionSolver/pointPatchFields/derived/surfaceDisplacement/surfaceDisplacementPointPatchVectorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -72,7 +72,7 @@ void surfaceDisplacementPointPatchVectorField::calcProjection const scalar projectLen = mag(mesh.bounds().max()-mesh.bounds().min()); // For case of fixed projection vector: - vector projectVec; + vector projectVec(vector::zero); if (projectMode_ == FIXEDNORMAL) { vector n = projectDir_/mag(projectDir_); diff --git a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C index 6fd254c46e574fa0ae9c021191285112121f0b79..6a61832cd61a18c73db4ededf69d14a24effaa5c 100644 --- a/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C +++ b/src/mesh/autoMesh/autoHexMesh/autoHexMeshDriver/autoLayerDriver.C @@ -2501,7 +2501,8 @@ void Foam::autoLayerDriver::addLayers if (debug&meshRefinement::MESH) { const_cast<Time&>(mesh.time())++; - Info<< "Writing baffled mesh to " << meshRefiner_.timeName() << endl; + Info<< "Writing baffled mesh to time " + << meshRefiner_.timeName() << endl; meshRefiner_.write ( debug, @@ -2923,7 +2924,8 @@ void Foam::autoLayerDriver::addLayers ); const_cast<Time&>(mesh.time())++; - Info<< "Writing shrunk mesh to " << meshRefiner_.timeName() << endl; + Info<< "Writing shrunk mesh to time " + << meshRefiner_.timeName() << endl; // See comment in autoSnapDriver why we should not remove meshPhi // using mesh.clearOut(). @@ -3057,7 +3059,8 @@ void Foam::autoLayerDriver::addLayers if (debug&meshRefinement::MESH) { - Info<< "Writing layer mesh to " << meshRefiner_.timeName() << endl; + Info<< "Writing layer mesh to time " << meshRefiner_.timeName() + << endl; newMesh.write(); cellSet addedCellSet ( diff --git a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C index dcc268c238cbef33baac0706b021a64ea75374a8..9f881a52f33ddbfaee0d9df8ef4cbd5dfb2e6e2c 100644 --- a/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C +++ b/src/mesh/autoMesh/autoHexMesh/meshRefinement/meshRefinementProblemCells.C @@ -955,6 +955,19 @@ Foam::labelList Foam::meshRefinement::markFacesOnProblemCells } } + + // Because of isCollapsedFace one side can decide not to baffle whereas + // the other side does so sync. Baffling is prefered over not baffling. + if (checkCollapse) // Or always? + { + syncTools::syncFaceList + ( + mesh_, + facePatch, + maxEqOp<label>() + ); + } + Info<< "markFacesOnProblemCells : marked " << returnReduce(nBaffleFaces, sumOp<label>()) << " additional internal faces to be converted into baffles." diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H index 3cbe4c29f683f28034d4656c05ff7c83122f50a4..6641d0d1e291236da3c55ad5153c3af68fce938f 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPointPatch/cyclicAMIPointPatch.H @@ -112,13 +112,6 @@ public: // Member Functions - //- Is patch 'coupled'. Note that on AMI the geometry is not - // coupled but the fields are! - virtual bool coupled() const - { - return false; - } - //- Return the constraint type this pointPatch implements. virtual const word& constraintType() const { diff --git a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C index 6632fdb6d2a653daa8923da06587e148adf317dd..f43f91ff4653e8371303660b8e07faf0d9fe89e2 100644 --- a/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C +++ b/src/meshTools/AMIInterpolation/patches/cyclicAMI/cyclicAMIPolyPatch/cyclicAMIPolyPatch.C @@ -297,9 +297,9 @@ void Foam::cyclicAMIPolyPatch::resetAMI { Pout<< "cyclicAMIPolyPatch : " << name() << " constructed AMI with " << nl - << " " << ":srcAddress:" << AMIPtr_().srcAddress().size() + << " " << "srcAddress:" << AMIPtr_().srcAddress().size() << nl - << " " << " tgAddress :" << AMIPtr_().tgtAddress().size() + << " " << "tgAddress :" << AMIPtr_().tgtAddress().size() << nl << endl; } } diff --git a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C index 765e1e6136d8c2d7a7acec286ba52dd690349af0..a4535d15534fa3a581b82914d0943a53f06c7cd5 100644 --- a/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C +++ b/src/meshTools/algorithms/PointEdgeWave/PointEdgeWave.C @@ -415,46 +415,10 @@ void Foam::PointEdgeWave<Type, TrackingData>::handleProcPatches() } } - - - // - // 3. Handle all shared points - // (Note:irrespective if changed or not for now) - // - - const globalMeshData& pd = mesh_.globalData(); - - List<Type> sharedData(pd.nGlobalPoints()); - - forAll(pd.sharedPointLabels(), i) - { - label meshPointI = pd.sharedPointLabels()[i]; - - // Fill my entries in the shared points - sharedData[pd.sharedPointAddr()[i]] = allPointInfo_[meshPointI]; - } - - // Combine on master. Reduce operator has to handle a list and call - // Type.updatePoint for all elements - combineReduce(sharedData, listUpdateOp<Type>(propagationTol_, td_)); - - forAll(pd.sharedPointLabels(), i) - { - label meshPointI = pd.sharedPointLabels()[i]; - - // Retrieve my entries from the shared points. - const Type& nbrInfo = sharedData[pd.sharedPointAddr()[i]]; - - if (!allPointInfo_[meshPointI].equal(nbrInfo, td_)) - { - updatePoint - ( - meshPointI, - nbrInfo, - allPointInfo_[meshPointI] - ); - } - } + // Collocated points should be handled by face based transfer + // (since that is how connectivity is worked out) + // They are also explicitly equalised in handleCollocatedPoints to + // guarantee identical values. } diff --git a/src/meshTools/indexedOctree/treeDataEdge.C b/src/meshTools/indexedOctree/treeDataEdge.C index 4d0b9b4d813624bb635424c125b1f61e7e3f0d07..2499380b324d5d67c265067c1a37ae03604e6791 100644 --- a/src/meshTools/indexedOctree/treeDataEdge.C +++ b/src/meshTools/indexedOctree/treeDataEdge.C @@ -109,8 +109,6 @@ Foam::treeDataEdge::findIntersectOp::findIntersectOp ( const indexedOctree<treeDataEdge>& tree ) -: - tree_(tree) {} diff --git a/src/meshTools/indexedOctree/treeDataEdge.H b/src/meshTools/indexedOctree/treeDataEdge.H index 12fd0d6aa10ba98c5db55977549b4775d58ca4d7..be82a2a09c55c09750f268855ccd9572856c2e4e 100644 --- a/src/meshTools/indexedOctree/treeDataEdge.H +++ b/src/meshTools/indexedOctree/treeDataEdge.H @@ -121,8 +121,6 @@ public: class findIntersectOp { - const indexedOctree<treeDataEdge>& tree_; - public: findIntersectOp(const indexedOctree<treeDataEdge>& tree); diff --git a/src/meshTools/indexedOctree/treeDataPoint.C b/src/meshTools/indexedOctree/treeDataPoint.C index fd7f4404b418cbab465ca6eb95b21505bdb8ddf5..82a9bd257b00aea85498af4c4dddd89816cb5e5a 100644 --- a/src/meshTools/indexedOctree/treeDataPoint.C +++ b/src/meshTools/indexedOctree/treeDataPoint.C @@ -70,8 +70,6 @@ Foam::treeDataPoint::findIntersectOp::findIntersectOp ( const indexedOctree<treeDataPoint>& tree ) -: - tree_(tree) {} diff --git a/src/meshTools/indexedOctree/treeDataPoint.H b/src/meshTools/indexedOctree/treeDataPoint.H index 020f60a11d14452cb21c0c678f7cca11486e1f51..73cec8a212573b1c737ec8b2a1389e78ab704d79 100644 --- a/src/meshTools/indexedOctree/treeDataPoint.H +++ b/src/meshTools/indexedOctree/treeDataPoint.H @@ -104,8 +104,6 @@ public: class findIntersectOp { - const indexedOctree<treeDataPoint>& tree_; - public: findIntersectOp(const indexedOctree<treeDataPoint>& tree); diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C index 488104a34515eb0c7ded8f86f68fbf444e02831c..51e5252121af11b7575c77da30fe15717ec8507b 100644 --- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.C +++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.C @@ -66,76 +66,6 @@ void Foam::treeDataPrimitivePatch<PatchType>::update() } -template<class PatchType> -bool Foam::treeDataPrimitivePatch<PatchType>::findIntersection -( - const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree, - const label index, - const point& start, - const point& end, - point& intersectionPoint -) -{ - const treeDataPrimitivePatch<PatchType>& shape = tree.shapes(); - const PatchType& patch = shape.patch(); - - const pointField& points = patch.points(); - const typename PatchType::FaceType& f = patch[index]; - - // Do quick rejection test - if (shape.cacheBb_) - { - const treeBoundBox& faceBb = shape.bbs_[index]; - - if ((faceBb.posBits(start) & faceBb.posBits(end)) != 0) - { - // start and end in same block outside of faceBb. - return false; - } - } - - const vector dir(end - start); - pointHit inter; - - if (f.size() == 3) - { - inter = triPointRef - ( - points[f[0]], - points[f[1]], - points[f[2]] - ).intersection(start, dir, intersection::HALF_RAY, shape.planarTol_); - } - else - { - const pointField& faceCentres = patch.faceCentres(); - - inter = f.intersection - ( - start, - dir, - faceCentres[index], - points, - intersection::HALF_RAY, - shape.planarTol_ - ); - } - - if (inter.hit() && inter.distance() <= 1) - { - // Note: no extra test on whether intersection is in front of us - // since using half_ray - intersectionPoint = inter.hitPoint(); - - return true; - } - else - { - return false; - } -} - - // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // // Construct from components @@ -187,6 +117,19 @@ Foam::treeDataPrimitivePatch<PatchType>::findAllIntersectOp::findAllIntersectOp {} +template<class PatchType> +Foam::treeDataPrimitivePatch<PatchType>:: +findSelfIntersectOp::findSelfIntersectOp +( + const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree, + const label edgeID +) +: + tree_(tree), + edgeID_(edgeID) +{} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // template<class PatchType> @@ -645,4 +588,116 @@ bool Foam::treeDataPrimitivePatch<PatchType>::findAllIntersectOp::operator() } +template<class PatchType> +bool Foam::treeDataPrimitivePatch<PatchType>::findSelfIntersectOp::operator() +( + const label index, + const point& start, + const point& end, + point& intersectionPoint +) const +{ + if (edgeID_ == -1) + { + FatalErrorIn + ( + "findSelfIntersectOp::operator()\n" + "(\n" + " const label index,\n" + " const point& start,\n" + " const point& end,\n" + " point& intersectionPoint\n" + ") const" + ) << "EdgeID not set. Please set edgeID to the index of" + << " the edge you are testing" + << exit(FatalError); + } + + const treeDataPrimitivePatch<PatchType>& shape = tree_.shapes(); + const PatchType& patch = shape.patch(); + + const typename PatchType::FaceType& f = patch.localFaces()[index]; + const edge& e = patch.edges()[edgeID_]; + + if (findIndex(f, e[0]) == -1 && findIndex(f, e[1]) == -1) + { + return findIntersection(tree_, index, start, end, intersectionPoint); + } + else + { + return false; + } +} + + +template<class PatchType> +bool Foam::treeDataPrimitivePatch<PatchType>::findIntersection +( + const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree, + const label index, + const point& start, + const point& end, + point& intersectionPoint +) +{ + const treeDataPrimitivePatch<PatchType>& shape = tree.shapes(); + const PatchType& patch = shape.patch(); + + const pointField& points = patch.points(); + const typename PatchType::FaceType& f = patch[index]; + + // Do quick rejection test + if (shape.cacheBb_) + { + const treeBoundBox& faceBb = shape.bbs_[index]; + + if ((faceBb.posBits(start) & faceBb.posBits(end)) != 0) + { + // start and end in same block outside of faceBb. + return false; + } + } + + const vector dir(end - start); + pointHit inter; + + if (f.size() == 3) + { + inter = triPointRef + ( + points[f[0]], + points[f[1]], + points[f[2]] + ).intersection(start, dir, intersection::HALF_RAY, shape.planarTol_); + } + else + { + const pointField& faceCentres = patch.faceCentres(); + + inter = f.intersection + ( + start, + dir, + faceCentres[index], + points, + intersection::HALF_RAY, + shape.planarTol_ + ); + } + + if (inter.hit() && inter.distance() <= 1) + { + // Note: no extra test on whether intersection is in front of us + // since using half_ray + intersectionPoint = inter.hitPoint(); + + return true; + } + else + { + return false; + } +} + + // ************************************************************************* // diff --git a/src/meshTools/indexedOctree/treeDataPrimitivePatch.H b/src/meshTools/indexedOctree/treeDataPrimitivePatch.H index 9d43d2ba85154dcec67dbab742a7d7a7bc89b19c..18c901244e501f3db5fff08a55bd42979cce3ebf 100644 --- a/src/meshTools/indexedOctree/treeDataPrimitivePatch.H +++ b/src/meshTools/indexedOctree/treeDataPrimitivePatch.H @@ -86,16 +86,6 @@ class treeDataPrimitivePatch //- Initialise all member data void update(); - //- Find intersection of line with shapes - static bool findIntersection - ( - const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree, - const label index, - const point& start, - const point& end, - point& intersectionPoint - ); - public: @@ -141,8 +131,8 @@ public: findIntersectOp(const indexedOctree<treeDataPrimitivePatch>& tree); - //- Calculate intersection of triangle with ray. Sets result - // accordingly + //- Calculate intersection of any face with ray. Sets result + // accordingly. Used to find first intersection. bool operator() ( const label index, @@ -167,8 +157,34 @@ public: DynamicList<label>& shapeMask ); - //- Calculate intersection of triangle with ray. Sets result - // accordingly + //- Calculate intersection of unique face with ray. Sets result + // accordingly. Used to find all faces. + bool operator() + ( + const label index, + const point& start, + const point& end, + point& intersectionPoint + ) const; + }; + + + class findSelfIntersectOp + { + const indexedOctree<treeDataPrimitivePatch>& tree_; + + const label edgeID_; + + public: + + findSelfIntersectOp + ( + const indexedOctree<treeDataPrimitivePatch>& tree, + const label edgeID + ); + + //- Calculate intersection of face with edge of patch. Excludes + // faces that use edgeID. Used to find self intersection. bool operator() ( const label index, @@ -234,6 +250,16 @@ public: const point& centre, const scalar radiusSqr ) const; + + //- Helper: find intersection of line with shapes + static bool findIntersection + ( + const indexedOctree<treeDataPrimitivePatch<PatchType> >& tree, + const label index, + const point& start, + const point& end, + point& intersectionPoint + ); }; diff --git a/src/meshTools/searchableSurface/searchablePlate.H b/src/meshTools/searchableSurface/searchablePlate.H index 671f3785f6be6a8d77e0c3d4deeffe13c97e559e..86b0785077370effb75ecb83c13091d2506c6fcf 100644 --- a/src/meshTools/searchableSurface/searchablePlate.H +++ b/src/meshTools/searchableSurface/searchablePlate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -54,7 +54,7 @@ namespace Foam // Forward declaration of classes /*---------------------------------------------------------------------------*\ - Class searchablePlate Declaration + Class searchablePlate Declaration \*---------------------------------------------------------------------------*/ class searchablePlate @@ -112,7 +112,7 @@ public: ( const IOobject& io, const point& origin, - const point& span + const vector& span ); //- Construct from dictionary (used by searchableSurface) @@ -122,6 +122,7 @@ public: const dictionary& dict ); + //- Destructor virtual ~searchablePlate(); @@ -254,7 +255,6 @@ public: notImplemented("searchablePlate::writeData(Ostream&) const"); return false; } - }; diff --git a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C index 7c80bd1a5694c6aec91244888117d33e604448f3..95d0e887b67ed54f3647dfa87294c574f76ff462 100644 --- a/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C +++ b/src/parallel/distributed/distributedTriSurfaceMesh/distributedTriSurfaceMesh.C @@ -74,6 +74,26 @@ const Foam::NamedEnum<Foam::distributedTriSurfaceMesh::distributionType, 3> // Read my additional data from the dictionary bool Foam::distributedTriSurfaceMesh::read() { + + if + ( + Pstream::parRun() + && + ( + regIOobject::fileModificationChecking == timeStampMaster + || regIOobject::fileModificationChecking == inotifyMaster + ) + ) + { + FatalErrorIn("Foam::distributedTriSurfaceMesh::read()") + << " distributedTriSurfaceMesh is being constructed\n" + << " using 'timeStampMaster' or 'inotifyMaster.'\n" + << " Modify the entry fileModificationChecking\n" + << " in the etc/controlDict.\n" + << " Use 'timeStamp' instead." + << exit(FatalError); + } + // Get bb of all domains. procBb_.setSize(Pstream::nProcs()); @@ -183,10 +203,6 @@ void Foam::distributedTriSurfaceMesh::distributeSegment List<DynamicList<label> >& sendMap ) const { - // Work points - point clipPt; - - // 1. Fully local already handled outside. Note: retest is cheap. if (isLocal(procBb_[Pstream::myProcNo()], start, end)) { @@ -227,6 +243,9 @@ void Foam::distributedTriSurfaceMesh::distributeSegment // Scheme a: any processor that intersects the segment gets // the segment. + // Intersection point + point clipPt; + if (bb.intersects(start, end, clipPt)) { sendMap[procI].append(allSegments.size()); diff --git a/src/postProcessing/Allwmake b/src/postProcessing/Allwmake index 24b764c4208c02d9b53d2d2d913d5a4e783169cc..3522721c4d31912e879e581448c9575d06d97a1b 100755 --- a/src/postProcessing/Allwmake +++ b/src/postProcessing/Allwmake @@ -3,7 +3,7 @@ cd ${0%/*} || exit 1 # run from this directory makeType=${1:-libso} set -x -wmake libo postCalc +wmake ${1:-libo} postCalc wmake $makeType foamCalcFunctions functionObjects/Allwmake $* diff --git a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C index 674996e5aaa8abae617e89a8839eeac09b5a04f1..c14d1b4bf76b49ef33d9f237b4a6355de2667c6a 100644 --- a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C +++ b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -87,13 +87,33 @@ void Foam::partialWrite::read(const dictionary& dict) << ". It should be >= 1." << exit(FatalIOError); } + + // Clear out any previously loaded fields + vsf_.clear(); + vvf_.clear(); + vSpheretf_.clear(); + vSymmtf_.clear(); + vtf_.clear(); + + ssf_.clear(); + svf_.clear(); + sSpheretf_.clear(); + sSymmtf_.clear(); + stf_.clear(); + + forAllConstIter(HashSet<word>, objectNames_, iter) + { + loadField<scalar>(iter.key(), vsf_, ssf_); + loadField<vector>(iter.key(), vvf_, svf_); + loadField<sphericalTensor>(iter.key(), vSpheretf_, sSpheretf_); + loadField<symmTensor>(iter.key(), vSymmtf_, sSymmtf_); + loadField<tensor>(iter.key(), vtf_, stf_); + } } void Foam::partialWrite::execute() { - //Pout<< "execute at time " << obr_.time().timeName() - // << " index:" << obr_.time().timeIndex() << endl; } @@ -104,99 +124,61 @@ void Foam::partialWrite::end() } -void Foam::partialWrite::write() +void Foam::partialWrite::timeSet() { - //Pout<< "write at time " << obr_.time().timeName() << endl; if (obr_.time().outputTime()) { - // Above check so it can be used both with - // outputControl timeStep; - // outputInterval 1; - // or with - // outputControl outputTime; - writeInstance_++; if (writeInstance_ == writeInterval_) { - // Normal dump + // Next overall dump corresponf to partial write. Change + // write options to AUTO_WRITE writeInstance_ = 0; + + changeWriteOptions<scalar>(vsf_, ssf_, IOobject::AUTO_WRITE); + changeWriteOptions<vector>(vvf_, svf_, IOobject::AUTO_WRITE); + changeWriteOptions<sphericalTensor> + ( + vSpheretf_, + sSpheretf_, + IOobject::AUTO_WRITE + ); + changeWriteOptions<symmTensor> + ( + vSymmtf_, + sSymmtf_, + IOobject::AUTO_WRITE + ); + changeWriteOptions<tensor>(vtf_, stf_, IOobject::AUTO_WRITE); } else { - // Delete all but marked objects - fileName dbDir; - if (isA<polyMesh>(obr_)) - { - dbDir = dynamic_cast<const polyMesh&>(obr_).dbDir(); - } - - IOobjectList objects(obr_, obr_.time().timeName()); - - if (debug) - { - Pout<< "For region:" << obr_.name() << endl; - } - - forAllConstIter(IOobjectList, objects, iter) - { - if (!objectNames_.found(iter()->name())) - { - const fileName f = - obr_.time().timePath() - /dbDir - /iter()->name(); - if (debug) - { - Pout<< " rm " << f << endl; - } - rm(f); - } - } - - // Do the lagrangian files as well. - fileNameList cloudDirs + changeWriteOptions<scalar>(vsf_, ssf_, IOobject::NO_WRITE); + changeWriteOptions<vector>(vvf_, svf_, IOobject::NO_WRITE); + changeWriteOptions<sphericalTensor> + ( + vSpheretf_, + sSpheretf_, + IOobject::NO_WRITE + ); + changeWriteOptions<symmTensor> ( - readDir - ( - obr_.time().timePath()/dbDir/cloud::prefix, - fileName::DIRECTORY - ) + vSymmtf_, + sSymmtf_, + IOobject::NO_WRITE ); - forAll(cloudDirs, i) - { - if (debug) - { - Pout<< "For cloud:" << cloudDirs[i] << endl; - } - - IOobjectList sprayObjs - ( - obr_, - obr_.time().timeName(), - cloud::prefix/cloudDirs[i] - ); - forAllConstIter(IOobjectList, sprayObjs, iter) - { - if (!objectNames_.found(iter()->name())) - { - const fileName f = - obr_.time().timePath() - /dbDir - /cloud::prefix - /cloudDirs[i] - /iter()->name(); - if (debug) - { - Pout<< " rm " << f << endl; - } - rm(f); - } - } - } + changeWriteOptions<tensor>(vtf_, stf_, IOobject::NO_WRITE); } } } +void Foam::partialWrite::write() +{ + // Do nothing. The fields get written through the + // standard dump +} + + // ************************************************************************* // diff --git a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H index 62a53f51943e1af6e31ea4f4ebd0aafbd0407c12..09197a671d84e4aa9108b8bdad8a381b02a76465 100644 --- a/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H +++ b/src/postProcessing/functionObjects/IO/partialWrite/partialWrite.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -29,8 +29,8 @@ Group Description This function object allows user-selected fields/registered objects to be - written at a custom write interval. It operates by deleting all entries - except those selected after writing. + written at a custom write interval. The interval is given in terms of + number of overall dumps Example of function object specification: \verbatim @@ -66,8 +66,9 @@ SourceFiles #define partialWrite_H #include "HashSet.H" -#include "DynamicList.H" #include "runTimeSelectionTables.H" +#include "volFields.H" +#include "surfaceFields.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -95,6 +96,18 @@ protected: const objectRegistry& obr_; + //- Loaded fields + UPtrList<volScalarField> vsf_; + UPtrList<volVectorField> vvf_; + UPtrList<volSphericalTensorField> vSpheretf_; + UPtrList<volSymmTensorField> vSymmtf_; + UPtrList<volTensorField> vtf_; + + UPtrList<surfaceScalarField> ssf_; + UPtrList<surfaceVectorField> svf_; + UPtrList<surfaceSphericalTensorField> sSpheretf_; + UPtrList<surfaceSymmTensorField> sSymmtf_; + UPtrList<surfaceTensorField> stf_; // Read from dictionary @@ -105,6 +118,7 @@ protected: label writeInterval_; + //- Current dump instance. If reaches writeInterval do a full write. label writeInstance_; @@ -118,6 +132,24 @@ protected: void operator=(const partialWrite&); + //- Load objects in the objectNames + template<class Type> + void loadField + ( + const word&, + UPtrList<GeometricField<Type, fvPatchField, volMesh> >&, + UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& + ) const; + + template<class Type> + void changeWriteOptions + ( + UPtrList<GeometricField<Type, fvPatchField, volMesh> >&, + UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >&, + const IOobject::writeOption + ) const; + + public: //- Runtime type information @@ -152,12 +184,15 @@ public: //- Read the partialWrite data virtual void read(const dictionary&); - //- Execute, currently does nothing + //- Execute virtual void execute(); //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the partialWrite virtual void write(); @@ -177,6 +212,12 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // +#ifdef NoRepository +# include "partialWriteTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + #endif // ************************************************************************* // diff --git a/src/postProcessing/functionObjects/IO/partialWrite/partialWriteTemplates.C b/src/postProcessing/functionObjects/IO/partialWrite/partialWriteTemplates.C new file mode 100644 index 0000000000000000000000000000000000000000..56e00893131b54fcdb7315f063e417faab71dc1b --- /dev/null +++ b/src/postProcessing/functionObjects/IO/partialWrite/partialWriteTemplates.C @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 "partialWrite.H" +#include "volFields.H" +#include "surfaceFields.H" +#include "Time.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class Type> +void Foam::partialWrite::loadField +( + const word& fieldName, + UPtrList<GeometricField<Type, fvPatchField, volMesh> >& vflds, + UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& sflds +) const +{ + typedef GeometricField<Type, fvPatchField, volMesh> vfType; + typedef GeometricField<Type, fvsPatchField, surfaceMesh> sfType; + + if (obr_.foundObject<vfType>(fieldName)) + { + if (debug) + { + Info<< "partialWrite : Field " + << fieldName << " found in database" << endl; + } + + vfType& vField = + const_cast<vfType&> + ( + obr_.lookupObject<vfType>(fieldName) + ); + + + const unsigned int sz = vflds.size(); + vflds.setSize(sz + 1); + vflds.set(sz, &vField); + } + else if (obr_.foundObject<sfType>(fieldName)) + { + if (debug) + { + Info<< "partialWrite : Field " << fieldName + << " found in database" << endl; + } + + sfType& sField = + const_cast<sfType&> + ( + obr_.lookupObject<sfType>(fieldName) + ); + + + const unsigned int sz = sflds.size(); + sflds.setSize(sz + 1); + sflds.set(sz, &sField); + } +} + + +template<class Type> +void Foam::partialWrite::changeWriteOptions +( + UPtrList<GeometricField<Type, fvPatchField, volMesh> >& vflds, + UPtrList<GeometricField<Type, fvsPatchField, surfaceMesh> >& sflds, + const IOobject::writeOption wOption +) const +{ + forAll(vflds , i) + { + vflds[i].writeOpt() = wOption; + } + + forAll(sflds , i) + { + sflds[i].writeOpt() = wOption; + } +} + + +// ************************************************************************* // diff --git a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C index 802f63f3082b5f9bb3eeb6611921a883c5017fe2..4ed2bb524ae68fee9d8920ec9a4d13860effaf1b 100644 --- a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C +++ b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -92,6 +92,12 @@ void Foam::removeRegisteredObject::end() } +void Foam::removeRegisteredObject::timeSet() +{ + // Do nothing - only valid on execute +} + + void Foam::removeRegisteredObject::write() { // Do nothing - only valid on execute diff --git a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H index 957c1a9a2d1fa1f3ba4e2c5f7bde20509e7a7b32..fc02432ad89c246a840a64cd2e7e9bce87ee4584 100644 --- a/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H +++ b/src/postProcessing/functionObjects/IO/removeRegisteredObject/removeRegisteredObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -146,6 +146,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the removeRegisteredObject virtual void write(); diff --git a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C index 694fba31b67a3b67c182028cda810603200e991f..56cd35a407316ef313f461c1d3cc1f80a5407bf8 100644 --- a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C +++ b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -199,6 +199,12 @@ void Foam::writeDictionary::end() } +void Foam::writeDictionary::timeSet() +{ + // do nothing +} + + void Foam::writeDictionary::write() { // do nothing diff --git a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H index 1f12efd096f754f07999f3c00e59a4f8a1b9c2d3..a4ac474e40888edb30791d24bc4f1e6060ca539b 100644 --- a/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H +++ b/src/postProcessing/functionObjects/IO/writeDictionary/writeDictionary.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,6 +134,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the writeDictionary virtual void write(); diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C index cc3f0c628ecffc6a9b7e2c84fe262181dd95c55f..37007274079e77ca848fcc94a71f3c6d503e30fc 100644 --- a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -79,6 +79,12 @@ void Foam::writeRegisteredObject::end() } +void Foam::writeRegisteredObject::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::writeRegisteredObject::write() { forAll(objectNames_, i) diff --git a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H index 014d4ce90c9d4b5679f6be776bb01507a99e136f..7159fad3fcddbe7ca124d44c4c3b0bbe90f83249 100644 --- a/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H +++ b/src/postProcessing/functionObjects/IO/writeRegisteredObject/writeRegisteredObject.H @@ -147,6 +147,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the writeRegisteredObject virtual void write(); diff --git a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C index 2a3d212afdc1e334e26cb29eaef9089b0724ac59..6bea8e6478e1c94b0a75eb059f9539b41917941b 100644 --- a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C +++ b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -106,6 +106,12 @@ void Foam::cloudInfo::end() } +void Foam::cloudInfo::timeSet() +{ + // Do nothing +} + + void Foam::cloudInfo::write() { if (active_) diff --git a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H index 85558d2e3fc8d81eb3de967afe980a03249bfa6d..e659807cd4e37999b8c33e61868518e033c05eec 100644 --- a/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H +++ b/src/postProcessing/functionObjects/cloud/cloudInfo/cloudInfo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -162,6 +162,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/doc/functionObjects.dox b/src/postProcessing/functionObjects/doc/functionObjects.dox index 64073c2a3ff37c0764d52b82212ceadc1b16b2cc..94eb32bc4799b7d2b51b22c640cd94f7fd92be16 100644 --- a/src/postProcessing/functionObjects/doc/functionObjects.dox +++ b/src/postProcessing/functionObjects/doc/functionObjects.dox @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2012-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -57,14 +57,14 @@ functions { myFunctionObject // user-defined name of function object entry { - type functionObjectType; - libs ("libMyFunctionObjectlib.so"); - region defaultRegion; - enabled yes; - timeStart 0; - timeEnd 10; - outputControl outputTime; - outputInterval 1; + type functionObjectType; + functionObjectLibs ("libMyFunctionObjectlib.so"); + region defaultRegion; + enabled yes; + timeStart 0; + timeEnd 10; + outputControl outputTime; + outputInterval 1; ... } } @@ -74,7 +74,7 @@ Where: \table Property | Description | Required | Default value type | type of function object | yes | - libs | libraries containing object implementation | yes | + functionObjectLibs | libraries containing object implementation | yes | region | name of region for multi-region cases | no | enabled | on/off switch | no | yes timeStart| start time | no | diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C index 5a73765f938ece8322d5524196b30163dcacbc7a..e8f58c370e6afd90abb665f17d000495e20e4ea0 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.C @@ -393,6 +393,10 @@ void Foam::fieldAverage::end() {} +void Foam::fieldAverage::timeSet() +{} + + void Foam::fieldAverage::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H index 4a6d75e06b8b380d59af35b0b48a0ec814a6574a..12cea88cd769380801aabd80f0866da59bd54372 100644 --- a/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H +++ b/src/postProcessing/functionObjects/field/fieldAverage/fieldAverage/fieldAverage.H @@ -318,6 +318,9 @@ public: //- Execute the averaging at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the field average data and write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C index ac0fc6da0afc17a6b53ab5b31e167d0455328ecd..57c26aa4724e5fe70fee658cf3185bc584b64095 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.C @@ -104,6 +104,12 @@ void Foam::fieldCoordinateSystemTransform::end() } +void Foam::fieldCoordinateSystemTransform::timeSet() +{ + // Do nothing +} + + void Foam::fieldCoordinateSystemTransform::write() { forAll(fieldSet_, fieldI) diff --git a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H index 0671327ad8e7abc9d8a71aae427a2955ccedc1ba..edd1f13b502437f9d545a0e26ecb5689d83d1f85 100644 --- a/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H +++ b/src/postProcessing/functionObjects/field/fieldCoordinateSystemTransform/fieldCoordinateSystemTransform.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -173,6 +173,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C index e7a611febc452b8bb148f1cd28088aaa5fcba8ee..7c3c3283895ea0012c7c1efa514d2ee13e528216 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -139,6 +139,12 @@ void Foam::fieldMinMax::end() } +void Foam::fieldMinMax::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::fieldMinMax::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H index 50e3017f89327ddae9dbbbbd99a0007ab7a5d5a3..25ccd00f4186ee3e9c54fada27c5453590f8afdf 100644 --- a/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H +++ b/src/postProcessing/functionObjects/field/fieldMinMax/fieldMinMax.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -189,6 +189,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the field min/max template<class Type> void calcMinMaxFields diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C index 50d47d8198f2303682fff96fa3e922c1c71da804..9f651c8ee9d764f4e440bb9e5f679729243e3724 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.C @@ -131,6 +131,12 @@ void Foam::fieldValue::end() } +void Foam::fieldValue::timeSet() +{ + // Do nothing +} + + void Foam::fieldValue::updateMesh(const mapPolyMesh&) { // Do nothing diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H index b7994383d51c83321dcfe7a9dafc78af610af5ba..9d852cdfb798173aadcec34a3f1a7a13c60b8382 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValue/fieldValue.H @@ -191,6 +191,9 @@ public: //- Execute the at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Update mesh virtual void updateMesh(const mapPolyMesh&); diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C index 0e0c93ed1b3ceda489c9fe3cdd842adc553c3acf..30027a864a7a4287d357f73e99bdbaa6f310963a 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.C @@ -202,6 +202,12 @@ void Foam::fieldValues::fieldValueDelta::end() } +void Foam::fieldValues::fieldValueDelta::timeSet() +{ + // Do nothing +} + + void Foam::fieldValues::fieldValueDelta::updateMesh(const mapPolyMesh&) { // Do nothing diff --git a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H index 24d72f1f6bf2a4db31f9d56b6e0aa6e760624942..d408227bbce516b4d45735a39316375c8dca9fcb 100644 --- a/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H +++ b/src/postProcessing/functionObjects/field/fieldValues/fieldValueDelta/fieldValueDelta.H @@ -192,6 +192,9 @@ public: //- Execute the at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Update mesh virtual void updateMesh(const mapPolyMesh&); diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C index 715bcfa7f8fa51bc791b88a39480361eafcc2e95..4b82fbd331ecc1ef19e028fbcf42b6307520fb97 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -163,6 +163,11 @@ void Foam::nearWallFields::end() } +void Foam::nearWallFields::timeSet() +{ +} + + void Foam::nearWallFields::write() { if (debug) diff --git a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H index df6c8f80635ce8df57630d246082a2cd1b2f203e..cea4e42139657def9ccbad543460e3a834a21331 100644 --- a/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H +++ b/src/postProcessing/functionObjects/field/nearWallFields/nearWallFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -191,6 +191,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/processorField/processorField.C b/src/postProcessing/functionObjects/field/processorField/processorField.C index bd72316b23685a605173e899cc51f2a7bd679621..611ebced0f68755f538530fc6c48595833fcd8fe 100644 --- a/src/postProcessing/functionObjects/field/processorField/processorField.C +++ b/src/postProcessing/functionObjects/field/processorField/processorField.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -96,6 +96,12 @@ void Foam::processorField::end() } +void Foam::processorField::timeSet() +{ + // Do nothing +} + + void Foam::processorField::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/processorField/processorField.H b/src/postProcessing/functionObjects/field/processorField/processorField.H index cee878adc1d5e005ac27ebfa513e1e79a056d5a9..6d45e32acbc71c49f9333617f30dd63a808e111a 100644 --- a/src/postProcessing/functionObjects/field/processorField/processorField.H +++ b/src/postProcessing/functionObjects/field/processorField/processorField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -145,6 +145,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/readFields/readFields.C b/src/postProcessing/functionObjects/field/readFields/readFields.C index 2d8a0fd0e0e6e840b4f5f14ff204f690d6503949..b92998684d3f9d07805ed26b44161bf3946854b1 100644 --- a/src/postProcessing/functionObjects/field/readFields/readFields.C +++ b/src/postProcessing/functionObjects/field/readFields/readFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,6 +122,12 @@ void Foam::readFields::end() } +void Foam::readFields::timeSet() +{ + // Do nothing +} + + void Foam::readFields::write() { // Do nothing diff --git a/src/postProcessing/functionObjects/field/readFields/readFields.H b/src/postProcessing/functionObjects/field/readFields/readFields.H index 81f11922b7fa0c8084b192b4161cfa0e7795ceff..0c39404a93243c924f59fefa5ef6394ef9f57791 100644 --- a/src/postProcessing/functionObjects/field/readFields/readFields.H +++ b/src/postProcessing/functionObjects/field/readFields/readFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -173,6 +173,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C index 3e5e2fc98ab15a5ad57454b997f54b94c1b3fd58..22512c0317b4e838693ee71634a12e977c03f4a3 100644 --- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C +++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -384,6 +384,12 @@ void Foam::regionSizeDistribution::end() } +void Foam::regionSizeDistribution::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::regionSizeDistribution::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H index 1fd236f024c8b202f42b3379054be74b9d91af91..0c466398462c3c1af3d2a0a2fc8b95485fa87438 100644 --- a/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H +++ b/src/postProcessing/functionObjects/field/regionSizeDistribution/regionSizeDistribution.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -266,6 +266,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the regionSizeDistribution and write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.C b/src/postProcessing/functionObjects/field/streamLine/streamLine.C index 037ddc5ae16a1ce5e8ae90bc72e15e41cf83ef26..6116950a44ec1c3d2a3bbbd03fd7b4906652d14f 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLine.C +++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -517,6 +517,10 @@ void Foam::streamLine::end() {} +void Foam::streamLine::timeSet() +{} + + void Foam::streamLine::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/streamLine/streamLine.H b/src/postProcessing/functionObjects/field/streamLine/streamLine.H index bce1808d90a6e7627e07110ae68cb8c125d75c7b..59d9d9026e0e8e90d94abda60171904661af8611 100644 --- a/src/postProcessing/functionObjects/field/streamLine/streamLine.H +++ b/src/postProcessing/functionObjects/field/streamLine/streamLine.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -266,6 +266,9 @@ public: //- Execute the averaging at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the field average data and write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C index d89a6b3648483fb02bd82096a3f36a379b5bbb4a..69b45c12ca9d0bf4d1a8df46d84b29276541b810 100644 --- a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C +++ b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -112,6 +112,12 @@ void Foam::surfaceInterpolateFields::end() } +void Foam::surfaceInterpolateFields::timeSet() +{ + // Do nothing +} + + void Foam::surfaceInterpolateFields::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H index 07110c8d88203a9bce1a1b8750ad98a01e5bd8cf..1a5d38a0759cd6d009c52aa91b8398351eaf30ae 100644 --- a/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H +++ b/src/postProcessing/functionObjects/field/surfaceInterpolateFields/surfaceInterpolateFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -169,6 +169,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C b/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C index 855b3ce80078193b7a6ead5f0cb78ade5ba650b9..72585b8148770e864268f4c86921db6253275b40 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C +++ b/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -259,6 +259,12 @@ void Foam::turbulenceFields::end() } +void Foam::turbulenceFields::timeSet() +{ + // Do nothing +} + + void Foam::turbulenceFields::write() { // Do nothing diff --git a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H b/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H index b885759223fdd44e649282897029d438d9a598f5..09ecd93e687d92d514b221535f99d3936eb2bda7 100644 --- a/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H +++ b/src/postProcessing/functionObjects/field/turbulenceFields/turbulenceFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -206,6 +206,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write virtual void write(); diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C index e2487e3cd68d43f5bf8ade6af60531f2aa6c19f5..95238cbd306432b81dae0df24a2b0ad98d1c3943 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -644,6 +644,10 @@ void Foam::wallBoundedStreamLine::end() {} +void Foam::wallBoundedStreamLine::timeSet() +{} + + void Foam::wallBoundedStreamLine::write() { if (active_) diff --git a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H index c6b8a178a3553dab1e9633fc3b5b7edf93667455..98956ba9caa2111e22aa5c53c6ae791887d18652 100644 --- a/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H +++ b/src/postProcessing/functionObjects/field/wallBoundedStreamLine/wallBoundedStreamLine.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -272,6 +272,9 @@ public: //- Execute the averaging at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the field average data and write virtual void write(); diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C index 9537f6a28a06ce7285afdf9be2f21e37e455b6ea..5a29b54bc003a11f6dd7c2759fc6a58dba6da067 100644 --- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C +++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.C @@ -108,6 +108,12 @@ void Foam::forceCoeffs::end() } +void Foam::forceCoeffs::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::forceCoeffs::write() { if (active_) diff --git a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H index b8112939b3685d1b0ee8c5cd353d31dbc0f8041b..048c0dd331b468115528db5a79ac7b7e60f4dfd8 100644 --- a/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H +++ b/src/postProcessing/functionObjects/forces/forceCoeffs/forceCoeffs.H @@ -177,6 +177,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the forces virtual void write(); }; diff --git a/src/postProcessing/functionObjects/forces/forces/forces.C b/src/postProcessing/functionObjects/forces/forces/forces.C index e38208963b322289bbb713a2fd4639790816a5ef..7df79a2e1f753efcd59339c68e54cda525b677c6 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.C +++ b/src/postProcessing/functionObjects/forces/forces/forces.C @@ -625,6 +625,12 @@ void Foam::forces::end() } +void Foam::forces::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::forces::write() { if (!active_) diff --git a/src/postProcessing/functionObjects/forces/forces/forces.H b/src/postProcessing/functionObjects/forces/forces/forces.H index dd87184c2f7d5afa138356fb0e99b09b72ae9629..793cf78cbf00e39528cbdcb530d96638df955f1b 100644 --- a/src/postProcessing/functionObjects/forces/forces/forces.H +++ b/src/postProcessing/functionObjects/forces/forces/forces.H @@ -205,7 +205,7 @@ protected: //- Minimum bin bounds scalar binMin_; - + //- Bin positions along binDir List<point> binPoints_; @@ -309,6 +309,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write the forces virtual void write(); diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C b/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C index b5fd621b711bbf6c3b9c29c919e705253c79bc00..185e83b0a45169fe496c37d32f83fcb90e2a7bb2 100644 --- a/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C +++ b/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -141,6 +141,12 @@ void Foam::calcFvcDiv::end() } +void Foam::calcFvcDiv::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::calcFvcDiv::write() { if (active_) diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.H b/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.H index e15f680e644b5c354745c57bc8c96cf4071ca5f8..447b00c92c8b36168ed5d42061964247700de7a5 100644 --- a/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.H +++ b/src/postProcessing/functionObjects/fvTools/calcFvcDiv/calcFvcDiv.H @@ -148,6 +148,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the calcFvcDiv and write virtual void write(); diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C index edcddb2eaec5dbf18ab6e26ad5ed7285770bb5ec..6b8efee0c883180101903e46693cbca42f5502c9 100644 --- a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C +++ b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,6 +103,12 @@ void Foam::calcFvcGrad::end() } +void Foam::calcFvcGrad::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::calcFvcGrad::write() { if (active_) diff --git a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.H b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.H index 6822a7bb08492ea551283c2c72f3a54a33126e43..bdaf5383ed5b7aa90f1e51063e5d7587dea5b1d9 100644 --- a/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.H +++ b/src/postProcessing/functionObjects/fvTools/calcFvcGrad/calcFvcGrad.H @@ -151,6 +151,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the calcFvcGrad and write virtual void write(); diff --git a/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C b/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C index f997cc8b78bf75127aee01d765b6775b6d1aad7f..93229e7f5d4581ea4f2f0b56aaabf7a42072b1ea 100644 --- a/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C +++ b/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -103,6 +103,12 @@ void Foam::calcMag::end() } +void Foam::calcMag::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::calcMag::write() { if (active_) diff --git a/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.H b/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.H index d8a91cc802711f360dc94166cb1561b3584d5d3b..76f10721117618a00c503b554b219c8e91c69fc7 100644 --- a/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.H +++ b/src/postProcessing/functionObjects/fvTools/calcMag/calcMag.H @@ -145,6 +145,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the calcMag and write virtual void write(); diff --git a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C index 41b8f697c1681fe775ec65158e4df4d19bde537b..d0551c84ce7cdbaedaed03b3ec7bedb8dad478fe 100644 --- a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C +++ b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -179,6 +179,11 @@ void Foam::abortCalculation::end() } +void Foam::abortCalculation::timeSet() +{ +} + + void Foam::abortCalculation::write() { // Do nothing - only valid on execute diff --git a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.H b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.H index 4040709fdb32b5b5edb6dffcef62299098e986e0..95e1994fd47d6ce9022bc08362b2baafd211310e 100644 --- a/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.H +++ b/src/postProcessing/functionObjects/jobControl/abortCalculation/abortCalculation.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -146,6 +146,9 @@ public: //- Execute at the final time-loop, used for cleanup virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Execute, check existence of abort file and take action virtual void write(); diff --git a/src/postProcessing/functionObjects/systemCall/systemCall.C b/src/postProcessing/functionObjects/systemCall/systemCall.C index 00cb7b850cf86db88fdf5171701b13e93f64a5fb..0fb6d1cfca305217227c543963554533211c233a 100644 --- a/src/postProcessing/functionObjects/systemCall/systemCall.C +++ b/src/postProcessing/functionObjects/systemCall/systemCall.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -111,6 +111,11 @@ void Foam::systemCall::end() } +void Foam::systemCall::timeSet() +{ +} + + void Foam::systemCall::write() { forAll(writeCalls_, callI) diff --git a/src/postProcessing/functionObjects/systemCall/systemCall.H b/src/postProcessing/functionObjects/systemCall/systemCall.H index 5de53fa26cf392a62531925eefbf37e73bf72b20..b4d43a2bf7f172ae857ac3dad0e739cce3e7d32f 100644 --- a/src/postProcessing/functionObjects/systemCall/systemCall.H +++ b/src/postProcessing/functionObjects/systemCall/systemCall.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -172,6 +172,9 @@ public: //- Execute the "endCalls" at the final time-loop virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Write, execute the "writeCalls" virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C index e72e69333892280731bd1a84cbff7325e8a9deab..9309ba42bb1905a26622457213a51dc1cbc0b7fd 100644 --- a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C +++ b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -165,6 +165,12 @@ void Foam::CourantNo::end() } +void Foam::CourantNo::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::CourantNo::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.H b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.H index e74d6c9e2cc8a8c492aa35c3afc658fb86c2f980..16724bee94b9c7ae59c626db5de8c238f05546d7 100644 --- a/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.H +++ b/src/postProcessing/functionObjects/utilities/CourantNo/CourantNo.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -134,6 +134,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the CourantNo and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C index b9a48436007c6d64fec0eda84f8a5c71d2d32816..9f861596f780a5e2b2abdc6c6a21807a1737c7a4 100644 --- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C +++ b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -114,6 +114,12 @@ void Foam::DESModelRegions::end() } +void Foam::DESModelRegions::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::DESModelRegions::write() { typedef incompressible::turbulenceModel icoModel; @@ -175,7 +181,7 @@ void Foam::DESModelRegions::write() file() << obr_.time().timeName() << token::TAB << prc << token::TAB << 100.0 - prc << endl; } - + if (log_) { Info<< " LES = " << prc << " % (volume)" << nl diff --git a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H index 858fab4e05258e2ebe47a981ea08b1e501f808fe..d0bf101ae0cbbfdbcd209875886b3d8ca76a9c12 100644 --- a/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H +++ b/src/postProcessing/functionObjects/utilities/DESModelRegions/DESModelRegions.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,6 +136,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the DESModelRegions and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C b/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C index 5b1b3f0cf934123cfe266229edf0a4b02dd87286..0f1dd72a92c1d7f00086d213ff38ba5a8aa2700a 100644 --- a/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C +++ b/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -126,6 +126,12 @@ void Foam::Lambda2::end() } +void Foam::Lambda2::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::Lambda2::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.H b/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.H index 77659532e26f2788ffe61e4b3a2d6dcfa25e44b5..f4360f46404b714b6043422eb95bbc71042a307d 100644 --- a/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.H +++ b/src/postProcessing/functionObjects/utilities/Lambda2/Lambda2.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -127,6 +127,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the Lambda2 and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C index 874977faed9ad9ba3600fbcde9a5a55f33f36ae1..885e611fa0f879cbde7c1d8b4f7a0e35b1d71cde 100644 --- a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C +++ b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,6 +130,12 @@ void Foam::Peclet::end() } +void Foam::Peclet::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::Peclet::write() { typedef compressible::turbulenceModel cmpTurbModel; diff --git a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.H b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.H index 4c4ec390b7b7f4a14a43c5c9541cb420b9f7f82d..5becbe93e951172d1697de0d4f5c7bdb3017896d 100644 --- a/src/postProcessing/functionObjects/utilities/Peclet/Peclet.H +++ b/src/postProcessing/functionObjects/utilities/Peclet/Peclet.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -129,6 +129,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the Peclet and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/Q/Q.C b/src/postProcessing/functionObjects/utilities/Q/Q.C index 5dec2d3aa7ec5ee64cbee0d75257a991e31a59e0..81a68a152a7c3ef6a2be199073996a8eff1a8122 100644 --- a/src/postProcessing/functionObjects/utilities/Q/Q.C +++ b/src/postProcessing/functionObjects/utilities/Q/Q.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -125,6 +125,12 @@ void Foam::Q::end() } +void Foam::Q::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::Q::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/Q/Q.H b/src/postProcessing/functionObjects/utilities/Q/Q.H index 892808ef95d385d113e4b831548d7cb75efa24fa..aed626228c8c61d627fa166907da83af6b0b8506 100644 --- a/src/postProcessing/functionObjects/utilities/Q/Q.H +++ b/src/postProcessing/functionObjects/utilities/Q/Q.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -130,6 +130,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the Q and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C index 98b57ec4873389125d922db3e5676736b28eb959..cd8c3e01694054bd3e1ca1dac760df74a0404212 100644 --- a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C +++ b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -61,6 +61,7 @@ void Foam::codedFunctionObject::prepare dynCode.setFilterVariable("codeExecute", codeExecute_); dynCode.setFilterVariable("codeEnd", codeEnd_); dynCode.setFilterVariable("codeData", codeData_); + dynCode.setFilterVariable("codeTimeSet", codeTimeSet_); //dynCode.setFilterVariable("codeWrite", codeWrite_); // compile filtered C template @@ -185,6 +186,13 @@ bool Foam::codedFunctionObject::end() } +bool Foam::codedFunctionObject::timeSet() +{ + updateLibrary(redirectType_); + return redirectFunctionObject().timeSet(); +} + + bool Foam::codedFunctionObject::read(const dictionary& dict) { dict.lookup("redirectType") >> redirectType_; @@ -261,6 +269,24 @@ bool Foam::codedFunctionObject::read(const dictionary& dict) ); } + const entry* timeSetPtr = dict.lookupEntryPtr + ( + "codeTimeSet", + false, + false + ); + if (timeSetPtr) + { + codeTimeSet_ = stringOps::trim(timeSetPtr->stream()); + stringOps::inplaceExpand(codeTimeSet_, dict); + dynamicCodeContext::addLineDirective + ( + codeTimeSet_, + timeSetPtr->startLineNumber(), + dict.name() + ); + } + updateLibrary(redirectType_); return redirectFunctionObject().read(dict); } diff --git a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H index 84b48a91e6a59d60ed366279a299f8ec800e4bea..7b3f8f57e3f7ec4eed00039b9b23fc52b4245ebb 100644 --- a/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H +++ b/src/postProcessing/functionObjects/utilities/codedFunctionObject/codedFunctionObject.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,6 +31,39 @@ Description This function object provides a general interface to enable dynamic code compilation. + The entries are + code : c++; upon functionObject::write() + codeInclude : include files + codeOptions : include paths; inserted into EXE_INC in Make/options + codeLibs : link line; inserted into LIB_LIBS in Make/options + + codeExecute : c++;upon functionObject::execute(); + codeRead : c++; upon functionObject::read(); + codeEnd : c++; upon functionObject::end(); + codeData : c++; local member data (null constructed); + codeTimeSet : c++; upon functionObject::timeSet(); + localCode : c++; local static functions + + Example of function object specification: + \verbatim + difference + { + functionObjectLibs ("libutilityFunctionObjects.so"); + + type coded; + // Name of on-the-fly generated functionObject + redirectType writeMagU; + code + #{ + // Lookup U + const volVectorField& U = mesh().lookupObject<volVectorField>("U"); + // Write + mag(U).write(); + } + } + \endverbatim + + SeeAlso Foam::functionObject Foam::OutputFilterFunctionObject @@ -77,6 +110,7 @@ protected: string codeRead_; string codeExecute_; string codeEnd_; + string codeTimeSet_; //- Underlying functionObject mutable autoPtr<functionObject> redirectFunctionObjectPtr_; @@ -148,6 +182,9 @@ public: // By default it simply calls execute(). virtual bool end(); + //- Called when time was set at the end of the Time::operator++ + virtual bool timeSet(); + //- Read and set the function object if its data have changed virtual bool read(const dictionary&); diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C index fb60ce2527a9fce7e6ca6a5ca49b21b42fb698a4..fa26841aefe0daa50bda529042d4907126fd5330 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -104,6 +104,12 @@ void Foam::dsmcFields::end() } +void Foam::dsmcFields::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::dsmcFields::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H index a88d3c207044f7861e617af135fd3bd9e72ceafa..b6f7ae68d61dc0bd968fbfc4b8eef43cf3bd02fb 100644 --- a/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H +++ b/src/postProcessing/functionObjects/utilities/dsmcFields/dsmcFields.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -123,6 +123,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the dsmcFields and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C index 014aefd8a0be47911bfb7a448c79a5a4189f98a1..5ea5b9034a8b8914b0b4db60432d434387322829 100644 --- a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C +++ b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.C @@ -273,7 +273,7 @@ void Foam::pressureTools::read(const dictionary& dict) if (p.dimensions() != dimPressure) { dict.lookup("rhoRef") >> rhoInf_; - } + } dict.lookup("calcTotal") >> calcTotal_; if (calcTotal_) @@ -304,6 +304,12 @@ void Foam::pressureTools::end() } +void Foam::pressureTools::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::pressureTools::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.H b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.H index 82a44921edeb921703ee87e07be63c3ecfe83960..6d80b388d107eb205d8de7cb08f8b438a993a8b0 100644 --- a/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.H +++ b/src/postProcessing/functionObjects/utilities/pressureTools/pressureTools.H @@ -241,6 +241,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the pressureTools and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C index ad392c506bdef7e6c6b91aabf992118a9d0683e6..b63fe4acd8b1cc5095cae4a4b602404722b82e79 100644 --- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C +++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.C @@ -66,7 +66,7 @@ Foam::wordList Foam::scalarTransport::boundaryTypes() const } } - return bTypes; + return bTypes; } @@ -228,7 +228,7 @@ void Foam::scalarTransport::execute() { schemeVar = UName_; } - + word divScheme("div(phi," + schemeVar + ")"); word laplacianScheme("laplacian(" + DT.name() + "," + schemeVar + ")"); @@ -303,6 +303,12 @@ void Foam::scalarTransport::end() } +void Foam::scalarTransport::timeSet() +{ + // Do nothing +} + + void Foam::scalarTransport::write() { // Do nothing diff --git a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H index a58ed2268049379831ceaff4c1042434300d6f52..ae3db7635ca55bb539106f54ebaa87ece75906ed 100644 --- a/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H +++ b/src/postProcessing/functionObjects/utilities/scalarTransport/scalarTransport.H @@ -170,6 +170,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the scalarTransport and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C index aa88880eee39e68b8a180b923196fb464b0841c7..9329ad6e3f554a25fd44cf510ac4d247f595e7cc 100644 --- a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C +++ b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -136,6 +136,12 @@ void Foam::timeActivatedFileUpdate::end() } +void Foam::timeActivatedFileUpdate::timeSet() +{ + // Do nothing +} + + void Foam::timeActivatedFileUpdate::write() { // Do nothing diff --git a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H index dc43ee39a322e5fa05ac29570cd14004a7672d78..e2f168eaf2dcabfa39c6a5cedbee9760944d49cd 100644 --- a/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H +++ b/src/postProcessing/functionObjects/utilities/timeActivatedFileUpdate/timeActivatedFileUpdate.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -152,6 +152,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the timeActivatedFileUpdate and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C index 55a4011d6ae6d2115dc77063bbe9ba8e28c66445..22942fa266a5c5483af79f91f71c69bb2d67204a 100644 --- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C +++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -202,6 +202,12 @@ void Foam::wallShearStress::end() } +void Foam::wallShearStress::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::wallShearStress::write() { typedef compressible::turbulenceModel cmpModel; @@ -254,7 +260,7 @@ void Foam::wallShearStress::write() << "database" << exit(FatalError); } - + calcShearStress(mesh, Reff(), wallShearStress); if (log_) diff --git a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H index f8ecbbcfde7e14295a14135d88fcd207fbe967bd..c2927eaad5321ca76e31256594f37a812cf53310 100644 --- a/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H +++ b/src/postProcessing/functionObjects/utilities/wallShearStress/wallShearStress.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -177,6 +177,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the wallShearStress and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C index 789c06ddc73b71b30cd83ec1af64e75a55a66609..1b4bc680afab0fc3baf7d56bd7923a464aaed917 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C +++ b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -248,6 +248,12 @@ void Foam::yPlusLES::end() } +void Foam::yPlusLES::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::yPlusLES::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.H b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.H index 78e7d38db78adf66d4f6f539b9cf91841a53af02..94a2bb349a31ae03675382ca69f2116caf87c37d 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.H +++ b/src/postProcessing/functionObjects/utilities/yPlusLES/yPlusLES.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -153,6 +153,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the yPlusLES and write virtual void write(); diff --git a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C index 663c6dda74391a5c9b86d212d35467df4721c681..13412a300e7675192f66134e815e5626bad97f75 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C +++ b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -235,6 +235,12 @@ void Foam::yPlusRAS::end() } +void Foam::yPlusRAS::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::yPlusRAS::write() { if (active_) diff --git a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H index 241c4b6a74e08b5e0a88484dd031064e62300cac..747f100ab4f163f62a2e2bf9224380c688e1c1d9 100644 --- a/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H +++ b/src/postProcessing/functionObjects/utilities/yPlusRAS/yPlusRAS.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -140,6 +140,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Calculate the yPlusRAS and write virtual void write(); diff --git a/src/regionModels/regionModel/regionModel1D/regionModel1D.C b/src/regionModels/regionModel/regionModel1D/regionModel1D.C index 60243b55cdc032d6bea6d459f42d71d10ecca6cb..86c640a3f25e4b37b0921fe90270719e62dfcda8 100644 --- a/src/regionModels/regionModel/regionModel1D/regionModel1D.C +++ b/src/regionModels/regionModel/regionModel1D/regionModel1D.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -122,6 +122,7 @@ void Foam::regionModels::regionModel1D::initialise() surfaceScalarField& nMagSf = nMagSfPtr_(); + localPyrolysisFaceI = 0; forAll(intCoupledPatchIDs_, i) { const label patchI = intCoupledPatchIDs_[i]; @@ -132,7 +133,7 @@ void Foam::regionModels::regionModel1D::initialise() forAll(pNormals, localFaceI) { const vector& n = pNormals[localFaceI]; - const labelList& faces = boundaryFaceFaces_[localFaceI]; + const labelList& faces = boundaryFaceFaces_[localPyrolysisFaceI++]; forAll (faces, faceI) { const label faceID = faces[faceI]; diff --git a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C index 108109702b03dcb1170006f4a681afe4ea7012c3..bc4bf5ee889aebf2cfc3d4ca1d86eaee2447998c 100644 --- a/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C +++ b/src/regionModels/surfaceFilmModels/submodels/kinematic/filmTurbulenceModel/laminar/laminar.C @@ -76,7 +76,7 @@ tmp<volVectorField> laminar::Us() const ( IOobject ( - typeName + ".Us", + typeName + ":Us", owner_.regionMesh().time().timeName(), owner_.regionMesh(), IOobject::NO_READ, @@ -104,7 +104,7 @@ tmp<volScalarField> laminar::mut() const ( IOobject ( - typeName + ".mut", + typeName + ":mut", owner_.regionMesh().time().timeName(), owner_.regionMesh(), IOobject::NO_READ, diff --git a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C index 4a08755ee3e68a1950074fc80295882222d421c3..8b0a0c5f169778ef1b7992c05ce71d8f74ee3ac8 100644 --- a/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C +++ b/src/regionModels/surfaceFilmModels/submodels/thermo/phaseChangeModel/standardPhaseChange/standardPhaseChange.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -26,8 +26,6 @@ License #include "standardPhaseChange.H" #include "addToRunTimeSelectionTable.H" #include "thermoSingleLayer.H" -#include "specie.H" -#include "heatTransferModel.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C index 42d459ce01254a404dbff9ef2863dcf4fbd47cdf..03d1654fda5456e248b73a1286b2f46fb9e7ba1c 100644 --- a/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C +++ b/src/regionModels/surfaceFilmModels/thermoSingleLayer/thermoSingleLayer.C @@ -294,10 +294,20 @@ tmp<fvScalarMatrix> thermoSingleLayer::q(volScalarField& hs) const { dimensionedScalar Tstd("Tstd", dimTemperature, 298.15); + volScalarField htcst = htcs_->h()(); + volScalarField htcwt = htcw_->h()(); + forAll(alpha_, i) + { + htcst[i] *= max(alpha_[i], ROOTVSMALL); + htcwt[i] *= max(alpha_[i], ROOTVSMALL); + } + htcst.correctBoundaryConditions(); + htcwt.correctBoundaryConditions(); + return ( - - fvm::Sp(htcs_->h()/Cp_, hs) - htcs_->h()*(Tstd - TPrimary_) - - fvm::Sp(htcw_->h()/Cp_, hs) - htcw_->h()*(Tstd - Tw_) + - fvm::Sp(htcst/Cp_, hs) - htcst*(Tstd - TPrimary_) + - fvm::Sp(htcwt/Cp_, hs) -htcwt*(Tstd - Tw_) ); } diff --git a/src/sampling/probes/patchProbesTemplates.C b/src/sampling/probes/patchProbesTemplates.C index 8f37e2f07cde46ec8abf4e08cffbfb6decc8d56d..7e8ddd74b427bfcdaddc957e16f053a768c6b1d5 100644 --- a/src/sampling/probes/patchProbesTemplates.C +++ b/src/sampling/probes/patchProbesTemplates.C @@ -43,7 +43,9 @@ void Foam::patchProbes::sampleAndWrite unsigned int w = IOstream::defaultPrecision() + 7; OFstream& probeStream = *probeFilePtrs_[vField.name()]; - probeStream << setw(w) << vField.time().value(); + probeStream + << setw(w) + << vField.time().timeToUserTime(vField.time().value()); forAll(values, probeI) { @@ -67,7 +69,9 @@ void Foam::patchProbes::sampleAndWrite unsigned int w = IOstream::defaultPrecision() + 7; OFstream& probeStream = *probeFilePtrs_[sField.name()]; - probeStream << setw(w) << sField.time().value(); + probeStream + << setw(w) + << sField.time().timeToUserTime(sField.time().value()); forAll(values, probeI) { diff --git a/src/sampling/probes/probes.C b/src/sampling/probes/probes.C index 8652fa9a25cfc21cf4b6121d0e64648203394fd7..608049c7f7c9fb2a1a18c97cc23b877cff7a0b96 100644 --- a/src/sampling/probes/probes.C +++ b/src/sampling/probes/probes.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -293,6 +293,12 @@ void Foam::probes::end() } +void Foam::probes::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::probes::write() { if (size() && prepare()) diff --git a/src/sampling/probes/probes.H b/src/sampling/probes/probes.H index 80a4037571259f24f62956598cf0b8e5d2ff92d5..f72581dbd700bccc1db5feecd8667c0d02eac327 100644 --- a/src/sampling/probes/probes.H +++ b/src/sampling/probes/probes.H @@ -243,6 +243,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Sample and write virtual void write(); diff --git a/src/sampling/probes/probesTemplates.C b/src/sampling/probes/probesTemplates.C index 3a34c1c264f640ff5d5570bbabada9868db502ca..b64bbb577f1a576565fbf49fd8dc3cc29e3b35a9 100644 --- a/src/sampling/probes/probesTemplates.C +++ b/src/sampling/probes/probesTemplates.C @@ -76,7 +76,7 @@ void Foam::probes::sampleAndWrite unsigned int w = IOstream::defaultPrecision() + 7; OFstream& os = *probeFilePtrs_[vField.name()]; - os << setw(w) << vField.time().value(); + os << setw(w) << vField.time().timeToUserTime(vField.time().value()); forAll(values, probeI) { @@ -90,17 +90,17 @@ void Foam::probes::sampleAndWrite template<class Type> void Foam::probes::sampleAndWrite ( - const GeometricField<Type, fvsPatchField, surfaceMesh>& vField + const GeometricField<Type, fvsPatchField, surfaceMesh>& sField ) { - Field<Type> values(sample(vField)); + Field<Type> values(sample(sField)); if (Pstream::master()) { unsigned int w = IOstream::defaultPrecision() + 7; - OFstream& os = *probeFilePtrs_[vField.name()]; + OFstream& os = *probeFilePtrs_[sField.name()]; - os << setw(w) << vField.time().value(); + os << setw(w) << sField.time().timeToUserTime(sField.time().value()); forAll(values, probeI) { @@ -259,7 +259,7 @@ template<class Type> Foam::tmp<Foam::Field<Type> > Foam::probes::sample ( - const GeometricField<Type, fvsPatchField, surfaceMesh>& vField + const GeometricField<Type, fvsPatchField, surfaceMesh>& sField ) const { const Type unsetVal(-VGREAT*pTraits<Type>::one); @@ -275,7 +275,7 @@ Foam::probes::sample { if (faceList_[probeI] >= 0) { - values[probeI] = vField[faceList_[probeI]]; + values[probeI] = sField[faceList_[probeI]]; } } diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.C b/src/sampling/sampledSet/sampledSets/sampledSets.C index 44ea1691af47a20f24ad05e298073eb3591f9acd..0286e5487737cabeee186975fa7a08f580d1f4d0 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSets.C +++ b/src/sampling/sampledSet/sampledSets/sampledSets.C @@ -188,6 +188,12 @@ void Foam::sampledSets::end() } +void Foam::sampledSets::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::sampledSets::write() { if (size()) diff --git a/src/sampling/sampledSet/sampledSets/sampledSets.H b/src/sampling/sampledSet/sampledSets/sampledSets.H index a2ad2f1418bb438b2cfa305006e60a485733a88f..54744bbbf859d69e22aaffd5edfd2cb44580a24a 100644 --- a/src/sampling/sampledSet/sampledSets/sampledSets.H +++ b/src/sampling/sampledSet/sampledSets/sampledSets.H @@ -288,6 +288,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Sample and write virtual void write(); diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C index 34d5bd5b965caf5d835a4cd689af412f92aa27f9..b33d6b30b752a45d2ccddcb8101ef4d383593f76 100644 --- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C +++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.C @@ -143,6 +143,12 @@ void Foam::sampledSurfaces::end() } +void Foam::sampledSurfaces::timeSet() +{ + // Do nothing - only valid on write +} + + void Foam::sampledSurfaces::write() { if (size()) diff --git a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H index 050b2b6e383c1ac2e71789ee48d36055b29d0213..3390c0034876bcf46459b1a13ca351b6e34ddaed 100644 --- a/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H +++ b/src/sampling/sampledSurface/sampledSurfaces/sampledSurfaces.H @@ -221,6 +221,9 @@ public: //- Execute at the final time-loop, currently does nothing virtual void end(); + //- Called when time was set at the end of the Time::operator++ + virtual void timeSet(); + //- Sample and write virtual void write(); diff --git a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H index 734d51083100def428f7c985368c39bf70854698..3f24e11e4a9cb4f8622dfb687c1e6eee6a50d840 100644 --- a/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H +++ b/src/thermophysicalModels/solidChemistryModel/solidChemistrySolver/makeSolidChemistrySolverType.H @@ -47,8 +47,8 @@ namespace Foam defineTemplateTypeNameAndDebugWithName \ ( \ SS##Schem##Comp##SThermo##GThermo, \ - (#SS"<" + word(Schem::typeName_()) +"<"#Comp"," + SThermo::typeName() \ - + "," + GThermo::typeName() + ">>").c_str(), \ + (#SS"<"#Schem"<"#Comp"," + SThermo::typeName() + "," \ + + GThermo::typeName() + ">>").c_str(), \ 0 \ ); \ \ diff --git a/src/thermophysicalModels/solidSpecie/include/solidThermoPhysicsTypes.H b/src/thermophysicalModels/solidSpecie/include/solidThermoPhysicsTypes.H index c1269e80007be332440a16e1a272c8e7509c66d2..b7eac0fc3f97dfbcd1abb3dd3b77fa7d9b376fe6 100644 --- a/src/thermophysicalModels/solidSpecie/include/solidThermoPhysicsTypes.H +++ b/src/thermophysicalModels/solidSpecie/include/solidThermoPhysicsTypes.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -35,13 +35,17 @@ Description #include "specie.H" #include "rhoConst.H" #include "hConstThermo.H" +#include "hPolynomialThermo.H" #include "hExponentialThermo.H" #include "constIsoSolidTransport.H" #include "constAnIsoSolidTransport.H" #include "exponentialSolidTransport.H" +#include "polynomialSolidTransport.H" + #include "sensibleEnthalpy.H" #include "thermo.H" + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam @@ -57,8 +61,7 @@ namespace Foam >, sensibleEnthalpy > - > - hConstSolidThermoPhysics; + > hConstSolidThermoPhysics; typedef exponentialSolidTransport @@ -71,8 +74,23 @@ namespace Foam >, sensibleEnthalpy > - > - hExponentialSolidThermoPhysics; + > hExponentialSolidThermoPhysics; + + + typedef + polynomialSolidTransport + < + species::thermo + < + hPolynomialThermo + < + rhoConst<specie>, + 8 + >, + sensibleEnthalpy + >, + 8 + > hTransportThermoPoly8SolidThermoPhysics; } diff --git a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C index e2c5ae6719a8de95a351eeac612b8f8ad2ff1981..bef81029444b61d4c39cd3f8570406c93d4e3b36 100644 --- a/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/const/constAnIsoSolidTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,26 +28,26 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class thermo> -Foam::constAnIsoSolidTransport<thermo>::constAnIsoSolidTransport +template<class Thermo> +Foam::constAnIsoSolidTransport<Thermo>::constAnIsoSolidTransport ( const dictionary& dict ) : - thermo(dict), + Thermo(dict), kappa_(dict.subDict("transport").lookup("kappa")) {} // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class thermo> -void Foam::constAnIsoSolidTransport<thermo>::constAnIsoSolidTransport::write +template<class Thermo> +void Foam::constAnIsoSolidTransport<Thermo>::constAnIsoSolidTransport::write ( Ostream& os ) const { - thermo::write(os); + Thermo::write(os); dictionary dict("transport"); dict.add("kappa", kappa_); @@ -57,14 +57,14 @@ void Foam::constAnIsoSolidTransport<thermo>::constAnIsoSolidTransport::write // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -template<class thermo> +template<class Thermo> Foam::Ostream& Foam::operator<< ( Ostream& os, - const constAnIsoSolidTransport<thermo>& ct + const constAnIsoSolidTransport<Thermo>& ct ) { - operator<<(os, static_cast<const thermo&>(ct)); + operator<<(os, static_cast<const Thermo&>(ct)); os << tab << ct.kappa_; os.check diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C index 10070c48ba43c9a200674caa7976591c08b666c7..24abeac8ae772d4e2f458c71d1f0efee2dca8f0c 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransport.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -28,13 +28,13 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class thermo> -Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport +template<class Thermo> +Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport ( const dictionary& dict ) : - thermo(dict), + Thermo(dict), kappa0_(0.0), n0_(0.0), Tref_(0.0) @@ -48,13 +48,13 @@ Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class thermo> -void Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport::write +template<class Thermo> +void Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport::write ( Ostream& os ) const { - thermo::write(os); + Thermo::write(os); dictionary dict("transport"); dict.add("kappa0", kappa0_); @@ -66,13 +66,13 @@ void Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport::write // * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // -template<class thermo> +template<class Thermo> Foam::Ostream& Foam::operator<< ( - Ostream& os, const exponentialSolidTransport<thermo>& et + Ostream& os, const exponentialSolidTransport<Thermo>& et ) { - operator<<(os, static_cast<const thermo&>(et)); + operator<<(os, static_cast<const Thermo&>(et)); os << tab << et.kappa0_ << tab << et.n0_ << tab << et.Tref_; os.check diff --git a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H index 547c2e0be9435bc9f3978a9ad06e55ee6c204816..36105ceb449ec3d757f5314338c8132fbc821ae0 100644 --- a/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H +++ b/src/thermophysicalModels/solidSpecie/transport/exponential/exponentialSolidTransportI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -25,30 +25,30 @@ License // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -template<class thermo> -inline Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport +template<class Thermo> +inline Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport ( - const thermo& t, + const Thermo& t, const scalar kappa0, const scalar n0, const scalar Tref ) : - thermo(t), + Thermo(t), kappa0_(kappa0), n0_(n0), Tref_(Tref) {} -template<class thermo> -inline Foam::exponentialSolidTransport<thermo>::exponentialSolidTransport +template<class Thermo> +inline Foam::exponentialSolidTransport<Thermo>::exponentialSolidTransport ( const word& name, const exponentialSolidTransport& ct ) : - thermo(name, ct), + Thermo(name, ct), kappa0_(ct.kappa0_), n0_(ct.n0_), Tref_(ct.Tref_) @@ -70,8 +70,8 @@ Foam::exponentialSolidTransport<Thermo>::New // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -template<class thermo> -inline Foam::scalar Foam::exponentialSolidTransport<thermo>::kappa +template<class Thermo> +inline Foam::scalar Foam::exponentialSolidTransport<Thermo>::kappa ( const scalar p, const scalar T ) const @@ -80,8 +80,8 @@ inline Foam::scalar Foam::exponentialSolidTransport<thermo>::kappa } -template<class thermo> -inline Foam::vector Foam::exponentialSolidTransport<thermo>::Kappa +template<class Thermo> +inline Foam::vector Foam::exponentialSolidTransport<Thermo>::Kappa ( const scalar p, const scalar T ) const @@ -91,13 +91,13 @@ inline Foam::vector Foam::exponentialSolidTransport<thermo>::Kappa } -template<class thermo> -inline Foam::scalar Foam::exponentialSolidTransport<thermo>:: +template<class Thermo> +inline Foam::scalar Foam::exponentialSolidTransport<Thermo>:: mu(const scalar p, const scalar T) const { notImplemented ( - "Foam::scalar Foam::exponentialSolidTransport<thermo>mu::" + "Foam::scalar Foam::exponentialSolidTransport<Thermo>mu::" "(" " const scalar p, const scalar T" ") const" @@ -106,8 +106,8 @@ mu(const scalar p, const scalar T) const } -template<class thermo> -inline Foam::scalar Foam::exponentialSolidTransport<thermo>:: +template<class Thermo> +inline Foam::scalar Foam::exponentialSolidTransport<Thermo>:: alphah(const scalar p, const scalar T) const { return kappa(p, T)/this->Cpv(p, T); @@ -116,33 +116,28 @@ alphah(const scalar p, const scalar T) const // * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // -template<class thermo> -inline Foam::exponentialSolidTransport<thermo>& -Foam::exponentialSolidTransport<thermo>::operator= +template<class Thermo> +inline Foam::exponentialSolidTransport<Thermo>& +Foam::exponentialSolidTransport<Thermo>::operator= ( - const exponentialSolidTransport<thermo>& ct + const exponentialSolidTransport<Thermo>& ct ) { - //thermo::operator=(ct); - kappa0_ = ct.kappa0_; n0_ = ct.n0_; Tref_ = ct.Tref_; - return *this; } -template<class thermo> -inline void Foam::exponentialSolidTransport<thermo>::operator+= +template<class Thermo> +inline void Foam::exponentialSolidTransport<Thermo>::operator+= ( - const exponentialSolidTransport<thermo>& ct + const exponentialSolidTransport<Thermo>& ct ) { scalar molr1 = this->nMoles(); - //thermo::operator+=(ct); - molr1 /= this->nMoles(); scalar molr2 = ct.nMoles()/this->nMoles(); @@ -152,16 +147,14 @@ inline void Foam::exponentialSolidTransport<thermo>::operator+= } -template<class thermo> -inline void Foam::exponentialSolidTransport<thermo>::operator-= +template<class Thermo> +inline void Foam::exponentialSolidTransport<Thermo>::operator-= ( - const exponentialSolidTransport<thermo>& ct + const exponentialSolidTransport<Thermo>& ct ) { scalar molr1 = this->nMoles(); - //thermo::operator-=(ct); - molr1 /= this->nMoles(); scalar molr2 = ct.nMoles()/this->nMoles(); @@ -173,16 +166,16 @@ inline void Foam::exponentialSolidTransport<thermo>::operator-= // * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // -template<class thermo> -inline Foam::exponentialSolidTransport<thermo> Foam::operator* +template<class Thermo> +inline Foam::exponentialSolidTransport<Thermo> Foam::operator* ( const scalar s, - const exponentialSolidTransport<thermo>& ct + const exponentialSolidTransport<Thermo>& ct ) { - return exponentialSolidTransport<thermo> + return exponentialSolidTransport<Thermo> ( - s*static_cast<const thermo&>(ct), + s*static_cast<const Thermo&>(ct), ct.kappa0_, ct.n0_, ct.Tref_ diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.C b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.C new file mode 100644 index 0000000000000000000000000000000000000000..e43b30a2e8997156f0b8a47575f8afa94a1340dd --- /dev/null +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.C @@ -0,0 +1,105 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 "polynomialSolidTransport.H" +#include "IOstreams.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Thermo, int PolySize> +Foam::polynomialSolidTransport<Thermo, PolySize>::polynomialSolidTransport +( + Istream& is +) +: + Thermo(is), + kappaCoeffs_("kappaCoeffs<" + Foam::name(PolySize) + '>', is) +{ +} + + +template<class Thermo, int PolySize> +Foam::polynomialSolidTransport<Thermo, PolySize>::polynomialSolidTransport +( + const dictionary& dict +) +: + Thermo(dict), + kappaCoeffs_ + ( + dict.subDict("transport").lookup + ( + "kappaCoeffs<" + Foam::name(PolySize) + '>' + ) + ) +{ +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Thermo, int PolySize> +void Foam::polynomialSolidTransport<Thermo, PolySize>::write(Ostream& os) const +{ + Thermo::write(os); + + dictionary dict("transport"); + + dict.add + ( + word("kappaCoeffs<" + Foam::name(PolySize) + '>'), + kappaCoeffs_ + ); + os << indent << dict.dictName() << dict; +} + + +// * * * * * * * * * * * * * * * IOstream Operators * * * * * * * * * * * * // + +template<class Thermo, int PolySize> +Foam::Ostream& Foam::operator<< +( + Ostream& os, + const polynomialSolidTransport<Thermo, PolySize>& pt +) +{ + os << static_cast<const Thermo&>(pt) << tab + << "kappaCoeffs<" << Foam::name(PolySize) << '>' << tab + << pt.kappaCoeffs_; + + os.check + ( + "Ostream& operator<<" + "(" + "Ostream&, " + "const polynomialSolidTransport<Thermo, PolySize>&" + ")" + ); + + return os; +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H new file mode 100644 index 0000000000000000000000000000000000000000..90a9e52f6af3b026a42d620e052c5da5dc973abf --- /dev/null +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransport.H @@ -0,0 +1,237 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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::polynomialSolidTransport + +Description + Transport package using polynomial functions for solid kappa + +SourceFiles + polynomialSolidTransportI.H + polynomialSolidTransport.C + +\*---------------------------------------------------------------------------*/ + +#ifndef polynomialSolidTransport_H +#define polynomialSolidTransport_H + +#include "Polynomial.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +// Forward declaration of friend functions and operators + +template<class Thermo, int PolySize> class polynomialSolidTransport; + +template<class Thermo, int PolySize> +inline polynomialSolidTransport<Thermo, PolySize> operator+ +( + const polynomialSolidTransport<Thermo, PolySize>&, + const polynomialSolidTransport<Thermo, PolySize>& +); + +template<class Thermo, int PolySize> +inline polynomialSolidTransport<Thermo, PolySize> operator- +( + const polynomialSolidTransport<Thermo, PolySize>&, + const polynomialSolidTransport<Thermo, PolySize>& +); + +template<class Thermo, int PolySize> +inline polynomialSolidTransport<Thermo, PolySize> operator* +( + const scalar, + const polynomialSolidTransport<Thermo, PolySize>& +); + +template<class Thermo, int PolySize> +inline polynomialSolidTransport<Thermo, PolySize> operator== +( + const polynomialSolidTransport<Thermo, PolySize>&, + const polynomialSolidTransport<Thermo, PolySize>& +); + +template<class Thermo, int PolySize> +Ostream& operator<< +( + Ostream&, + const polynomialSolidTransport<Thermo, PolySize>& +); + + +/*---------------------------------------------------------------------------*\ + Class polynomialSolidTransport Declaration +\*---------------------------------------------------------------------------*/ + +template<class Thermo, int PolySize=8> +class polynomialSolidTransport +: + public Thermo +{ + // Private data + + //- Thermal conductivity polynomial coefficients + // Note: input in [W/m/K] + Polynomial<PolySize> kappaCoeffs_; + + + // Private Member Functions + + //- Construct from components + inline polynomialSolidTransport + ( + const Thermo& t, + const Polynomial<PolySize>& kappaPoly + ); + + +public: + + // Constructors + + //- Construct copy + inline polynomialSolidTransport(const polynomialSolidTransport&); + + //- Construct as named copy + inline polynomialSolidTransport + ( + const word&, + const polynomialSolidTransport& + ); + + //- Construct from Istream + polynomialSolidTransport(Istream& is); + + //- Construct from dictionary + polynomialSolidTransport(const dictionary& dict); + + //- Construct and return a clone + inline autoPtr<polynomialSolidTransport> clone() const; + + // Selector from Istream + inline static autoPtr<polynomialSolidTransport> New(Istream& is); + + // Selector from dictionary + inline static autoPtr<polynomialSolidTransport> New + ( + const dictionary&dict + ); + + + // Member functions + + //- Return the instantiated type name + static word typeName() + { + return "polynomial<" + Thermo::typeName() + '>'; + } + + //- Is the thermal conductivity isotropic + static const bool isotropic = true; + + //- Dynamic viscosity [kg/ms] + inline scalar mu(const scalar p, const scalar T) const; + + //- Thermal conductivity [W/mK] + inline scalar kappa(const scalar p, const scalar T) const; + + //- Thermal conductivity [W/mK] + inline vector Kappa(const scalar p, const scalar T) const; + + //- Thermal diffusivity of enthalpy [kg/ms] + inline scalar alphah(const scalar p, const scalar T) const; + + + //- Write to Ostream + void write(Ostream& os) const; + + + // Member operators + + inline polynomialSolidTransport& operator= + ( + const polynomialSolidTransport& + ); + inline void operator+=(const polynomialSolidTransport&); + inline void operator-=(const polynomialSolidTransport&); + inline void operator*=(const scalar); + + + // Friend operators + + friend polynomialSolidTransport operator+ <Thermo, PolySize> + ( + const polynomialSolidTransport&, + const polynomialSolidTransport& + ); + + friend polynomialSolidTransport operator- <Thermo, PolySize> + ( + const polynomialSolidTransport&, + const polynomialSolidTransport& + ); + + friend polynomialSolidTransport operator* <Thermo, PolySize> + ( + const scalar, + const polynomialSolidTransport& + ); + + friend polynomialSolidTransport operator== <Thermo, PolySize> + ( + const polynomialSolidTransport&, + const polynomialSolidTransport& + ); + + + // Ostream Operator + + friend Ostream& operator<< <Thermo, PolySize> + ( + Ostream&, + const polynomialSolidTransport& + ); +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "polynomialSolidTransportI.H" + +#ifdef NoRepository +# include "polynomialSolidTransport.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H new file mode 100644 index 0000000000000000000000000000000000000000..51dda6ba5780187134d048f8de088469af454e74 --- /dev/null +++ b/src/thermophysicalModels/solidSpecie/transport/polynomial/polynomialSolidTransportI.H @@ -0,0 +1,289 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2013 OpenFOAM Foundation + \\/ 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 "specie.H" + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +template<class Thermo, int PolySize> +inline Foam::polynomialSolidTransport<Thermo, PolySize>:: +polynomialSolidTransport +( + const polynomialSolidTransport& pt +) +: + Thermo(pt), + kappaCoeffs_(pt.kappaCoeffs_) +{} + + +template<class Thermo, int PolySize> +inline Foam::polynomialSolidTransport<Thermo, PolySize>:: +polynomialSolidTransport +( + const Thermo& t, + const Polynomial<PolySize>& kappaCoeffs +) +: + Thermo(t), + kappaCoeffs_(kappaCoeffs) +{} + + +template<class Thermo, int PolySize> +inline Foam::polynomialSolidTransport<Thermo, PolySize>:: +polynomialSolidTransport +( + const word& name, + const polynomialSolidTransport& pt +) +: + Thermo(name, pt), + kappaCoeffs_(pt.kappaCoeffs_) +{} + + +template<class Thermo, int PolySize> +inline Foam::autoPtr<Foam::polynomialSolidTransport<Thermo, PolySize> > +Foam::polynomialSolidTransport<Thermo, PolySize>::clone() const +{ + return autoPtr<polynomialSolidTransport<Thermo, PolySize> > + ( + new polynomialSolidTransport<Thermo, PolySize>(*this) + ); +} + + +template<class Thermo, int PolySize> +inline Foam::autoPtr<Foam::polynomialSolidTransport<Thermo, PolySize> > +Foam::polynomialSolidTransport<Thermo, PolySize>::New(Istream& is) +{ + return autoPtr<polynomialSolidTransport<Thermo, PolySize> > + ( + new polynomialSolidTransport<Thermo, PolySize>(is) + ); +} + + +template<class Thermo, int PolySize> +inline Foam::autoPtr<Foam::polynomialSolidTransport<Thermo, PolySize> > +Foam::polynomialSolidTransport<Thermo, PolySize>::New(const dictionary& dict) +{ + return autoPtr<polynomialSolidTransport<Thermo, PolySize> > + ( + new polynomialSolidTransport<Thermo, PolySize>(dict) + ); +} + + +// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // + +template<class Thermo, int PolySize> +inline Foam::scalar Foam::polynomialSolidTransport<Thermo, PolySize>::mu +( + const scalar p, + const scalar T +) const +{ + notImplemented + ( + "Foam::scalar Foam::polynomialSolidTransport<thermo, PolySize>mu::" + "(" + " const scalar p, const scalar T" + ") const" + ); + return scalar(0); +} + + +template<class Thermo, int PolySize> +inline Foam::scalar Foam::polynomialSolidTransport<Thermo, PolySize>::kappa +( + const scalar p, + const scalar T +) const +{ + return kappaCoeffs_.value(T); +} + + +template<class Thermo, int PolySize> +inline Foam::vector Foam::polynomialSolidTransport<Thermo, PolySize>::Kappa +( + const scalar p, + const scalar T +) const +{ + const scalar kappa(kappaCoeffs_.value(T)); + return vector(kappa, kappa, kappa); +} + + +template<class Thermo, int PolySize> +inline Foam::scalar Foam::polynomialSolidTransport<Thermo, PolySize>::alphah +( + const scalar p, const scalar T +) const +{ + return kappa(p, T)/this->Cpv(p, T); +} + + +// * * * * * * * * * * * * * * * Member Operators * * * * * * * * * * * * * // + +template<class Thermo, int PolySize> +inline Foam::polynomialSolidTransport<Thermo, PolySize>& +Foam::polynomialSolidTransport<Thermo, PolySize>::operator= +( + const polynomialSolidTransport<Thermo, PolySize>& pt +) +{ + Thermo::operator=(pt); + + kappaCoeffs_ = pt.kappaCoeffs_; + + return *this; +} + + +template<class Thermo, int PolySize> +inline void Foam::polynomialSolidTransport<Thermo, PolySize>::operator+= +( + const polynomialSolidTransport<Thermo, PolySize>& pt +) +{ + scalar molr1 = this->nMoles(); + + Thermo::operator+=(pt); + + molr1 /= this->nMoles(); + scalar molr2 = pt.nMoles()/this->nMoles(); + + kappaCoeffs_ = molr1*kappaCoeffs_ + molr2*pt.kappaCoeffs_; +} + + +template<class Thermo, int PolySize> +inline void Foam::polynomialSolidTransport<Thermo, PolySize>::operator-= +( + const polynomialSolidTransport<Thermo, PolySize>& pt +) +{ + scalar molr1 = this->nMoles(); + + Thermo::operator-=(pt); + + molr1 /= this->nMoles(); + scalar molr2 = pt.nMoles()/this->nMoles(); + + kappaCoeffs_ = molr1*kappaCoeffs_ - molr2*pt.kappaCoeffs_; +} + + +template<class Thermo, int PolySize> +inline void Foam::polynomialSolidTransport<Thermo, PolySize>::operator*= +( + const scalar s +) +{ + Thermo::operator*=(s); +} + + +// * * * * * * * * * * * * * * * Friend Operators * * * * * * * * * * * * * // + +template<class Thermo, int PolySize> +inline Foam::polynomialSolidTransport<Thermo, PolySize> Foam::operator+ +( + const polynomialSolidTransport<Thermo, PolySize>& pt1, + const polynomialSolidTransport<Thermo, PolySize>& pt2 +) +{ + Thermo t + ( + static_cast<const Thermo&>(pt1) + static_cast<const Thermo&>(pt2) + ); + + scalar molr1 = pt1.nMoles()/t.nMoles(); + scalar molr2 = pt2.nMoles()/t.nMoles(); + + return polynomialSolidTransport<Thermo, PolySize> + ( + t, + molr1*pt1.kappaCoeffs_ + molr2*pt2.kappaCoeffs_ + ); +} + + +template<class Thermo, int PolySize> +inline Foam::polynomialSolidTransport<Thermo, PolySize> Foam::operator- +( + const polynomialSolidTransport<Thermo, PolySize>& pt1, + const polynomialSolidTransport<Thermo, PolySize>& pt2 +) +{ + Thermo t + ( + static_cast<const Thermo&>(pt1) - static_cast<const Thermo&>(pt2) + ); + + scalar molr1 = pt1.nMoles()/t.nMoles(); + scalar molr2 = pt2.nMoles()/t.nMoles(); + + return polynomialSolidTransport<Thermo, PolySize> + ( + t, + molr1*pt1.kappaCoeffs_ - molr2*pt2.kappaCoeffs_ + ); +} + + +template<class Thermo, int PolySize> +inline Foam::polynomialSolidTransport<Thermo, PolySize> Foam::operator* +( + const scalar s, + const polynomialSolidTransport<Thermo, PolySize>& pt +) +{ + return polynomialSolidTransport<Thermo, PolySize> + ( + s*static_cast<const Thermo&>(pt), + pt.kappaCoeffs_ + ); +} + + +template<class Thermo, int PolySize> +inline Foam::polynomialSolidTransport<Thermo, PolySize> Foam::operator== +( + const polynomialSolidTransport<Thermo, PolySize>& pt1, + const polynomialSolidTransport<Thermo, PolySize>& pt2 +) +{ + return pt2 - pt1; +} + + +// ************************************************************************* // diff --git a/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H b/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H index 85000a3c108f822a722ad1c3553710380981d341..5193a4b9deef4e3d95b10f06d9231f625fb46e72 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H +++ b/src/thermophysicalModels/solidThermo/solidThermo/makeSolidThermo.H @@ -103,6 +103,58 @@ addToRunTimeSelectionTable \ ); + +#define makeSolidThermoPhysicsType(BaseThermo,Cthermo,Mixture,SolidPhysicsType)\ + \ + \ + \ +typedef \ + heThermo \ + < \ + BaseThermo, \ + Mixture<SolidPhysicsType> \ + > heThermo##Mixture##SolidPhysicsType; \ + \ +typedef \ + Cthermo \ + < \ + BaseThermo, \ + Mixture<SolidPhysicsType> \ + > Cthermo##Mixture##SolidPhysicsType; \ + \ + \ +defineTemplateTypeNameAndDebugWithName \ +( \ + Cthermo##Mixture##SolidPhysicsType, \ + ( \ + #Cthermo"<"#Mixture"<" \ + + SolidPhysicsType::typeName() \ + + ">>" \ + ).c_str(), \ + 0 \ +); \ + \ + \ +addToRunTimeSelectionTable \ +( \ + basicThermo, \ + Cthermo##Mixture##SolidPhysicsType, \ + fvMesh \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + BaseThermo, \ + Cthermo##Mixture##SolidPhysicsType, \ + fvMesh \ +); \ + \ +addToRunTimeSelectionTable \ +( \ + BaseThermo, \ + Cthermo##Mixture##SolidPhysicsType, \ + dictionary \ +); // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #endif diff --git a/src/thermophysicalModels/solidThermo/solidThermo/solidThermos.C b/src/thermophysicalModels/solidThermo/solidThermo/solidThermos.C index 6814431fecc1757f1717582490b9d258a247eee6..020dbfda9240f32fe070cd56bbb796747b5628d0 100644 --- a/src/thermophysicalModels/solidThermo/solidThermo/solidThermos.C +++ b/src/thermophysicalModels/solidThermo/solidThermo/solidThermos.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -31,14 +31,17 @@ License #include "rhoConst.H" #include "hConstThermo.H" #include "hExponentialThermo.H" +#include "hPolynomialThermo.H" #include "constIsoSolidTransport.H" #include "constAnIsoSolidTransport.H" #include "exponentialSolidTransport.H" +#include "polynomialSolidTransport.H" #include "pureMixture.H" #include "sensibleEnthalpy.H" #include "sensibleInternalEnergy.H" #include "thermo.H" +#include "solidThermoPhysicsTypes.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -83,6 +86,14 @@ makeSolidThermo specie ); +makeSolidThermoPhysicsType +( + solidThermo, + heSolidThermo, + pureMixture, + hTransportThermoPoly8SolidThermoPhysics +); + // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // } // End namespace Foam diff --git a/src/thermophysicalModels/specie/transport/const/constTransportI.H b/src/thermophysicalModels/specie/transport/const/constTransportI.H index 98ce21d97ec0eb030cb5f74ca2e8852c9f2d8ce2..9949fddae4e5fc6804e884ea6c8fb717e062154e 100644 --- a/src/thermophysicalModels/specie/transport/const/constTransportI.H +++ b/src/thermophysicalModels/specie/transport/const/constTransportI.H @@ -111,7 +111,7 @@ inline Foam::scalar Foam::constTransport<Thermo>::kappa const scalar T ) const { - return this->Cp(p, T)*mu(p, T)*rPr_; + return this->Cpv(p, T)*mu(p, T)*rPr_; } diff --git a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H index a2ff3f4d22f38303935f640ccd60ef8d764e08a2..9a5ad80d5ea693a3da3d9184ae0e852de812af63 100644 --- a/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H +++ b/src/thermophysicalModels/specie/transport/polynomial/polynomialTransportI.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -129,7 +129,7 @@ inline Foam::scalar Foam::polynomialTransport<Thermo, PolySize>::alphah const scalar p, const scalar T ) const { - return kappa(p, T)/this->Cp(p, T); + return kappa(p, T)/this->Cpv(p, T); } diff --git a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H index 7a0845cfb52eaf6280a7df4c7286da00c12a0de5..01668dda17336f3b6c61403e87a5809379130a3d 100644 --- a/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H +++ b/src/thermophysicalModels/specie/transport/sutherland/sutherlandTransportI.H @@ -158,7 +158,7 @@ inline Foam::scalar Foam::sutherlandTransport<Thermo>::alphah ) const { - return kappa(p, T)/this->Cp(p, T); + return kappa(p, T)/this->Cpv(p, T); } diff --git a/src/triSurface/triSurface/triSurface.C b/src/triSurface/triSurface/triSurface.C index e0e6c265ff748040dc8f5f47d539965c66e890c3..258958ca69b45e0188e96b0c4079238250747fea 100644 --- a/src/triSurface/triSurface/triSurface.C +++ b/src/triSurface/triSurface/triSurface.C @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -494,6 +494,7 @@ void Foam::triSurface::write ( "triSurface::write(const fileName&, const word&, const bool)" ) << "unknown file extension " << ext + << " for file " << name << ". Supported extensions are '.ftr', '.stl', '.stlb', " << "'.gts', '.obj', '.vtk'" << ", '.off', '.dx', '.smesh', '.ac' and '.tri'" diff --git a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H index ba7fd1be491941da8f63cd33a60c46d24bf5e6b8..e80d0948447aa8af403475977d32b509e0573bb6 100644 --- a/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H +++ b/src/turbulenceModels/LES/LESdeltas/smoothDelta/smoothDelta.H @@ -80,7 +80,7 @@ public: //- Construct null inline deltaData(); - //- Construct from origin, yStar, distance + //- Construct from delta value inline deltaData(const scalar delta); diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H index c2f7cf178fef5fb8fe29aec389f93783856666be..bac27237c3828f02dad9e3e09aa516b5163d418d 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonLowReWallFunction/epsilonLowReWallFunctionFvPatchScalarField.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::iompressible::epsilonLowReWallFunctionFvPatchScalarField + Foam::compressible::epsilonLowReWallFunctionFvPatchScalarField Group grpCmpWallFunctions diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 5e78e48c9732566b7e4f029181e577a2dd4c25ad..90915d25eb4d700859d59d69cf33c4fdd23a9827 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() forAll(epsilonPatches, i) { label patchI = epsilonPatches[i]; - const fvPatchField& wf = weights.boundaryField()[patchI]; + const fvPatchScalarField& wf = weights.boundaryField()[patchI]; cornerWeights_[patchI] = 1.0/wf.patchInternalField(); } @@ -237,9 +237,9 @@ void epsilonWallFunctionFvPatchScalarField::calculate scalar w = cornerWeights[faceI]; - epsilon[cellI] = w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]); + epsilon[cellI] += w*Cmu75*pow(k[cellI], 1.5)/(kappa_*y[faceI]); - G[cellI] = + G[cellI] += w *(mutw[faceI] + muw[faceI]) *magGradUw[faceI] @@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField()); + scalarField& epsilonf = *this; + // only set the values if the weights are < 1 - tolerance forAll(weights, faceI) { @@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI]; + epsilonf[faceI] = epsilon[cellI]; } } diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H index 12beef633820fcb4ec2e39e8044e6806dc3cba26..ea1aaa184fd0d2406bfaae77c373d612cd31367e 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/mutWallFunctions/mutURoughWallFunction/mutURoughWallFunctionFvPatchScalarField.H @@ -2,7 +2,7 @@ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | - \\ / A nd | Copyright (C) 2011-2012 OpenFOAM Foundation + \\ / A nd | Copyright (C) 2011-2013 OpenFOAM Foundation \\/ M anipulation | ------------------------------------------------------------------------------- License @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::compressible:::mutURoughWallFunctionFvPatchScalarField + Foam::compressible::mutURoughWallFunctionFvPatchScalarField Group grpCmpWallFunctions diff --git a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index fff165e15e3511d125b56fdc971b231e6631c335..d0d9865c5c9468cdac1a02d562f97cb802a8e5d3 100644 --- a/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/compressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() forAll(omegaPatches, i) { label patchI = omegaPatches[i]; - const fvPatchField& wf = weights.boundaryField()[patchI]; + const fvPatchScalarField& wf = weights.boundaryField()[patchI]; cornerWeights_[patchI] = 1.0/wf.patchInternalField(); } @@ -244,9 +244,9 @@ void omegaWallFunctionFvPatchScalarField::calculate scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]); - omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog)); + omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); - G[cellI] = + G[cellI] += w *(mutw[faceI] + muw[faceI]) *magGradUw[faceI] @@ -481,6 +481,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs FieldType& omega = const_cast<FieldType&>(dimensionedInternalField()); + scalarField& omegaf = *this; + // only set the values if the weights are < 1 - tolerance forAll(weights, faceI) { @@ -492,6 +494,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI]; + omegaf[faceI] = omega[cellI]; } } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C index 7fb6fcfb96e1ebe727a59ffff566480f1f347d7c..da2913f3044d915b3a32f93618184b88ef1287eb 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/epsilonWallFunctions/epsilonWallFunction/epsilonWallFunctionFvPatchScalarField.C @@ -141,7 +141,7 @@ void epsilonWallFunctionFvPatchScalarField::createAveragingWeights() forAll(epsilonPatches, i) { label patchI = epsilonPatches[i]; - const fvPatchField& wf = weights.boundaryField()[patchI]; + const fvPatchScalarField& wf = weights.boundaryField()[patchI]; cornerWeights_[patchI] = 1.0/wf.patchInternalField(); } @@ -464,6 +464,8 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs FieldType& epsilon = const_cast<FieldType&>(dimensionedInternalField()); + scalarField& epsilonf = *this; + // only set the values if the weights are < 1 - tolerance forAll(weights, faceI) { @@ -475,6 +477,7 @@ void epsilonWallFunctionFvPatchScalarField::updateCoeffs G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; epsilon[cellI] = w*epsilon[cellI] + (1.0 - w)*epsilon0[cellI]; + epsilonf[faceI] = epsilon[cellI]; } } diff --git a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C index 554c18542d9fd800d7d52ac0fd4892d4e8ec2e91..9aec38bc386a19e4e49bdf805aaf612052013b4f 100644 --- a/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C +++ b/src/turbulenceModels/incompressible/RAS/derivedFvPatchFields/wallFunctions/omegaWallFunctions/omegaWallFunction/omegaWallFunctionFvPatchScalarField.C @@ -143,7 +143,7 @@ void omegaWallFunctionFvPatchScalarField::createAveragingWeights() forAll(omegaPatches, i) { label patchI = omegaPatches[i]; - const fvPatchField& wf = weights.boundaryField()[patchI]; + const fvPatchScalarField& wf = weights.boundaryField()[patchI]; cornerWeights_[patchI] = 1.0/wf.patchInternalField(); } @@ -242,9 +242,9 @@ void omegaWallFunctionFvPatchScalarField::calculate scalar omegaLog = sqrt(k[cellI])/(Cmu25*kappa_*y[faceI]); - omega[cellI] = w*sqrt(sqr(omegaVis) + sqr(omegaLog)); + omega[cellI] += w*sqrt(sqr(omegaVis) + sqr(omegaLog)); - G[cellI] = + G[cellI] += w *(nutw[faceI] + nuw[faceI]) *magGradUw[faceI] @@ -479,6 +479,8 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs FieldType& omega = const_cast<FieldType&>(dimensionedInternalField()); + scalarField& omegaf = *this; + // only set the values if the weights are < 1 - tolerance forAll(weights, faceI) { @@ -490,6 +492,7 @@ void omegaWallFunctionFvPatchScalarField::updateCoeffs G[cellI] = w*G[cellI] + (1.0 - w)*G0[cellI]; omega[cellI] = w*omega[cellI] + (1.0 - w)*omega0[cellI]; + omegaf[faceI] = omega[cellI]; } } diff --git a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh index 26fa39b2553d6f9632bba0bfd73a4ec90aa02ca3..9fa4a5a2c89276d1c85bae95012c74d2463039f4 100644 --- a/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh +++ b/tutorials/heatTransfer/buoyantSimpleFoam/circuitBoardCooling/0.org/p_rgh @@ -38,7 +38,7 @@ boundaryField } outlet { - type fixedFluxPressure; + type fixedValue; value $internalField; } fixedWalls diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/U b/tutorials/incompressible/simpleFoam/motorBike/0.org/U index 635097121830b8f88d0a5b59d3c30072c18bc1f4..fee3ec88b81f8729dc0e6b67a07a3385f0e525fc 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/U +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/U @@ -41,7 +41,7 @@ boundaryField value $internalField; } - "motorBike_.*" + motorBikeGroup { type fixedValue; value uniform (0 0 0); diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/k b/tutorials/incompressible/simpleFoam/motorBike/0.org/k index 834d2ad52c2afbf990bab910a1b7884eaaead3f3..301f8b579c183903925c73cd09dbb824793e3233 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/k +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/k @@ -41,7 +41,7 @@ boundaryField value $internalField; } - "motorBike_.*" + motorBikeGroup { type kqRWallFunction; value $internalField; diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/nut b/tutorials/incompressible/simpleFoam/motorBike/0.org/nut index 999d0b331ea7193114a3bfd0fe39a0b9dd7c2375..c940f6b2d626139de3f580952b9a06b9c408d418 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/nut +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/nut @@ -54,7 +54,7 @@ boundaryField value uniform 0; } - "motorBike_.*" + motorBikeGroup { type nutkWallFunction; value uniform 0; diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/omega b/tutorials/incompressible/simpleFoam/motorBike/0.org/omega index 5362d6c44e1c87b97d88cd93c1e040724ab07674..7eff6c73556546386383963a0bcb40c7519b097e 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/omega +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/omega @@ -40,7 +40,7 @@ boundaryField value $internalField; } - "motorBike_.*" + motorBikeGroup { type omegaWallFunction; value $internalField; diff --git a/tutorials/incompressible/simpleFoam/motorBike/0.org/p b/tutorials/incompressible/simpleFoam/motorBike/0.org/p index e6eb255c41d060020335b314f126a956eec66256..419e1a85d8844d6a27ad3ec5737f231a55d2a748 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/0.org/p +++ b/tutorials/incompressible/simpleFoam/motorBike/0.org/p @@ -41,7 +41,7 @@ boundaryField type zeroGradient; } - "motorBike_.*" + motorBikeGroup { type zeroGradient; } diff --git a/tutorials/incompressible/simpleFoam/motorBike/Allclean b/tutorials/incompressible/simpleFoam/motorBike/Allclean index af2c672ef80199607ae5e95c9ffdce80e8425776..25434c9d020ccd96ae202e35e0dc296d3bc685c8 100755 --- a/tutorials/incompressible/simpleFoam/motorBike/Allclean +++ b/tutorials/incompressible/simpleFoam/motorBike/Allclean @@ -3,8 +3,10 @@ # Source tutorial clean functions . $WM_PROJECT_DIR/bin/tools/CleanFunctions -# remove surface +# remove surface and features \rm -f constant/triSurface/motorBike.obj.gz +\rm -rf constant/extendedFeatureEdgeMesh/ +\rm -f constant/triSurface/motorBike.eMesh rm -rf 0 > /dev/null 2>&1 diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs b/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs index e4977a21d67e8fc508c98229db21659e0d4876cf..3012c35b321d732b92bda85c408192a951682c42 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs +++ b/tutorials/incompressible/simpleFoam/motorBike/system/forceCoeffs @@ -12,12 +12,11 @@ forceCoeffs1 functionObjectLibs ( "libforces.so" ); - outputControl timeStep; - outputInterval 1; + outputControl outputTime; log yes; - patches ( "motorBike.*" ); + patches ( motorBikeGroup ); pName p; UName U; rhoName rhoInf; // Indicates incompressible @@ -31,6 +30,7 @@ forceCoeffs1 lRef 1.42; // Wheelbase length Aref 0.75; // Estimated +/* - Uncomment to have forceCoeffs calculated in 20 bins binData { nBin 20; // output data into 20 bins @@ -38,6 +38,7 @@ forceCoeffs1 format gnuplot; cumulative yes; } +*/ } diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes index 36a6021c97a5b210efcb5206792ea644ef62b423..c0f1506a7ce5fce2b53f6dde09e233def2088830 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes +++ b/tutorials/incompressible/simpleFoam/motorBike/system/fvSchemes @@ -22,6 +22,7 @@ ddtSchemes gradSchemes { default Gauss linear; + grad(U) cellLimited Gauss linear 1; } divSchemes diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution b/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution index 5037a3c14f6efef9376e464f2694dcbaead87e6b..55c9820427db82757efd4a3df9fb7909bdc31cb7 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution +++ b/tutorials/incompressible/simpleFoam/motorBike/system/fvSolution @@ -20,7 +20,7 @@ solvers { solver GAMG; tolerance 1e-7; - relTol 0.1; + relTol 0.01; smoother GaussSeidel; nPreSweeps 0; nPostSweeps 2; diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/meshQualityDict b/tutorials/incompressible/simpleFoam/motorBike/system/meshQualityDict new file mode 100644 index 0000000000000000000000000000000000000000..e1a0539abaef60f66d40ee7397e4fc0403fc15af --- /dev/null +++ b/tutorials/incompressible/simpleFoam/motorBike/system/meshQualityDict @@ -0,0 +1,65 @@ +/*--------------------------------*- 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 dictionary; + object meshQualityDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +//- 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 quality of the tet formed by the face-centre +// and variable base point minimum decomposition triangles and +// the cell centre. This has to be a positive number for tracking +// to work. Set to very negative number (e.g. -1E30) to +// disable. +// <0 = inside out tet, +// 0 = flat tet +// 1 = regular tet +minTetQuality 1e-30; + +//- 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.02; + +//- minimum normalised cell determinant +//- 1 = hex, <= 0 = folded or flattened illegal cell +minDeterminant 0.001; + +//- minFaceWeight (0 -> 0.5) +minFaceWeight 0.02; + +//- minVolRatio (0 -> 1) +minVolRatio 0.01; + +//must be >0 for Fluent compatibility +minTriangleTwist -1; + + +// ************************************************************************* // diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict index ebed3bc292960c9266648dc86bea82d3bb82faf9..00cc7b66ef59360041472923914717ec2b2d7712 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict +++ b/tutorials/incompressible/simpleFoam/motorBike/system/snappyHexMeshDict @@ -92,7 +92,7 @@ castellatedMeshControls ( { file "motorBike.eMesh"; - level 0; + level 6; } ); @@ -119,7 +119,7 @@ castellatedMeshControls patchInfo { type wall; - inGroups (motorBike); + inGroups (motorBikeGroup); } } } @@ -180,10 +180,10 @@ snapControls //- 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; + tolerance 2.0; //- Number of mesh displacement relaxation iterations. - nSolveIter 0; + nSolveIter 30; //- Maximum number of snapping relaxation iterations. Should stop // before upon reaching a correct mesh. @@ -193,14 +193,14 @@ snapControls //- Number of feature edge snapping iterations. // Leave out altogether to disable. - nFeatureSnapIter 0; + nFeatureSnapIter 10; //- Detect (geometric only) features by sampling the surface // (default=false). implicitFeatureSnap false; //- Use castellatedMeshControls::features (default = true) - explicitFeatureSnap false; + explicitFeatureSnap true; //- Detect points on multiple surfaces (only for explicitFeatureSnap) multiRegionFeatureSnap false; @@ -297,52 +297,7 @@ addLayersControls // 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 quality of the tet formed by the face-centre - // and variable base point minimum decomposition triangles and - // the cell centre. This has to be a positive number for tracking - // to work. Set to very negative number (e.g. -1E30) to - // disable. - // <0 = inside out tet, - // 0 = flat tet - // 1 = regular tet - minTetQuality 1e-30; - - //- 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.02; - - //- minimum normalised cell determinant - //- 1 = hex, <= 0 = folded or flattened illegal cell - minDeterminant 0.001; - - //- minFaceWeight (0 -> 0.5) - minFaceWeight 0.02; - - //- minVolRatio (0 -> 1) - minVolRatio 0.01; - - //must be >0 for Fluent compatibility - minTriangleTwist -1; + #include "meshQualityDict" // Advanced diff --git a/tutorials/incompressible/simpleFoam/motorBike/system/wallBoundedStreamLines b/tutorials/incompressible/simpleFoam/motorBike/system/wallBoundedStreamLines index e3e050e2b92f8960bc77ae6e56aa7e68cb08a8ff..c071607c9ac4ed383efae7560fe8a56383d3bee9 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/system/wallBoundedStreamLines +++ b/tutorials/incompressible/simpleFoam/motorBike/system/wallBoundedStreamLines @@ -16,7 +16,6 @@ near // Output every outputControl outputTime; - //outputInterval 1; // Fields to be sampled. Per field original name and mapped field to // create. @@ -27,7 +26,7 @@ near ); // Patches/groups to sample (regular expressions) - patches (motorBike); + patches (motorBikeGroup); // Distance to sample distance 0.001; @@ -42,7 +41,6 @@ wallBoundedStreamLines // Output every outputControl outputTime; - // outputInterval 10; setFormat vtk; //gnuplot; //xmgr; //raw; //jplot; @@ -87,7 +85,7 @@ wallBoundedStreamLines patchSeedCoeffs { type patchSeed; - patches (motorBike); + patches (motorBikeGroup); axis x; //distance; maxPoints 20000; } diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon b/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon index 15724a840fd98e470dba5398cf6ea664ed80f294..84e17340fa2865292135d3e52269fb8b2d4a834b 100644 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon +++ b/tutorials/incompressible/simpleFoam/pipeCyclic/0.org/epsilon @@ -40,7 +40,7 @@ boundaryField walls { type epsilonWallFunction; - value uniform 0; + value $internalField; } } diff --git a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary b/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary deleted file mode 100644 index 123fc6be271cf0b98d8ab3ac8dff9ed781fb9d26..0000000000000000000000000000000000000000 --- a/tutorials/incompressible/simpleFoam/pipeCyclic/constant/polyMesh/boundary +++ /dev/null @@ -1,64 +0,0 @@ -/*--------------------------------*- 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; -} -// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // - -5 -( - inlet - { - type patch; - nFaces 28; - startFace 4422; - } - outlet - { - type patch; - nFaces 28; - startFace 4450; - } - side1 - { - type cyclicAMI; - inGroups 1(cyclicAMI); - nFaces 400; - startFace 4478; - matchTolerance 0.0001; - transform rotational; - neighbourPatch side2; - rotationAxis (1 0 0); - rotationCentre (0 0 0); - } - side2 - { - type cyclicAMI; - inGroups 1(cyclicAMI); - nFaces 250; - startFace 4878; - matchTolerance 0.0001; - transform rotational; - neighbourPatch side1; - rotationAxis (1 0 0); - rotationCentre (0 0 0); - } - walls - { - type wall; - nFaces 250; - startFace 5128; - } -) - -// ************************************************************************* // diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/kinematicCloudProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/kinematicCloudProperties index 20eed6f6e0e785cd4e37eeb988c69c98396ada00..159b737d17d47fd5bf88055b4a4d843791836cba 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/kinematicCloudProperties +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperEmptying/constant/kinematicCloudProperties @@ -11,7 +11,7 @@ FoamFile format ascii; class dictionary; location "constant"; - object reactingCloud1Properties; + object kinematicCloudProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -48,8 +48,6 @@ constantProperties rho0 964; youngsModulus 6e8; poissonsRatio 0.35; - - constantVolume false; } @@ -66,18 +64,12 @@ subModels dispersionModel none; - patchInteractionModel standardWallInteraction; - - heatTransferModel none; - - stochasticCollisionModel none; + patchInteractionModel none; surfaceFilmModel none; collisionModel pairCollision; - radiation off; - pairCollisionCoeffs { // Maximum possible particle diameter expected at any time @@ -123,11 +115,6 @@ subModels } }; } - - standardWallInteractionCoeffs - { - type rebound; - } } diff --git a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/kinematicCloudProperties b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/kinematicCloudProperties index b24dcb63b23eba2f077124ac95e021fd7d0744a8..49458393ea6fb5b6755a4bf34826816045936ef9 100644 --- a/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/kinematicCloudProperties +++ b/tutorials/lagrangian/icoUncoupledKinematicParcelFoam/hopper/hopperInitialState/constant/kinematicCloudProperties @@ -11,7 +11,7 @@ FoamFile format ascii; class dictionary; location "constant"; - object reactingCloud1Properties; + object kinematicCloudProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // @@ -40,8 +40,6 @@ constantProperties rho0 964; youngsModulus 6e8; poissonsRatio 0.35; - - constantVolume false; } subModels @@ -76,18 +74,12 @@ subModels dispersionModel none; - patchInteractionModel standardWallInteraction; - - heatTransferModel none; - - stochasticCollisionModel none; + patchInteractionModel none; surfaceFilmModel none; collisionModel pairCollision; - radiation off; - pairCollisionCoeffs { // Maximum possible particle diameter expected at any time @@ -133,11 +125,6 @@ subModels } }; } - - standardWallInteractionCoeffs - { - type rebound; - } } diff --git a/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel b/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel index dcb5474b1367094e55d1255c6f107326161c988f..3113b19787164c7bc76f5c6d889b8eb45b971a5c 100755 --- a/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel +++ b/tutorials/mesh/foamyHexMesh/blob/Allrun-parallel @@ -10,8 +10,8 @@ nProc=$(getNumberOfProcessors) # copy flange surface from resources folder cp $FOAM_TUTORIALS/resources/geometry/blob.stl.gz constant/triSurface/ -runApplication blockMesh -runApplication decomposePar +runApplication blockMesh -region backgroundMeshDecomposition +runApplication decomposePar -region backgroundMeshDecomposition runParallel foamyHexMesh $nProc runParallel collapseEdges $nProc -latestTime -collapseFaces diff --git a/tutorials/mesh/foamyHexMesh/blob/constant/polyMesh/blockMeshDict b/tutorials/mesh/foamyHexMesh/blob/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict similarity index 100% rename from tutorials/mesh/foamyHexMesh/blob/constant/polyMesh/blockMeshDict rename to tutorials/mesh/foamyHexMesh/blob/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict diff --git a/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/decomposeParDict b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..3d3806e87382b1f4fef074e2aad6f535c98881b6 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/decomposeParDict @@ -0,0 +1,47 @@ +/*--------------------------------*- 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 dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 2; + +method scotch; +//method ptscotch; +// method hierarchical; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 1 1 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSchemes b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..288d536c8b0f5fc598f73b75a3b34168659b9df5 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSchemes @@ -0,0 +1 @@ +../fvSchemes \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSolution b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..4a4e96ba76f1b7aa611bd7956bfcaef773bbfa44 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/blob/system/backgroundMeshDecomposition/fvSolution @@ -0,0 +1 @@ +../fvSolution \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/flange/Allrun b/tutorials/mesh/foamyHexMesh/flange/Allrun index 69367821227af6ba001ff391eba732be3a307b70..fe467dd3c693fd25392ff9d6023fd3f90bca3007 100755 --- a/tutorials/mesh/foamyHexMesh/flange/Allrun +++ b/tutorials/mesh/foamyHexMesh/flange/Allrun @@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions +# copy flange surface from resources folder +cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/ + runApplication foamyHexMesh runApplication collapseEdges -latestTime -collapseFaces runApplication checkMesh -latestTime -allGeometry -allTopology diff --git a/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel b/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel index 4b56361f2d9bac69a74f91aab8abad788677c7f2..237296826d54b95fa01b1298bdc5425a333ca772 100755 --- a/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel +++ b/tutorials/mesh/foamyHexMesh/flange/Allrun-parallel @@ -7,13 +7,12 @@ cd ${0%/*} || exit 1 # run from this directory # Get the number of processors to run on from system/decomposeParDict nProc=$(getNumberOfProcessors) -# Create tight-fitting background mesh -runApplication blockMesh -runApplication topoSet -dict system/topoSetDict-background -mv log.topoSet log.topoSet.background -runApplication subsetMesh background -patch walls -overwrite +# copy flange surface from resources folder +cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/ -runApplication decomposePar +# Create tight-fitting background mesh +runApplication blockMesh -region backgroundMeshDecomposition +runApplication decomposePar -region backgroundMeshDecomposition runParallel foamyHexMesh $nProc runParallel collapseEdges $nProc -latestTime -collapseFaces diff --git a/tutorials/mesh/foamyHexMesh/flange/Alltest b/tutorials/mesh/foamyHexMesh/flange/Alltest index 87587982d81fbaabba544d3dec4b08b949a529dd..ee9a8862c705ebc496d7166887e7cc07d7f81eb5 100755 --- a/tutorials/mesh/foamyHexMesh/flange/Alltest +++ b/tutorials/mesh/foamyHexMesh/flange/Alltest @@ -4,6 +4,9 @@ cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions +# copy flange surface from resources folder +cp $FOAM_TUTORIALS/resources/geometry/flange.stl.gz constant/triSurface/ + # Create tight-fitting background mesh runApplication blockMesh runApplication foamyHexMesh @@ -16,4 +19,5 @@ system/collapseDict.org > system/collapseDict runApplication collapseEdges -latestTime -collapseFaces + # ----------------------------------------------------------------- end-of-file diff --git a/tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/blockMeshDict b/tutorials/mesh/foamyHexMesh/flange/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict similarity index 100% rename from tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/blockMeshDict rename to tutorials/mesh/foamyHexMesh/flange/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict diff --git a/tutorials/mesh/foamyHexMesh/flange/constant/triSurface/README b/tutorials/mesh/foamyHexMesh/flange/constant/triSurface/README new file mode 100644 index 0000000000000000000000000000000000000000..dbf3b73d5fcef61fd6dcf3c1225370b44a39bc00 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/flange/constant/triSurface/README @@ -0,0 +1,4 @@ +Folder to house tri-surfaces + +The Allrun script copies the surface from the $FOAM_TUTORIALS/resources/geometry +folder diff --git a/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/decomposeParDict b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..afb5d8a226cc699ab6db67b043e65ba01103f2d7 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/decomposeParDict @@ -0,0 +1,46 @@ +/*--------------------------------*- 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 dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +//method scotch; +method hierarchical; + +simpleCoeffs +{ + n ( 2 2 2 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 2 2 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSchemes b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..288d536c8b0f5fc598f73b75a3b34168659b9df5 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSchemes @@ -0,0 +1 @@ +../fvSchemes \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSolution b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..4a4e96ba76f1b7aa611bd7956bfcaef773bbfa44 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/flange/system/backgroundMeshDecomposition/fvSolution @@ -0,0 +1 @@ +../fvSolution \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/flange/system/foamyHexMeshDict b/tutorials/mesh/foamyHexMesh/flange/system/foamyHexMeshDict index 4ba0ceafe6b23def784a11e401c6ad18ca835525..cf6a3cafdf8619e9168ece23f461ae64be63f24e 100644 --- a/tutorials/mesh/foamyHexMesh/flange/system/foamyHexMeshDict +++ b/tutorials/mesh/foamyHexMesh/flange/system/foamyHexMeshDict @@ -22,7 +22,7 @@ FoamFile geometry { - flange.obj + flange.stl { name flange; type triSurfaceMesh; diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean b/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean new file mode 100755 index 0000000000000000000000000000000000000000..3b88829f540dcf87d48c1766f77359b8304e8b40 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allclean @@ -0,0 +1,11 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/CleanFunctions + +rm -r constant/internalDelaunayVertices constant/targetCellSize > /dev/null 2>&1 + +cleanCase + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun new file mode 100755 index 0000000000000000000000000000000000000000..865325d1b802fec1ab0e46aaaa2087d93715283e --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/Allrun @@ -0,0 +1,56 @@ +#!/bin/sh +cd ${0%/*} || exit 1 # run from this directory + +# Source tutorial run functions +. $WM_PROJECT_DIR/bin/tools/RunFunctions + +nProcs=$(getNumberOfProcessors) + +# copy flange surface from resources folder +cp $FOAM_TUTORIALS/resources/geometry/mixerVessel.tar.gz constant/triSurface/ +tar zxf constant/triSurface/mixerVessel.tar.gz -C constant/triSurface/rawSurfaces + +# Run the surface preparation script +./constant/triSurface/surfaceProcess.sh > log.surfaceProcess 2>&1 + +runApplication surfaceBooleanFeatures \ + intersection \ + constant/triSurface/vessel.stl \ + constant/triSurface/spargerShaft.stl -perturb + +mv log.surfaceBooleanFeatures log.surfaceBooleanFeatures.vessel_spargerShaft + +runApplication surfaceBooleanFeatures \ + intersection \ + constant/triSurface/vessel.stl \ + constant/triSurface/shaftStatic.stl -perturb + +mv log.surfaceBooleanFeatures log.surfaceBooleanFeatures.vessel_shaftStatic + +runApplication surfaceBooleanFeatures \ + intersection \ + constant/triSurface/spargerShaft.stl \ + constant/triSurface/spargerInlet.stl -perturb + +mv log.surfaceBooleanFeatures log.surfaceBooleanFeatures.spargerShaft_spargerInlet + +runApplication surfaceBooleanFeatures \ + intersection \ + constant/triSurface/stirrer.stl \ + constant/triSurface/shaftRotating.stl -perturb + +mv log.surfaceBooleanFeatures log.surfaceBooleanFeatures.stirrer_shaftRotating + +runApplication surfaceFeatureExtract + +runApplication blockMesh -region backgroundMeshDecomposition +runApplication decomposePar -region backgroundMeshDecomposition + +runParallel foamyHexMesh $nProcs + +runParallel collapseEdges $nProcs -collapseFaces -latestTime + +runParallel checkMesh $nProcs -latestTime -allTopology -allGeometry + + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict similarity index 54% rename from tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary rename to tutorials/mesh/foamyHexMesh/mixerVessel/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict index ce1bcc0d3a591dd8d2e80eb316f061cbb12fcb53..438af44eea739bb08530afa18e08574f906f8caa 100644 --- a/tutorials/incompressible/simpleFoam/motorBike/constant/polyMesh/boundary +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/backgroundMeshDecomposition/polyMesh/blockMeshDict @@ -9,44 +9,50 @@ FoamFile { version 2.0; format ascii; - class polyBoundaryMesh; - location "constant/polyMesh"; - object boundary; + class dictionary; + object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -5 +convertToMeters 1; + +vertices ( - frontAndBack - { - type patch; - nFaces 320; - startFace 3456; - } - inlet - { - type patch; - nFaces 64; - startFace 3776; - } - outlet - { - type patch; - nFaces 64; - startFace 3840; - } - lowerWall - { - type wall; - nFaces 160; - startFace 3904; - } - upperWall + ( -300 -300 -250) + ( 300 -300 -250) + ( 300 300 -250) + ( -300 300 -250) + ( -300 -300 1500) + ( 300 -300 1500) + ( 300 300 1500) + ( -300 300 1500) +); + +blocks +( + hex (0 1 2 3 4 5 6 7) (30 30 67) simpleGrading (1 1 1) +); + +edges +( +); + +boundary +( + allBoundary { - type patch; - nFaces 160; - startFace 4064; + type patch; + faces + ( + (3 7 6 2) + (0 4 7 3) + (2 6 5 1) + (1 5 4 0) + (0 3 2 1) + (4 5 6 7) + ); } -) +); + // ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/rawSurfaces/README b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/rawSurfaces/README new file mode 100644 index 0000000000000000000000000000000000000000..dbf3b73d5fcef61fd6dcf3c1225370b44a39bc00 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/rawSurfaces/README @@ -0,0 +1,4 @@ +Folder to house tri-surfaces + +The Allrun script copies the surface from the $FOAM_TUTORIALS/resources/geometry +folder diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/surfaceProcess.sh b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/surfaceProcess.sh new file mode 100755 index 0000000000000000000000000000000000000000..a061a5ba32d72efc1c8703d5041fa4786176e8ad --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/constant/triSurface/surfaceProcess.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +cd ${0%/*} || exit 1 # run from this directory + +#cp rawSurfaces/MRF.stl MRF.stl +#cp rawSurfaces/baffles.stl baffles.stl + +cp rawSurfaces/vessel.stl vessel.stl +cp rawSurfaces/sparger.stl sparger.stl +cp rawSurfaces/shaftRotating.stl shaftRotating.stl +cp rawSurfaces/shaftStatic.stl shaftStatic.stl +cp rawSurfaces/gasInlet.stl gasInlet.stl +cp rawSurfaces/stirrer.stl stirrer.stl + +# Vessel surface +surfaceAutoPatch vessel.stl vessel.stl 120 + +# Sparger +surfaceCheck sparger.stl +surfaceAdd gasInlet.stl sparger_0.obj spargerInlet.stl +surfaceConvert sparger_1.obj spargerShaft.stl +surfaceOrient -inside spargerInlet.stl "(-100 -50 500)" spargerInlet.stl +surfaceOrient -inside spargerShaft.stl "(-50 -20 -100)" spargerShaft.stl + +# Rotating shaft +surfaceOrient -inside shaftRotating.stl "(-100 -50 500)" shaftRotating.stl + +# Static shaft +surfaceOrient -inside shaftStatic.stl "(15 -200 1000)" shaftStatic.stl + +# Stirrer +surfaceSplitByTopology stirrer.stl stirrer.stl +surfaceOrient -inside stirrer.stl "(15 -200 1000)" stirrer.stl + + +# ----------------------------------------------------------------- end-of-file diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/decomposeParDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..24853f860c83fa3934d4a639a8cd06eef84ab905 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/decomposeParDict @@ -0,0 +1,47 @@ +/*--------------------------------*- 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 dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +//method ptscotch; +//method hierarchical; +method scotch; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 2 2 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSchemes b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSchemes new file mode 120000 index 0000000000000000000000000000000000000000..288d536c8b0f5fc598f73b75a3b34168659b9df5 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSchemes @@ -0,0 +1 @@ +../fvSchemes \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSolution b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSolution new file mode 120000 index 0000000000000000000000000000000000000000..4a4e96ba76f1b7aa611bd7956bfcaef773bbfa44 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/backgroundMeshDecomposition/fvSolution @@ -0,0 +1 @@ +../fvSolution \ No newline at end of file diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/collapseDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/collapseDict new file mode 100644 index 0000000000000000000000000000000000000000..69679625719137e63f132bf0dae1f9024033977b --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/collapseDict @@ -0,0 +1,85 @@ +/*--------------------------------*- 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 dictionary; + object collapseDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// If on, after collapsing check the quality of the mesh. If bad faces are +// generated then redo the collapsing with stricter filtering. +controlMeshQuality on; + +collapseEdgesCoeffs +{ + // Edges shorter than this absolute value will be merged + minimumEdgeLength 1e-6; + + // The maximum angle between two edges that share a point attached to + // no other edges + maximumMergeAngle 180; +} + + +collapseFacesCoeffs +{ + // The initial face length factor + initialFaceLengthFactor 0.3; + + // If the face can't be collapsed to an edge, and it has a span less than + // the target face length multiplied by this coefficient, collapse it + // to a point. + maxCollapseFaceToPointSideLengthCoeff 0.3; + + // Allow early collapse of edges to a point + allowEarlyCollapseToPoint on; + + // Fraction to premultiply maxCollapseFaceToPointSideLengthCoeff by if + // allowEarlyCollapseToPoint is enabled + allowEarlyCollapseCoeff 0.2; + + // Defining how close to the midpoint (M) of the projected + // vertices line a projected vertex (X) can be before making this + // an invalid edge collapse + // + // X---X-g----------------M----X-----------g----X--X + // + // Only allow a collapse if all projected vertices are outwith + // guardFraction (g) of the distance form the face centre to the + // furthest vertex in the considered direction + guardFraction 0.1; +} + + +controlMeshQualityCoeffs +{ + // Name of the dictionary that has the mesh quality coefficients used + // by motionSmoother::checkMesh + #include "meshQualityDict"; + + // The amount that minimumEdgeLength will be reduced by for each + // edge if that edge's collapse generates a poor quality face + edgeReductionFactor 0.5; + + // The amount that initialFaceLengthFactor will be reduced by for each + // face if its collapse generates a poor quality face + faceReductionFactor 0.5; + + // Maximum number of outer iterations is mesh quality checking is enabled + maximumIterations 10; + + maximumSmoothingIterations 2; + + maxPointErrorCount 3; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/controlDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/controlDict new file mode 100644 index 0000000000000000000000000000000000000000..c0004ba42bd4c93c7b3a402f64cd6caeb81c3265 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/controlDict @@ -0,0 +1,49 @@ +/*--------------------------------*- 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 dictionary; + location "system"; + object controlDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +application icoFoam; + +startFrom startTime; + +startTime 0; + +stopAt endTime; + +endTime 100; + +deltaT 1; + +writeControl timeStep; + +writeInterval 100; + +purgeWrite 0; + +writeFormat binary; + +writePrecision 10; + +writeCompression uncompressed; + +timeFormat general; + +timePrecision 6; + +runTimeModifiable yes; + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict new file mode 100644 index 0000000000000000000000000000000000000000..24853f860c83fa3934d4a639a8cd06eef84ab905 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/decomposeParDict @@ -0,0 +1,47 @@ +/*--------------------------------*- 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 dictionary; + location "system"; + object decomposeParDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +numberOfSubdomains 8; + +//method ptscotch; +//method hierarchical; +method scotch; + +simpleCoeffs +{ + n ( 2 2 1 ); + delta 0.001; +} + +hierarchicalCoeffs +{ + n ( 2 2 2 ); + delta 0.001; + order xyz; +} + +manualCoeffs +{ + dataFile ""; +} + +distributed no; + +roots ( ); + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/foamyHexMeshDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/foamyHexMeshDict new file mode 100644 index 0000000000000000000000000000000000000000..a000ba4ad380243c3ee0f428c304506353ef3c88 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/foamyHexMeshDict @@ -0,0 +1,278 @@ +/*--------------------------------*- 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 dictionary; + object foamyHexMeshDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#include "$WM_PROJECT_DIR/etc/caseDicts/foamyHexMeshDict" + +geometry +{ + #include "meshDict.geometry" +} + + +initialPoints +{ + initialPointsMethod autoDensity; + + autoDensityCoeffs + { + minLevels 2; + maxSizeRatio 2.0; + sampleResolution 5; + surfaceSampleResolution 5; + } +} + + +surfaceConformation +{ + locationInMesh (200 0 10); + + geometryToConformTo + { + spargerInlet + { + featureMethod extendedFeatureEdgeMesh; + extendedFeatureEdgeMesh "spargerInlet.extendedFeatureEdgeMesh"; + } + + spargerShaft + { + featureMethod none; + } + + vessel + { + featureMethod extendedFeatureEdgeMesh; + extendedFeatureEdgeMesh "vessel.extendedFeatureEdgeMesh"; + regions + { + vessel_wall {} + vessel_outletPipe {} + vessel_outlet {} + } + } + + shaftRotating + { + featureMethod extendedFeatureEdgeMesh; + extendedFeatureEdgeMesh "shaftRotating.extendedFeatureEdgeMesh"; + } + + shaftStatic + { + featureMethod none; + } + + stirrer + { + featureMethod extendedFeatureEdgeMesh; + extendedFeatureEdgeMesh "stirrer.extendedFeatureEdgeMesh"; + } + } + + additionalFeatures + { + spargerShaft_spargerInlet_intersection + { + featureMethod extendedFeatureEdgeMesh; + extendedFeatureEdgeMesh "spargerShaft_spargerInlet_intersection.extendedFeatureEdgeMesh"; + } + + vessel_shaftStatic_intersection + { + featureMethod extendedFeatureEdgeMesh; + extendedFeatureEdgeMesh "vessel_shaftStatic_intersection.extendedFeatureEdgeMesh"; + } + + vessel_spargerShaft_intersection + { + featureMethod extendedFeatureEdgeMesh; + extendedFeatureEdgeMesh "vessel_spargerShaft_intersection.extendedFeatureEdgeMesh"; + } + + stirrer_shaftRotating_intersection + { + featureMethod extendedFeatureEdgeMesh; + extendedFeatureEdgeMesh "stirrer_shaftRotating_intersection.extendedFeatureEdgeMesh"; + } + } +} + + +motionControl +{ + defaultCellSize 10; + + minimumCellSizeCoeff 0.1; + + maxRefinementIterations 0; + + maxSmoothingIterations 100; + + shapeControlFunctions + { + vessel + { + type searchableSurfaceControl; + priority 1; + mode inside; + forceInitialPointInsertion off; + + surfaceCellSizeFunction uniformValue; + uniformValueCoeffs + { + surfaceCellSizeCoeff 1; + } + + cellSizeFunction uniform; + uniformCoeffs{} + + regions + { + vessel_wall + { + surfaceCellSizeFunction uniformValue; + uniformValueCoeffs + { + surfaceCellSizeCoeff 1; + } + + cellSizeFunction uniform; + uniformCoeffs{} + } + + vessel_outletPipe + { + priority 2; + surfaceCellSizeFunction uniformValue; + uniformValueCoeffs + { + surfaceCellSizeCoeff 0.5; + } + + cellSizeFunction uniformDistance; + uniformDistanceCoeffs + { + distanceCoeff 5; + } + } + + vessel_outlet + { + priority 2; + surfaceCellSizeFunction uniformValue; + uniformValueCoeffs + { + surfaceCellSizeCoeff 0.5; + } + + cellSizeFunction uniformDistance; + uniformDistanceCoeffs + { + distanceCoeff 2; + } + } + } + } + + shaftRotating + { + type searchableSurfaceControl; + priority 2; + mode inside; + forceInitialPointInsertion off; + + surfaceCellSizeFunction uniformValue; + uniformValueCoeffs + { + surfaceCellSizeCoeff 0.25; + } + + cellSizeFunction linearDistance; + linearDistanceCoeffs + { + distanceCellSizeCoeff 1; + distanceCoeff 4; + } + } + + shaftStatic + { + ${shaftRotating}; + } + + stirrer + { + ${shaftRotating}; + } + + spargerInlet + { + type searchableSurfaceControl; + priority 2; + mode inside; + forceInitialPointInsertion off; + + surfaceCellSizeFunction uniformValue; + uniformValueCoeffs + { + surfaceCellSizeCoeff 0.25; + } + + cellSizeFunction linearDistance; + linearDistanceCoeffs + { + distanceCellSizeCoeff 1; + distanceCoeff 4; + } + } + + spargerShaft + { + ${spargerInlet} + } + } + + objOutput no; + + timeChecks no; +} + + +backgroundMeshDecomposition +{ + minLevels 1; + sampleResolution 4; + spanScale 20; + maxCellWeightCoeff 20; +} + + +polyMeshFiltering +{ + writeTetDualMesh false; + filterEdges on; + filterFaces off; +} + + +meshQualityControls +{ + #include "meshQualityDict" +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/boundary b/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes similarity index 78% rename from tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/boundary rename to tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes index efe6bfe832fedad4de807c79b291f6dcc2b14dde..6acef5c539720d85528663dd7e69359f83d078f9 100644 --- a/tutorials/mesh/foamyHexMesh/flange/constant/polyMesh/boundary +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSchemes @@ -9,20 +9,22 @@ FoamFile { version 2.0; format ascii; - class polyBoundaryMesh; - location "constant/polyMesh"; - object boundary; + class dictionary; + location "system"; + object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -1 -( - walls - { - type wall; - nFaces 126; - startFace 207; - } -) +gradSchemes +{ +} + +divSchemes +{ +} + +laplacianSchemes +{ +} // ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSolution b/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSolution new file mode 100644 index 0000000000000000000000000000000000000000..6db4e1a6ba541b790f69ca0a506d8c2f547e51cc --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/fvSolution @@ -0,0 +1,18 @@ +/*--------------------------------*- 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 dictionary; + location "system"; + object fvSolution; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/meshDict.geometry b/tutorials/mesh/foamyHexMesh/mixerVessel/system/meshDict.geometry new file mode 100644 index 0000000000000000000000000000000000000000..b73418aeab5f6bc04666139594449269db47a838 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/meshDict.geometry @@ -0,0 +1,66 @@ +/*--------------------------------*- 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 dictionary; + object meshDict.geometry; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +vessel.stl +{ + name vessel; + type triSurfaceMesh; + + regions + { + patch0 {name vessel_wall;} + patch1 {name vessel_outletPipe;} + patch2 {name vessel_outlet;} + } +} + + +spargerInlet.stl +{ + name spargerInlet; + type triSurfaceMesh; +} + + +spargerShaft.stl +{ + name spargerShaft; + type triSurfaceMesh; +} + + +shaftRotating.stl +{ + name shaftRotating; + type triSurfaceMesh; +} + + +shaftStatic.stl +{ + name shaftStatic; + type triSurfaceMesh; +} + + +stirrer.stl +{ + name stirrer; + type triSurfaceMesh; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/meshQualityDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/meshQualityDict new file mode 100644 index 0000000000000000000000000000000000000000..358c725cccece2ccda64b1c04a1fc51f30241c3b --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/meshQualityDict @@ -0,0 +1,30 @@ +/*--------------------------------*- 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 dictionary; + object meshQualityControls; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +maxNonOrtho 60; +maxBoundarySkewness 50; +maxInternalSkewness 10; +maxConcave 80; +minVol 1e-20; +minTetQuality 1e-30; +minArea -1; +minTwist 0.0; +minDeterminant 0.001; +minFaceWeight 0.02; +minVolRatio 0.01; +minTriangleTwist -1; + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/mixerVessel/system/surfaceFeatureExtractDict b/tutorials/mesh/foamyHexMesh/mixerVessel/system/surfaceFeatureExtractDict new file mode 100644 index 0000000000000000000000000000000000000000..e26f75b58f6c687fcdbfee52f7425600049cef36 --- /dev/null +++ b/tutorials/mesh/foamyHexMesh/mixerVessel/system/surfaceFeatureExtractDict @@ -0,0 +1,113 @@ +/*--------------------------------*- 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 dictionary; + object surfaceFeatureExtractDict; +} +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +shaftRotating.stl +{ + extractionMethod extractFromSurface; + + extractFromSurfaceCoeffs + { + // Mark edges whose adjacent surface normals are at an angle less + // than includedAngle as features + // - 0 : selects no edges + // - 180: selects all edges + includedAngle 100; + } + + subsetFeatures + { + // Remove the top feature + insideBox (-100 -100 -100)(100 100 100); + } + + // Write options + + // Write features to obj format for postprocessing + writeObj no; +} + + +vessel.stl +{ + extractionMethod extractFromSurface; + + extractFromSurfaceCoeffs + { + // Mark edges whose adjacent surface normals are at an angle less + // than includedAngle as features + // - 0 : selects no edges + // - 180: selects all edges + includedAngle 120; + } + + subsetFeatures + { + // Keep nonManifold edges (edges with >2 connected faces where + // the faces form more than two different normal planes) + nonManifoldEdges no; + + // Keep open edges (edges with 1 connected face) + openEdges no; + } + + // Write options + + // Write features to obj format for postprocessing + writeObj no; +} + + +spargerInlet.stl +{ + extractionMethod extractFromSurface; + + extractFromSurfaceCoeffs + { + // Mark edges whose adjacent surface normals are at an angle less + // than includedAngle as features + // - 0 : selects no edges + // - 180: selects all edges + includedAngle 120; + } + + // Write options + + // Write features to obj format for postprocessing + writeObj no; +} + + +stirrer.stl +{ + extractionMethod extractFromSurface; + + extractFromSurfaceCoeffs + { + // Mark edges whose adjacent surface normals are at an angle less + // than includedAngle as features + // - 0 : selects no edges + // - 180: selects all edges + includedAngle 120; + } + + // Write options + + // Write features to obj format for postprocessing + writeObj no; +} + + +// ************************************************************************* // diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/constant/triSurface/coneAndSphere.obj b/tutorials/mesh/foamyHexMesh/simpleShapes/constant/triSurface/coneAndSphere.obj deleted file mode 100644 index d90d10e85faf369f8cb5347a328e1ba3889e63d2..0000000000000000000000000000000000000000 --- a/tutorials/mesh/foamyHexMesh/simpleShapes/constant/triSurface/coneAndSphere.obj +++ /dev/null @@ -1,1489 +0,0 @@ -# Wavefront OBJ file -# Regions: -# 0 patch0 -# -# points : 495 -# triangles : 986 -# -v -0.5 0.371572 0.334565 -v -0.5 0.371572 -0.334565 -v -0.5 0.334565 0.371572 -v -0.5 -0.334565 0.371572 -v -0.5 -0.371572 0.334565 -v -0.5 -0.371572 -0.334565 -v -0.5 -0.334565 -0.371572 -v -0.5 0.334565 -0.371572 -v -0.5 0.475528 -0.154509 -v -0.5 0.475528 0.154509 -v -0.5 0.154509 0.475528 -v -0.5 -0.154509 0.475528 -v -0.5 -0.475528 0.154509 -v -0.5 -0.475528 -0.154509 -v -0.5 -0.154509 -0.475528 -v -0.5 0.154509 -0.475528 -v -0.5 0.5 0 -v -0.5 -1.02552e-10 0.5 -v -0.5 -0.5 -2.05103e-10 -v -0.5 3.07655e-10 -0.5 -v -0.5 0.497261 -0.0522642 -v -0.5 0.497261 0.0522642 -v -0.5 0.0522642 0.497261 -v -0.5 -0.0522642 0.497261 -v -0.5 -0.497261 0.0522642 -v -0.5 -0.497261 -0.0522642 -v -0.5 -0.0522642 -0.497261 -v -0.5 0.0522642 -0.497261 -v -0.5 0.456773 -0.203368 -v -0.5 0.456773 0.203368 -v -0.5 0.203368 0.456773 -v -0.5 -0.203368 0.456773 -v -0.5 -0.456773 0.203368 -v -0.5 -0.456773 -0.203368 -v -0.5 -0.203368 -0.456773 -v -0.5 0.203368 -0.456773 -v -0.5 0.489074 -0.103956 -v -0.5 0.489074 0.103956 -v -0.5 0.103956 0.489074 -v -0.5 -0.103956 0.489074 -v -0.5 -0.489074 0.103956 -v -0.5 -0.489074 -0.103956 -v -0.5 -0.103956 -0.489074 -v -0.5 0.103956 -0.489074 -v -0.5 0.433013 0.25 -v -0.5 0.433013 -0.25 -v -0.5 0.25 0.433013 -v -0.5 -0.25 0.433013 -v -0.5 -0.433013 0.25 -v -0.5 -0.433013 -0.25 -v -0.5 -0.25 -0.433013 -v -0.5 0.25 -0.433013 -v -0.5 0.404509 0.293893 -v -0.5 0.404509 -0.293893 -v -0.5 0.293893 0.404509 -v -0.5 -0.293893 0.404509 -v -0.5 -0.404509 0.293893 -v -0.5 -0.404509 -0.293893 -v -0.5 -0.293893 -0.404509 -v -0.5 0.293893 -0.404509 -v 0.139023 0.150219 0.122743 -v 0.139023 0.150219 -0.122743 -v 0.164524 0.158505 0.200848 -v 0.164524 0.158505 -0.200848 -v 0.229562 0.0308609 0.200848 -v 0.229562 0.0308609 -0.200848 -v 0.101708 0.3 0.0412897 -v 0.101708 0.3 -0.0412897 -v 0.307111 -0.103127 0.0412897 -v 0.307111 -0.103127 -0.0412897 -v 0.1153 0.3 0.122743 -v 0.1153 0.3 -0.122743 -v 0.3151 -0.0921307 0.122743 -v 0.3151 -0.0921307 -0.122743 -v 0.201904 0.170651 0.273474 -v 0.201904 0.170651 -0.273474 -v 0.261359 0.0539629 0.273474 -v 0.261359 0.0539629 -0.273474 -v 0.142113 0.3 0.200848 -v 0.142113 0.3 -0.200848 -v 0.330861 -0.0704381 0.200848 -v 0.330861 -0.0704381 -0.200848 -v 0.181417 0.3 0.273474 -v 0.181417 0.3 -0.273474 -v 0.353963 -0.038641 0.273474 -v 0.353963 -0.038641 -0.273474 -v 0.250142 0.186324 0.338641 -v 0.250143 0.186324 -0.338641 -v 0.302393 0.0837761 0.338641 -v 0.302393 0.0837761 -0.338641 -v 0.126096 0.453981 0.0412897 -v 0.126096 0.453981 -0.0412897 -v 0.446019 -0.173904 0.0412897 -v 0.446019 -0.173904 -0.0412897 -v 0.139023 0.449781 0.122743 -v 0.139023 0.449781 -0.122743 -v 0.450219 -0.160977 0.122743 -v 0.450219 -0.160977 -0.122743 -v 0.232138 0.3 0.338641 -v 0.232138 0.3 -0.338641 -v 0.383776 0.0023934 0.338641 -v 0.383776 0.00239342 -0.338641 -v 0.164524 0.441495 0.200848 -v 0.164524 0.441495 -0.200848 -v 0.458505 -0.135476 0.200848 -v 0.458505 -0.135476 -0.200848 -v 0.307925 0.205099 0.39457 -v 0.307925 0.205099 -0.39457 -v 0.351546 0.119487 0.39457 -v 0.351546 0.119487 -0.39457 -v 0.201904 0.429349 0.273474 -v 0.201904 0.429349 -0.273474 -v 0.470651 -0.0980963 0.273474 -v 0.470651 -0.0980963 -0.273474 -v 0.292894 0.3 0.39457 -v 0.292894 0.3 -0.39457 -v 0.419487 0.0515457 0.39457 -v 0.419487 0.0515457 -0.39457 -v 0.250142 0.413676 0.338641 -v 0.250143 0.413676 -0.338641 -v 0.486324 -0.0498575 0.338641 -v 0.486324 -0.0498575 -0.338641 -v 0.373674 0.226462 0.439737 -v 0.373674 0.226462 -0.439737 -v 0.407475 0.160123 0.439737 -v 0.407475 0.160123 -0.439737 -v 0.196873 0.592889 0.0412897 -v 0.196873 0.592889 -0.0412897 -v 0.207869 0.5849 0.122743 -v 0.207869 0.5849 -0.122743 -v 0.6 -0.198292 0.0412897 -v 0.6 -0.198292 -0.0412897 -v 0.307924 0.394901 0.39457 -v 0.307925 0.394901 -0.39457 -v 0.6 -0.1847 0.122743 -v 0.6 -0.1847 -0.122743 -v 0.505099 0.00792448 0.39457 -v 0.505099 0.00792451 -0.39457 -v 0.362026 0.3 0.439737 -v 0.362026 0.3 -0.439737 -v 0.460123 0.107475 0.439737 -v 0.460123 0.107475 -0.439737 -v 0.229562 0.569139 0.200848 -v 0.229562 0.569139 -0.200848 -v 0.6 -0.157887 0.200848 -v 0.6 -0.157887 -0.200848 -v 0.261359 0.546037 0.273474 -v 0.261359 0.546037 -0.273474 -v 0.6 -0.118583 0.273474 -v 0.6 -0.118583 -0.273474 -v 0.373674 0.373538 0.439737 -v 0.373674 0.373538 -0.439737 -v 0.302393 0.516224 0.338641 -v 0.302393 0.516224 -0.338641 -v 0.526462 0.0736736 0.439737 -v 0.526462 0.0736736 -0.439737 -v 0.6 -0.0678619 -0.338641 -v 0.6 -0.067862 0.338641 -v 0.445596 0.249831 0.472909 -v 0.445596 0.249831 -0.472909 -v 0.468656 0.204573 0.472909 -v 0.468656 0.204573 -0.472909 -v 0.43765 0.3 0.472909 -v 0.43765 0.3 -0.472909 -v 0.504573 0.168656 0.472909 -v 0.504573 0.168656 -0.472909 -v 0.351546 0.480513 0.39457 -v 0.351546 0.480513 -0.39457 -v 0.6 -0.00710633 -0.39457 -v 0.6 -0.00710636 0.39457 -v 0.445596 0.350169 0.472909 -v 0.445596 0.350169 -0.472909 -v 0.549831 0.145596 0.472909 -v 0.549831 0.145596 -0.472909 -v 0.407475 0.439877 0.439737 -v 0.407475 0.439877 -0.439737 -v 0.6 0.0620263 0.439737 -v 0.6 0.0620263 -0.439737 -v 0.307111 0.703127 0.0412897 -v 0.307111 0.703127 -0.0412897 -v 0.521731 0.274569 0.493181 -v 0.521731 0.274569 -0.493181 -v 0.53342 0.251627 0.493181 -v 0.53342 0.251627 -0.493181 -v 0.3151 0.692131 0.122743 -v 0.3151 0.692131 -0.122743 -v 0.330861 0.670438 0.200848 -v 0.330861 0.670438 -0.200848 -v 0.468656 0.395427 0.472909 -v 0.468656 0.395427 -0.472909 -v 0.753981 -0.173904 0.0412897 -v 0.753981 -0.173904 -0.0412897 -v 0.517703 0.3 0.493181 -v 0.517703 0.3 -0.493181 -v 0.551627 0.23342 0.493181 -v 0.551627 0.23342 -0.493181 -v 0.6 0.13765 0.472909 -v 0.6 0.13765 -0.472909 -v 0.749781 -0.160977 0.122743 -v 0.749781 -0.160977 -0.122743 -v 0.353963 0.638641 0.273474 -v 0.353963 0.638641 -0.273474 -v 0.741495 -0.135476 0.200848 -v 0.741495 -0.135476 -0.200848 -v 0.729349 -0.0980963 0.273474 -v 0.729349 -0.0980963 -0.273474 -v 0.383776 0.597607 0.338641 -v 0.383776 0.597607 -0.338641 -v 0.521731 0.325431 0.493181 -v 0.521731 0.325431 -0.493181 -v 0.574569 0.221731 0.493181 -v 0.574569 0.221731 -0.493181 -v 0.713676 -0.0498575 0.338641 -v 0.713676 -0.0498575 -0.338641 -v 0.419487 0.548454 0.39457 -v 0.419487 0.548454 -0.39457 -v 0.694901 0.0079245 0.39457 -v 0.694901 0.00792454 -0.39457 -v 0.460123 0.492525 0.439737 -v 0.460123 0.492525 -0.439737 -v 0.53342 0.348373 0.493181 -v 0.53342 0.348373 -0.493181 -v 0.6 0.217703 0.493181 -v 0.6 0.217703 -0.493181 -v 0.673538 0.0736736 0.439737 -v 0.673538 0.0736736 -0.439737 -v 0.504573 0.431344 0.472909 -v 0.504573 0.431344 -0.472909 -v 0.650169 0.145596 0.472909 -v 0.650169 0.145596 -0.472909 -v 0.551627 0.36658 0.493181 -v 0.551627 0.36658 -0.493181 -v 0.625431 0.221731 0.493181 -v 0.625431 0.221731 -0.493181 -v 0.6 0.3 0.5 -v 0.6 0.3 -0.5 -v 0.574569 0.378269 0.493181 -v 0.574569 0.378269 -0.493181 -v 0.648373 0.23342 0.493181 -v 0.648373 0.23342 -0.493181 -v 0.549831 0.454404 0.472909 -v 0.549831 0.454404 -0.472909 -v 0.695427 0.168656 0.472909 -v 0.695427 0.168656 -0.472909 -v 0.526462 0.526326 0.439737 -v 0.526462 0.526326 -0.439737 -v 0.6 0.382297 0.493181 -v 0.6 0.382297 -0.493181 -v 0.66658 0.251627 0.493181 -v 0.66658 0.251627 -0.493181 -v 0.739877 0.107475 0.439737 -v 0.739877 0.107475 -0.439737 -v 0.505099 0.592075 -0.39457 -v 0.505099 0.592076 0.39457 -v 0.780513 0.0515458 0.39457 -v 0.780513 0.0515458 -0.39457 -v 0.486324 0.649857 -0.338641 -v 0.486324 0.649858 0.338641 -v 0.625431 0.378269 0.493181 -v 0.625431 0.378269 -0.493181 -v 0.678269 0.274569 0.493181 -v 0.678269 0.274569 -0.493181 -v 0.816224 0.00239345 0.338641 -v 0.816224 0.00239348 -0.338641 -v 0.470651 0.698096 0.273474 -v 0.470651 0.698096 -0.273474 -v 0.458505 0.735476 0.200848 -v 0.458505 0.735476 -0.200848 -v 0.846037 -0.0386409 0.273474 -v 0.846037 -0.0386409 -0.273474 -v 0.450219 0.760977 0.122743 -v 0.450219 0.760977 -0.122743 -v 0.6 0.46235 0.472909 -v 0.6 0.46235 -0.472909 -v 0.648373 0.36658 0.493181 -v 0.648373 0.36658 -0.493181 -v 0.682297 0.3 0.493181 -v 0.682297 0.3 -0.493181 -v 0.446019 0.773904 0.0412897 -v 0.446019 0.773904 -0.0412897 -v 0.731344 0.204573 0.472909 -v 0.731344 0.204573 -0.472909 -v 0.869139 -0.070438 -0.200848 -v 0.869139 -0.0704381 0.200848 -v 0.8849 -0.0921306 0.122743 -v 0.8849 -0.0921306 -0.122743 -v 0.66658 0.348373 0.493181 -v 0.66658 0.348373 -0.493181 -v 0.678269 0.325431 0.493181 -v 0.678269 0.325431 -0.493181 -v 0.892889 -0.103127 0.0412897 -v 0.892889 -0.103127 -0.0412897 -v 0.6 0.537974 0.439737 -v 0.6 0.537974 -0.439737 -v 0.792525 0.160123 0.439737 -v 0.792525 0.160123 -0.439737 -v 0.650169 0.454404 0.472909 -v 0.650169 0.454404 -0.472909 -v 0.754404 0.249831 0.472909 -v 0.754404 0.249831 -0.472909 -v 0.6 0.607106 0.39457 -v 0.6 0.607106 -0.39457 -v 0.848454 0.119487 0.39457 -v 0.848454 0.119487 -0.39457 -v 0.695427 0.431344 0.472909 -v 0.695427 0.431344 -0.472909 -v 0.76235 0.3 0.472909 -v 0.76235 0.3 -0.472909 -v 0.731344 0.395427 0.472909 -v 0.731344 0.395427 -0.472909 -v 0.754404 0.350169 0.472909 -v 0.754404 0.350169 -0.472909 -v 0.6 0.667862 0.338641 -v 0.6 0.667862 -0.338641 -v 0.673538 0.526326 0.439737 -v 0.673538 0.526326 -0.439737 -v 0.897607 0.0837762 0.338641 -v 0.897607 0.0837762 -0.338641 -v 0.826326 0.226462 0.439737 -v 0.826326 0.226462 -0.439737 -v 0.6 0.718583 0.273474 -v 0.6 0.718583 -0.273474 -v 0.938641 0.053963 0.273474 -v 0.938641 0.053963 -0.273474 -v 0.6 0.757887 0.200848 -v 0.6 0.757887 -0.200848 -v 0.970438 0.030861 0.200848 -v 0.970438 0.030861 -0.200848 -v 0.739877 0.492525 0.439737 -v 0.739877 0.492525 -0.439737 -v 0.837974 0.3 0.439737 -v 0.837974 0.3 -0.439737 -v 0.694901 0.592075 -0.39457 -v 0.694901 0.592076 0.39457 -v 0.6 0.7847 0.122743 -v 0.6 0.7847 -0.122743 -v 0.892075 0.205099 -0.39457 -v 0.892076 0.205099 0.39457 -v 0.6 0.798292 0.0412897 -v 0.6 0.798292 -0.0412897 -v 0.992131 0.0151005 0.122743 -v 0.992131 0.0151005 -0.122743 -v 1.00313 0.00711123 0.0412897 -v 1.00313 0.00711123 -0.0412897 -v 0.792525 0.439877 0.439737 -v 0.792525 0.439877 -0.439737 -v 0.826326 0.373538 0.439737 -v 0.826326 0.373538 -0.439737 -v 0.713676 0.649858 0.338641 -v 0.713676 0.649858 -0.338641 -v 0.949858 0.186324 0.338641 -v 0.949858 0.186324 -0.338641 -v 0.780513 0.548454 0.39457 -v 0.780513 0.548454 -0.39457 -v 0.907106 0.3 0.39457 -v 0.907106 0.3 -0.39457 -v 0.729349 0.698096 0.273474 -v 0.729349 0.698096 -0.273474 -v 0.998096 0.170651 0.273474 -v 0.998096 0.170651 -0.273474 -v 0.848454 0.480513 0.39457 -v 0.848454 0.480513 -0.39457 -v 0.892075 0.394901 0.39457 -v 0.892075 0.394901 -0.39457 -v 0.741495 0.735476 0.200848 -v 0.741495 0.735476 -0.200848 -v 1.03548 0.158505 0.200848 -v 1.03548 0.158505 -0.200848 -v 0.816224 0.597607 0.338641 -v 0.816224 0.597607 -0.338641 -v 0.967862 0.3 0.338641 -v 0.967862 0.3 -0.338641 -v 0.749781 0.760977 0.122743 -v 0.749781 0.760977 -0.122743 -v 1.06098 0.15022 0.122743 -v 1.06098 0.15022 -0.122743 -v 0.753981 0.773904 0.0412897 -v 0.753981 0.773904 -0.0412897 -v 1.0739 0.146019 0.0412897 -v 1.0739 0.146019 -0.0412897 -v 0.897607 0.516224 0.338641 -v 0.897607 0.516224 -0.338641 -v 0.949857 0.413676 -0.338641 -v 0.949858 0.413676 0.338641 -v 0.846037 0.638641 0.273474 -v 0.846037 0.638641 -0.273474 -v 1.01858 0.3 0.273474 -v 1.01858 0.3 -0.273474 -v 0.869139 0.670438 0.200848 -v 0.869139 0.670438 -0.200848 -v 1.05789 0.3 0.200848 -v 1.05789 0.3 -0.200848 -v 0.938641 0.546037 0.273474 -v 0.938641 0.546037 -0.273474 -v 0.998096 0.429349 0.273474 -v 0.998096 0.429349 -0.273474 -v 0.8849 0.692131 0.122743 -v 0.8849 0.692131 -0.122743 -v 1.0847 0.3 0.122743 -v 1.0847 0.3 -0.122743 -v 0.892889 0.703127 0.0412897 -v 0.892889 0.703127 -0.0412897 -v 1.09829 0.3 0.0412897 -v 1.09829 0.3 -0.0412897 -v 0.970438 0.569139 0.200848 -v 0.970438 0.569139 -0.200848 -v 1.03548 0.441495 0.200848 -v 1.03548 0.441495 -0.200848 -v 0.992131 0.5849 0.122743 -v 0.992131 0.5849 -0.122743 -v 1.06098 0.449781 0.122743 -v 1.06098 0.449781 -0.122743 -v 1.00313 0.592889 0.0412897 -v 1.00313 0.592889 -0.0412897 -v 1.0739 0.453981 0.0412897 -v 1.0739 0.453981 -0.0412897 -v 0.302656 -0.098672 -4.04758e-11 -v 0.119055 0.190472 0 -v 0.302295 -0.098311 0.0103329 -v 0.301208 -0.097224 0.0206656 -v 0.299383 -0.095399 0.0309971 -v 0.11977 0.185961 0.0395272 -v 0.119235 0.18934 0.0199004 -v 0.15894 0.114107 -0.126728 -v 0.170235 0.0969156 -0.133393 -v 0.180792 0.0798019 -0.138221 -v 0.190576 0.0629269 -0.141336 -v 0.199568 0.0464194 -0.142864 -v 0.207764 0.0303797 -0.142925 -v 0.239765 -0.013601 -0.129405 -v 0.216833 0.0147995 -0.140808 -v 0.22907 8.3353e-11 -0.135465 -v 0.249054 -0.0260873 -0.122731 -v 0.258454 -0.0373211 -0.114862 -v 0.266658 -0.0474544 -0.106585 -v 0.273756 -0.0565611 -0.0979668 -v 0.279826 -0.0647075 -0.0890622 -v 0.284938 -0.0719522 -0.079911 -v 0.289149 -0.0783464 -0.0705434 -v 0.292507 -0.0839329 -0.0609809 -v 0.295049 -0.0887464 -0.0512377 -v 0.296806 -0.0928137 -0.0413232 -v 0.137914 0.146467 -0.106414 -v 0.148 0.130793 -0.117767 -v 0.123693 0.178944 -0.0581427 -v 0.128047 0.169898 -0.0756434 -v 0.132459 0.15915 -0.0918852 -v 0.119235 0.18934 -0.0199004 -v 0.11977 0.185961 -0.0395272 -v 0.299383 -0.095399 -0.0309971 -v 0.301208 -0.097224 -0.0206656 -v 0.302295 -0.098311 -0.0103329 -v 0.284938 -0.0719522 0.079911 -v 0.279826 -0.0647075 0.0890622 -v 0.273756 -0.0565611 0.0979668 -v 0.266657 -0.0474544 0.106585 -v 0.258454 -0.0373211 0.114862 -v 0.249054 -0.0260873 0.122731 -v 0.207764 0.0303797 0.142925 -v 0.199568 0.0464194 0.142864 -v 0.190576 0.0629269 0.141336 -v 0.180792 0.0798019 0.138221 -v 0.170235 0.0969156 0.133393 -v 0.15894 0.114107 0.126728 -v 0.239765 -0.013601 0.129405 -v 0.22907 -2.77844e-11 0.135465 -v 0.216833 0.0147995 0.140808 -v 0.296806 -0.0928137 0.0413232 -v 0.295049 -0.0887464 0.0512377 -v 0.292507 -0.0839329 0.0609809 -v 0.289149 -0.0783464 0.0705434 -v 0.148 0.130793 0.117767 -v 0.137914 0.146467 0.106414 -v 0.132459 0.15915 0.0918852 -v 0.128047 0.169898 0.0756434 -v 0.123693 0.178944 0.0581428 -v 0.275476 -0.0588694 -0.0954436 -v 0.249037 -0.0260675 -0.122743 -v 0.153399 0.122005 -0.122743 -v 0.213211 0.0189815 -0.141977 -v 0.136027 0.149246 -0.103866 -v 0.228378 0.000836743 -0.135767 -v 0.298434 -0.0944504 -0.0347901 -v 0.296809 -0.0928248 -0.0412897 -v 0.119851 0.185446 -0.0412897 -v 0.295059 -0.0887695 0.0511813 -v 0.296809 -0.0928248 0.0412897 -v 0.144975 0.135494 0.114362 -v 0.119851 0.185446 0.0412897 -v 0.123804 0.178715 0.0585855 -v 0.136027 0.149246 0.103866 -v 0.249037 -0.0260675 0.122743 -v 0.153399 0.122005 0.122743 -v 0.19695 0.0512265 0.142419 -v 0.213211 0.0189815 0.141977 -g patch0 -f 19 417 26 -f 417 452 26 -f 25 19 26 -f 25 26 41 -f 41 26 13 -f 13 26 33 -f 33 26 49 -f 49 26 57 -f 57 26 5 -f 5 26 4 -f 4 26 56 -f 56 26 48 -f 48 26 32 -f 32 26 12 -f 12 26 40 -f 40 26 24 -f 24 26 18 -f 18 26 23 -f 23 26 39 -f 39 26 11 -f 11 26 31 -f 31 26 47 -f 47 26 55 -f 55 26 3 -f 3 26 1 -f 1 26 53 -f 53 26 45 -f 45 26 30 -f 30 26 10 -f 10 26 38 -f 38 26 22 -f 22 26 17 -f 17 26 21 -f 21 26 37 -f 37 26 9 -f 9 26 29 -f 29 26 46 -f 46 26 54 -f 54 26 2 -f 2 26 8 -f 8 26 60 -f 60 26 52 -f 52 26 36 -f 36 26 16 -f 16 26 44 -f 44 26 28 -f 28 26 20 -f 20 26 27 -f 27 26 43 -f 43 26 15 -f 15 26 35 -f 35 26 51 -f 51 26 59 -f 59 26 7 -f 7 26 6 -f 6 26 58 -f 58 26 50 -f 50 26 34 -f 34 26 14 -f 14 26 42 -f 19 25 417 -f 25 419 417 -f 421 487 69 -f 421 69 420 -f 419 420 69 -f 417 419 69 -f 452 417 69 -f 70 452 69 -f 70 451 452 -f 483 450 70 -f 70 450 451 -f 26 452 42 -f 452 451 42 -f 42 451 14 -f 451 450 14 -f 14 450 34 -f 450 483 34 -f 484 442 34 -f 483 484 34 -f 34 442 50 -f 442 441 50 -f 50 441 58 -f 441 440 58 -f 58 440 6 -f 440 439 6 -f 6 439 7 -f 439 438 7 -f 59 7 438 -f 59 438 437 -f 51 59 437 -f 51 437 436 -f 436 437 477 -f 35 51 436 -f 35 436 435 -f 15 35 435 -f 15 435 434 -f 43 15 434 -f 43 434 433 -f 27 43 433 -f 27 478 430 -f 27 433 478 -f 20 27 430 -f 20 430 432 -f 28 20 432 -f 28 432 431 -f 431 432 482 -f 44 28 431 -f 44 480 429 -f 44 431 480 -f 16 44 429 -f 16 429 428 -f 36 16 428 -f 36 428 427 -f 52 36 427 -f 52 427 426 -f 60 52 426 -f 60 426 425 -f 8 60 425 -f 8 425 424 -f 2 8 424 -f 2 479 444 -f 2 424 479 -f 54 2 444 -f 54 444 443 -f 46 54 443 -f 46 481 447 -f 46 443 481 -f 29 46 447 -f 29 447 446 -f 9 29 446 -f 9 446 445 -f 37 9 445 -f 37 485 449 -f 37 445 485 -f 21 37 449 -f 21 449 448 -f 17 21 448 -f 17 448 418 -f 423 22 17 -f 423 17 418 -f 422 38 22 -f 422 22 423 -f 476 10 38 -f 476 38 489 -f 489 38 422 -f 475 30 10 -f 475 10 490 -f 490 10 476 -f 474 45 30 -f 474 30 475 -f 473 53 45 -f 473 45 491 -f 491 45 474 -f 472 1 53 -f 472 53 488 -f 488 53 473 -f 464 3 1 -f 464 1 493 -f 493 1 472 -f 55 3 463 -f 3 464 463 -f 47 55 462 -f 55 463 462 -f 31 47 461 -f 47 462 461 -f 11 31 460 -f 31 461 494 -f 31 494 460 -f 39 11 459 -f 11 460 459 -f 23 39 467 -f 39 459 495 -f 39 495 467 -f 18 23 466 -f 23 467 466 -f 24 18 465 -f 18 466 465 -f 40 24 458 -f 24 465 492 -f 24 492 458 -f 12 40 457 -f 40 458 457 -f 32 12 456 -f 12 457 456 -f 48 32 455 -f 32 456 455 -f 56 48 454 -f 48 455 454 -f 4 56 453 -f 56 454 453 -f 5 4 471 -f 4 453 471 -f 57 5 470 -f 5 471 470 -f 49 57 469 -f 57 470 469 -f 33 49 468 -f 49 469 486 -f 49 486 468 -f 13 33 421 -f 33 468 487 -f 33 487 421 -f 41 13 420 -f 13 421 420 -f 25 41 419 -f 41 420 419 -f 70 69 94 -f 69 93 94 -f 468 486 69 -f 468 69 487 -f 458 492 73 -f 458 73 457 -f 456 457 73 -f 455 456 73 -f 454 455 73 -f 453 454 73 -f 471 453 73 -f 470 471 73 -f 469 470 73 -f 486 469 73 -f 486 73 69 -f 69 73 93 -f 70 94 98 -f 70 98 74 -f 74 477 437 -f 74 437 70 -f 484 70 442 -f 442 70 441 -f 441 70 440 -f 440 70 439 -f 70 437 438 -f 70 438 439 -f 484 483 70 -f 74 478 433 -f 74 436 477 -f 74 435 436 -f 74 434 435 -f 74 433 434 -f 82 482 432 -f 82 432 74 -f 74 430 478 -f 74 432 430 -f 480 431 66 -f 431 482 82 -f 431 82 66 -f 66 62 479 -f 66 429 480 -f 66 428 429 -f 66 427 428 -f 66 426 427 -f 66 425 426 -f 66 424 425 -f 66 479 424 -f 62 481 443 -f 62 444 479 -f 62 443 444 -f 62 447 481 -f 62 446 447 -f 62 68 445 -f 445 68 485 -f 62 445 446 -f 485 68 67 -f 485 67 449 -f 449 67 448 -f 418 448 67 -f 423 418 67 -f 422 423 67 -f 489 422 67 -f 489 67 71 -f 489 71 476 -f 476 71 490 -f 490 71 61 -f 490 61 475 -f 475 61 474 -f 491 474 61 -f 473 491 61 -f 473 61 488 -f 472 61 493 -f 488 61 472 -f 493 61 63 -f 493 63 464 -f 464 63 463 -f 462 463 63 -f 461 462 63 -f 494 461 63 -f 494 63 65 -f 494 65 460 -f 460 65 459 -f 495 459 65 -f 467 495 65 -f 467 65 466 -f 465 466 65 -f 492 465 65 -f 492 65 73 -f 94 93 132 -f 93 131 132 -f 73 97 93 -f 93 97 131 -f 94 132 136 -f 94 136 98 -f 65 81 73 -f 73 81 97 -f 98 136 146 -f 98 146 106 -f 74 98 106 -f 74 106 82 -f 82 106 114 -f 82 114 86 -f 66 82 86 -f 66 86 78 -f 64 66 78 -f 62 66 64 -f 72 62 64 -f 68 62 72 -f 68 72 92 -f 67 68 92 -f 67 92 91 -f 67 91 95 -f 67 95 71 -f 71 95 103 -f 71 103 79 -f 71 79 61 -f 61 79 63 -f 79 83 63 -f 63 83 75 -f 63 75 65 -f 75 77 65 -f 65 77 81 -f 132 131 192 -f 131 191 192 -f 97 135 131 -f 131 135 191 -f 132 192 200 -f 132 200 136 -f 81 105 97 -f 97 105 135 -f 136 200 204 -f 136 204 146 -f 77 85 81 -f 81 85 105 -f 146 204 206 -f 146 206 150 -f 106 146 150 -f 106 150 114 -f 114 150 157 -f 114 157 122 -f 86 114 122 -f 86 122 102 -f 78 86 102 -f 78 102 90 -f 76 78 90 -f 64 78 76 -f 80 64 76 -f 72 64 80 -f 72 80 96 -f 72 96 92 -f 92 96 128 -f 91 92 128 -f 91 128 127 -f 91 127 129 -f 91 129 95 -f 95 129 143 -f 95 143 103 -f 103 143 147 -f 103 147 111 -f 79 103 111 -f 79 111 83 -f 83 111 119 -f 83 119 99 -f 83 99 75 -f 75 99 87 -f 75 87 77 -f 87 89 77 -f 77 89 85 -f 192 191 292 -f 191 291 292 -f 135 199 191 -f 199 291 191 -f 192 292 286 -f 200 192 286 -f 105 145 135 -f 135 145 199 -f 200 286 283 -f 204 200 283 -f 85 113 105 -f 105 113 145 -f 204 283 270 -f 206 204 270 -f 89 101 85 -f 85 101 113 -f 206 270 264 -f 214 206 264 -f 150 206 214 -f 150 214 157 -f 157 214 218 -f 157 218 169 -f 122 157 169 -f 122 169 138 -f 102 122 138 -f 102 138 118 -f 90 102 118 -f 90 118 110 -f 88 90 110 -f 76 90 88 -f 84 76 88 -f 80 76 84 -f 80 84 104 -f 96 80 104 -f 96 104 130 -f 96 130 128 -f 128 130 180 -f 127 128 180 -f 127 180 179 -f 127 179 185 -f 127 185 129 -f 129 185 187 -f 129 187 143 -f 147 143 187 -f 147 187 201 -f 147 201 153 -f 201 207 153 -f 111 147 153 -f 111 153 119 -f 119 153 167 -f 119 167 133 -f 99 119 133 -f 99 133 115 -f 99 115 87 -f 87 115 107 -f 87 107 89 -f 89 107 109 -f 89 109 101 -f 292 291 344 -f 291 343 344 -f 199 285 291 -f 285 343 291 -f 292 344 342 -f 286 292 342 -f 145 203 199 -f 203 285 199 -f 286 342 328 -f 283 286 328 -f 113 149 145 -f 145 149 203 -f 283 328 324 -f 270 283 324 -f 101 121 113 -f 113 121 149 -f 270 324 318 -f 264 270 318 -f 109 117 101 -f 101 117 121 -f 264 318 304 -f 256 264 304 -f 214 264 256 -f 218 214 256 -f 218 256 252 -f 226 218 252 -f 169 218 226 -f 169 226 178 -f 138 169 178 -f 138 178 156 -f 118 138 156 -f 118 156 142 -f 110 118 142 -f 110 142 126 -f 108 110 126 -f 88 110 108 -f 100 88 108 -f 84 88 100 -f 84 100 112 -f 104 84 112 -f 104 112 144 -f 104 144 130 -f 130 144 186 -f 130 186 180 -f 180 186 280 -f 179 180 280 -f 179 280 279 -f 179 279 271 -f 179 271 185 -f 185 271 267 -f 185 267 187 -f 187 267 265 -f 187 265 201 -f 201 265 258 -f 201 258 207 -f 207 258 254 -f 207 254 215 -f 153 207 167 -f 207 215 167 -f 167 215 219 -f 167 219 175 -f 133 167 175 -f 133 175 151 -f 115 133 151 -f 115 151 139 -f 115 139 107 -f 107 139 123 -f 107 123 109 -f 109 123 125 -f 109 125 117 -f 344 343 380 -f 343 379 380 -f 285 341 343 -f 341 379 343 -f 344 380 376 -f 342 344 376 -f 203 284 285 -f 284 341 285 -f 342 376 368 -f 328 342 368 -f 149 205 203 -f 205 284 203 -f 328 368 360 -f 324 328 360 -f 121 158 149 -f 149 158 205 -f 324 360 352 -f 318 324 352 -f 117 137 121 -f 121 137 158 -f 337 318 352 -f 304 318 337 -f 125 141 117 -f 117 141 137 -f 320 304 337 -f 296 304 320 -f 256 304 296 -f 252 256 296 -f 282 252 296 -f 244 252 282 -f 226 252 244 -f 230 226 244 -f 178 226 230 -f 178 230 198 -f 156 178 198 -f 156 198 174 -f 142 156 174 -f 142 174 166 -f 126 142 166 -f 126 166 162 -f 124 126 162 -f 108 126 124 -f 116 108 124 -f 100 108 116 -f 100 116 120 -f 112 100 120 -f 112 120 148 -f 112 148 144 -f 188 144 148 -f 188 148 202 -f 144 188 186 -f 186 188 272 -f 186 272 280 -f 280 272 340 -f 279 280 340 -f 279 340 339 -f 279 339 335 -f 279 335 271 -f 271 335 325 -f 271 325 267 -f 267 325 321 -f 267 321 265 -f 265 321 313 -f 265 313 258 -f 258 313 301 -f 258 301 254 -f 254 301 293 -f 254 293 245 -f 215 254 245 -f 215 245 219 -f 219 245 241 -f 219 241 227 -f 175 219 227 -f 175 227 189 -f 151 175 189 -f 151 189 171 -f 139 151 171 -f 139 171 163 -f 139 163 123 -f 123 163 159 -f 123 159 125 -f 125 159 161 -f 125 161 141 -f 380 379 404 -f 379 403 404 -f 341 375 379 -f 375 403 379 -f 380 404 400 -f 376 380 400 -f 284 327 341 -f 327 375 341 -f 392 376 400 -f 368 376 392 -f 205 269 284 -f 269 327 284 -f 388 368 392 -f 360 368 388 -f 158 213 205 -f 213 269 205 -f 372 360 388 -f 352 360 372 -f 137 170 158 -f 158 170 213 -f 356 352 372 -f 337 352 356 -f 141 155 137 -f 137 155 170 -f 332 337 356 -f 320 337 332 -f 141 161 165 -f 141 165 155 -f 308 320 332 -f 300 320 308 -f 300 296 320 -f 282 296 300 -f 262 282 300 -f 250 282 262 -f 250 244 282 -f 240 244 250 -f 240 230 244 -f 234 230 240 -f 198 230 234 -f 198 234 224 -f 174 198 224 -f 174 224 212 -f 166 174 212 -f 166 212 196 -f 162 166 196 -f 162 196 184 -f 160 162 184 -f 124 162 160 -f 140 124 160 -f 116 124 140 -f 116 140 134 -f 120 116 134 -f 120 134 154 -f 120 154 148 -f 202 148 154 -f 202 154 208 -f 202 208 266 -f 202 266 268 -f 188 202 268 -f 188 268 272 -f 272 268 336 -f 272 336 340 -f 336 378 340 -f 339 340 378 -f 339 378 377 -f 339 377 373 -f 335 339 373 -f 335 373 365 -f 325 335 365 -f 325 365 357 -f 321 325 357 -f 321 357 349 -f 313 321 349 -f 313 349 334 -f 301 313 334 -f 301 334 315 -f 293 301 315 -f 293 315 297 -f 273 293 297 -f 245 293 273 -f 245 273 241 -f 241 273 247 -f 241 247 237 -f 227 241 237 -f 227 237 231 -f 189 227 231 -f 189 231 221 -f 171 189 221 -f 171 221 209 -f 163 171 209 -f 163 209 193 -f 163 193 159 -f 159 193 181 -f 159 181 161 -f 161 181 183 -f 161 183 165 -f 375 399 403 -f 415 403 399 -f 416 404 415 -f 404 403 415 -f 412 404 416 -f 412 400 404 -f 327 367 375 -f 367 399 375 -f 408 400 412 -f 408 392 400 -f 269 323 327 -f 323 367 327 -f 396 392 408 -f 396 388 392 -f 213 263 269 -f 263 323 269 -f 383 388 396 -f 383 372 388 -f 170 217 213 -f 217 263 213 -f 364 372 383 -f 364 356 372 -f 155 177 170 -f 170 177 217 -f 348 356 364 -f 348 332 356 -f 165 173 155 -f 155 173 177 -f 312 332 348 -f 312 308 332 -f 165 183 195 -f 165 195 173 -f 278 300 308 -f 290 308 312 -f 290 278 308 -f 262 300 278 -f 236 262 278 -f 236 250 262 -f 236 240 250 -f 236 234 240 -f 224 234 236 -f 212 224 236 -f 196 212 236 -f 184 196 236 -f 182 184 236 -f 160 184 182 -f 164 160 182 -f 140 160 164 -f 140 164 152 -f 134 140 152 -f 134 152 168 -f 154 134 168 -f 208 154 168 -f 208 168 216 -f 208 216 257 -f 208 257 266 -f 266 257 322 -f 266 322 326 -f 268 266 326 -f 268 326 336 -f 326 374 336 -f 336 374 378 -f 374 402 378 -f 377 378 402 -f 377 402 401 -f 377 401 397 -f 373 377 397 -f 373 397 389 -f 365 373 389 -f 365 389 385 -f 357 365 385 -f 357 385 369 -f 349 357 369 -f 349 369 353 -f 334 349 353 -f 334 353 329 -f 315 334 329 -f 315 329 305 -f 297 315 305 -f 275 297 305 -f 259 297 275 -f 273 297 259 -f 247 273 259 -f 235 247 259 -f 237 247 235 -f 231 237 235 -f 221 231 235 -f 209 221 235 -f 193 209 235 -f 193 235 181 -f 181 235 183 -f 183 235 195 -f 367 391 399 -f 391 411 399 -f 411 415 399 -f 414 416 413 -f 416 415 413 -f 413 415 411 -f 410 416 414 -f 410 412 416 -f 406 412 410 -f 406 408 412 -f 323 359 367 -f 359 391 367 -f 394 408 406 -f 394 396 408 -f 263 317 323 -f 317 359 323 -f 382 396 394 -f 382 383 396 -f 217 255 263 -f 255 317 263 -f 362 383 382 -f 362 364 383 -f 177 225 217 -f 225 255 217 -f 346 364 362 -f 346 348 364 -f 173 197 177 -f 177 197 225 -f 310 348 346 -f 310 312 348 -f 173 195 211 -f 173 211 197 -f 288 312 310 -f 288 290 312 -f 195 235 211 -f 236 278 290 -f 236 290 288 -f 236 288 276 -f 236 276 260 -f 236 260 248 -f 238 236 248 -f 232 236 238 -f 222 236 232 -f 210 236 222 -f 194 236 210 -f 194 182 236 -f 164 182 194 -f 164 194 172 -f 152 164 172 -f 152 172 176 -f 168 152 176 -f 168 176 216 -f 176 220 216 -f 216 220 253 -f 216 253 257 -f 257 253 314 -f 257 314 322 -f 314 358 322 -f 322 358 366 -f 322 366 326 -f 326 366 374 -f 366 398 374 -f 374 398 402 -f 398 414 402 -f 401 402 414 -f 401 414 413 -f 401 413 409 -f 397 401 409 -f 397 409 405 -f 389 397 405 -f 389 405 393 -f 385 389 393 -f 385 393 381 -f 369 385 381 -f 369 381 361 -f 353 369 361 -f 353 361 345 -f 329 353 345 -f 309 329 345 -f 305 329 309 -f 287 305 309 -f 275 305 287 -f 235 275 287 -f 235 259 275 -f 235 277 261 -f 235 261 249 -f 235 249 239 -f 235 239 233 -f 223 235 233 -f 211 235 223 -f 235 287 289 -f 235 289 277 -f 359 387 391 -f 387 407 391 -f 407 411 391 -f 409 413 411 -f 409 411 407 -f 398 410 414 -f 390 410 398 -f 390 406 410 -f 386 406 390 -f 386 394 406 -f 317 351 359 -f 351 387 359 -f 370 394 386 -f 370 382 394 -f 255 303 317 -f 303 351 317 -f 354 382 370 -f 354 362 382 -f 225 251 255 -f 251 303 255 -f 330 362 354 -f 330 346 362 -f 197 229 225 -f 229 251 225 -f 306 346 330 -f 306 310 346 -f 211 223 197 -f 197 223 229 -f 276 310 306 -f 276 288 310 -f 260 276 306 -f 248 260 298 -f 260 306 298 -f 238 248 274 -f 248 298 274 -f 242 232 238 -f 242 238 274 -f 228 222 232 -f 228 232 242 -f 190 210 222 -f 190 222 228 -f 172 194 210 -f 172 210 190 -f 176 172 190 -f 176 190 220 -f 220 190 228 -f 220 228 246 -f 220 246 253 -f 253 246 302 -f 253 302 314 -f 302 350 314 -f 314 350 358 -f 350 386 358 -f 358 386 390 -f 358 390 366 -f 366 390 398 -f 405 409 407 -f 405 407 395 -f 393 405 395 -f 393 395 384 -f 381 393 384 -f 363 381 384 -f 361 381 363 -f 347 361 363 -f 345 361 347 -f 311 345 347 -f 309 345 311 -f 289 309 311 -f 287 309 289 -f 261 277 307 -f 289 311 277 -f 277 311 307 -f 261 307 299 -f 249 261 299 -f 249 299 281 -f 239 249 281 -f 239 281 243 -f 233 239 243 -f 233 243 229 -f 223 233 229 -f 351 371 387 -f 371 395 387 -f 395 407 387 -f 350 370 386 -f 303 338 351 -f 338 371 351 -f 333 370 350 -f 333 354 370 -f 251 295 303 -f 295 338 303 -f 316 354 333 -f 316 330 354 -f 229 243 251 -f 243 295 251 -f 298 330 316 -f 298 306 330 -f 274 298 316 -f 274 316 294 -f 242 274 294 -f 246 242 294 -f 228 242 246 -f 246 294 302 -f 294 333 302 -f 302 333 350 -f 384 395 371 -f 355 384 371 -f 363 384 355 -f 331 363 355 -f 347 363 331 -f 307 347 331 -f 311 347 307 -f 299 307 331 -f 299 331 319 -f 281 299 319 -f 281 319 295 -f 243 281 295 -f 338 355 371 -f 295 319 338 -f 319 355 338 -f 294 316 333 -f 319 331 355 diff --git a/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict b/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict index 248e32affb790c99f326197e8e7890e7bb5e51ff..e8e2fd9d592fb03ca8a37110920a82bea05dd7f4 100644 --- a/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict +++ b/tutorials/mesh/foamyHexMesh/simpleShapes/system/foamyHexMeshDict @@ -23,12 +23,28 @@ geometry { name sphere; type triSurfaceMesh; + + regions + { + ascii + { + name sphere_patch; + } + } } cone_orient.stl { name cone; type triSurfaceMesh; + + regions + { + ascii + { + name cone_patch; + } + } } // Outside of domain @@ -130,19 +146,22 @@ motionControl { sphere { - type searchableSurfaceControl; - priority 1; - mode bothSides; + type searchableSurfaceControl; + priority 2; + mode inside; - surfaceCellSizeFunction uniformValue; + surfaceCellSizeFunction uniformValue; uniformValueCoeffs { - surfaceCellSizeCoeff 0.5; + surfaceCellSizeCoeff 0.25; } - cellSizeFunction uniform; - uniformCoeffs - {} + cellSizeFunction linearDistance; + linearDistanceCoeffs + { + distanceCellSizeCoeff 1; + distanceCoeff 2; + } } cone @@ -154,7 +173,7 @@ motionControl surfaceCellSizeFunction uniformValue; uniformValueCoeffs { - surfaceCellSizeCoeff 0.75; + surfaceCellSizeCoeff 1; } cellSizeFunction uniform; diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/0.org/T b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/T similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/0.org/T rename to tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/T diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/0.org/U b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/0.org/U rename to tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/U diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/0.org/p b/tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/p similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/0.org/p rename to tutorials/mesh/foamyQuadMesh/OpenCFD/0.org/p diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/Allclean b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/Allclean rename to tutorials/mesh/foamyQuadMesh/OpenCFD/Allclean diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/Allrun b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun similarity index 91% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/Allrun rename to tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun index 05750d2d751a6ef73d609681cc8891da43c21938..36e81e496f29362613b2a2051d8e905c05cc19fd 100755 --- a/tutorials/mesh/foamyHex2DMesh/OpenCFD/Allrun +++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun @@ -7,7 +7,7 @@ cd ${0%/*} || exit 1 # run from this directory cp system/controlDict.mesher system/controlDict runApplication surfaceFeatureExtract -runApplication foamyHex2DMesh -overwrite +runApplication foamyQuadMesh -overwrite runApplication extrude2DMesh -overwrite polyMesh2D runApplication checkMesh -allGeometry -allTopology -constant -noZero diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/Allrun-rhoCentralFoam b/tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/Allrun-rhoCentralFoam rename to tutorials/mesh/foamyQuadMesh/OpenCFD/Allrun-rhoCentralFoam diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/polyMesh/boundary b/tutorials/mesh/foamyQuadMesh/OpenCFD/constant/polyMesh/boundary similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/polyMesh/boundary rename to tutorials/mesh/foamyQuadMesh/OpenCFD/constant/polyMesh/boundary diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/thermophysicalProperties b/tutorials/mesh/foamyQuadMesh/OpenCFD/constant/thermophysicalProperties similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/thermophysicalProperties rename to tutorials/mesh/foamyQuadMesh/OpenCFD/constant/thermophysicalProperties diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/triSurface/opencfd_box.stl b/tutorials/mesh/foamyQuadMesh/OpenCFD/constant/triSurface/opencfd_box.stl similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/triSurface/opencfd_box.stl rename to tutorials/mesh/foamyQuadMesh/OpenCFD/constant/triSurface/opencfd_box.stl diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/triSurface/opencfd_text.stl b/tutorials/mesh/foamyQuadMesh/OpenCFD/constant/triSurface/opencfd_text.stl similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/triSurface/opencfd_text.stl rename to tutorials/mesh/foamyQuadMesh/OpenCFD/constant/triSurface/opencfd_text.stl diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/turbulenceProperties b/tutorials/mesh/foamyQuadMesh/OpenCFD/constant/turbulenceProperties similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/turbulenceProperties rename to tutorials/mesh/foamyQuadMesh/OpenCFD/constant/turbulenceProperties diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/controlDict b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/controlDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/system/controlDict rename to tutorials/mesh/foamyQuadMesh/OpenCFD/system/controlDict diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/controlDict.mesher b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/controlDict.mesher similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/system/controlDict.mesher rename to tutorials/mesh/foamyQuadMesh/OpenCFD/system/controlDict.mesher diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/controlDict.rhoCentralFoam b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/controlDict.rhoCentralFoam similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/system/controlDict.rhoCentralFoam rename to tutorials/mesh/foamyQuadMesh/OpenCFD/system/controlDict.rhoCentralFoam diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/decomposeParDict b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/decomposeParDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/system/decomposeParDict rename to tutorials/mesh/foamyQuadMesh/OpenCFD/system/decomposeParDict diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/extrude2DMeshDict b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/extrude2DMeshDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/system/extrude2DMeshDict rename to tutorials/mesh/foamyQuadMesh/OpenCFD/system/extrude2DMeshDict diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/foamyHex2DMeshDict b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/foamyQuadMeshDict similarity index 99% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/system/foamyHex2DMeshDict rename to tutorials/mesh/foamyQuadMesh/OpenCFD/system/foamyQuadMeshDict index 821769aa5a4966c0c06d7d41c218568fda8cb242..a16e7f3fbc6f4486645c766d1f1697d47b16c243 100644 --- a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/foamyHex2DMeshDict +++ b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/foamyQuadMeshDict @@ -11,7 +11,7 @@ FoamFile format ascii; class dictionary; location "system"; - object foamyHex2DMeshDict; + object foamyQuadMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/fvSchemes b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/fvSchemes similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/system/fvSchemes rename to tutorials/mesh/foamyQuadMesh/OpenCFD/system/fvSchemes diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/fvSolution b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/fvSolution similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/system/fvSolution rename to tutorials/mesh/foamyQuadMesh/OpenCFD/system/fvSolution diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/system/surfaceFeatureExtractDict b/tutorials/mesh/foamyQuadMesh/OpenCFD/system/surfaceFeatureExtractDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/system/surfaceFeatureExtractDict rename to tutorials/mesh/foamyQuadMesh/OpenCFD/system/surfaceFeatureExtractDict diff --git a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/Allclean b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/jaggedBoundary/Allclean rename to tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allclean diff --git a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/Allrun b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun similarity index 90% rename from tutorials/mesh/foamyHex2DMesh/jaggedBoundary/Allrun rename to tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun index 087447c2fb4a96b7c7da9732d1913eb8d31bb08c..5b5b21582d7d69deab59be87faa4af67a90bcffe 100755 --- a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/Allrun +++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication surfaceFeatureExtract -runApplication foamyHex2DMesh -overwrite +runApplication foamyQuadMesh -overwrite runApplication extrude2DMesh -overwrite MeshedSurface runApplication checkMesh -allGeometry -allTopology -constant -noZero diff --git a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/constant/triSurface/jaggedBoundary.stl b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/constant/triSurface/jaggedBoundary.stl similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/jaggedBoundary/constant/triSurface/jaggedBoundary.stl rename to tutorials/mesh/foamyQuadMesh/jaggedBoundary/constant/triSurface/jaggedBoundary.stl diff --git a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/controlDict b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/controlDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/controlDict rename to tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/controlDict diff --git a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/extrude2DMeshDict b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/extrude2DMeshDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/extrude2DMeshDict rename to tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/extrude2DMeshDict diff --git a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/foamyHex2DMeshDict b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/foamyQuadMeshDict similarity index 99% rename from tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/foamyHex2DMeshDict rename to tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/foamyQuadMeshDict index fee67e55feb4b9b8a48ef3b10770b2b0ca85ea14..8cbfb7a94a328714df61bd753269b767b0f4bc8c 100644 --- a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/foamyHex2DMeshDict +++ b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/foamyQuadMeshDict @@ -11,7 +11,7 @@ FoamFile format ascii; class dictionary; location "system"; - object foamyHex2DMeshDict; + object foamyQuadMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/fvSchemes b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/fvSchemes similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/fvSchemes rename to tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/fvSchemes diff --git a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/fvSolution b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/fvSolution similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/fvSolution rename to tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/fvSolution diff --git a/tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/surfaceFeatureExtractDict b/tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/surfaceFeatureExtractDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/jaggedBoundary/system/surfaceFeatureExtractDict rename to tutorials/mesh/foamyQuadMesh/jaggedBoundary/system/surfaceFeatureExtractDict diff --git a/tutorials/mesh/foamyHex2DMesh/square/Allclean b/tutorials/mesh/foamyQuadMesh/square/Allclean similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/square/Allclean rename to tutorials/mesh/foamyQuadMesh/square/Allclean diff --git a/tutorials/mesh/foamyHex2DMesh/square/Allrun b/tutorials/mesh/foamyQuadMesh/square/Allrun similarity index 90% rename from tutorials/mesh/foamyHex2DMesh/square/Allrun rename to tutorials/mesh/foamyQuadMesh/square/Allrun index c12f0325dbb47f9c16f3e3e605b68db8aa8e6234..1856290b9a9f5911864eca6ff6b0a295d74e7c47 100755 --- a/tutorials/mesh/foamyHex2DMesh/square/Allrun +++ b/tutorials/mesh/foamyQuadMesh/square/Allrun @@ -5,7 +5,7 @@ cd ${0%/*} || exit 1 # run from this directory . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication surfaceFeatureExtract -runApplication foamyHex2DMesh -overwrite +runApplication foamyQuadMesh -overwrite runApplication extrude2DMesh -overwrite polyMesh2D runApplication checkMesh -allGeometry -allTopology -constant -noZero diff --git a/tutorials/mesh/foamyHex2DMesh/square/constant/triSurface/unit_cube.stl b/tutorials/mesh/foamyQuadMesh/square/constant/triSurface/unit_cube.stl similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/square/constant/triSurface/unit_cube.stl rename to tutorials/mesh/foamyQuadMesh/square/constant/triSurface/unit_cube.stl diff --git a/tutorials/mesh/foamyHex2DMesh/square/system/controlDict b/tutorials/mesh/foamyQuadMesh/square/system/controlDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/square/system/controlDict rename to tutorials/mesh/foamyQuadMesh/square/system/controlDict diff --git a/tutorials/mesh/foamyHex2DMesh/square/system/extrude2DMeshDict b/tutorials/mesh/foamyQuadMesh/square/system/extrude2DMeshDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/square/system/extrude2DMeshDict rename to tutorials/mesh/foamyQuadMesh/square/system/extrude2DMeshDict diff --git a/tutorials/mesh/foamyHex2DMesh/square/system/foamyHex2DMeshDict b/tutorials/mesh/foamyQuadMesh/square/system/foamyQuadMeshDict similarity index 99% rename from tutorials/mesh/foamyHex2DMesh/square/system/foamyHex2DMeshDict rename to tutorials/mesh/foamyQuadMesh/square/system/foamyQuadMeshDict index 76645c4fba50e7b332a64d714bae40afd0f9136d..275822892214c52bf823e0fc730e366dc49dd059 100644 --- a/tutorials/mesh/foamyHex2DMesh/square/system/foamyHex2DMeshDict +++ b/tutorials/mesh/foamyQuadMesh/square/system/foamyQuadMeshDict @@ -11,7 +11,7 @@ FoamFile format ascii; class dictionary; location "system"; - object foamyHex2DMeshDict; + object foamyQuadMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/tutorials/mesh/foamyHex2DMesh/square/system/fvSchemes b/tutorials/mesh/foamyQuadMesh/square/system/fvSchemes similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/square/system/fvSchemes rename to tutorials/mesh/foamyQuadMesh/square/system/fvSchemes diff --git a/tutorials/mesh/foamyHex2DMesh/square/system/fvSolution b/tutorials/mesh/foamyQuadMesh/square/system/fvSolution similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/square/system/fvSolution rename to tutorials/mesh/foamyQuadMesh/square/system/fvSolution diff --git a/tutorials/mesh/foamyHex2DMesh/square/system/surfaceFeatureExtractDict b/tutorials/mesh/foamyQuadMesh/square/system/surfaceFeatureExtractDict similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/square/system/surfaceFeatureExtractDict rename to tutorials/mesh/foamyQuadMesh/square/system/surfaceFeatureExtractDict diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/U b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/U rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/U diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/p b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/p similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/p rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/p diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/p_gh b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/p_gh similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/0.org/p_gh rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/0.org/p_gh diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/Allclean b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/Allclean rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allclean diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/Allrun b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/Allrun rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/Allrun diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/g b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/g similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/g rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/g diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/blockMeshDict b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/blockMeshDict similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/blockMeshDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/blockMeshDict diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/boundary b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/boundary similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/boundary rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/polyMesh/boundary diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/transportProperties b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/transportProperties similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/constant/transportProperties rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/transportProperties diff --git a/tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/turbulenceProperties b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/turbulenceProperties similarity index 100% rename from tutorials/mesh/foamyHex2DMesh/OpenCFD/constant/turbulenceProperties rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/constant/turbulenceProperties diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData similarity index 98% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData index 584f0ea0d51cc70fcc8d28f34781e5260abcefbb..bc1a5b586c255ce2640d8047342e93c127c3f0a3 100755 --- a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData +++ b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/extractHeightData @@ -1,3 +1,2 @@ #!/bin/sh awk '{print $1 " " $4}' postProcessing/poolHeight/0/faceSource.dat > poolHeight_vs_time - diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/controlDict diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSchemes diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/fvSolution b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSolution similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/fvSolution rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/fvSolution diff --git a/tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/topoSetDict b/tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/topoSetDict similarity index 100% rename from tutorials/incompressible/potentialFreeSurfaceFoam/oscillatingBox/system/topoSetDict rename to tutorials/multiphase/potentialFreeSurfaceFoam/oscillatingBox/system/topoSetDict diff --git a/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution b/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution index 5800e2a4b4dc1f19677781a8a5487b289bb2296e..3a47e5857c1307ec855eb02f64a67e250c467750 100644 --- a/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution +++ b/tutorials/multiphase/twoPhaseEulerFoam/bed/system/fvSolution @@ -53,6 +53,12 @@ solvers relTol 0; } + alpha1 + { + nAlphaCorr 2; + nAlphaSubCycles 3; + } + alpha { solver PCG; @@ -72,12 +78,9 @@ PIMPLE { nCorrectors 2; nNonOrthogonalCorrectors 0; - nAlphaCorr 2; - nAlphaSubCycles 3; correctAlpha yes; pRefCell 0; pRefValue 0; } - // ************************************************************************* // diff --git a/tutorials/resources/geometry/mixerVessel.tar.gz b/tutorials/resources/geometry/mixerVessel.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..eafb6a18da2255146c96b7f90c22b811a2fd0d69 Binary files /dev/null and b/tutorials/resources/geometry/mixerVessel.tar.gz differ diff --git a/wmake/wmake b/wmake/wmake index ebcd38cb6e03804ae51b514b6c4a228efbf0c6fa..e5d939656567eb4459bb8830e7a3aad6096b4c54 100755 --- a/wmake/wmake +++ b/wmake/wmake @@ -50,12 +50,14 @@ The 'target' is a Makefile target: e.g., Make/linux64GccDPOpt/fvMesh.o or a special target: + dwim search up directories tree for Make sub-directory and build all all subdirectories, uses any Allwmake files if they exist exe build statically linked executable lib build statically linked archive lib (.a) libo build statically linked lib (.o) libso build dynamically linked lib (.so) jar build Java jar + dep build lnInclude and dependencies only USAGE exit 1 @@ -136,7 +138,7 @@ fi #------------------------------------------------------------------------------ -# check arguments and change to the directory in which to run wmake +# Check arguments and change to the directory in which to run wmake #------------------------------------------------------------------------------ unset dir makeType @@ -167,6 +169,51 @@ then fi +#------------------------------------------------------------------------------ +# Search up directories tree for the Make sub-directory and build there +#------------------------------------------------------------------------------ + +unset dir +MakeDir=Make + +expandpath() +{ + dir=`dirname $1` + cwd=$PWD + cd $dir + exPath=$PWD + cd $cwd +} + +find_target() +{ + expandpath $1 + + if [ "$exPath" = "$WM_PROJECT_DIR" -o "$exPath" = "$HOME" -o "$exPath" = "/" ]; then + echo "$Script error: could not find Make directory" + elif [ -d "$1/Make" ]; then + echo Target $1 + dir=$1 + else + find_target "$1/.." + fi +} + +if [ "$makeType" = dwim ] +then + find_target . + makeType= + + if [ "$dir" ] + then + cd $dir 2>/dev/null || { + echo "$Script error: could not change to directory '$dir'" 1>&2 + exit 1 + } + fi +fi + + #------------------------------------------------------------------------------ # Recurse the application directories tree #------------------------------------------------------------------------------ @@ -244,7 +291,7 @@ OBJECTS_DIR=$MakeDir/$WM_OPTIONS touch $OBJECTS_DIR/dontIncludeDeps case "$makeType" in -lib | libo | libso ) +lib | libo | libso | dep ) $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontIncludeDeps lnInclude/uptodate ;; esac @@ -254,12 +301,16 @@ $make -s -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/dontInc rc=$? [ $rc -eq 0 ] || exit $rc + #------------------------------------------------------------------------------ -# make the object files and link +# Make the object files and link #------------------------------------------------------------------------------ -cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType" -# echo "cmd=$cmd" -exec $cmd +if [ "$makeType" != dep ] +then + cmd="$make -f $WM_DIR/Makefile MAKE_DIR=$MakeDir INCLUDE_DEPS=$OBJECTS_DIR/includeDeps $makeType" + # echo "cmd=$cmd" + exec $cmd +fi #------------------------------------------------------------------------------