Public Member Functions | Protected Member Functions | Protected Attributes
streamLineBase Class Referenceabstract
Inheritance diagram for streamLineBase:
Inheritance graph
[legend]
Collaboration diagram for streamLineBase:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("streamLineBase")
 Runtime type information. More...
 
 streamLineBase (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~streamLineBase ()
 Destructor. More...
 
virtual void read (const dictionary &)
 Read the field average data. More...
 
virtual void execute ()
 Execute the averaging. More...
 
virtual void end ()
 Execute the averaging at the final time-loop, currently does nothing. More...
 
virtual void timeSet ()
 Called when time was set at the end of the Time::operator++. More...
 
virtual void write ()
 Track and write. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &)
 Update for mesh point-motion. More...
 
- Public Member Functions inherited from functionObjectState
 functionObjectState (const objectRegistry &obr, const word &name)
 Construct from components. More...
 
virtual ~functionObjectState ()
 Destructor. More...
 
const wordname () const
 Return the name. More...
 
bool active () const
 Return the active flag. More...
 
const IOdictionarystateDict () const
 Return access to the state dictionary. More...
 
dictionarypropertyDict ()
 Return access to the property dictionary. More...
 
template<class Type >
bool setActive ()
 Set the active status by querying objectRegistry type. More...
 
bool foundProperty (const word &entryName) const
 Return true if the property exists. More...
 
