Public Types | Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | Friends
Cloud Class Reference

Base cloud calls templated on particle type. More...

Inheritance diagram for Cloud:
Inheritance graph
[legend]
Collaboration diagram for Cloud:
Collaboration graph
[legend]

Public Types

typedef ParticleType particleType
 
typedef IDLList< ParticleType >::iterator iterator
 
typedef IDLList< ParticleType >::const_iterator const_iterator
 

Public Member Functions

 TypeName ("Cloud")
 Runtime type information. More...
 
 Cloud (const polyMesh &mesh, const IDLList< ParticleType > &particles)
 Construct from mesh and a list of particles. More...
 
 Cloud (const polyMesh &mesh, const word &cloudName, const IDLList< ParticleType > &particles)
 Construct from mesh, cloud name, and a list of particles. More...
 
 Cloud (const polyMesh &mesh, const bool checkClass=true)
 Construct from mesh by reading from file. More...
 
 Cloud (const polyMesh &pMesh, const word &cloudName, const bool checkClass=true)
 Construct from mesh by reading from file with given cloud instance. More...
 
const polyMeshpMesh () const
 Return the polyMesh reference. More...
 
label size () const
 
DynamicList< label > & labels ()
 
label nTrackingRescues () const
 Return nTrackingRescues. More...
 
void trackingRescue () const
 Increment the nTrackingRescues counter. More...
 
const PackedBoolListcellHasWallFaces () const
 Whether each cell has any wall faces (demand driven data) More...
 
virtual bool hasWallImpactDistance () const
 Switch to specify if particles of the cloud can return. More...
 
const const_iterator begin () const
 
const const_iterator cbegin () const
 
const const_iterator end () const
 
const const_iterator cend () const
 
iterator begin ()
 
iterator end ()
 
void clear ()
 
void addParticle (ParticleType *pPtr)
 Transfer particle to cloud. More...
 
void deleteParticle (ParticleType &)
 Remove particle from cloud and delete. More...
 
void cloudReset (const Cloud< ParticleType > &c)
 Reset the particles. More...
 
template<class TrackData >
void move (TrackData &td, const scalar trackTime)
 Move the particles. More...
 
template<class TrackData >
void autoMap (TrackData &td, const mapPolyMesh &)
 Remap the cells of particles corresponding to the. More...
 
IOobject fieldIOobject (const word &fieldName, const IOobject::readOption r) const
 Helper to construct IOobject for field and current time. More...
 
template<class DataType >
void checkFieldIOobject (const Cloud< ParticleType > &c, const IOField< DataType > &data) const
 Check lagrangian data field. More...
 
template<class DataType >
void checkFieldFieldIOobject (const Cloud< ParticleType > &c, const CompactIOField< Field< DataType >, DataType > &data) const
 Check lagrangian data fieldfield. More...
 
virtual void readFields ()
 Read the field data for the cloud of particles. Dummy at. More...
 
virtual void writeFields () const
 Write the field data for the cloud of particles Dummy at. More...
 
virtual bool writeObject (IOstream::streamFormat fmt, IOstream::versionNumber ver, IOstream::compressionType cmp) const
 Write using given format, version and compression. More...
 
void writePositions () const
 Write positions to <cloudName>_positions.obj file. More...
 

Static Public Attributes

static word cloudPropertiesName
 Name of cloud properties dictionary. More...
 

Private Member Functions

void checkPatches () const
 Check patches. More...
 
void initCloud (const bool checkClass)
 Initialise cloud on IO constructor. More...
 
void calcCellWallFaces () const
 Find all cells which have wall faces. More...
 
void readCloudUniformProperties ()
 Read cloud properties dictionary. More...
 
void writeCloudUniformProperties () const
 Write cloud properties dictionary. More...
 

Private Attributes

const polyMeshpolyMesh_
 
DynamicList< labellabels_
 Temporary storage for addressing. Used in findTris. More...
 
label nTrackingRescues_
 Count of how many tracking rescue corrections have been. More...
 
autoPtr< PackedBoolListcellWallFacesPtr_
 Does the cell have wall faces. More...
 

Friends

class particle
 
template<class ParticleT >
class IOPosition
 
Ostreamoperator (Ostream &, const Cloud< ParticleType > &)
 

Detailed Description

Base cloud calls templated on particle type.

Source files

Definition at line 52 of file Cloud.H.

