diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 8d6cc649474bc5e2289a4d471778e409150685cd..8c3342d9f9846e0bf6beea57428c7eee6c5084dd 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -27,6 +27,7 @@ It is likely incomplete... - Bernhard Gschaider - Andrew Heather - David Hill +- Crist�bal Ib��ez - Yoshiaki Inoue - Mattijs Janssens - Andrew Jackson diff --git a/src/dynamicFvMesh/dynamicMotionSolverFvMeshAMI/dynamicMotionSolverFvMeshAMI.C b/src/dynamicFvMesh/dynamicMotionSolverFvMeshAMI/dynamicMotionSolverFvMeshAMI.C index bb94134e1fd6536c6966f5d2d4ee70f0afca6a9a..bbad4c5bd30063b656faea7fae9db6a63293e029 100644 --- a/src/dynamicFvMesh/dynamicMotionSolverFvMeshAMI/dynamicMotionSolverFvMeshAMI.C +++ b/src/dynamicFvMesh/dynamicMotionSolverFvMeshAMI/dynamicMotionSolverFvMeshAMI.C @@ -31,6 +31,7 @@ License #include "volFields.H" #include "surfaceFields.H" #include "cyclicAMIPolyPatch.H" +#include "cyclicACMIPolyPatch.H" #include "polyTopoChange.H" #include "MeshObject.H" #include "lduMesh.H" @@ -83,6 +84,35 @@ bool Foam::dynamicMotionSolverFvMeshAMI::init(const bool doInit) } motionPtr_ = motionSolver::New(*this); + + // allow restarts during initialization to match patch field values if + // required + const auto& pbm = boundaryMesh(); + bool changeRequired = false; + for (label patchi = 0; patchi < pbm.nNonProcessor(); ++patchi) + { + const auto* cycAmiPtr = isA<cyclicAMIPolyPatch>(pbm[patchi]); + + if (cycAmiPtr) + { + changeRequired = cycAmiPtr->createAMIFaces() || changeRequired; + } + else + { + const auto* cycAcmiPtr = isA<cyclicACMIPolyPatch>(pbm[patchi]); + if (cycAcmiPtr) + { + changeRequired = + cycAcmiPtr->cyclicAMIPolyPatch::createAMIFaces() + || changeRequired; + } + } + } + if (returnReduceOr(changeRequired)) + { + update(); + } + return true; } diff --git a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/controlDict b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/controlDict index fee05d98df20c8f2a901cf0a88524c46d80e0d81..67b81572349ade92a9e3a995cecdd42cfa686678 100644 --- a/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/controlDict +++ b/tutorials/incompressible/pimpleFoam/laminar/mixerVesselAMI2D/mixerVesselAMI2D-topologyChange/system/controlDict @@ -32,7 +32,7 @@ writeInterval 0.1; purgeWrite 0; -writeFormat ascii; +writeFormat binary; //ascii; writePrecision 6;