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

This function object provides a differencing option between two 'field value' function objects. More...

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

Public Types

enum  operationType {
  opAdd, opSubtract, opMin, opMax,
  opAverage
}
 Operation type enumeration. More...
 

Public Member Functions

 TypeName ("fieldValueDelta")
 Run-time type information. More...
 
 fieldValueDelta (const word &name, const objectRegistry &obr, const dictionary &dict, const bool loadFromFiles=false)
 Construct from components. More...
 
virtual ~fieldValueDelta ()
 Destructor. More...
 
virtual void read (const dictionary &)
 Read from dictionary. More...
 
virtual void write ()
 Calculate and write. 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...
 
- 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 Attributes

static const NamedEnum< operationType, 5 > operationTypeNames_
 Operation type names. More...
 
- 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

virtual void writeFileHeader (const label i)
 Output file header information. 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 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

This function object provides a differencing option between two 'field value' function objects.

Example of function object specification:

fieldValueDelta1
{
    type            fieldValueDelta;
    functionObjectLibs ("libfieldFunctionObjects.so");
    operation       subtract;

    fieldValue1
    {
        ...
    }
    fieldValue2
    {
        ...
    }
}


Function object usage

Property Description Required Default value
type type name: fieldValueDelta yes


The operation is one of:

add : add
subtract : subtract
min : minimum
max : maximum
average : average
See also
Foam::fieldValue
Source files

Definition at line 124 of file fieldValueDelta.H.

Member Enumeration Documentation

Operation type enumeration.

Enumerator
opAdd 
opSubtract 
opMin 
opMax 
opAverage 

Definition at line 130 of file fieldValueDelta.H.

Constructor & Destructor Documentation

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

Construct from components.

Definition at line 60 of file fieldValueDelta.C.

References Foam::read().

Referenced by NamedEnum< Enum, nEnum >::names().

Here is the call graph for this function:

Here is the caller graph for this function:

~fieldValueDelta ( )
virtual

Destructor.

Definition at line 113 of file fieldValueDelta.C.

Member Function Documentation

void writeFileHeader ( const label  i)
protectedvirtual

Output file header information.

Reimplemented from functionObjectFile.

Definition at line 80 of file fieldValueDelta.C.

References Foam::endl(), Foam::findIndex(), forAll, IOstream::name(), List< T >::size(), and Foam::tab.

Here is the call graph for this function:

TypeName ( "fieldValueDelta"  )

Run-time type information.

void read ( const dictionary dict)
virtual

Read from dictionary.

Definition at line 119 of file fieldValueDelta.C.

References dictionary::lookup(), dictionary::lookupOrDefault(), fieldValue::New(), and dictionary::subDict().

Here is the call graph for this function:

void write ( )
virtual

Calculate and write.

Reimplemented from functionObjectFile.

Definition at line 149 of file fieldValueDelta.C.

References Foam::endl(), found, Foam::Info, UPstream::master(), Foam::type(), and functionObjectFile::write().

Here is the call graph for this function:

void execute ( )
virtual

Execute.

Definition at line 189 of file fieldValueDelta.C.

void end ( )
virtual

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

Definition at line 195 of file fieldValueDelta.C.

void timeSet ( )
virtual

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

Definition at line 201 of file fieldValueDelta.C.

void updateMesh ( const mapPolyMesh )
virtual

Update mesh.

Definition at line 207 of file fieldValueDelta.C.

void movePoints ( const polyMesh )
virtual

Move points.

Definition at line 213 of file fieldValueDelta.C.

Member Data Documentation

const NamedEnum< fieldValues::fieldValueDelta::operationType, 5 > operationTypeNames_
static

Operation type names.

Definition at line 140 of file fieldValueDelta.H.

Referenced by NamedEnum< Enum, nEnum >::names().


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