55Foam::multiDisplacementMotionSolver::multiDisplacementMotionSolver
72 motionSolvers_.setSize(solverDict.
size());
74 for (
const entry& dEntry : solverDict)
81 io.rename(dEntry.dict().dictName());
98 motionSolvers_[i].pointDisplacement().checkOut();
103 motionSolvers_.setSize(i);
116Foam::multiDisplacementMotionSolver::
117multiDisplacementMotionSolver
119 const polyMesh&
mesh,
120 const IOdictionary&
dict,
136 motionSolvers_.setSize(solverDict.size());
138 for (
const entry& dEntry : solverDict)
145 io.rename(dEntry.dict().dictName());
163 msPtr->pointDisplacement().checkOut();
165 motionSolvers_.set(i++, msPtr);
168 motionSolvers_.setSize(i);
192 if (!motionSolvers_.size())
208 pointDisplacement().checkOut();
211 motionSolvers_[0].pointDisplacement().checkIn();
213 motionSolvers_[0].pointDisplacement() == pointDisplacement();
215 motionSolvers_[0].solve();
216 motionSolvers_[0].pointDisplacement().checkOut();
219 curPoints_ = motionSolvers_[0].curPoints();
220 pointDisplacement() == motionSolvers_[0].pointDisplacement();
222 for (label i = 1; i < motionSolvers_.size(); i++)
225 const_cast<polyMesh&
>(
mesh()).movePoints(curPoints_);
226 motionSolvers_[i].pointDisplacement().checkIn();
229 motionSolvers_[i].pointDisplacement() == pointDisplacement();
231 motionSolvers_[i].solve();
232 motionSolvers_[i].pointDisplacement().checkOut();
235 curPoints_ = motionSolvers_[i].curPoints();
236 pointDisplacement() == motionSolvers_[i].pointDisplacement();
239 pointDisplacement().checkIn();
242 for (
auto& ms : motionSolvers_)
254 curPoints_ = newPoints;
255 for (
auto& ms : motionSolvers_)
264 for (
auto& ms : motionSolvers_)
Macros for easy insertion into run-time selection tables.
#define addToRunTimeSelectionTable(baseType, thisType, argNames)
Add to construction table with typeName as the key.
label size() const noexcept
The number of elements in list.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
IOdictionary(const IOobject &io, const dictionary *fallback=nullptr)
Construct given an IOobject and optional fallback dictionary content.
@ NO_READ
Nothing to be read.
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
dictionary()
Default construct, a top-level empty dictionary.
friend class entry
Declare friendship with the entry class for IO.
Virtual base class for displacement motion solver.
pointVectorField & pointDisplacement() noexcept
Return reference to the point motion displacement field.
displacementMotionSolver(const displacementMotionSolver &)=delete
No copy construct.
static autoPtr< displacementMotionSolver > New(const word &solverTypeName, const polyMesh &, const IOdictionary &, const pointVectorField &pointDisplacement, const pointIOField &points0)
Select constructed from polyMesh, dictionary and components.
A keyword and a list of tokens is an 'entry'.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Virtual base class for mesh motion solver.
const polyMesh & mesh() const
Return reference to mesh.
static autoPtr< motionSolver > New(const polyMesh &)
Select constructed from polyMesh.
virtual tmp< pointField > newPoints()
Provide new points for motion. Solves for motion.
Mesh motion solver for a polyMesh. Applies multiple (displacement) motion solvers in order.
virtual tmp< pointField > curPoints() const
Provide current points for motion.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
virtual void solve()
Solve for motion.
pointField & points0() noexcept
Return reference to the reference ('0') pointField.
Mesh consisting of general polyhedral cells.
bool checkOut()
Remove object from registry, and remove all file watches.
bool checkIn()
Add object to registry, if not already registered.
A class for managing temporary objects.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
GeometricField< vector, pointPatchField, pointMesh > pointVectorField
vectorIOField pointIOField
pointIOField is a vectorIOField.
const word GlobalIOList< Tuple2< scalar, vector > >::typeName("scalarVectorTable")
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
vectorField pointField
pointField is a vectorField.
errorManipArg< error, int > exit(error &err, const int errNo=1)
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER)))