41 dynamicMultiMotionSolverFvMesh,
47 dynamicMultiMotionSolverFvMesh,
77 IOobject dynMeshDictIO
88 const auto& dynamicMeshCoeffs = dynDict.subDict(typeName +
"Coeffs");
93 motionSolvers_.resize(dynamicMeshCoeffs.size());
94 zoneMotions_.resize(dynamicMeshCoeffs.size());
96 const auto& allCellZones = this->cellZones();
100 for (
const entry&
e : dynamicMeshCoeffs)
102 if (
const auto* dictptr =
e.dictPtr())
104 const auto& subDict = *dictptr;
107 subDict.readEntry(
"cellZone", cellZoneName);
115 <<
"No matching cellZones: " << cellZoneName <<
nl 129 IOdictionary(dynMeshDictIO, subDict)
134 auto& zoneMove = zoneMotions_.emplace_set(zonei, *
this,
zoneIDs);
136 Info<<
"Applying motionSolver " << motionSolvers_[zonei].type()
138 <<
returnReduce(zoneMove.pointIDs().size(), sumOp<label>())
139 <<
" points of cellZone " << cellZoneName <<
endl;
145 motionSolvers_.resize(zonei);
146 zoneMotions_.resize(zonei);
159 forAll(motionSolvers_, zonei)
161 const labelUList& zonePoints = zoneMotions_[zonei].pointIDs();
163 const pointField newPoints(motionSolvers_[zonei].newPoints());
165 for (
const label pointi : zonePoints)
167 transformedPts[pointi] = newPoints[pointi];
173 static bool hasWarned =
false;
175 if (
auto* Uptr = getObjectPtr<volVectorField>(
"U"))
177 Uptr->correctBoundaryConditions();
184 <<
"Did not find volVectorField U." 185 <<
" Not updating U boundary conditions." <<
endl;
const labelIOList & zoneIDs
errorManipArg< error, int > exit(error &err, const int errNo=1)
constexpr char nl
The newline '\n' character (0x0a)
bool empty() const noexcept
True if List is empty (ie, size() is zero)
Ostream & endl(Ostream &os)
Add newline and flush stream.
virtual bool movePoints()
Do what is necessary if the mesh has moved.
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
static autoPtr< motionSolver > New(const polyMesh &)
Select constructed from polyMesh.
Ignore writing from objectRegistry::writeObject()
static dictionary readContents(const IOobject &io)
Read and return contents, testing for "dictionary" type. The IOobject will not be registered...
Macros for easy insertion into run-time selection tables.
#define forAll(list, i)
Loop across all elements in list.
const dimensionedScalar e
Elementary charge.
T returnReduce(const T &value, BinaryOp bop, const int tag=UPstream::msgType(), const int communicator=UPstream::worldComm)
Perform reduction on a copy, using specified binary operation.
defineTypeNameAndDebug(combustionModel, 0)
Expression::UniformListWrap< scalar > constant
Wrap of constant as a list expression.
#define WarningInFunction
Report a warning using Foam::Warning.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
Abstract base class for geometry and/or topology changing fvMesh.
messageStream Info
Information stream (stdout output on master, null elsewhere)
virtual bool update()
Update the mesh for both mesh motion and topology change.
List< label > labelList
A List of labels.
virtual bool init(const bool doInit)
Initialise all non-demand-driven data.
dynamicMultiMotionSolverFvMesh(const dynamicMultiMotionSolverFvMesh &)=delete
No copy construct.
Defines the attributes of an object for which implicit objectRegistry management is supported...
Do not request registration (bool: false)
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...