template<class Type >
Type getProperty (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
 Retrieve generic property. More...
 
template<class Type >
void getProperty (const word &entryName, Type &value) const
 Retrieve generic property. More...
 
template<class Type >
void setProperty (const word &entryName, const Type &value)
 Add generic property. More...
 
template<class Type >
Type getObjectProperty (const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
 Retrieve generic property from named object. More...
 
template<class Type >
void getObjectProperty (const word &objectName, const word &entryName, Type &value) const
 Retrieve generic property from named object. More...
 
template<class Type >
void setObjectProperty (const word &objectName, const word &entryName, const Type &value)
 Add generic property from named object. More...
 
template<class Type >
void setResult (const word &entryName, const Type &value)
 Add result. More...
 
template<class Type >
void setObjectResult (const word &objectName, const word &entryName, const Type &value)
 Add result from named object. More...
 
template<class Type >
Type getResult (const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
 Retrieve result. More...
 
template<class Type >
Type getObjectResult (const word &objectName, const word &entryName, const Type &defaultValue=pTraits< Type >::zero) const
 Retrieve result from named object. More...
 
template<class Type >
void getObjectResult (const word &objectName, const word &entryName, Type &value) const
 Retrieve result from named object. More...
 
word resultType (const word &entryName) const
 Retrieve the result type. More...
 
word objectResultType (const word &objectName, const word &entryName) const
 Return the type of result. More...
 
List< wordobjectResultEntries () const
 Retrieve the result entries. More...
 
List< wordobjectResultEntries (const word &objectName) const
 Return result entries for named object. More...
 

Protected Member Functions

autoPtr< indirectPrimitivePatchwallPatch () const
 Construct patch out of all wall patch faces. More...
 
void initInterpolations (const label nSeeds, label &UIndex, PtrList< volScalarField > &vsFlds, PtrList< interpolation< scalar > > &vsInterp, PtrList< volVectorField > &vvFlds, PtrList< interpolation< vector > > &vvInterp)
 Initialise fields, interpolators and track storage. More...
 
void storePoint (const label trackI, const scalar w, const label leftI, const label rightI, DynamicList< point > &newTrack, DynamicList< List< scalar > > &newScalars, DynamicList< List< vector > > &newVectors) const
 Generate point and values by interpolating from existing values. More...
 
void trimToBox (const treeBoundBox &bb, const label trackI, PtrList< DynamicList< point > > &newTracks, PtrList< DynamicList< scalarList > > &newScalars, PtrList< DynamicList< vectorList > > &newVectors) const
 Trim and possibly split a track. More...
 
void trimToBox (const treeBoundBox &bb)
 Trim tracks to bounding box. More...
 
virtual void track ()=0
 Do the actual tracking to fill the track data. More...
 
- Protected Member Functions inherited from functionObjectState
 functionObjectState (const functionObjectState &)
 Disallow default bitwise copy construct. More...
 
void operator= (const functionObjectState &)
 Disallow default bitwise assignment. More...
 

Protected Attributes

dictionary dict_
 Input dictionary. More...
 
const objectRegistryobr_
 Database this class is registered to. More...
 
bool loadFromFiles_
 Load fields from files (not from objectRegistry) More...
 
Switch log_
 Switch to send output to Info as well as to file. More...
 
wordList fields_
 List of fields to sample. More...
 
word UName_
 Field to transport particle with. More...
 
word interpolationScheme_
 Interpolation scheme to use. More...
 
bool trackForward_
 Whether to use +u or -u. More...
 
label lifeTime_
 Maximum lifetime (= number of cells) of particle. More...
 
scalar trackLength_
 Track length. More...
 
boundBox bounds_
 Optional trimming of tracks. More...
 
word cloudName_
 Optional specified name of particles. More...
 
word seedSet_
 Type of seed. More...
 
wordList scalarNames_
 Names of scalar fields. More...
 
wordList vectorNames_
 Names of vector fields. More...
 
autoPtr< meshSearchmeshSearchPtr_
 Mesh searching enigne. More...
 
autoPtr< sampledSetsampledSetPtr_
 Seed set engine. More...
 
word sampledSetAxis_
 Axis of the sampled points to output. More...
 
autoPtr< writer< scalar > > scalarFormatterPtr_
 File writer for scalar data. More...
 
autoPtr< writer< vector > > vectorFormatterPtr_
 File writer for vector data. More...
 
DynamicList< List< point > > allTracks_
 All tracks. Per track the points it passed through. More...
 
List< DynamicList< scalarList > > allScalars_
 Per scalarField, per track, the sampled values. More...
 
List< DynamicList< vectorList > > allVectors_
 Per vectorField, per track, the sampled values. More...
 
- Protected Attributes inherited from functionObjectState
const word name_
 Name of model. More...
 
bool active_
 Flag to indicate whether the object is active. More...
 
IOdictionarystateDict_
 Reference to the state dictionary. More...
 

Detailed Description

See also
Foam::streamLine Foam::wallBoundedStreamLine
Source files

Definition at line 62 of file streamLineBase.H.

Constructor & Destructor Documentation

◆ streamLineBase()

streamLineBase ( const word name,
const objectRegistry obr,
const dictionary dict,
const bool  loadFromFiles = false 
)

Construct for given objectRegistry and dictionary.

Allow the possibility to load fields from files

Definition at line 537 of file streamLineBase.C.

◆ ~streamLineBase()

~streamLineBase ( )
virtual

Destructor.

Definition at line 554 of file streamLineBase.C.

Member Function Documentation

◆ wallPatch()

Foam::autoPtr< Foam::indirectPrimitivePatch > wallPatch ( ) const
protected

Construct patch out of all wall patch faces.

Definition at line 47 of file streamLineBase.C.

References forAll, mesh, streamLineBase::obr_, patches, and polyPatch::start().

Referenced by wallBoundedStreamLine::track().

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

◆ initInterpolations()

void initInterpolations ( const label  nSeeds,
label UIndex,
PtrList< volScalarField > &  vsFlds,
PtrList< interpolation< scalar > > &  vsInterp,
PtrList< volVectorField > &  vvFlds,
PtrList< interpolation< vector > > &  vvInterp 
)
protected

Initialise fields, interpolators and track storage.

Definition at line 98 of file streamLineBase.C.

References IOobjectList::add(), Foam::exit(), f(), Foam::FatalError, FatalErrorInFunction, forAll, objectRegistry::foundObject(), objectRegistry::lookupObject(), mesh, objectRegistry::names(), Foam::nl, Foam::ReadFields(), PtrList::size(), objectRegistry::time(), and Time::timeName().

Referenced by wallBoundedStreamLine::track(), and streamLine::track().

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

◆ storePoint()

void storePoint ( const label  trackI,
const scalar  w,
const label  leftI,
const label  rightI,
DynamicList< point > &  newTrack,
DynamicList< List< scalar > > &  newScalars,
DynamicList< List< vector > > &  newVectors 
) const
protected

Generate point and values by interpolating from existing values.

Definition at line 270 of file streamLineBase.C.

References DynamicList::append(), forAll, and w().

Here is the call graph for this function:

◆ trimToBox() [1/2]

void trimToBox ( const treeBoundBox bb,
const label  trackI,
PtrList< DynamicList< point > > &  newTracks,
PtrList< DynamicList< scalarList > > &  newScalars,
PtrList< DynamicList< vectorList > > &  newVectors 
) const
protected

Trim and possibly split a track.

Definition at line 316 of file streamLineBase.C.

References DynamicList::append(), treeBoundBox::contains(), treeBoundBox::intersects(), Foam::mag(), DynamicList::shrink(), and List::size().

Here is the call graph for this function:

◆ trimToBox() [2/2]

void trimToBox ( const treeBoundBox bb)
protected

Trim tracks to bounding box.

Definition at line 470 of file streamLineBase.C.

References PtrList::append(), forAll, DynamicList::setSize(), List::setSize(), List::size(), and PtrList::size().

Here is the call graph for this function:

◆ track()

virtual void track ( )
protectedpure virtual

Do the actual tracking to fill the track data.

Implemented in streamLine, and wallBoundedStreamLine.

◆ TypeName()

TypeName ( "streamLineBase"  )

Runtime type information.

◆ read()

void read ( const dictionary dict)
virtual

◆ execute()

void execute ( )
virtual

Execute the averaging.

Definition at line 656 of file streamLineBase.C.

◆ end()

void end ( )
virtual

Execute the averaging at the final time-loop, currently does nothing.

Definition at line 660 of file streamLineBase.C.

◆ timeSet()

void timeSet ( )
virtual

Called when time was set at the end of the Time::operator++.

Definition at line 664 of file streamLineBase.C.

◆ write()

void write ( )
virtual

◆ updateMesh()

void updateMesh ( const mapPolyMesh )
virtual

Update for changes of mesh.

Definition at line 964 of file streamLineBase.C.

References Foam::read().

Here is the call graph for this function:

◆ movePoints()

void movePoints ( const polyMesh )
virtual

Update for mesh point-motion.

Definition at line 970 of file streamLineBase.C.

References Foam::read().

Here is the call graph for this function:

Field Documentation

◆ dict_

dictionary dict_
protected

Input dictionary.

Definition at line 69 of file streamLineBase.H.

◆ obr_

const objectRegistry& obr_
protected

Database this class is registered to.

Definition at line 72 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), streamLine::track(), and streamLineBase::wallPatch().

◆ loadFromFiles_

bool loadFromFiles_
protected

Load fields from files (not from objectRegistry)

Definition at line 75 of file streamLineBase.H.

◆ log_

Switch log_
protected

Switch to send output to Info as well as to file.

Definition at line 78 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), and streamLine::track().

◆ fields_

wordList fields_
protected

List of fields to sample.

Definition at line 81 of file streamLineBase.H.

◆ UName_

word UName_
protected

Field to transport particle with.

Definition at line 84 of file streamLineBase.H.

◆ interpolationScheme_

word interpolationScheme_
protected

Interpolation scheme to use.

Definition at line 87 of file streamLineBase.H.

◆ trackForward_

bool trackForward_
protected

Whether to use +u or -u.

Definition at line 90 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), and streamLine::track().

◆ lifeTime_

label lifeTime_
protected

Maximum lifetime (= number of cells) of particle.

Definition at line 93 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), and streamLine::track().

◆ trackLength_

scalar trackLength_
protected

Track length.

Definition at line 96 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), and streamLine::track().

◆ bounds_

boundBox bounds_
protected

Optional trimming of tracks.

Definition at line 99 of file streamLineBase.H.

◆ cloudName_

word cloudName_
protected

Optional specified name of particles.

Definition at line 102 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), and streamLine::track().

◆ seedSet_

word seedSet_
protected

Type of seed.

Definition at line 105 of file streamLineBase.H.

◆ scalarNames_

wordList scalarNames_
protected

Names of scalar fields.

Definition at line 108 of file streamLineBase.H.

◆ vectorNames_

wordList vectorNames_
protected

Names of vector fields.

Definition at line 111 of file streamLineBase.H.

◆ meshSearchPtr_

autoPtr<meshSearch> meshSearchPtr_
protected

Mesh searching enigne.

Definition at line 117 of file streamLineBase.H.

◆ sampledSetPtr_

autoPtr<sampledSet> sampledSetPtr_
protected

Seed set engine.

Definition at line 120 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), and streamLine::track().

◆ sampledSetAxis_

word sampledSetAxis_
protected

Axis of the sampled points to output.

Definition at line 123 of file streamLineBase.H.

◆ scalarFormatterPtr_

autoPtr<writer<scalar> > scalarFormatterPtr_
protected

File writer for scalar data.

Definition at line 126 of file streamLineBase.H.

◆ vectorFormatterPtr_

autoPtr<writer<vector> > vectorFormatterPtr_
protected

File writer for vector data.

Definition at line 129 of file streamLineBase.H.

◆ allTracks_

DynamicList<List<point> > allTracks_
protected

All tracks. Per track the points it passed through.

Definition at line 135 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), and streamLine::track().

◆ allScalars_

List<DynamicList<scalarList> > allScalars_
protected

Per scalarField, per track, the sampled values.

Definition at line 138 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), and streamLine::track().

◆ allVectors_

List<DynamicList<vectorList> > allVectors_
protected

Per vectorField, per track, the sampled values.

Definition at line 141 of file streamLineBase.H.

Referenced by wallBoundedStreamLine::track(), and streamLine::track().


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