LagrangianSubMesh Class Reference

Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate to a contiguous sub-set of the Lagrangian elements. This class only stores references and the indices defining the range of the sub-set, so it is very lightweight and can be constructed and thrown away largely without consideration of expense. More...

Inheritance diagram for LagrangianSubMesh:
Collaboration diagram for LagrangianSubMesh:

Public Types

typedef LagrangianSubMesh Mesh
 Mesh type. More...
 
- Public Types inherited from GeoMesh< polyMesh >
typedef polyMesh Mesh
 Mesh type. More...
 
typedef MESH::BoundaryMesh BoundaryMesh
 Boundary mesh type. More...
 

Public Member Functions

 ClassName ("LagrangianSubMesh")
 Runtime type information. More...
 
 LagrangianSubMesh (const LagrangianMesh &mesh, const LagrangianGroup group, const label size, const label start)
 Construct from components, except for the index which is. More...
 
 LagrangianSubMesh (const LagrangianMesh &mesh, const labelList &groupOffsets, const LagrangianGroup group)
 Construct from Lagrangian mesh, group offsets and group. More...
 
 ~LagrangianSubMesh ()
 Destructor. More...
 
const LagrangianMeshmesh () const
 Return the mesh. More...
 
LagrangianGroup group () const
 Return the group. More...
 
label size () const
 Return size. More...
 
label globalSize () const
 Return size. More...
 
bool empty () const
 Return whether or not the mesh is empty. More...
 
label start () const
 Return start. More...
 
label end () const
 Return end. More...
 
label index () const
 Return the index. More...
 
template<class Type >
SubList< Type > sub (const List< Type > &list) const
 Return a sub-list corresponding to this sub-mesh. More...
 
template<class Type >
SubField< Type > sub (const Field< Type > &field) const
 Return a sub-field corresponding to this sub-mesh. More...
 
template<class Type , template< class > class PrimitiveField>
tmp< LagrangianSubSubField< Type > > sub (const DimensionedField< Type, LagrangianMesh, PrimitiveField > &) const
 Return a sub-dimensioned-field corresponding to this sub-mesh. More...
 
template<class FieldType >
tmp< FieldType > nf (const LagrangianScalarInternalDynamicField &fraction) const
 Return the face normals at the Lagrangian locations. More...
 
template<class FieldType >
tmp< FieldType > Uf (const LagrangianScalarInternalDynamicField &fraction) const
 Return the face velocities at the Lagrangian locations. More...
 
void operator+= (const LagrangianSubMesh &)
 Add a sub-mesh to this one. Must relate to adjacent elements. More...
 
template<>
Foam::tmp< Foam::vectorFieldnf (const LagrangianSubScalarSubField &fraction)
 
template<>
Foam::tmp< Foam::vectorFieldnf (const LagrangianScalarInternalDynamicField &fraction) const
 
template<>
Foam::tmp< Foam::vectorFieldUf (const LagrangianSubScalarSubField &fraction)
 
template<>
Foam::tmp< Foam::vectorFieldUf (const LagrangianScalarInternalDynamicField &fraction) const
 
template<class Type >
Foam::SubList< Type > sub (const List< Type > &list) const
 
template<class Type >
Foam::SubField< Type > sub (const Field< Type > &field) const
 
template<class Type , template< class > class PrimitiveField>
Foam::tmp< Foam::LagrangianSubSubField< Type > > sub (const DimensionedField< Type, LagrangianMesh, PrimitiveField > &field) const
 
- Public Member Functions inherited from GeoMesh< polyMesh >
 GeoMesh (const polyMesh &mesh)
 Construct from MESH. More...
 
const objectRegistrythisDb () const
 Return the object registry. More...
 
const polyMeshoperator() () const
 Return reference to MESH. More...
 

Static Public Member Functions

static label size (const LagrangianSubMesh &subMesh)
 Return size. More...
 
template<class FieldType >
static tmp< FieldType > nf (const LagrangianSubScalarSubField &fraction)
 Return the face normals at the Lagrangian locations. More...
 
template<class FieldType >
static tmp< FieldType > Uf (const LagrangianSubScalarSubField &fraction)
 Return the face velocities at the Lagrangian locations. More...
 

Friends

class LagrangianMesh
 Allow the Lagrangian mesh to construct with a specified index. More...
 

Additional Inherited Members

- Protected Attributes inherited from GeoMesh< polyMesh >
const polyMeshmesh_
 Reference to Mesh. More...
 

Detailed Description

Mesh that relates to a sub-section of a Lagrangian mesh. This is used to construct fields that relate to a contiguous sub-set of the Lagrangian elements. This class only stores references and the indices defining the range of the sub-set, so it is very lightweight and can be constructed and thrown away largely without consideration of expense.

Source files

Definition at line 58 of file LagrangianSubMesh.H.

Member Typedef Documentation

◆ Mesh

Mesh type.

