LagrangianInjection Class Reference

Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility functions, and reports that all fields require a source value to be specified. Also serves as a type that can be identified and cast to. More...

Inheritance diagram for LagrangianInjection:
Collaboration diagram for LagrangianInjection:

Public Member Functions

 TypeName ("LagrangianInjection")
 Runtime type information. More...
 
 LagrangianInjection (const word &name, const LagrangianMesh &mesh)
 Construct from components. More...
 
virtual ~LagrangianInjection ()
 Destructor. More...
 
virtual bool addsSupToField (const word &fieldName) const
 Return true if the LagrangianModel adds a source term to the. More...
 
- Public Member Functions inherited from LagrangianModel
 TypeName ("LagrangianModel")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, LagrangianModel, dictionary,(const word &name, const LagrangianMesh &mesh, const dictionary &modelDict, const dictionary &stateDict),(name, mesh, modelDict, stateDict))
 Declare run-time constructor selection table. More...
 
 LagrangianModel (const word &name, const LagrangianMesh &mesh)
 Construct from components. More...
 
 LagrangianModel (const LagrangianModel &)=delete
 Disallow default bitwise copy construction. More...
 
autoPtr< LagrangianModelclone () const
 Clone. More...
 
virtual ~LagrangianModel ()
 Destructor. More...
 
const wordname () const
 The source name. More...
 
const objectRegistrydb () const
 The database. More...
 
const LagrangianMeshmesh () const
 The mesh. More...
 
virtual wordList addSupFields () const
 Return the list of fields for which the LagrangianModel adds. More...
 
template<class Type , template< class > class PrimitiveField>
bool addsSupToField (const LagrangianSubField< Type, PrimitiveField > &field) const
 Return true if the LagrangianModels adds a source term to the. More...
 
virtual void postConstruct ()
 Do post construction steps which require access to other models. More...
 
virtual void correct ()
 Correct the LagrangianModel. More...
 
virtual void preModify (const LagrangianMesh &mesh, DynamicList< elementModification > &elementModifications) const
 Identify elements in the Lagrangian mesh which are to be. More...
 
virtual LagrangianSubMesh modify (LagrangianMesh &mesh, const LagrangianSubMesh &modifiedMesh) const
 Instantaneously modify and/or create and remove elements in the. More...
 
virtual void calculate (const LagrangianSubScalarField &deltaT, const bool final)
 Solve equations and/or update continually changing properties. More...
 
virtual void addSup (const LagrangianSubScalarField &deltaT, LagrangianSubScalarField &S) const
 Add a fractional source term. More...
 
virtual void topoChange (const polyTopoChangeMap &)
 Add a source term to an equation. More...
 
virtual void mapMesh (const polyMeshMap &)
 Update from another mesh using the given map. More...
 
virtual void distribute (const polyDistributionMap &)
 Redistribute or update using the given distribution map. More...
 
virtual bool read (const dictionary &modelDict)
 Read dictionary. More...
 
virtual bool write (const bool write) const
 Write data. More...
 
void operator= (const LagrangianModel &)=delete
 Disallow default bitwise assignment. More...
 
template<class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
Foam::word fieldName (const AlphaRhoFieldType &alphaRhoField, const AlphaRhoFieldTypes &... alphaRhoFields)
 
template<class AlphaRhoFieldType >
Foam::word fieldName (const AlphaRhoFieldType &alphaRhoField)
 
template<class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
Foam::word fieldsName (const AlphaRhoFieldType &alphaRhoField, const AlphaRhoFieldTypes &... alphaRhoFields)
 
template<class AlphaRhoFieldType >
Foam::word fieldsName (const AlphaRhoFieldType &alphaRhoField)
 
- Public Member Functions inherited from stateModel
 stateModel ()
 Construct null. More...
 
 stateModel (const stateModel &)=delete
 Disallow default bitwise copy construction. More...
 
virtual ~stateModel ()
 Destructor. More...
 
bool writeState (const bool write) const
 Write state. More...
 
virtual void writeState (Ostream &os) const
 Write state. More...
 
virtual void writeProcessorState (Ostream &os) const
 Write processor state. More...
 
void operator= (const stateModel &)=delete
 Disallow default bitwise assignment. More...
 

Protected Member Functions

void checkLocation (const LagrangianMesh::location, const point &) const
 Check the location and error or warn as appropriate. More...
 
void checkLocation (const List< LagrangianMesh::location > &, const List< point > &) const
 Check the locations and error or warn as appropriate. More...
 
