From 4e8fd19d3dbce39ab6aacd670ca010726b04ae4e Mon Sep 17 00:00:00 2001 From: Andrew Heather <a.heather@opencfd.co.uk> Date: Mon, 11 Jun 2018 12:42:09 +0100 Subject: [PATCH] ENH: Refactored creation of simplified meshes for -dry-run operation TODO: migrate singleCellFvMesh into simplified mesh framework (?) --- .../solvers/combustion/chemFoam/chemFoam.C | 2 +- .../chemFoam/createSingleCellMesh.H | 2 +- src/OpenFOAM/include/createMesh.H | 2 +- src/dynamicFvMesh/Make/files | 3 + .../dynamicFvMesh/dynamicFvMesh.H | 10 ++ .../dynamicFvMesh/dynamicFvMeshNew.C | 60 +++++++ .../dynamicMotionSolverFvMesh.C | 23 +++ .../dynamicMotionSolverFvMesh.H | 12 ++ .../include/createDynamicFvMesh.H | 20 +-- .../simplifiedDynamicFvMesh.C | 82 ++++++++++ .../simplifiedDynamicFvMesh.H | 149 ++++++++++++++++++ .../simplifiedDynamicFvMeshTemplates.C | 67 ++++++++ .../simplifiedDynamicFvMeshes.C | 44 ++++++ src/dynamicFvMesh/staticFvMesh/staticFvMesh.C | 22 +++ src/dynamicFvMesh/staticFvMesh/staticFvMesh.H | 12 ++ .../points0/points0MotionSolver.C | 10 +- src/finiteVolume/Make/files | 6 +- .../cfdTools/general/include/fvCFD.H | 2 - .../columnFvMesh}/columnFvMesh.C | 142 +++++++++-------- .../columnFvMesh}/columnFvMesh.H | 19 ++- .../hexCellFvMesh}/hexCellFvMesh.C | 8 +- .../hexCellFvMesh}/hexCellFvMesh.H | 14 +- .../simplifiedFvMesh/simplifiedFvMesh.C} | 20 +-- .../simplifiedFvMesh/simplifiedFvMesh.H} | 26 +-- .../simplifiedFvMeshTemplates.C} | 2 +- .../singleCellFvMesh/singleCellFvMesh.H | 6 +- 26 files changed, 626 insertions(+), 139 deletions(-) create mode 100644 src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMesh.C create mode 100644 src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMesh.H create mode 100644 src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMeshTemplates.C create mode 100644 src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMeshes.C rename src/finiteVolume/fvMesh/{proxyFvMesh => simplifiedFvMesh/columnFvMesh}/columnFvMesh.C (90%) rename src/finiteVolume/fvMesh/{proxyFvMesh => simplifiedFvMesh/columnFvMesh}/columnFvMesh.H (89%) rename src/finiteVolume/fvMesh/{proxyFvMesh => simplifiedFvMesh/hexCellFvMesh}/hexCellFvMesh.C (95%) rename src/finiteVolume/fvMesh/{proxyFvMesh => simplifiedFvMesh/hexCellFvMesh}/hexCellFvMesh.H (89%) rename src/finiteVolume/fvMesh/{proxyFvMesh/proxyFvMesh.C => simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.C} (82%) rename src/finiteVolume/fvMesh/{proxyFvMesh/proxyFvMesh.H => simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.H} (85%) rename src/finiteVolume/fvMesh/{proxyFvMesh/proxyFvMeshTemplates.C => simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMeshTemplates.C} (97%) diff --git a/applications/solvers/combustion/chemFoam/chemFoam.C b/applications/solvers/combustion/chemFoam/chemFoam.C index a3e704fcf5f..aa074eb3812 100644 --- a/applications/solvers/combustion/chemFoam/chemFoam.C +++ b/applications/solvers/combustion/chemFoam/chemFoam.C @@ -43,7 +43,7 @@ Description #include "OFstream.H" #include "thermoPhysicsTypes.H" #include "basicSpecieMixture.H" -#include "cellModel.H" +#include "hexCellFvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H index 45fe584d54f..9944cc8cee9 100644 --- a/applications/solvers/combustion/chemFoam/createSingleCellMesh.H +++ b/applications/solvers/combustion/chemFoam/createSingleCellMesh.H @@ -1,3 +1,3 @@ Info<< "Constructing single cell mesh" << nl << endl; -Foam::proxyMeshes::hexCellFvMesh mesh(runTime); +Foam::simplifiedMeshes::hexCellFvMesh mesh(runTime); diff --git a/src/OpenFOAM/include/createMesh.H b/src/OpenFOAM/include/createMesh.H index a91c9707329..f2bb851dc6b 100644 --- a/src/OpenFOAM/include/createMesh.H +++ b/src/OpenFOAM/include/createMesh.H @@ -9,7 +9,7 @@ if (args.optionFound("dry-run") || args.optionFound("dry-run-write")) Foam::FieldBase::allowConstructFromLargerSize = true; // Create a simplified 1D mesh and attempt to re-create boundary conditions - meshPtr.reset(new Foam::proxyMeshes::columnFvMesh(runTime)); + meshPtr.reset(new Foam::simplifiedMeshes::columnFvMesh(runTime)); // Stopping after 1 iteration of the simplified mesh // Note: using saNoWriteNow will only trigger the function object execute diff --git a/src/dynamicFvMesh/Make/files b/src/dynamicFvMesh/Make/files index 7f579610835..b8432c07c90 100644 --- a/src/dynamicFvMesh/Make/files +++ b/src/dynamicFvMesh/Make/files @@ -7,4 +7,7 @@ dynamicInkJetFvMesh/dynamicInkJetFvMesh.C dynamicRefineFvMesh/dynamicRefineFvMesh.C dynamicMotionSolverListFvMesh/dynamicMotionSolverListFvMesh.C +simplifiedDynamicFvMesh/simplifiedDynamicFvMeshes.C +simplifiedDynamicFvMesh/simplifiedDynamicFvMesh.C + LIB = $(FOAM_LIBBIN)/libdynamicFvMesh diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H index 506aafc0397..8ee55e5d362 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMesh.H @@ -119,6 +119,16 @@ public: static autoPtr<dynamicFvMesh> New(const IOobject& io); + //- Select, construct and return the dynamicFvMesh + // If the constant/dynamicMeshDict does not exist + // a staticFvMesh is returned + static autoPtr<dynamicFvMesh> New + ( + const argList& args, + const Time& runTime + ); + + //- Destructor virtual ~dynamicFvMesh() = default; diff --git a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C index ce86e1d3dcb..6ebfb467e31 100644 --- a/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C +++ b/src/dynamicFvMesh/dynamicFvMesh/dynamicFvMeshNew.C @@ -24,6 +24,8 @@ License \*---------------------------------------------------------------------------*/ #include "staticFvMesh.H" +#include "simplifiedDynamicFvMesh.H" +#include "argList.H" // * * * * * * * * * * * * * * * * Selectors * * * * * * * * * * * * * * * * // @@ -87,4 +89,62 @@ Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New(const IOobject& io) } +Foam::autoPtr<Foam::dynamicFvMesh> Foam::dynamicFvMesh::New +( + const argList& args, + const Time& runTime +) +{ + if (args.optionFound("dry-run") || args.optionFound("dry-run-write")) + { + Info + << "Operating in 'dry-run' mode: case will run for 1 time step. " + << "All checks assumed OK on a clean exit" << Foam::endl; + + FieldBase::allowConstructFromLargerSize = true; + + // Stopping after 1 iteration of the simplified mesh + // Note: using saNoWriteNow will only trigger the function object execute + // function and not the write function + runTime.stopAt(Foam::Time::saNoWriteNow); + + if (args.optionFound("dry-run-write")) + { + // Stopping after 1 iteration of the simplified mesh + // Note: using saWriteNow to trigger writing/execution of function + // objects + runTime.stopAt(Foam::Time::saWriteNow); + } + + functionObject::outputPrefix = "postProcessing-dry-run"; + + return + simplifiedMeshes::simplifiedDynamicFvMeshBase::New + ( + IOobject + ( + dynamicFvMesh::defaultRegion, + runTime.timeName(), + runTime, + IOobject::MUST_READ + ) + ); + } + else + { + return + New + ( + IOobject + ( + dynamicFvMesh::defaultRegion, + runTime.timeName(), + runTime, + IOobject::MUST_READ + ) + ); + } +} + + // ************************************************************************* // diff --git a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C index d676d4ef042..bf5b0a97663 100644 --- a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C +++ b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.C @@ -51,6 +51,29 @@ Foam::dynamicMotionSolverFvMesh::dynamicMotionSolverFvMesh(const IOobject& io) {} +Foam::dynamicMotionSolverFvMesh::dynamicMotionSolverFvMesh +( + const IOobject& io, + pointField&& points, + faceList&& faces, + labelList&& allOwner, + labelList&& allNeighbour, + const bool syncPar +) +: + dynamicFvMesh + ( + io, + std::move(points), + std::move(faces), + std::move(allOwner), + std::move(allNeighbour), + syncPar + ), + motionPtr_(motionSolver::New(*this)) +{} + + // * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::dynamicMotionSolverFvMesh::~dynamicMotionSolverFvMesh() diff --git a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.H b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.H index 84fd7b56497..3a59afcd17d 100644 --- a/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.H +++ b/src/dynamicFvMesh/dynamicMotionSolverFvMesh/dynamicMotionSolverFvMesh.H @@ -77,6 +77,18 @@ public: //- Construct from IOobject dynamicMotionSolverFvMesh(const IOobject& io); + //- Construct from components without boundary. + // Boundary is added using addFvPatches() member function + dynamicMotionSolverFvMesh + ( + const IOobject& io, + pointField&& points, + faceList&& faces, + labelList&& allOwner, + labelList&& allNeighbour, + const bool syncPar = true + ); + //- Destructor ~dynamicMotionSolverFvMesh(); diff --git a/src/dynamicFvMesh/include/createDynamicFvMesh.H b/src/dynamicFvMesh/include/createDynamicFvMesh.H index 97303ffded3..543bcbfe34f 100644 --- a/src/dynamicFvMesh/include/createDynamicFvMesh.H +++ b/src/dynamicFvMesh/include/createDynamicFvMesh.H @@ -1,18 +1,6 @@ - Info<< "Create mesh for time = " - << runTime.timeName() << nl << endl; +Info<< "Create mesh for time = " + << runTime.timeName() << nl << endl; - autoPtr<dynamicFvMesh> meshPtr - ( - dynamicFvMesh::New - ( - IOobject - ( - dynamicFvMesh::defaultRegion, - runTime.timeName(), - runTime, - IOobject::MUST_READ - ) - ) - ); +autoPtr<dynamicFvMesh> meshPtr(dynamicFvMesh::New(args, runTime)); - dynamicFvMesh& mesh = meshPtr(); +dynamicFvMesh& mesh = meshPtr(); diff --git a/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMesh.C b/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMesh.C new file mode 100644 index 00000000000..9ecc46af0e5 --- /dev/null +++ b/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMesh.C @@ -0,0 +1,82 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "simplifiedDynamicFvMesh.H" +#include "staticFvMesh.H" + +// * * * * * * * * * * * * * * Static Data Members * * * * * * * * * * * * * // + +namespace Foam +{ +namespace simplifiedMeshes +{ +defineTypeNameAndDebug(simplifiedDynamicFvMeshBase, 0); +defineRunTimeSelectionTable(simplifiedDynamicFvMeshBase, time); +} +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +Foam::autoPtr<Foam::dynamicFvMesh> +Foam::simplifiedMeshes::simplifiedDynamicFvMeshBase::New +( + const IOobject& io +) +{ + IOobject dictHeader + ( + "dynamicMeshDict", + io.time().constant(), + (io.name() == polyMesh::defaultRegion ? "" : io.name()), + io.db(), + IOobject::MUST_READ_IF_MODIFIED, + IOobject::NO_WRITE, + false + ); + + if (dictHeader.typeHeaderOk<IOdictionary>(true)) + { + IOdictionary dict(dictHeader); + + const word modelType(dict.lookup("dynamicFvMesh")); + + auto cstrIter = timeConstructorTablePtr_->cfind(modelType); + + if (cstrIter.found()) + { + Info<< "Selecting simplified mesh model " << modelType << endl; + return autoPtr<dynamicFvMesh>(cstrIter()(io.time())); + } + } + + Info<< "Selecting simplified mesh model " << staticFvMesh::typeName << endl; + return autoPtr<dynamicFvMesh> + ( + new SimplifiedDynamicFvMesh<staticFvMesh>(io.time()) + ); +} + + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMesh.H b/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMesh.H new file mode 100644 index 00000000000..35713d2f8e8 --- /dev/null +++ b/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMesh.H @@ -0,0 +1,149 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +Class + Foam::simplifiedFvMesh + +Description + Functions to generate simplified finite volume meshes + +SourceFiles + simplifiedFvMesh.C + +\*---------------------------------------------------------------------------*/ + +#ifndef simplifiedDynamicFvMesh_H +#define simplifiedDynamicFvMesh_H + +#include "columnFvMesh.H" +#include "runTimeSelectionTables.H" + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +namespace Foam +{ + +class dynamicFvMesh; + +namespace simplifiedMeshes +{ + +/*---------------------------------------------------------------------------*\ + Class simplifiedDynamicFvMesh Declaration +\*---------------------------------------------------------------------------*/ + +class simplifiedDynamicFvMeshBase +{ +public: + + //- Runtime type information + TypeName("simplifiedDynamicFvMeshBase"); + + // Declare run-time constructor selection table + + declareRunTimeSelectionTable + ( + autoPtr, + dynamicFvMesh, + time, + ( + const Time& runTime + ), + (runTime) + ); + + + // Selectors + + //- Return a reference to the selected simplified mesh + static autoPtr<dynamicFvMesh> New(const IOobject& io); + + + //- Constructor + simplifiedDynamicFvMeshBase() + {} + + //- Destructor + virtual ~simplifiedDynamicFvMeshBase() = default; +}; + + +template<class DynamicMeshType> +class SimplifiedDynamicFvMesh +: + public simplifiedDynamicFvMeshBase, + public columnFvMeshInfo, + public DynamicMeshType +{ + +public: + + ClassNameNoDebug(DynamicMeshType::typeName_.c_str()); + + //- Constructor + SimplifiedDynamicFvMesh(const Time& runTime); + + //- Update the mesh for both mesh motion and topology change + virtual bool update() + { + // No updates performed + return false; + } +}; + + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace simplifiedMeshes +} // End namespace Foam + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#ifdef NoRepository + #include "simplifiedDynamicFvMeshTemplates.C" +#endif + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#define createProxyDynamicFvMesh(Type) \ + \ +typedef simplifiedMeshes::SimplifiedDynamicFvMesh<Type> simplified##Type; \ + \ +template<> \ +const word simplified##Type::typeName = Type::typeName; \ + \ +namespace simplifiedMeshes \ +{ \ + addToRunTimeSelectionTable \ + ( \ + simplifiedDynamicFvMeshBase, \ + simplified##Type, \ + time \ + ); \ +} + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +#endif + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMeshTemplates.C b/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMeshTemplates.C new file mode 100644 index 00000000000..4cbf5fd4f8f --- /dev/null +++ b/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMeshTemplates.C @@ -0,0 +1,67 @@ +/*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +template<class DynamicMeshType> +Foam::simplifiedMeshes::SimplifiedDynamicFvMesh<DynamicMeshType>:: +SimplifiedDynamicFvMesh +( + const Time& runTime +) +: + simplifiedDynamicFvMeshBase(), + columnFvMeshInfo(runTime), + DynamicMeshType + ( + IOobject + ( + fvMesh::defaultRegion, + runTime.constant(), + runTime, + IOobject::NO_READ, // Do not read any existing mesh + IOobject::NO_WRITE + ), + std::move(points1D_), + std::move(faces1D_), + std::move(owner1D_), + std::move(neighbour1D_) + ) +{ + // Workaround to read fvSchemes and fvSolution after setting NO_READ + // when creating the mesh + { + fvSchemes::readOpt() = IOobject::MUST_READ; + fvSchemes::read(); + fvSolution::readOpt() = IOobject::MUST_READ; + fvSolution::read(); + } + + // Add the patches + addLocalPatches(*this); +} + + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMeshes.C b/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMeshes.C new file mode 100644 index 00000000000..5aa1a2cb597 --- /dev/null +++ b/src/dynamicFvMesh/simplifiedDynamicFvMesh/simplifiedDynamicFvMeshes.C @@ -0,0 +1,44 @@ + /*---------------------------------------------------------------------------*\ + ========= | + \\ / F ield | OpenFOAM: The Open Source CFD Toolbox + \\ / O peration | + \\ / A nd | Copyright (C) 2018 OpenCFD Ltd. + \\/ M anipulation | +------------------------------------------------------------------------------- +License + This file is part of OpenFOAM. + + OpenFOAM is free software: you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + OpenFOAM is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. + +\*---------------------------------------------------------------------------*/ + +#include "addToRunTimeSelectionTable.H" +#include "simplifiedDynamicFvMesh.H" +#include "staticFvMesh.H" +#include "dynamicMotionSolverFvMesh.H" + + +namespace Foam +{ + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + + createProxyDynamicFvMesh(staticFvMesh); + createProxyDynamicFvMesh(dynamicMotionSolverFvMesh); + +// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // + +} // End namespace Foam + +// ************************************************************************* // diff --git a/src/dynamicFvMesh/staticFvMesh/staticFvMesh.C b/src/dynamicFvMesh/staticFvMesh/staticFvMesh.C index 172b2565f96..798f9c87381 100644 --- a/src/dynamicFvMesh/staticFvMesh/staticFvMesh.C +++ b/src/dynamicFvMesh/staticFvMesh/staticFvMesh.C @@ -43,6 +43,28 @@ Foam::staticFvMesh::staticFvMesh(const IOobject& io) {} +Foam::staticFvMesh::staticFvMesh +( + const IOobject& io, + pointField&& points, + faceList&& faces, + labelList&& allOwner, + labelList&& allNeighbour, + const bool syncPar +) +: + dynamicFvMesh + ( + io, + std::move(points), + std::move(faces), + std::move(allOwner), + std::move(allNeighbour), + syncPar + ) +{} + + // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // bool Foam::staticFvMesh::update() diff --git a/src/dynamicFvMesh/staticFvMesh/staticFvMesh.H b/src/dynamicFvMesh/staticFvMesh/staticFvMesh.H index 97400e72929..d1e661faea9 100644 --- a/src/dynamicFvMesh/staticFvMesh/staticFvMesh.H +++ b/src/dynamicFvMesh/staticFvMesh/staticFvMesh.H @@ -70,6 +70,18 @@ public: //- Construct from IOobject staticFvMesh(const IOobject& io); + //- Construct from components without boundary. + // Boundary is added using addFvPatches() member function + staticFvMesh + ( + const IOobject& io, + pointField&& points, + faceList&& faces, + labelList&& allOwner, + labelList&& allNeighbour, + const bool syncPar = true + ); + //- Destructor ~staticFvMesh() = default; diff --git a/src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.C b/src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.C index 435314e6a25..1a204d67a5e 100644 --- a/src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.C +++ b/src/dynamicMesh/motionSolvers/displacement/points0/points0MotionSolver.C @@ -113,7 +113,15 @@ Foam::points0MotionSolver::points0MotionSolver motionSolver(mesh, dict, type), points0_(points0IO(mesh)) { - if (points0_.size() != mesh.nPoints()) + if + ( + FieldBase::allowConstructFromLargerSize + && (points0_.size() > mesh.nPoints()) + ) + { + // Allowed + } + else if (points0_.size() != mesh.nPoints()) { FatalErrorInFunction << "Number of points in mesh " << mesh.nPoints() diff --git a/src/finiteVolume/Make/files b/src/finiteVolume/Make/files index ec674a23c53..8d86f57d684 100644 --- a/src/finiteVolume/Make/files +++ b/src/finiteVolume/Make/files @@ -3,9 +3,9 @@ fvMesh/fvMesh.C fvMesh/singleCellFvMesh/singleCellFvMesh.C -fvMesh/proxyFvMesh/proxyFvMesh.C -fvMesh/proxyFvMesh/columnFvMesh.C -fvMesh/proxyFvMesh/hexCellFvMesh.C +fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.C +fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C +fvMesh/simplifiedFvMesh/hexCellFvMesh/hexCellFvMesh.C fvBoundaryMesh = fvMesh/fvBoundaryMesh $(fvBoundaryMesh)/fvBoundaryMesh.C diff --git a/src/finiteVolume/cfdTools/general/include/fvCFD.H b/src/finiteVolume/cfdTools/general/include/fvCFD.H index 7a6ee39aff9..bfe39b376e4 100644 --- a/src/finiteVolume/cfdTools/general/include/fvCFD.H +++ b/src/finiteVolume/cfdTools/general/include/fvCFD.H @@ -22,9 +22,7 @@ #include "IOMRFZoneList.H" #include "constants.H" -#include "proxyFvMesh.H" #include "columnFvMesh.H" -#include "hexCellFvMesh.H" #include "OSspecific.H" #include "argList.H" diff --git a/src/finiteVolume/fvMesh/proxyFvMesh/columnFvMesh.C b/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C similarity index 90% rename from src/finiteVolume/fvMesh/proxyFvMesh/columnFvMesh.C rename to src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C index a103451dfca..9f92cf17887 100644 --- a/src/finiteVolume/fvMesh/proxyFvMesh/columnFvMesh.C +++ b/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.C @@ -36,14 +36,14 @@ License namespace Foam { -namespace proxyMeshes +namespace simplifiedMeshes { defineTypeNameAndDebug(columnFvMeshInfo, 0); defineTypeNameAndDebug(columnFvMesh, 0); addToRunTimeSelectionTable ( - proxyFvMesh, + simplifiedFvMesh, columnFvMesh, time ); @@ -53,7 +53,7 @@ namespace proxyMeshes // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * // -bool Foam::proxyMeshes::columnFvMeshInfo::setPatchEntries +bool Foam::simplifiedMeshes::columnFvMeshInfo::setPatchEntries ( const Time& runTime ) @@ -75,7 +75,7 @@ bool Foam::proxyMeshes::columnFvMeshInfo::setPatchEntries { polyBoundaryMeshEntries allPatchEntries(boundaryIO); - Info<< "Creating proxy mesh using " << allPatchEntries.path() << endl; + Info<< "Creating simplified mesh using " << allPatchEntries.path() << endl; for (const entry& e : allPatchEntries) { @@ -115,7 +115,7 @@ bool Foam::proxyMeshes::columnFvMeshInfo::setPatchEntries const fieldDictionary fieldDict(io, io.headerClassName()); - Info<< "Creating proxy mesh from field " + Info<< "Creating simplified mesh from field " << fieldDict.objectPath() << endl; @@ -126,17 +126,17 @@ bool Foam::proxyMeshes::columnFvMeshInfo::setPatchEntries { const word type(e.dict().lookup("type")); - if (proxyFvMesh::fvPatchFieldExists(type)) + if (simplifiedFvMesh::fvPatchFieldExists(type)) { if (!constraintPatches.found(type)) { ++nPatchWithFace_; - dictionary proxyEntries; - proxyEntries.add("startFace", 0); - proxyEntries.add("nFaces", 1); - proxyEntries.add("type", "wall"); // default to wall type + dictionary simplifiedEntries; + simplifiedEntries.add("startFace", 0); + simplifiedEntries.add("nFaces", 1); + simplifiedEntries.add("type", "wall"); // default to wall type - patchEntries_.add(e.keyword(), proxyEntries); + patchEntries_.add(e.keyword(), simplifiedEntries); } } else @@ -150,7 +150,7 @@ bool Foam::proxyMeshes::columnFvMeshInfo::setPatchEntries } -void Foam::proxyMeshes::columnFvMeshInfo::initialise(const Time& runTime) +void Foam::simplifiedMeshes::columnFvMeshInfo::initialise(const Time& runTime) { DebugInfo << "Constructing 1-D mesh" << nl << endl; @@ -304,61 +304,8 @@ void Foam::proxyMeshes::columnFvMeshInfo::initialise(const Time& runTime) } -// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // - -Foam::proxyMeshes::columnFvMeshInfo::columnFvMeshInfo(const Time& runTime) -: - localInstance_ - ( - runTime.findInstance - ( - polyMesh::meshSubDir, - "boundary", - IOobject::READ_IF_PRESENT - ) - ), - createFromMesh_(false), - points1D_(), - faces1D_(), - owner1D_(), - neighbour1D_(), - patchEntries_(), - nPatchWithFace_(0) -{ - initialise(runTime); -} - - -Foam::proxyMeshes::columnFvMesh::columnFvMesh(const Time& runTime) -: - columnFvMeshInfo(runTime), - proxyFvMesh - ( - IOobject - ( - fvMesh::defaultRegion, - runTime.constant(), - runTime, - IOobject::NO_READ, // Do not read any existing mesh - IOobject::NO_WRITE - ), - std::move(points1D_), - std::move(faces1D_), - std::move(owner1D_), - std::move(neighbour1D_) - ) +void Foam::simplifiedMeshes::columnFvMeshInfo::addLocalPatches(fvMesh& mesh) const { - // Workaround to read fvSchemes and fvSolution after setting NO_READ - // when creating the mesh - { - fvSchemes::readOpt() = IOobject::MUST_READ; - fvSchemes::read(); - fvSolution::readOpt() = IOobject::MUST_READ; - fvSolution::read(); - } - - // Add the patches - const label nPatch = patchEntries_.size(); List<polyPatch*> patches(nPatch + 1); @@ -390,7 +337,7 @@ Foam::proxyMeshes::columnFvMesh::columnFvMesh(const Time& runTime) patchName, patchDict, entryi, - boundaryMesh() + mesh.boundaryMesh() ).ptr(); ++entryi; @@ -403,11 +350,11 @@ Foam::proxyMeshes::columnFvMesh::columnFvMesh(const Time& runTime) 2, // number of faces nInternalFace + 4*nPatchWithFace_, // start face nPatch - 1, // index in boundary list - boundaryMesh(), // polyBoundaryMesh + mesh.boundaryMesh(), // polyBoundaryMesh emptyPolyPatch::typeName // patchType ); - addFvPatches(patches); + mesh.addFvPatches(patches); if (debug) { @@ -418,6 +365,63 @@ Foam::proxyMeshes::columnFvMesh::columnFvMesh(const Time& runTime) << *patches[patchi] << endl; } } +} + +// * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // + +Foam::simplifiedMeshes::columnFvMeshInfo::columnFvMeshInfo(const Time& runTime) +: + localInstance_ + ( + runTime.findInstance + ( + polyMesh::meshSubDir, + "boundary", + IOobject::READ_IF_PRESENT + ) + ), + createFromMesh_(false), + points1D_(), + faces1D_(), + owner1D_(), + neighbour1D_(), + patchEntries_(), + nPatchWithFace_(0) +{ + initialise(runTime); +} + + +Foam::simplifiedMeshes::columnFvMesh::columnFvMesh(const Time& runTime) +: + columnFvMeshInfo(runTime), + simplifiedFvMesh + ( + IOobject + ( + fvMesh::defaultRegion, + runTime.constant(), + runTime, + IOobject::NO_READ, // Do not read any existing mesh + IOobject::NO_WRITE + ), + std::move(points1D_), + std::move(faces1D_), + std::move(owner1D_), + std::move(neighbour1D_) + ) +{ + // Workaround to read fvSchemes and fvSolution after setting NO_READ + // when creating the mesh + { + fvSchemes::readOpt() = IOobject::MUST_READ; + fvSchemes::read(); + fvSolution::readOpt() = IOobject::MUST_READ; + fvSolution::read(); + } + + // Add the patches + addLocalPatches(*this); // Add the zones diff --git a/src/finiteVolume/fvMesh/proxyFvMesh/columnFvMesh.H b/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.H similarity index 89% rename from src/finiteVolume/fvMesh/proxyFvMesh/columnFvMesh.H rename to src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.H index 2ab775b294c..d02d4ebeb38 100644 --- a/src/finiteVolume/fvMesh/proxyFvMesh/columnFvMesh.H +++ b/src/finiteVolume/fvMesh/simplifiedFvMesh/columnFvMesh/columnFvMesh.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::proxyMeshes::columnFvMesh + Foam::simplifiedMeshes::columnFvMesh Description Generates a 1D column representation of a mesh based on an existing mesh @@ -33,16 +33,16 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef proxyMeshes_columnFvMesh_H -#define proxyMeshes_columnFvMesh_H +#ifndef simplifiedMeshes_columnFvMesh_H +#define simplifiedMeshes_columnFvMesh_H -#include "proxyFvMesh.H" +#include "simplifiedFvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace proxyMeshes +namespace simplifiedMeshes { /*---------------------------------------------------------------------------*\ @@ -94,6 +94,11 @@ protected: //- Number of patches with at least 1 local face label nPatchWithFace_; + // Protected Member Functions + + //- Add the patches to the mesh + void addLocalPatches(fvMesh& mesh) const; + public: @@ -108,7 +113,7 @@ public: class columnFvMesh : public columnFvMeshInfo, - public proxyFvMesh + public simplifiedFvMesh { public: @@ -123,7 +128,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace proxyMeshes +} // End namespace simplifiedMeshes } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/proxyFvMesh/hexCellFvMesh.C b/src/finiteVolume/fvMesh/simplifiedFvMesh/hexCellFvMesh/hexCellFvMesh.C similarity index 95% rename from src/finiteVolume/fvMesh/proxyFvMesh/hexCellFvMesh.C rename to src/finiteVolume/fvMesh/simplifiedFvMesh/hexCellFvMesh/hexCellFvMesh.C index d9a8a9ddbd3..8ef8ef2dc37 100644 --- a/src/finiteVolume/fvMesh/proxyFvMesh/hexCellFvMesh.C +++ b/src/finiteVolume/fvMesh/simplifiedFvMesh/hexCellFvMesh/hexCellFvMesh.C @@ -31,13 +31,13 @@ License namespace Foam { -namespace proxyMeshes +namespace simplifiedMeshes { defineTypeNameAndDebug(hexCellFvMesh, 0); addToRunTimeSelectionTable ( - proxyFvMesh, + simplifiedFvMesh, hexCellFvMesh, time ); @@ -47,13 +47,13 @@ namespace proxyMeshes // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * // -Foam::proxyMeshes::hexCellFvMesh::hexCellFvMesh +Foam::simplifiedMeshes::hexCellFvMesh::hexCellFvMesh ( const Time& runTime, const scalar d ) : - proxyFvMesh + simplifiedFvMesh ( IOobject ( diff --git a/src/finiteVolume/fvMesh/proxyFvMesh/hexCellFvMesh.H b/src/finiteVolume/fvMesh/simplifiedFvMesh/hexCellFvMesh/hexCellFvMesh.H similarity index 89% rename from src/finiteVolume/fvMesh/proxyFvMesh/hexCellFvMesh.H rename to src/finiteVolume/fvMesh/simplifiedFvMesh/hexCellFvMesh/hexCellFvMesh.H index b8687efb2b1..0a332fe746c 100644 --- a/src/finiteVolume/fvMesh/proxyFvMesh/hexCellFvMesh.H +++ b/src/finiteVolume/fvMesh/simplifiedFvMesh/hexCellFvMesh/hexCellFvMesh.H @@ -22,7 +22,7 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::proxyMeshes::hexCellFvMesh + Foam::simplifiedMeshes::hexCellFvMesh Description Generates a single hex cell representation of a mesh @@ -32,16 +32,16 @@ SourceFiles \*---------------------------------------------------------------------------*/ -#ifndef proxyMeshes_hexCellFvMesh_H -#define proxyMeshes_hexCellFvMesh_H +#ifndef simplifiedMeshes_hexCellFvMesh_H +#define simplifiedMeshes_hexCellFvMesh_H -#include "proxyFvMesh.H" +#include "simplifiedFvMesh.H" // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // namespace Foam { -namespace proxyMeshes +namespace simplifiedMeshes { /*---------------------------------------------------------------------------*\ @@ -50,7 +50,7 @@ namespace proxyMeshes class hexCellFvMesh : - public proxyFvMesh + public simplifiedFvMesh { public: @@ -65,7 +65,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // -} // End namespace proxyMeshes +} // End namespace simplifiedMeshes } // End namespace Foam // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/proxyFvMesh/proxyFvMesh.C b/src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.C similarity index 82% rename from src/finiteVolume/fvMesh/proxyFvMesh/proxyFvMesh.C rename to src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.C index 25ada4281e7..f4a3daa906f 100644 --- a/src/finiteVolume/fvMesh/proxyFvMesh/proxyFvMesh.C +++ b/src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.C @@ -23,21 +23,21 @@ License \*---------------------------------------------------------------------------*/ -#include "proxyFvMesh.H" +#include "simplifiedFvMesh.H" #include "fvPatchField.H" // * * * * * * * * * * * * * * * Static Members * * * * * * * * * * * * * * // namespace Foam { -defineTypeNameAndDebug(proxyFvMesh, 0); -defineRunTimeSelectionTable(proxyFvMesh, time); +defineTypeNameAndDebug(simplifiedFvMesh, 0); +defineRunTimeSelectionTable(simplifiedFvMesh, time); } // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // -bool Foam::proxyFvMesh::fvPatchFieldExists(const word& patchType) +bool Foam::simplifiedFvMesh::fvPatchFieldExists(const word& patchType) { if ( @@ -57,7 +57,7 @@ bool Foam::proxyFvMesh::fvPatchFieldExists(const word& patchType) } -Foam::proxyFvMesh::proxyFvMesh +Foam::simplifiedFvMesh::simplifiedFvMesh ( const IOobject& io, pointField&& points, @@ -77,27 +77,27 @@ Foam::proxyFvMesh::proxyFvMesh {} -Foam::autoPtr<Foam::proxyFvMesh> Foam::proxyFvMesh::New +Foam::autoPtr<Foam::simplifiedFvMesh> Foam::simplifiedFvMesh::New ( const word& modelType, const Time& runTime ) { - Info<< "Selecting proxy mesh model " << modelType << endl; + Info<< "Selecting simplified mesh model " << modelType << endl; auto cstrIter = timeConstructorTablePtr_->cfind(modelType); if (!cstrIter.found()) { FatalErrorInFunction - << "Unknown proxy mesh type " + << "Unknown simplified fvMesh type " << modelType << nl << nl - << "Valid dumy meshes :" << endl + << "Valid simplified fvMeshes :" << endl << timeConstructorTablePtr_->sortedToc() << exit(FatalError); } - return autoPtr<proxyFvMesh>(cstrIter()(runTime)); + return autoPtr<simplifiedFvMesh>(cstrIter()(runTime)); } diff --git a/src/finiteVolume/fvMesh/proxyFvMesh/proxyFvMesh.H b/src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.H similarity index 85% rename from src/finiteVolume/fvMesh/proxyFvMesh/proxyFvMesh.H rename to src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.H index 11abb1de494..978dcbcbef2 100644 --- a/src/finiteVolume/fvMesh/proxyFvMesh/proxyFvMesh.H +++ b/src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMesh.H @@ -22,18 +22,18 @@ License along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>. Class - Foam::proxyFvMesh + Foam::simplifiedFvMesh Description - Functions to generate proxy finite volume meshes + Functions to generate simplified finite volume meshes SourceFiles - proxyFvMesh.C + simplifiedFvMesh.C \*---------------------------------------------------------------------------*/ -#ifndef proxyFvMesh_H -#define proxyFvMesh_H +#ifndef simplifiedFvMesh_H +#define simplifiedFvMesh_H #include "runTimeSelectionTables.H" #include "fvMesh.H" @@ -45,10 +45,10 @@ namespace Foam { /*---------------------------------------------------------------------------*\ - Class proxyFvMesh Declaration + Class simplifiedFvMesh Declaration \*---------------------------------------------------------------------------*/ -class proxyFvMesh +class simplifiedFvMesh : public fvMesh { @@ -67,14 +67,14 @@ protected: public: //- Runtime type information - TypeName("proxyFvMesh"); + TypeName("simplifiedFvMesh"); // Declare run-time constructor selection table declareRunTimeSelectionTable ( autoPtr, - proxyFvMesh, + simplifiedFvMesh, time, ( const Time& runTime @@ -85,8 +85,8 @@ public: // Selectors - //- Return a reference to the selected proxy mesh - static autoPtr<proxyFvMesh> New + //- Return a reference to the selected simplified mesh + static autoPtr<simplifiedFvMesh> New ( const word& modelType, const Time& runTime @@ -94,7 +94,7 @@ public: //- Constructor - proxyFvMesh + simplifiedFvMesh ( const IOobject& io, pointField&& points, @@ -119,7 +119,7 @@ public: // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // #ifdef NoRepository - #include "proxyFvMeshTemplates.C" + #include "simplifiedFvMeshTemplates.C" #endif // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // diff --git a/src/finiteVolume/fvMesh/proxyFvMesh/proxyFvMeshTemplates.C b/src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMeshTemplates.C similarity index 97% rename from src/finiteVolume/fvMesh/proxyFvMesh/proxyFvMeshTemplates.C rename to src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMeshTemplates.C index 460e1d81b12..14097c1e716 100644 --- a/src/finiteVolume/fvMesh/proxyFvMesh/proxyFvMeshTemplates.C +++ b/src/finiteVolume/fvMesh/simplifiedFvMesh/simplifiedFvMesh/simplifiedFvMeshTemplates.C @@ -26,7 +26,7 @@ License #include "polyMesh.H" template<class ZoneMeshType> -void Foam::proxyFvMesh::initialiseZone +void Foam::simplifiedFvMesh::initialiseZone ( const word& zoneTypeName, const fileName& instance, diff --git a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H index e42c51168ef..56eb964d65e 100644 --- a/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H +++ b/src/finiteVolume/fvMesh/singleCellFvMesh/singleCellFvMesh.H @@ -155,7 +155,7 @@ public: singleCellFvMesh(const IOobject& io, const fvMesh&); //- Construct from fvMesh and agglomeration of boundary faces. - // agglomeration is per patch, per patch face index the agglomeration + // Agglomeration is per patch, per patch face index the agglomeration // the face goes into. singleCellFvMesh ( @@ -193,14 +193,14 @@ public: } //- From point on original mesh to point on this (or -1 for removed - // points) + //- points) const labelList& reversePointMap() const { return reversePointMap_; } //- Map volField. Internal field set to average, patch fields straight - // copies. + //- copies. template<class Type> tmp<GeometricField<Type, fvPatchField, volMesh>> interpolate -- GitLab