51 else if (cmptName ==
"y")
55 else if (cmptName ==
"z")
62 <<
"Given component name " << cmptName <<
" should be x, y or z"
72Foam::componentDisplacementMotionSolver::componentDisplacementMotionSolver
75 const IOdictionary&
dict,
80 cmptName_(coeffDict().get<word>(
"component")),
81 cmpt_(cmpt(cmptName_)),
102 "pointDisplacement" + cmptName_,
118 mesh.time().constant(),
119 polyMesh::meshSubDir,
123 IOobject::NO_REGISTER
124 ).typeFilePath<pointIOField>()
128 <<
"Number of points in mesh " << mesh.nPoints()
129 <<
" differs from number of points " << points0_.size()
130 <<
" read from file " << fName << nl
173 forAll(newPoints0, pointi)
175 label oldPointi = mpm.
pointMap()[pointi];
181 if (masterPointi == pointi)
183 newPoints0[pointi] = points0_[oldPointi];
196 <<
"Cannot work out coordinates of introduced vertices."
197 <<
" New vertex " << pointi <<
" at coordinate "
tmp< Field< cmptType > > component(const direction) const
Return a component field of the field.
IOdictionary is derived from dictionary and IOobject to give the dictionary automatic IO functionalit...
@ NO_REGISTER
Do not request registration (bool: false).
@ MUST_READ
Reading required.
@ NO_WRITE
Ignore writing from objectRegistry::writeObject().
@ AUTO_WRITE
Automatically write from objectRegistry::writeObject().
Defines the attributes of an object for which implicit objectRegistry management is supported,...
const Time & time() const noexcept
Return Time associated with the objectRegistry.
void transfer(List< T > &list)
Transfer the contents of the argument List into this list and annul the argument list.
void size(const label n)
Older name for setAddressableSize.
Virtual base class for displacement motion solver.
word cmptName_
The component name to solve for.
scalarField points0_
Reference point field for this component.
pointScalarField pointDisplacement_
Point motion field.
virtual void movePoints(const pointField &)
Update local data for geometry changes.
virtual ~componentDisplacementMotionSolver()
Destructor.
virtual void updateMesh(const mapPolyMesh &)
Update local data for topology changes.
direction cmpt_
The component to solve for.
T get(const word &keyword, enum keyType::option matchOpt=keyType::REGEX) const
Find and return a T. FatalIOError if not found, or if the number of tokens is incorrect.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
const pointField & preMotionPoints() const noexcept
Pre-motion point positions.
bool hasMotionPoints() const noexcept
Has valid preMotionPoints?
const labelList & reversePointMap() const noexcept
Reverse point map.
const labelList & pointMap() const noexcept
Old point map.
virtual void updateMesh(const mapPolyMesh &)=0
Update local data for topology changes.
const polyMesh & mesh() const
Return reference to mesh.
static autoPtr< motionSolver > New(const polyMesh &)
Select constructed from polyMesh.
motionSolver(const polyMesh &mesh)
Construct from polyMesh.
const dictionary & coeffDict() const
Const access to the coefficients dictionary.
constant condensation/saturation model.
Mesh representing a set of points created from polyMesh.
Mesh consisting of general polyhedral cells.
A class for handling words, derived from Foam::string.
#define defineTypeNameAndDebug(Type, DebugSwitch)
Define the typeName and debug information.
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
Different types of constants.
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh > > &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
void component(FieldField< Field, typename FieldField< Field, Type >::cmptType > &sf, const FieldField< Field, Type > &f, const direction d)
vectorIOField pointIOField
pointIOField is a vectorIOField.
fileName::Type type(const fileName &name, const bool followLink=true)
Return the file type: DIRECTORY or FILE, normally following symbolic links.
Field< scalar > scalarField
Specialisation of Field<T> for scalar.
MinMax< Type > gMinMax(const FieldField< Field, Type > &f)
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)
#define forAll(list, i)
Loop across all elements in list.