32 inline void Foam::LagrangianMesh::checkFieldSize(
const Field& field)
const
34 if (field.size() !=
size())
37 <<
"size of " << field.objectPath() <<
" = "
38 << field.size() <<
" is not the same as the size of the "
45 inline void Foam::LagrangianMesh::checkPtr
47 const autoPtr<Type>& ptr,
54 <<
name <<
" requested for a Lagrangian mesh in which "
55 <<
"they have not been constructed"
103 return statesPtr_.valid();
110 checkPtr(statesPtr_,
"States");
117 checkPtr(statesPtr_,
"States");
134 return state(subMesh.
start() + subi);
140 if (statesPtr_.valid())
152 <<
"Sub mesh index counter has overflowed."
156 return subMeshIndex_;
213 checkPtr(offsetsPtr_,
"Offsets");
232 checkPtr(offsetsPtr_,
"Offsets");
254 inline const Foam::vector& Foam::LagrangianMesh::linearDisplacement::operator()
271 inline Foam::vector Foam::LagrangianMesh::parabolicDisplacement::operator()
277 return linear_[i] + (1 -
f)*quadratic_[i];
label size() const
Return number of elements in table.
Boundary part of a Lagrangian mesh. Just a list of Lagrangian patches with some added convenience fun...
const vector & operator()(const label i) const
The displacement for a given index.
Pair< vector > operator()(const label i) const
The displacements for a given index.
Class containing Lagrangian geometry and topology.
LagrangianState state(const label i) const
Return the state for an element of the mesh, or a none state.
const labelIODynamicField & faceTrii() const
Access the face-tet indices.
const LagrangianSubMesh & subAll() const
Return a sub-mesh for all elements.
const polyMesh & mesh() const
Access the mesh.
label size() const
Get the number of elements.
bool changing() const
Return whether or not the mesh is changing.
const labelIODynamicField & celli() const
Access the cell indices.
const LagrangianBoundaryMesh & boundary() const
Return reference to boundary mesh.
label nGroups() const
Return the number of groups.
LagrangianSubMesh subNone() const
Return a sub-mesh for no elements.
LagrangianSubMesh subIncomplete() const
Return a sub-mesh for all incomplete elements.
label nStates() const
Return the number of states.
label subMeshIndex() const
Get a sub-mesh index.
label stateToGroupi(const LagrangianState state) const
Convert a state to a group index.
label globalSize() const
Get the global number of elements.
LagrangianSubMesh sub(const LagrangianGroup group) const
Return a sub-mesh for the given group.
const List< LagrangianState > & states() const
Return the states.
const barycentricIODynamicField & coordinates() const
Access the coordinates.
const labelIODynamicField & facei() const
Access the cell-face indices.
Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate...
label start() const
Return start.
A 1D array of objects of type <T>, where the size of the vector is known and used for subscript bound...
An ordered pair of two objects of type <Type> with first() and second() elements.
label size() const
Return the number of elements in the UPtrList.
static direction size()
Return the number of elements in the VectorSpace = Ncmpts.
Mesh consisting of general polyhedral cells.
const polyBoundaryMesh & boundaryMesh() const
Return boundary mesh.
Foam::fvMesh mesh(Foam::IOobject(regionName, runTime.name(), runTime, Foam::IOobject::MUST_READ), false)
#define FatalErrorInFunction
Report an error message using Foam::FatalError.
const char *const group
Group name for atomic constants.
barycentric coordinates(const polyMesh &mesh, const point &position, const label celli, const label facei, const label faceTrii, const scalar stepFraction)
Return the coordinates given the position and tet topology.
errorManipArg< error, int > exit(error &err, const int errNo=1)
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
errorManip< error > abort(error &err)
LagrangianState
Lagrangian state enumeration.
layerAndWeight min(const layerAndWeight &a, const layerAndWeight &b)
T returnReduce(const T &Value, const BinaryOp &bop, const int tag=Pstream::msgType(), const label comm=UPstream::worldComm)
LagrangianGroup stateToGroup(const LagrangianState &state)
Convert from a state enumeration to the corresponding group enumerations.
word name(const LagrangianState state)
Return a string representation of a Lagrangian state enumeration.
LagrangianGroup
Lagrangian group enumeration.
static const label labelMax
static const label labelMin