Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions
nearWallFields Class Reference

This function object samples near-patch volume fields. More...

Collaboration diagram for nearWallFields:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("nearWallFields")
 Runtime type information. More...
 
 nearWallFields (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~nearWallFields ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the nearWallFields object. More...
 
virtual void read (const dictionary &)
 Read the field min/max data. More...
 
virtual void execute ()
 Execute, currently does nothing. More...
 
virtual void end ()
 Execute 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 ()
 Write. More...
 
virtual void updateMesh (const mapPolyMesh &)
 Update for changes of mesh. More...
 
virtual void movePoints (const polyMesh &)
 Update for changes of mesh. More...
 

Protected Member Functions

void calcAddressing ()
 Calculate addressing from cells back to patch faces. More...
 
template<class Type >
void createFields (PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const
 
template<class Type >
void sampleBoundaryField (const interpolationCellPoint< Type > &interpolator, GeometricField< Type, fvPatchField, volMesh > &fld) const
 Override boundary fields with sampled values. More...
 
template<class Type >
void sampleFields (PtrList< GeometricField< Type, fvPatchField, volMesh > > &) const
 

Protected Attributes

word name_
 Name of this set of nearWallFields object. More...
 
const objectRegistryobr_
 
bool active_
 on/off switch More...
 
List< Tuple2< word, word > > fieldSet_
 Fields to process. More...
 
Switch log_
 Switch to send output to Info as well as to file. More...
 
labelHashSet patchSet_
 Patches to sample. More...
 
scalar distance_
 Distance away from wall. More...
 
HashTable< wordfieldMap_
 From original field to sampled result. More...
 
HashTable< wordreverseFieldMap_
 From resulting back to original field. More...
 
labelListList cellToWalls_
 From cell to seed patch faces. More...
 
List< List< point > > cellToSamples_
 From cell to tracked end point. More...
 
autoPtr< mapDistributegetPatchDataMapPtr_
 Map from cell based data back to patch based data. More...
 
PtrList< volScalarFieldvsf_
 
PtrList< volVectorFieldvvf_
 
PtrList< volSphericalTensorFieldvSpheretf_
 
PtrList< volSymmTensorFieldvSymmtf_
 
PtrList< volTensorFieldvtf_
 

Private Member Functions

 nearWallFields (const nearWallFields &)
 Disallow default bitwise copy construct. More...
 
void operator= (const nearWallFields &)
 Disallow default bitwise assignment. More...
 

Detailed Description

This function object samples near-patch volume fields.

Fields are stored

This functionObject can either be used

Example of function object specification:

nearWallFields1
{
    type        nearWallFields;
    functionObjectLibs ("libfieldFunctionObjects.so");
    ...
    fields      ((p pNear)(U UNear));
    patches     (movingWall);
    distance    0.13;
}


Function object usage

Property Description Required Default value
type type name: nearWallFields yes
fields list of fields with corresponding output field names yes
patches list of patches to sample yes
distance distance from patch to sample yes
log Log to standard output no yes
See also
Foam::functionObject Foam::OutputFilterFunctionObject
Source files

Definition at line 125 of file nearWallFields.H.

Constructor & Destructor Documentation

◆ nearWallFields() [1/2]

nearWallFields ( const nearWallFields )
private

Disallow default bitwise copy construct.

◆ nearWallFields() [2/2]

nearWallFields ( 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 225 of file nearWallFields.C.

References dict, Foam::endl(), Foam::read(), and WarningInFunction.

Here is the call graph for this function:

◆ ~nearWallFields()

~nearWallFields ( )
virtual

Destructor.

Definition at line 255 of file nearWallFields.C.

References Foam::endl(), and Foam::Info.

Here is the call graph for this function:

Member Function Documentation

◆ calcAddressing()

void calcAddressing ( )
protected

◆ createFields()

void createFields ( PtrList< GeometricField< Type, fvPatchField, volMesh > > &  sflds) const
protected

Definition at line 32 of file nearWallFieldsTemplates.C.

References Foam::endl(), fld(), forAllConstIter(), Foam::Info, IOobject::readOpt(), IOobject::rename(), WarningInFunction, and IOobject::writeOpt().

Here is the call graph for this function:

◆ sampleBoundaryField()

void sampleBoundaryField ( const interpolationCellPoint< Type > &  interpolator,
GeometricField< Type, fvPatchField, volMesh > &  fld 
) const
protected

Override boundary fields with sampled values.

Definition at line 78 of file nearWallFieldsTemplates.C.

References fld(), forAll, forAllConstIter(), and interpolationCellPoint< Type >::interpolate().

Here is the call graph for this function:

◆ sampleFields()

void sampleFields ( PtrList< GeometricField< Type, fvPatchField, volMesh > > &  sflds) const
protected

Definition at line 125 of file nearWallFieldsTemplates.C.

References fld(), and forAll.

Here is the call graph for this function:

◆ operator=()

void operator= ( const nearWallFields )
private

Disallow default bitwise assignment.

◆ TypeName()

TypeName ( "nearWallFields"  )

Runtime type information.

◆ name()

virtual const word& name ( ) const
inlinevirtual

Return name of the nearWallFields object.

Definition at line 241 of file nearWallFields.H.

References nearWallFields::name_.

◆ read()

void read ( const dictionary dict)
virtual

Read the field min/max data.

Definition at line 266 of file nearWallFields.C.

References polyMesh::boundaryMesh(), dict, Foam::endl(), forAll, Foam::Info, dictionary::lookup(), mesh, polyBoundaryMesh::patchSet(), Foam::readScalar(), and Foam::type().

Here is the call graph for this function:

◆ execute()

void execute ( )
virtual

Execute, currently does nothing.

Definition at line 316 of file nearWallFields.C.

References Foam::endl(), Foam::Info, Foam::nl, and Foam::type().

Here is the call graph for this function:

◆ end()

void end ( )
virtual

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

Definition at line 362 of file nearWallFields.C.

Referenced by nearWallFields::calcAddressing().

Here is the caller graph for this function:

◆ timeSet()

void timeSet ( )
virtual

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

Definition at line 368 of file nearWallFields.C.

◆ write()

void write ( )
virtual

Write.

Definition at line 374 of file nearWallFields.C.

References Foam::endl(), forAll, and Foam::Info.

Here is the call graph for this function:

◆ updateMesh()

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 262 of file nearWallFields.H.

◆ movePoints()

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 266 of file nearWallFields.H.

Field Documentation

◆ name_

word name_
protected

Name of this set of nearWallFields object.

Definition at line 132 of file nearWallFields.H.

Referenced by nearWallFields::name().

◆ obr_

const objectRegistry& obr_
protected

Definition at line 134 of file nearWallFields.H.

Referenced by nearWallFields::calcAddressing().

◆ active_

bool active_
protected

on/off switch

Definition at line 137 of file nearWallFields.H.

◆ fieldSet_

List<Tuple2<word, word> > fieldSet_
protected

Fields to process.

Definition at line 142 of file nearWallFields.H.

◆ log_

Switch log_
protected

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

Definition at line 145 of file nearWallFields.H.

◆ patchSet_

labelHashSet patchSet_
protected

Patches to sample.

Definition at line 148 of file nearWallFields.H.

Referenced by nearWallFields::calcAddressing().

◆ distance_

scalar distance_
protected

Distance away from wall.

Definition at line 151 of file nearWallFields.H.

Referenced by nearWallFields::calcAddressing().

◆ fieldMap_

HashTable<word> fieldMap_
protected

From original field to sampled result.

Definition at line 154 of file nearWallFields.H.

◆ reverseFieldMap_

HashTable<word> reverseFieldMap_
protected

From resulting back to original field.

Definition at line 157 of file nearWallFields.H.

◆ cellToWalls_

labelListList cellToWalls_
protected

From cell to seed patch faces.

Definition at line 163 of file nearWallFields.H.

Referenced by nearWallFields::calcAddressing().

◆ cellToSamples_

List<List<point> > cellToSamples_
protected

From cell to tracked end point.

Definition at line 166 of file nearWallFields.H.

Referenced by nearWallFields::calcAddressing().

◆ getPatchDataMapPtr_

autoPtr<mapDistribute> getPatchDataMapPtr_
protected

Map from cell based data back to patch based data.

Definition at line 169 of file nearWallFields.H.

Referenced by nearWallFields::calcAddressing().

◆ vsf_

PtrList<volScalarField> vsf_
protected

Definition at line 174 of file nearWallFields.H.

◆ vvf_

PtrList<volVectorField> vvf_
protected

Definition at line 175 of file nearWallFields.H.

◆ vSpheretf_

PtrList<volSphericalTensorField> vSpheretf_
protected

Definition at line 176 of file nearWallFields.H.

◆ vSymmtf_

PtrList<volSymmTensorField> vSymmtf_
protected

Definition at line 177 of file nearWallFields.H.

◆ vtf_

PtrList<volTensorField> vtf_
protected

Definition at line 178 of file nearWallFields.H.


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