Public Member Functions | Protected Member Functions | Protected Attributes
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 object. More...
 
const objectRegistryobr_
 Refefence to the database. More...
 
Switch log_
 Switch to send output to Info as well as to file. More...
 
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
log Log to standard output no yes
See also
Foam::functionObject Foam::OutputFilterFunctionObject
Source files

Definition at line 113 of file partialWrite.H.

Constructor & Destructor Documentation

◆ partialWrite() [1/2]

partialWrite ( const partialWrite )
protected

Disallow default bitwise copy construct.

◆ partialWrite() [2/2]

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 dict, and Foam::read().

Here is the call graph for this function:

◆ ~partialWrite()

~partialWrite ( )
virtual

Destructor.

Definition at line 61 of file partialWrite.C.

Member Function Documentation

◆ operator=()

void operator= ( const partialWrite )
protected

Disallow default bitwise assignment.

◆ loadField()

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 Foam::endl(), and Foam::Info.

Here is the call graph for this function:

◆ changeWriteOptions()

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.

◆ TypeName()

TypeName ( "partialWrite"  )

Runtime type information.

◆ name()

virtual const word& name ( ) const
inlinevirtual

Return name of the partialWrite.

Definition at line 208 of file partialWrite.H.

References partialWrite::name_.

◆ read()

void read ( const dictionary dict)
virtual

Read the partialWrite data.

Definition at line 67 of file partialWrite.C.

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

Here is the call graph for this function:

◆ execute()

void execute ( )
virtual

Execute.

Definition at line 136 of file partialWrite.C.

◆ end()

void end ( )
virtual

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

Definition at line 142 of file partialWrite.C.

◆ timeSet()

void timeSet ( )
virtual

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

Definition at line 148 of file partialWrite.C.

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

◆ write()

void write ( )
virtual

Write the partialWrite.

Definition at line 198 of file partialWrite.C.

◆ updateMesh()

virtual void updateMesh ( const mapPolyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 229 of file partialWrite.H.

◆ movePoints()

virtual void movePoints ( const polyMesh )
inlinevirtual

Update for changes of mesh.

Definition at line 233 of file partialWrite.H.

Field Documentation

◆ name_

word name_
protected

Name of this set of partialWrite object.

Definition at line 120 of file partialWrite.H.

Referenced by partialWrite::name().

◆ obr_

const objectRegistry& obr_
protected

Refefence to the database.

Definition at line 123 of file partialWrite.H.

◆ log_

Switch log_
protected

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

Definition at line 126 of file partialWrite.H.

◆ vsf_

UPtrList<volScalarField> vsf_
protected

Loaded fields.

Definition at line 129 of file partialWrite.H.

◆ vvf_

UPtrList<volVectorField> vvf_
protected

Definition at line 130 of file partialWrite.H.

◆ vSpheretf_

UPtrList<volSphericalTensorField> vSpheretf_
protected

Definition at line 131 of file partialWrite.H.

◆ vSymmtf_

UPtrList<volSymmTensorField> vSymmtf_
protected

Definition at line 132 of file partialWrite.H.

◆ vtf_

UPtrList<volTensorField> vtf_
protected

Definition at line 133 of file partialWrite.H.

◆ ssf_

UPtrList<surfaceScalarField> ssf_
protected

Definition at line 135 of file partialWrite.H.

◆ svf_

UPtrList<surfaceVectorField> svf_
protected

Definition at line 136 of file partialWrite.H.

◆ sSpheretf_

UPtrList<surfaceSphericalTensorField> sSpheretf_
protected

Definition at line 137 of file partialWrite.H.

◆ sSymmtf_

UPtrList<surfaceSymmTensorField> sSymmtf_
protected

Definition at line 138 of file partialWrite.H.

◆ stf_

UPtrList<surfaceTensorField> stf_
protected

Definition at line 139 of file partialWrite.H.

◆ objectNames_

HashSet<word> objectNames_
protected

Names of objects to dump always.

Definition at line 144 of file partialWrite.H.

◆ writeInterval_

label writeInterval_
protected

Write interval for restart dump.

Definition at line 147 of file partialWrite.H.

◆ writeInstance_

label writeInstance_
protected

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

Definition at line 152 of file partialWrite.H.


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