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

This function object allows user-selected fields/registered objects to be written at a custom write interval. The interval is given in terms of number of overall dumps. More...

Collaboration diagram for partialWrite:
Collaboration graph
[legend]

Public Member Functions

 TypeName ("partialWrite")
 Runtime type information. More...
 
 partialWrite (const word &name, const objectRegistry &, const dictionary &, const bool loadFromFiles=false)
 Construct for given objectRegistry and dictionary. More...
 
virtual ~partialWrite ()
 Destructor. More...
 
virtual const wordname () const
 Return name of the partialWrite. More...
 
virtual void read (const dictionary &)
 Read the partialWrite data. More...
 
virtual void execute ()
 Execute. 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 the partialWrite. 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

 partialWrite (const partialWrite &)
 Disallow default bitwise copy construct. More...
 
void operator= (const partialWrite &)
 Disallow default bitwise assignment. More...
 
template<class Type >
void loadField (const word &, UPtrList< GeometricField< Type, fvPatchField, volMesh > > &, UPtrList< GeometricField< Type, fvsPatchField, surfaceMesh > > &) const
 Load objects in the objectNames. More...
 
template<class Type >
void changeWriteOptions (UPtrList< GeometricField< Type, fvPatchField, volMesh > > &, UPtrList< GeometricField< Type, fvsPatchField, surfaceMesh > > &, const IOobject::writeOption) const
 

Protected Attributes

word name_
 Name of this set of partialWrite. More...
 
const objectRegistryobr_
 
UPtrList< volScalarFieldvsf_
 Loaded fields. More...
 
UPtrList< volVectorFieldvvf_
 
UPtrList< volSphericalTensorFieldvSpheretf_
 
UPtrList< volSymmTensorFieldvSymmtf_
 
UPtrList< volTensorFieldvtf_
 
UPtrList< surfaceScalarFieldssf_
 
UPtrList< surfaceVectorFieldsvf_
 
UPtrList< surfaceSphericalTensorFieldsSpheretf_
 
UPtrList< surfaceSymmTensorFieldsSymmtf_
 
UPtrList< surfaceTensorFieldstf_
 
HashSet< wordobjectNames_
 Names of objects to dump always. More...
 
label writeInterval_
 Write interval for restart dump. More...
 
label writeInstance_
 Current dump instance. If reaches writeInterval do a full write. More...
 

Detailed Description

This function object allows user-selected fields/registered objects to be written at a custom write interval. The interval is given in terms of number of overall dumps.

Example of function object specification:

partialWrite1
{
    type        partialWrite;
    functionObjectLibs ("libIOFunctionObjects.so");
    ...
    objectNames (p U T);
    writeInterval 100;
}


Function object usage

Property Description Required Default value
type type name: partialWrite yes
objectNames objects to write yes
writeInterval write interval yes
See also
Foam::functionObject Foam::OutputFilterFunctionObject
Source files

Definition at line 107 of file partialWrite.H.

Constructor & Destructor Documentation

partialWrite ( const partialWrite )
protected

Disallow default bitwise copy construct.

partialWrite ( 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 44 of file partialWrite.C.

References Foam::read().

Here is the call graph for this function:

~partialWrite ( )
virtual

Destructor.

Definition at line 60 of file partialWrite.C.

Member Function Documentation

void operator= ( const partialWrite )
protected

Disallow default bitwise assignment.

void loadField ( const word fieldName,
UPtrList< GeometricField< Type, fvPatchField, volMesh > > &  vflds,
UPtrList< GeometricField< Type, fvsPatchField, surfaceMesh > > &  sflds 
) const
protected

Load objects in the objectNames.

Definition at line 35 of file partialWriteTemplates.C.

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

Here is the call graph for this function:

void changeWriteOptions ( UPtrList< GeometricField< Type, fvPatchField, volMesh > > &  vflds,
UPtrList< GeometricField< Type, fvsPatchField, surfaceMesh > > &  sflds,
const IOobject::writeOption  wOption 
) const
protected

Definition at line 87 of file partialWriteTemplates.C.

References forAll.

Referenced by partialWrite::loadField().

Here is the caller graph for this function:

TypeName ( "partialWrite"  )

Runtime type information.

virtual const word& name ( ) const
inlinevirtual

Return name of the partialWrite.

Definition at line 198 of file partialWrite.H.

References partialWrite::end(), partialWrite::execute(), partialWrite::name_, partialWrite::read(), partialWrite::timeSet(), and partialWrite::write().

Here is the call graph for this function:

void read ( const dictionary dict)
virtual

Read the partialWrite data.

Definition at line 66 of file partialWrite.C.

References Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorIn, forAllConstIter(), Foam::Info, dictionary::lookup(), Foam::name(), Foam::nl, and Foam::type().

Referenced by partialWrite::name().

Here is the call graph for this function:

Here is the caller graph for this function:

void execute ( )
virtual

Execute.

Definition at line 112 of file partialWrite.C.

Referenced by partialWrite::name().

Here is the caller graph for this function:

void end ( )
virtual

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

Definition at line 117 of file partialWrite.C.

Referenced by partialWrite::name().

Here is the caller graph for this function:

void timeSet ( )
virtual

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

Definition at line 124 of file partialWrite.C.

References IOobject::AUTO_WRITE, and IOobject::NO_WRITE.

Referenced by partialWrite::name().

Here is the caller graph for this function:

void write ( )
virtual

Write the partialWrite.

Definition at line 174 of file partialWrite.C.

Referenced by partialWrite::name().

Here is the caller graph for this function:

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 219 of file partialWrite.H.

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 223 of file partialWrite.H.

Member Data Documentation

word name_
protected

Name of this set of partialWrite.

Definition at line 114 of file partialWrite.H.

Referenced by partialWrite::name().

const objectRegistry& obr_
protected

Definition at line 116 of file partialWrite.H.

UPtrList<volScalarField> vsf_
protected

Loaded fields.

Definition at line 119 of file partialWrite.H.

UPtrList<volVectorField> vvf_
protected

Definition at line 120 of file partialWrite.H.

UPtrList<volSphericalTensorField> vSpheretf_
protected

Definition at line 121 of file partialWrite.H.

UPtrList<volSymmTensorField> vSymmtf_
protected

Definition at line 122 of file partialWrite.H.

UPtrList<volTensorField> vtf_
protected

Definition at line 123 of file partialWrite.H.

UPtrList<surfaceScalarField> ssf_
protected

Definition at line 125 of file partialWrite.H.

UPtrList<surfaceVectorField> svf_
protected

Definition at line 126 of file partialWrite.H.

UPtrList<surfaceSphericalTensorField> sSpheretf_
protected

Definition at line 127 of file partialWrite.H.

UPtrList<surfaceSymmTensorField> sSymmtf_
protected

Definition at line 128 of file partialWrite.H.

UPtrList<surfaceTensorField> stf_
protected

Definition at line 129 of file partialWrite.H.

HashSet<word> objectNames_
protected

Names of objects to dump always.

Definition at line 134 of file partialWrite.H.

label writeInterval_
protected

Write interval for restart dump.

Definition at line 137 of file partialWrite.H.

label writeInstance_
protected

Current dump instance. If reaches writeInterval do a full write.

Definition at line 142 of file partialWrite.H.


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