- Protected Member Functions inherited from LagrangianModel
template<class Type >
void addSupType (const LagrangianSubScalarField &deltaT, const LagrangianSubSubField< Type > &field, LagrangianEqn< Type > &eqn) const
 Add a source term to an equation. More...
 
template<class Type >
void addSupType (const LagrangianSubScalarField &deltaT, const LagrangianSubScalarSubField &m, const LagrangianSubSubField< Type > &field, LagrangianEqn< Type > &eqn) const
 Add a source term to a mass-weighted equation. More...
 

Static Protected Member Functions

template<class ... OtherFields>
static void filter (barycentricField &coordinates, labelField &celli, labelField &facei, labelField &faceTrii, OtherFields &... otherFields)
 Filter out injected elements that are on other processes. These. More...
 

Additional Inherited Members

- Public Types inherited from LagrangianModel
enum class  modification : label { change = 0 , remove = 1 }
 Enumeration of the types of instantaneous modification. More...
 
typedef LagrangianMesh::elementGroup< modificationelementModification
 Class containing an element-index and a modification-enumeration. More...
 
- Static Public Member Functions inherited from LagrangianModel
template<class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
static word fieldName (const AlphaRhoFieldType &alphaRhoField, const AlphaRhoFieldTypes &... alphaRhoFields)
 Return the name of the field associated with a source term. More...
 
template<class AlphaRhoFieldType >
static word fieldName (const AlphaRhoFieldType &alphaRhoField)
 Return the name of the field associated with a source term (base. More...
 
template<class AlphaRhoFieldType , class ... AlphaRhoFieldTypes>
static word fieldsName (const AlphaRhoFieldType &alphaRhoField, const AlphaRhoFieldTypes &... alphaRhoFields)
 Return the name of the product of the fields associated with a. More...
 
template<class AlphaRhoFieldType >
static word fieldsName (const AlphaRhoFieldType &alphaRhoField)
 Return the name of the product of the fields associated with a. More...
 
static autoPtr< LagrangianModelNew (const word &name, const LagrangianMesh &mesh, const dictionary &modelDict)
 Selector. More...
 
- Static Public Member Functions inherited from stateModel
static dictionary stateDict (const word &name, const objectRegistry &db)
 Construct and return the state dictionary for reading. More...
 

Detailed Description

Base class for Lagrangian injections. Minimal wrapper over LagrangianSource. Implements some utility functions, and reports that all fields require a source value to be specified. Also serves as a type that can be identified and cast to.

Source files

Definition at line 53 of file LagrangianInjection.H.

Constructor & Destructor Documentation

◆ LagrangianInjection()

LagrangianInjection ( const word name,
const LagrangianMesh mesh 
)

Construct from components.

Definition at line 93 of file LagrangianInjection.C.

◆ ~LagrangianInjection()

~LagrangianInjection ( )
virtual

Destructor.

Definition at line 105 of file LagrangianInjection.C.

Member Function Documentation

◆ checkLocation() [1/2]

void checkLocation ( const LagrangianMesh::location  location,
const point p 
) const
protected

Check the location and error or warn as appropriate.

Definition at line 40 of file LagrangianInjection.C.

References Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorInFunction, LagrangianMesh::inCell, LagrangianMesh::onBoundary, LagrangianMesh::outsideMesh, p, and WarningInFunction.

Here is the call graph for this function:

◆ checkLocation() [2/2]

void checkLocation ( const List< LagrangianMesh::location > &  locations,
const List< point > &  points 
) const
protected

Check the locations and error or warn as appropriate.

Definition at line 67 of file LagrangianInjection.C.

References p, points, and List< T >::size().

Here is the call graph for this function:

◆ filter()

void filter ( barycentricField coordinates,
labelField celli,
labelField facei,
labelField faceTrii,
OtherFields &...  otherFields 
)
staticprotected

Filter out injected elements that are on other processes. These.

are identified by cell/face/faceTri indices equal to -1.

Definition at line 31 of file LagrangianInjectionTemplates.C.

References Foam::tracking::coordinates(), forAll, and List< T >::resize().

Here is the call graph for this function:

◆ TypeName()

TypeName ( "LagrangianInjection"  )

Runtime type information.

◆ addsSupToField()

bool addsSupToField ( const word fieldName) const
virtual

Return true if the LagrangianModel adds a source term to the.

given field's transport equation. Returns false. Injections are instantaneous. They do not create continuous sources.

Reimplemented from LagrangianModel.

Definition at line 111 of file LagrangianInjection.C.


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