Definition at line 108 of file LagrangianSubMesh.H.

Constructor & Destructor Documentation

◆ LagrangianSubMesh() [1/2]

LagrangianSubMesh ( const LagrangianMesh mesh,
const LagrangianGroup  group,
const label  size,
const label  start 
)
explicit

Construct from components, except for the index which is.

automatically generated from the complete mesh

Definition at line 61 of file LagrangianSubMesh.C.

◆ LagrangianSubMesh() [2/2]

LagrangianSubMesh ( const LagrangianMesh mesh,
const labelList groupOffsets,
const LagrangianGroup  group 
)
explicit

Construct from Lagrangian mesh, group offsets and group.

Definition at line 78 of file LagrangianSubMesh.C.

◆ ~LagrangianSubMesh()

Destructor.

Definition at line 100 of file LagrangianSubMesh.C.

Member Function Documentation

◆ ClassName()

ClassName ( "LagrangianSubMesh"  )

Runtime type information.

◆ mesh()

◆ group()

Foam::LagrangianGroup group ( ) const
inline

Return the group.

Definition at line 36 of file LagrangianSubMeshI.H.

Referenced by CrankNicolson< Type >::LagrangianmNoDdt(), cloudBoundaryCollisionFlux::postCrossFaces(), and cloudSurfaceDistribution::postCrossFaces().

Here is the caller graph for this function:

◆ size() [1/2]

◆ globalSize()

Foam::label globalSize ( ) const
inline

Return size.

Definition at line 48 of file LagrangianSubMeshI.H.

References Foam::returnReduce().

Here is the call graph for this function:

◆ size() [2/2]

Foam::label size ( const LagrangianSubMesh subMesh)
inlinestatic

Return size.

Definition at line 54 of file LagrangianSubMeshI.H.

◆ empty()

bool empty ( ) const
inline

Return whether or not the mesh is empty.

Definition at line 63 of file LagrangianSubMeshI.H.

◆ start()

◆ end()

Foam::label end ( ) const
inline

Return end.

Definition at line 75 of file LagrangianSubMeshI.H.

Referenced by LagrangianModels::modify().

Here is the caller graph for this function:

◆ index()

Foam::label index ( ) const
inline

Return the index.

Definition at line 81 of file LagrangianSubMeshI.H.

Referenced by CloudDerivedField< Type >::ref(), and CloudStateField< Type >::ref().

Here is the caller graph for this function:

◆ sub() [1/6]

◆ sub() [2/6]

SubField<Type> sub ( const Field< Type > &  field) const

Return a sub-field corresponding to this sub-mesh.

◆ sub() [3/6]

tmp<LagrangianSubSubField<Type> > sub ( const DimensionedField< Type, LagrangianMesh, PrimitiveField > &  ) const

Return a sub-dimensioned-field corresponding to this sub-mesh.

◆ nf() [1/4]

static tmp<FieldType> nf ( const LagrangianSubScalarSubField fraction)
static

Return the face normals at the Lagrangian locations.

◆ nf() [2/4]

tmp<FieldType> nf ( const LagrangianScalarInternalDynamicField fraction) const

Return the face normals at the Lagrangian locations.

◆ Uf() [1/4]

static tmp<FieldType> Uf ( const LagrangianSubScalarSubField fraction)
static

Return the face velocities at the Lagrangian locations.

◆ Uf() [2/4]

tmp<FieldType> Uf ( const LagrangianScalarInternalDynamicField fraction) const

Return the face velocities at the Lagrangian locations.

◆ operator+=()

void operator+= ( const LagrangianSubMesh subMesh)

Add a sub-mesh to this one. Must relate to adjacent elements.

Definition at line 292 of file LagrangianSubMesh.C.

References Foam::exit(), Foam::FatalError, and FatalErrorInFunction.

Here is the call graph for this function:

◆ nf() [3/4]

◆ nf() [4/4]

Definition at line 155 of file LagrangianSubMesh.C.

References Foam::tracking::coordinates(), Foam::tracking::faceNormalAndDisplacement(), forAll, mesh, and tmp< T >::ref().

Here is the call graph for this function:

◆ Uf() [3/4]

◆ Uf() [4/4]

◆ sub() [4/6]

Foam::SubList<Type> sub ( const List< Type > &  list) const

Definition at line 32 of file LagrangianSubMeshTemplates.C.

References LagrangianSubMesh::size(), and LagrangianSubMesh::start().

Here is the call graph for this function:

◆ sub() [5/6]

Foam::SubField<Type> sub ( const Field< Type > &  field) const

Definition at line 42 of file LagrangianSubMeshTemplates.C.

◆ sub() [6/6]

Friends And Related Function Documentation

◆ LagrangianMesh

friend class LagrangianMesh
friend

Allow the Lagrangian mesh to construct with a specified index.

Definition at line 98 of file LagrangianSubMesh.H.


The documentation for this class was generated from the following files: