Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
fieldValue Class Reference

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

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

Public Member Functions

 TypeName ("fieldValue")
 Run-time type information. More...
 
 declareRunTimeSelectionTable (autoPtr, fieldValue, dictionary,( const word &name, const objectRegistry &obr, const dictionary &dict, const bool loadFromFiles ),(name, obr, dict, loadFromFiles))
 
 fieldValue (const word &name, const objectRegistry &obr, const dictionary &dict, const word &valueType, const bool loadFromFiles=false)
 Construct from components. More...
 
virtual ~fieldValue ()
 Destructor. More...
 
const wordname () const
 Return the name of the geometric source. More...
 
const objectRegistryobr () const
 Return the reference to the object registry. More...
 
const dictionarydict () const
 Return the reference to the construction dictionary. More...
 
bool active () const
 Return the active flag. More...
 
const Switchlog () const
 Return the switch to send output to Info as well as to file. More...
 
const wordsourceName () const
 Return the source name. More...
 
const wordListfields () const
 Return the list of field names. More...
 
const SwitchvalueOutput () const
 Return the output field values flag. More...
 
const fvMeshmesh () const
 Helper function to return the reference to the mesh. More...
 
const dictionaryresultDict () const
 Return access to the latest set of results. More...
 
virtual void read (const dictionary &dict)
 Read from dictionary. More...
 
virtual void write ()
 Write to screen/file. More...
 
virtual void execute ()
 Execute. More...
 
virtual void end ()
 Execute the 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 updateMesh (const mapPolyMesh &)
 Update mesh. More...
 
virtual void movePoints (const polyMesh &)
 Move points. More...
 
template<class Type >
void combineFields (Field< Type > &field)
 Combine fields from all processor domains into single field. More...
 
template<class Type >
void combineFields (tmp< Field< Type > > &)
 Combine fields from all processor domains into single field. More...
 
- Public Member Functions inherited from functionObjectFile
 functionObjectFile (const objectRegistry &obr, const word &prefix)
 Construct null. More...
 
 functionObjectFile (const objectRegistry &obr, const word &prefix, const word &name)
 Construct from components. More...
 
 functionObjectFile (const objectRegistry &obr, const word &prefix, const wordList &names)
 Construct from components. More...
 
virtual ~functionObjectFile ()
 Destructor. More...
 
const wordListnames () const
 Return const access to the names. More...
 
OFstreamfile ()
 Return access to the file (if only 1) More...
 
PtrList< OFstream > & files ()
 Return access to the files. More...
 
OFstreamfile (const label i)
 Return file 'i'. More...
 
void writeCommented (Ostream &os, const string &str) const
 Write a commented string to stream. More...
 
void writeTabbed (Ostream &os, const string &str) const
 Write a tabbed string to stream. More...
 
void writeHeader (Ostream &os, const string &str) const
 Write a commented header to stream. More...
 
template<class Type >
void writeHeaderValue (Ostream &os, const string &property, const Type &value) const
 Write a (commented) header property and value pair. More...
 
label charWidth () const
 Return width of character stream output. More...
 

Static Public Member Functions

static autoPtr< fieldValueNew (const word &name, const objectRegistry &obr, const dictionary &dict, const bool loadFromFiles=false, const bool output=true)
 Return a reference to the selected fieldValue. More...
 

Protected Attributes

word name_
 Name of this fieldValue object. More...
 
const objectRegistryobr_
 Database this class is registered to. More...
 
dictionary dict_
 Construction dictionary. More...
 
bool active_
 Active flag. More...
 
Switch log_
 Switch to send output to Info as well as to file. More...
 
word sourceName_
 Name of source object. More...
 
wordList fields_
 List of field names to operate on. More...
 
Switch valueOutput_
 Output field values flag. More...
 
dictionary resultDict_
 Results dictionary for external access of results. More...
 

Additional Inherited Members

- Static Public Attributes inherited from functionObjectFile
static const word outputPrefix = "postProcessing"
 Directory prefix. More...
 
static label addChars = 7
 Additional characters for writing. More...
 
- Protected Member Functions inherited from functionObjectFile
virtual void initStream (Ostream &os) const
 Initialise the output stream for writing. More...
 
virtual fileName baseFileDir () const
 Return the base directory for output. More...
 
virtual fileName baseTimeDir () const
 Return the base directory for the current time value. More...
 
virtual void createFiles ()
 Create the output file. More...
 
virtual void writeFileHeader (const label i=0)
 File header information. More...
 
virtual void resetNames (const wordList &names)
 Reset the list of names from a wordList. More...
 
virtual void resetName (const word &name)
 Reset the list of names to a single name entry. More...
 
virtual Omanip< int > valueWidth (const label offset=0) const
 Return the value width when writing to stream with optional offset. More...
 
 functionObjectFile (const functionObjectFile &)
 Disallow default bitwise copy construct. More...
 
void operator= (const functionObjectFile &)
 Disallow default bitwise assignment. More...
 

Detailed Description

Base class for field value -based function objects.

Source files

Definition at line 62 of file fieldValue.H.

Constructor & Destructor Documentation

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

Construct from components.

Definition at line 69 of file fieldValue.C.

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

Referenced by fieldValue::write().

Here is the call graph for this function:

Here is the caller graph for this function:

~fieldValue ( )
virtual

Destructor.

Definition at line 113 of file fieldValue.C.

Member Function Documentation

TypeName ( "fieldValue"  )

Run-time type information.