Member Typedef Documentation

◆ particleType

typedef ParticleType particleType

Definition at line 114 of file Cloud.H.

◆ iterator

typedef IDLList<ParticleType>::iterator iterator

Definition at line 116 of file Cloud.H.

◆ const_iterator

typedef IDLList<ParticleType>::const_iterator const_iterator

Definition at line 117 of file Cloud.H.

Constructor & Destructor Documentation

◆ Cloud() [1/4]

Cloud ( const polyMesh mesh,
const IDLList< ParticleType > &  particles 
)

Construct from mesh and a list of particles.

◆ Cloud() [2/4]

Cloud ( const polyMesh mesh,
const word cloudName,
const IDLList< ParticleType > &  particles 
)

Construct from mesh, cloud name, and a list of particles.

◆ Cloud() [3/4]

Cloud ( const polyMesh mesh,
const bool  checkClass = true 
)

Construct from mesh by reading from file.

Optionally disable checking of class name for post-processing

◆ Cloud() [4/4]

Cloud ( const polyMesh pMesh,
const word cloudName,
const bool  checkClass = true 
)

Construct from mesh by reading from file with given cloud instance.

Optionally disable checking of class name for post-processing

Member Function Documentation

◆ checkPatches()

void checkPatches ( ) const
private

Check patches.

Definition at line 39 of file Cloud.C.

◆ initCloud()

void initCloud ( const bool  checkClass)
private

Initialise cloud on IO constructor.

Definition at line 110 of file CloudIO.C.

◆ calcCellWallFaces()

void calcCellWallFaces ( ) const
private

Find all cells which have wall faces.

Definition at line 68 of file Cloud.C.

◆ readCloudUniformProperties()

void readCloudUniformProperties ( )
private

Read cloud properties dictionary.

Definition at line 39 of file CloudIO.C.

◆ writeCloudUniformProperties()

void writeCloudUniformProperties ( ) const
private

Write cloud properties dictionary.

Definition at line 71 of file CloudIO.C.

◆ TypeName()

TypeName ( "Cloud"  )

Runtime type information.

◆ pMesh()

const polyMesh& pMesh ( ) const
inline

Return the polyMesh reference.

Definition at line 170 of file Cloud.H.

◆ size()

label size ( ) const
inline

◆ labels()

DynamicList<label>& labels ( )
inline

Definition at line 180 of file Cloud.H.

◆ nTrackingRescues()

label nTrackingRescues ( ) const
inline

Return nTrackingRescues.

Definition at line 186 of file Cloud.H.

◆ trackingRescue()

void trackingRescue ( ) const
inline

Increment the nTrackingRescues counter.

Definition at line 192 of file Cloud.H.

◆ cellHasWallFaces()

const Foam::PackedBoolList & cellHasWallFaces ( ) const

Whether each cell has any wall faces (demand driven data)

Definition at line 149 of file Cloud.C.

◆ hasWallImpactDistance()

virtual bool hasWallImpactDistance ( ) const
inlinevirtual

Switch to specify if particles of the cloud can return.

non-zero wall distance values. By default, assume that they can't (default for wallImpactDistance in particle is 0.0).

Definition at line 209 of file Cloud.H.

◆ begin() [1/2]

const const_iterator begin ( ) const
inline

Definition at line 217 of file Cloud.H.

◆ cbegin()

const const_iterator cbegin ( ) const
inline

Definition at line 222 of file Cloud.H.

◆ end() [1/2]

const const_iterator end ( ) const
inline

Definition at line 227 of file Cloud.H.

◆ cend()

const const_iterator cend ( ) const
inline

Definition at line 232 of file Cloud.H.

◆ begin() [2/2]

iterator begin ( )
inline

Definition at line 237 of file Cloud.H.

◆ end() [2/2]

iterator end ( )
inline

Definition at line 242 of file Cloud.H.

◆ clear()

void clear ( )
inline

Definition at line 250 of file Cloud.H.

Referenced by meshRefinement::markFeatureCellLevel().

Here is the caller graph for this function:

◆ addParticle()

void addParticle ( ParticleType *  pPtr)

Transfer particle to cloud.

Definition at line 162 of file Cloud.C.

Referenced by main(), meshRefinement::markFeatureCellLevel(), parLagrangianRedistributor::redistributeLagrangianPositions(), wallBoundedStreamLine::track(), and streamLine::track().

