FreeFOAM The Cross-Platform CFD Toolkit
fieldValue Class Reference

Base class for field value -based function objects. More...

#include <fieldFunctionObjects/fieldValue.H>


Detailed Description

+ Inheritance diagram for fieldValue:
+ Collaboration diagram for fieldValue:

List of all members.

Public Member Functions

 TypeName ("fieldValue")
 Run-time type information.
 fieldValue (const word &name, const objectRegistry &obr, const dictionary &dict, const bool loadFromFiles=false)
 Construct from components.
virtual ~fieldValue ()
 Destructor.
const wordname () const
 Return the name of the geometric source.
const objectRegistryobr () const
 Return the reference to the object registry.
bool active () const
 Return the active flag.
const Switchlog () const
 Return the switch to send output to Info as well as to file.
const wordsourceName () const
 Return the source name.
const wordListfields () const
 Return the list of field names.
const SwitchvalueOutput () const
 Return the output field values flag.
const fvMeshmesh () const
 Helper function to return the reference to the mesh.
virtual void read (const dictionary &dict)
 Read from dictionary.
virtual void write ()
 Write to screen/file.
virtual void execute ()
 Execute.
virtual void end ()
 Execute the at the final time-loop, currently does nothing.
template<class Type >
tmp< Field< Type > > combineFields (const Field< Type > &field) const
 Comnbine fields from all processor domains into single field.

Protected Member Functions

virtual void makeFile ()
 Make the output file.
virtual void writeFileHeader ()=0
 Write the output file header.
virtual void updateMesh (const mapPolyMesh &)
 Update mesh.
virtual void movePoints (const Field< point > &)
 Move points.

Protected Attributes

word name_
 Name of this fieldValue object.
const objectRegistryobr_
 Database this class is registered to.
bool active_
 Active flag.
Switch log_
 Switch to send output to Info as well as to file.
word sourceName_
 Name of source object.
wordList fields_
 List of field names to operate on.
Switch valueOutput_
 Output field values flag.
autoPtr< OFstreamoutputFilePtr_
 Output file pointer.

Constructor & Destructor Documentation

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

Construct from components.

Definition at line 127 of file fieldValue.C.

References Foam::endl(), Foam::nl, and WarningIn.

~fieldValue ( )
virtual

Destructor.

Definition at line 168 of file fieldValue.C.


Member Function Documentation

void makeFile ( )
protectedvirtual

Make the output file.

Definition at line 57 of file fieldValue.C.

References Foam::endl(), Foam::Info, Pstream::master(), Foam::mkDir(), Pstream::parRun(), fileName::path(), and Foam::type().

virtual void writeFileHeader ( )
protectedpure virtual

Write the output file header.

Implemented in faceSource, and cellSource.

void updateMesh ( const mapPolyMesh )
protectedvirtual

Update mesh.

Definition at line 45 of file fieldValue.C.

void movePoints ( const Field< point > &  )
protectedvirtual

Move points.

Definition at line 51 of file fieldValue.C.

TypeName ( "fieldValue"  )

Run-time type information.

const Foam::word & name ( ) const
inline

Return the name of the geometric source.

Definition at line 30 of file fieldValueI.H.

References fieldValue::name_.

const Foam::objectRegistry & obr ( ) const
inline

Return the reference to the object registry.

Definition at line 36 of file fieldValueI.H.

bool active ( ) const
inline

Return the active flag.

Definition at line 42 of file fieldValueI.H.

const Foam::Switch & log ( ) const
inline

Return the switch to send output to Info as well as to file.

Definition at line 48 of file fieldValueI.H.

const Foam::word & sourceName ( ) const
inline

Return the source name.

Definition at line 54 of file fieldValueI.H.

const Foam::wordList & fields ( ) const
inline

Return the list of field names.

Definition at line 60 of file fieldValueI.H.

const Foam::Switch & valueOutput ( ) const
inline

Return the output field values flag.

Definition at line 66 of file fieldValueI.H.

const Foam::fvMesh & mesh ( ) const
inline

Helper function to return the reference to the mesh.

Definition at line 72 of file fieldValueI.H.

void read ( const dictionary dict)
virtual

Read from dictionary.

Reimplemented in faceSource, and cellSource.

Definition at line 99 of file fieldValue.C.

References dictionary::lookup(), and dictionary::lookupOrDefault().

Referenced by cellSource::read(), and faceSource::read().

void write ( )
virtual

Write to screen/file.

Reimplemented in faceSource, and cellSource.

Definition at line 110 of file fieldValue.C.

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

Referenced by cellSource::write(), and faceSource::write().

void execute ( )
virtual

Execute.

Definition at line 174 of file fieldValue.C.

void end ( )
virtual

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

Definition at line 180 of file fieldValue.C.

Foam::tmp< Foam::Field< Type > > combineFields ( const Field< Type > &  field) const

Comnbine fields from all processor domains into single field.

Definition at line 34 of file fieldValueTemplates.C.


Member Data Documentation

word name_
protected

Name of this fieldValue object.

Definition at line 65 of file fieldValue.H.

Referenced by fieldValue::name().

const objectRegistry& obr_
protected

Database this class is registered to.

Definition at line 68 of file fieldValue.H.

Referenced by cellSource::validField(), and faceSource::validField().

bool active_
protected

Active flag.

Definition at line 71 of file fieldValue.H.

Switch log_
protected

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

Definition at line 74 of file fieldValue.H.

word sourceName_
protected

Name of source object.

Definition at line 77 of file fieldValue.H.

wordList fields_
protected

List of field names to operate on.

Definition at line 80 of file fieldValue.H.

Switch valueOutput_
protected

Output field values flag.

Definition at line 83 of file fieldValue.H.

autoPtr<OFstream> outputFilePtr_
protected

Output file pointer.

Definition at line 86 of file fieldValue.H.


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