declareRunTimeSelectionTable ( autoPtr  ,
fieldValue  ,
dictionary  ,
( const word &name, const objectRegistry &obr, const dictionary &dict, const bool loadFromFiles )  ,
(name, obr, dict, loadFromFiles)   
)
Foam::autoPtr< Foam::fieldValue > New ( const word name,
const objectRegistry obr,
const dictionary dict,
const bool  loadFromFiles = false,
const bool  output = true 
)
static

Return a reference to the selected fieldValue.

Definition at line 31 of file fieldValueNew.C.

References dict, Foam::endl(), Foam::exit(), Foam::FatalError, FatalErrorIn, Foam::Info, dictionary::lookup(), Foam::name(), and Foam::nl.

Referenced by fieldValueDelta::read().

Here is the call graph for this function:

Here is the caller graph for this function:

const Foam::word & name ( ) const
inline

Return the name of the geometric source.

Definition at line 31 of file fieldValueI.H.

References fieldValue::name_.

const Foam::objectRegistry & obr ( ) const
inline

Return the reference to the object registry.

Definition at line 37 of file fieldValueI.H.

References fieldValue::obr_.

const Foam::dictionary & dict ( ) const
inline

Return the reference to the construction dictionary.

Definition at line 43 of file fieldValueI.H.

References fieldValue::dict_.

bool active ( ) const
inline

Return the active flag.

Definition at line 49 of file fieldValueI.H.

References fieldValue::active_.

const Foam::Switch & log ( ) const
inline

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

Definition at line 55 of file fieldValueI.H.

References fieldValue::log_.

const Foam::word & sourceName ( ) const
inline

Return the source name.

Definition at line 61 of file fieldValueI.H.

References fieldValue::sourceName_.

const Foam::wordList & fields ( ) const
inline

Return the list of field names.

Definition at line 67 of file fieldValueI.H.

References fieldValue::fields_.

const Foam::Switch & valueOutput ( ) const
inline

Return the output field values flag.

Definition at line 73 of file fieldValueI.H.

References fieldValue::valueOutput_.

const Foam::fvMesh & mesh ( ) const
inline

Helper function to return the reference to the mesh.

Definition at line 79 of file fieldValueI.H.

References fieldValue::obr_.

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

Here is the caller graph for this function:

const Foam::dictionary & resultDict ( ) const
inline

Return access to the latest set of results.

Definition at line 85 of file fieldValueI.H.

References fieldValue::resultDict_.

void read ( const dictionary dict)
virtual

Read from dictionary.

Reimplemented in faceSource, and cellSource.

Definition at line 42 of file fieldValue.C.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

void write ( )
virtual

Write to screen/file.

Reimplemented from functionObjectFile.

Reimplemented in faceSource, and cellSource.

Definition at line 55 of file fieldValue.C.

References fieldValue::fieldValue(), Foam::Info, Foam::nl, Foam::type(), and functionObjectFile::write().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void execute ( )
virtual

Execute.

Definition at line 119 of file fieldValue.C.

void end ( )
virtual

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

Definition at line 125 of file fieldValue.C.

void timeSet ( )
virtual

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

Definition at line 131 of file fieldValue.C.

void updateMesh ( const mapPolyMesh )
virtual

Update mesh.

Definition at line 137 of file fieldValue.C.

void movePoints ( const polyMesh )
virtual

Move points.

Definition at line 143 of file fieldValue.C.

void combineFields ( Field< Type > &  field)

Combine fields from all processor domains into single field.

Definition at line 33 of file fieldValueTemplates.C.

References Pstream::gatherList(), UPstream::master(), UPstream::myProcNo(), and UPstream::nProcs().

Referenced by fieldValue::combineFields(), cellSource::writeValues(), and faceSource::writeValues().

Here is the call graph for this function:

Here is the caller graph for this function:

void combineFields ( tmp< Field< Type > > &  field)

Combine fields from all processor domains into single field.

Definition at line 54 of file fieldValueTemplates.C.

References fieldValue::combineFields().

Here is the call graph for this function:

Member Data Documentation

word name_
protected

Name of this fieldValue object.

Definition at line 72 of file fieldValue.H.

Referenced by faceSource::filterField(), fieldValue::name(), and faceSource::writeValues().

const objectRegistry& obr_
protected
dictionary dict_
protected

Construction dictionary.

Definition at line 78 of file fieldValue.H.

Referenced by fieldValue::dict().

bool active_
protected

Active flag.

Definition at line 81 of file fieldValue.H.

Referenced by fieldValue::active().

Switch log_
protected

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

Definition at line 84 of file fieldValue.H.

Referenced by fieldValue::log(), cellSource::writeValues(), and faceSource::writeValues().

word sourceName_
protected

Name of source object.

Definition at line 87 of file fieldValue.H.

Referenced by faceSource::filterField(), fieldValue::sourceName(), cellSource::writeValues(), and faceSource::writeValues().

wordList fields_
protected

List of field names to operate on.

Definition at line 90 of file fieldValue.H.

Referenced by fieldValue::fields().

Switch valueOutput_
protected

Output field values flag.

Definition at line 93 of file fieldValue.H.

Referenced by fieldValue::valueOutput(), and cellSource::writeValues().

dictionary resultDict_
protected

Results dictionary for external access of results.

Definition at line 96 of file fieldValue.H.

Referenced by fieldValue::resultDict(), cellSource::writeValues(), and faceSource::writeValues().


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