Here is the caller graph for this function:

◆ deleteParticle()

void deleteParticle ( ParticleType &  p)

Remove particle from cloud and delete.

Definition at line 169 of file Cloud.C.

Referenced by InflationInjection< CloudType >::parcelsToInject().

Here is the caller graph for this function:

◆ cloudReset()

void cloudReset ( const Cloud< ParticleType > &  c)

Reset the particles.

Definition at line 176 of file Cloud.C.

◆ move()

void move ( TrackData &  td,
const scalar  trackTime 
)

Move the particles.

passing the TrackingData to the track function

Definition at line 187 of file Cloud.C.

Referenced by moleculeCloud::evolve(), DSMCCloud< DSMCParcel< ParcelType > >::evolve(), meshRefinement::markFeatureCellLevel(), solidParticleCloud::move(), wallBoundedStreamLine::track(), and streamLine::track().

Here is the caller graph for this function:

◆ autoMap()

void autoMap ( TrackData &  td,
const mapPolyMesh mapper 
)

Remap the cells of particles corresponding to the.

mesh topology change

Definition at line 398 of file Cloud.C.

◆ fieldIOobject()

Foam::IOobject fieldIOobject ( const word fieldName,
const IOobject::readOption  r 
) const

Helper to construct IOobject for field and current time.

Definition at line 195 of file CloudIO.C.

Referenced by molecule::readFields(), and molecule::writeFields().

Here is the caller graph for this function:

◆ checkFieldIOobject()

void checkFieldIOobject ( const Cloud< ParticleType > &  c,
const IOField< DataType > &  data 
) const

Check lagrangian data field.

Definition at line 215 of file CloudIO.C.

Referenced by molecule::readFields().

Here is the caller graph for this function:

◆ checkFieldFieldIOobject()

void checkFieldFieldIOobject ( const Cloud< ParticleType > &  c,
const CompactIOField< Field< DataType >, DataType > &  data 
) const

Check lagrangian data fieldfield.

Definition at line 234 of file CloudIO.C.

◆ readFields()

void readFields ( )
virtual

Read the field data for the cloud of particles. Dummy at.

this level.

Definition at line 251 of file CloudIO.C.

◆ writeFields()

void writeFields ( ) const
virtual

Write the field data for the cloud of particles Dummy at.

this level.

Definition at line 256 of file CloudIO.C.

◆ writeObject()

bool writeObject ( IOstream::streamFormat  fmt,
IOstream::versionNumber  ver,
IOstream::compressionType  cmp 
) const
virtual

Write using given format, version and compression.

Only writes the cloud file if the Cloud isn't empty

Reimplemented in unmappedPassiveParticleCloud, and unmappedPassiveParticleCloud.

Definition at line 267 of file CloudIO.C.

◆ writePositions()

void writePositions ( ) const

Write positions to <cloudName>_positions.obj file.

Definition at line 471 of file Cloud.C.

Friends And Related Function Documentation

◆ particle

friend class particle
friend

Definition at line 110 of file Cloud.H.

◆ IOPosition

friend class IOPosition
friend

Definition at line 112 of file Cloud.H.

◆ operator

Ostream& operator ( Ostream ,
const Cloud< ParticleType > &   
)
friend

Field Documentation

◆ polyMesh_

const polyMesh& polyMesh_
private

Definition at line 77 of file Cloud.H.

Referenced by Cloud< streamLineParticle >::pMesh().

◆ labels_

DynamicList<label> labels_
mutableprivate

Temporary storage for addressing. Used in findTris.

Definition at line 80 of file Cloud.H.

Referenced by Cloud< streamLineParticle >::labels().

◆ nTrackingRescues_

label nTrackingRescues_
mutableprivate

Count of how many tracking rescue corrections have been.

applied

Definition at line 84 of file Cloud.H.

Referenced by Cloud< streamLineParticle >::nTrackingRescues(), and Cloud< streamLineParticle >::trackingRescue().

◆ cellWallFacesPtr_

autoPtr<PackedBoolList> cellWallFacesPtr_
mutableprivate

Does the cell have wall faces.

Definition at line 87 of file Cloud.H.

◆ cloudPropertiesName

Foam::word cloudPropertiesName
static

Name of cloud properties dictionary.

Definition at line 126 of file Cloud.H.


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