40 multiDisplacementMotionSolver,
46 displacementMotionSolver,
47 multiDisplacementMotionSolver,
55 Foam::multiDisplacementMotionSolver::multiDisplacementMotionSolver
72 motionSolvers_.setSize(solverDict.size());
74 for (
const entry& dEntry : solverDict)
81 io.rename(dEntry.dict().dictName());
94 dynamic_cast<displacementMotionSolver*>(msPtr)
98 motionSolvers_[i].pointDisplacement().checkOut();
103 motionSolvers_.setSize(i);
116 Foam::multiDisplacementMotionSolver::
117 multiDisplacementMotionSolver
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())
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();
242 for (
auto& ms : motionSolvers_)
244 ms.pointDisplacement() == pointDisplacement();
254 curPoints_ = newPoints;
255 for (
auto& ms : motionSolvers_)
257 ms.movePoints(newPoints);
264 for (
auto& ms : motionSolvers_)
Virtual base class for displacement motion solver.
errorManipArg< error, int > exit(error &err, const int errNo=1)
error FatalError
Error stream (stdout output on all processes), with additional 'FOAM FATAL ERROR' header text and sta...
A list of keyword definitions, which are a keyword followed by a number of values (eg...
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
virtual tmp< pointField > curPoints() const
Provide current points for motion.
pointVectorField & pointDisplacement() noexcept
Return reference to the point motion displacement field.
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
static autoPtr< motionSolver > New(const polyMesh &)
Select constructed from polyMesh.
Macros for easy insertion into run-time selection tables.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
vectorField pointField
pointField is a vectorField.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual void solve()
Solve for motion.
bool checkOut()
Remove object from registry, and remove all file watches.
defineTypeNameAndDebug(combustionModel, 0)
pointField points0(pointIOField(IOobject("points", mesh.time().constant(), polyMesh::meshSubDir, mesh, IOobject::MUST_READ, IOobject::NO_WRITE, IOobject::NO_REGISTER)))
Automatically write from objectRegistry::writeObject()
static autoPtr< displacementMotionSolver > New(const word &solverTypeName, const polyMesh &, const IOdictionary &, const pointVectorField &pointDisplacement, const pointIOField &points0)
Select constructed from polyMesh, dictionary and components.
pointField & points0() noexcept
Return reference to the reference ('0') pointField.
Mesh consisting of general polyhedral cells.
const polyMesh & mesh() const
Return reference to mesh.
IOobject io("surfaceFilmProperties", mesh.time().constant(), mesh, IOobject::READ_IF_PRESENT, IOobject::NO_WRITE, IOobject::NO_REGISTER)
A class for managing temporary objects.
Defines the attributes of an object for which implicit objectRegistry management is supported...
A primitive field of type <T> with automated input and output.
bool checkIn()
Add object to registry, if not already registered.
A keyword and a list of tokens is an 'entry'.
addToRunTimeSelectionTable(functionObject, pointHistory, dictionary)