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...

Public Types

typedef LagrangianSubMesh Mesh
 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...
 
const objectRegistrydb () const
 Return the object registry. More...
 
const Timetime () const
 Return time. 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...
 
uint64_t index () const
 Return the index. More...
 
word sub (const word &fieldName) const
 Return the name of a field corresponding to this sub-mesh. More...
 
word complete (const word &subFieldName) const
 Return the name of a field corresponding to the complete mesh. 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 LagrangianInternalScalarDynamicField &fraction) const
 Return the face normals at the Lagrangian locations. More...
 
template<class FieldType >
tmp< FieldType > Uf (const LagrangianInternalScalarDynamicField &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 LagrangianInternalScalarDynamicField &fraction) const
 
template<>
Foam::tmp< Foam::vectorFieldUf (const LagrangianSubScalarSubField &fraction)
 
template<>
Foam::tmp< Foam::vectorFieldUf (const LagrangianInternalScalarDynamicField &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
 

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...
 

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 57 of file LagrangianSubMesh.H.

Member Typedef Documentation

◆ Mesh

Mesh type.

Definition at line 105 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 60 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 76 of file LagrangianSubMesh.C.

◆ ~LagrangianSubMesh()

Destructor.

Definition at line 97 of file LagrangianSubMesh.C.

Member Function Documentation

◆ ClassName()

ClassName ( "LagrangianSubMesh"  )

Runtime type information.

◆ mesh()

◆ db()

const Foam::objectRegistry & db ( ) const

Return the object registry.

Definition at line 103 of file LagrangianSubMesh.C.

◆ time()

const Foam::Time & time ( ) const

Return time.

Definition at line 109 of file LagrangianSubMesh.C.

References objectRegistry::time().

Here is the call graph for this function:

◆ 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()

uint64_t index ( ) const
inline

Return the index.

Definition at line 81 of file LagrangianSubMeshI.H.

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

Here is the caller graph for this function:

◆ sub() [1/7]

Foam::word sub ( const word fieldName) const
inline

Return the name of a field corresponding to this sub-mesh.

Definition at line 87 of file LagrangianSubMeshI.H.

References Foam::constant::atomic::group, and Foam::name().

Referenced by heatTransfer::addSup(), pressureWork::addSup(), BasicLagrangianThermo< MixtureType, BasicThermoType >::alphav(), collisionPhaseTransfer::calculate(), constantFluxCarrierTransfer::calculate(), cloudAge::calculate(), cloudMass::calculate(), cloudPosition::calculate(), cloudSurfaceArea::calculate(), cloudVolume::calculate(), FluidLagrangianThermo< BaseThermo >::correct(), SolidLagrangianThermo< BaseThermo >::correct(), spherical::correct(), fluidLagrangianThermo::implementation::correctPressure(), BasicLagrangianThermo< MixtureType, BasicThermoType >::Cp(), cyclicLagrangianPatch::evaluate(), nonConformalCyclicLagrangianPatch::evaluate(), wedgeLagrangianPatch::evaluate(), nonConformalProcessorCyclicLagrangianPatch::initEvaluate(), processorLagrangianPatch::initEvaluate(), CrankNicolson< Type >::LagrangiancDdt(), BasicLagrangianThermo< MixtureType, BasicThermoType >::LagrangianInjectionProperty(), CrankNicolson< Type >::LagrangianmNoDdt(), BasicLagrangianThermo< MixtureType, BasicThermoType >::LagrangianSubScalarFieldProperty(), MulticomponentLagrangianThermo< BaseThermo >::LagrangianSubScalarFieldPropertyi(), patchInjection::modify(), multicomponentLagrangianThermo::implementation::normaliseY(), CloudStateFieldRef< Type >::operator()(), fluidLagrangianThermo::implementation::p(), cloudBoundaryCollisionFlux::postCrossFaces(), cloudPosition::postCrossFaces(), collisionPhaseTransfer::preAddSup(), constantFluxCarrierTransfer::preAddSup(), pressureWork::preAddSup(), cloudFunctionObjectUList::preCrossFaces(), cloud::solve(), internalLagrangianFieldSource< Type >::sourceValue(), LagrangianFieldSource< Type >::value(), and Function1LagrangianFieldSource::value().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ complete()

Foam::word complete ( const word subFieldName) const

Return the name of a field corresponding to the complete mesh.

Definition at line 115 of file LagrangianSubMesh.C.

References Foam::constant::atomic::group, and Foam::name().

Here is the call graph for this function:

◆ sub() [2/7]

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

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

◆ sub() [3/7]

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

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

◆ sub() [4/7]

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 LagrangianInternalScalarDynamicField 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 LagrangianInternalScalarDynamicField 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 330 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 193 of file LagrangianSubMesh.C.

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

Here is the call graph for this function:

◆ Uf() [3/4]

◆ Uf() [4/4]

◆ sub() [5/7]

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() [6/7]

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

Definition at line 42 of file LagrangianSubMeshTemplates.C.

◆ sub() [7/7]

Friends And Related Function Documentation

◆ LagrangianMesh

friend class LagrangianMesh
friend

Allow the Lagrangian mesh to construct with a specified index.

Definition at line 95 of file LagrangianSubMesh.H.


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