DMDModel Class Referenceabstract

Abstract base class for DMD models to handle DMD characteristics for the DMD function object. More...

Inheritance diagram for DMDModel:
Collaboration diagram for DMDModel:

Public Member Functions

 TypeName ("DMDModel")
 Runtime type information. More...
 
 declareRunTimeSelectionTable (autoPtr, DMDModel, dictionary,(const fvMesh &mesh, const word &name, const dictionary &dict),(mesh, name, dict))
 
 DMDModel (const fvMesh &mesh, const word &name, const dictionary &dict)
 Construct from components. More...
 
 DMDModel (const DMDModel &)=delete
 No copy construct. More...
 
void operator= (const DMDModel &)=delete
 No copy assignment. More...
 
virtual ~DMDModel ()=default
 Destructor. More...
 
virtual bool initialise (const RMatrix &snapshot)=0
 Initialise model data members with a given snapshot. More...
 
virtual bool update (const RMatrix &snapshot)=0
 Update model data members with a given snapshot. More...
 
virtual bool fit ()=0
 Compute and write modes and mode dynamics of model data members. More...
 
virtual void reconstruct (const wordList modes)
 Compute and write a reconstruction of flow field based on given modes and mode dynamics (currently no-op) More...
 
virtual bool read (const dictionary &dict)=0
 Read model settings. More...
 
- Public Member Functions inherited from writeFile
 writeFile (const objectRegistry &obr, const fileName &prefix, const word &name="undefined", const bool writeToFile=true)
 Construct from objectRegistry, prefix, fileName. More...
 
 writeFile (const objectRegistry &obr, const fileName &prefix, const word &name, const dictionary &dict, const bool writeToFile=true)
 Construct from objectRegistry, prefix, fileName and read options from dictionary. More...
 
 writeFile (const writeFile &wf)
 Construct copy. More...
 
virtual ~writeFile ()=default
 Destructor. More...
 
virtual OFstreamfile ()
 Return access to the file (if only 1) More...
 
virtual bool writeToFile () const
 Flag to allow writing to file. More...
 
virtual bool canWriteToFile () const
 Flag to allow writing to the file. More...
 
virtual bool canResetFile () const
 Flag to allow resetting the file. More...
 
virtual bool canWriteHeader () const
 Flag to allow writing the header. More...
 
virtual label charWidth () const
 Return width of character stream output. More...
 
virtual void writeCommented (Ostream &os, const string &str) const
 Write a commented string to stream. More...
 
virtual void writeTabbed (Ostream &os, const string &str) const
 Write a tabbed string to stream. More...
 
virtual void writeHeader (Ostream &os, const string &str) const
 Write a commented header to stream. More...
 
virtual void writeCurrentTime (Ostream &os) const
 Write the current time to stream. More...
 
virtual void writeBreak (Ostream &os) const
 Write a break marker to the 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...
 
template<class Type >
void writeValue (Ostream &os, const Type &val) const
 Write a given value to stream with the space delimiter. More...
 

Static Public Member Functions

static autoPtr< DMDModelNew (const fvMesh &mesh, const word &name, const dictionary &dict)
 Return a reference to the selected DMD model. More...
 

Protected Member Functions

virtual bool dynamics ()=0
 Compute and write mode dynamics. More...
 
virtual bool modes ()=0
 Compute and write modes. More...
 
- Protected Member Functions inherited from writeFile
void initStream (Ostream &os) const
 Initialise the output stream for writing. More...
 
fileName baseFileDir () const
 Return the base directory for output. More...
 
fileName baseTimeDir () const
 Return the base directory for the current time value. More...
 
fileName filePath (const fileName &fName) const
 Return the full path for the supplied file name. More...
 
virtual autoPtr< OFstreamnewFile (const fileName &fName) const
 Return autoPtr to a new file using file name. More...
 
virtual autoPtr< OFstreamnewFileAtTime (const word &name, scalar timeValue) const
 Return autoPtr to a new file for a given time. More...
 
virtual autoPtr< OFstreamnewFileAtStartTime (const word &name) const
 Return autoPtr to a new file using the simulation start time. More...
 
virtual void resetFile (const word &name)
 Reset internal file pointer to new file with new name. More...
 
Omanip< int > valueWidth (const label offset=0) const
 Return the value width when writing to stream with optional offset. More...
 
void operator= (const writeFile &)=delete
 No copy assignment. More...
 
virtual autoPtr< OFstreamcreateFile (const word &name, scalar timeValue) const
 Deprecated(2022-09) Return autoPtr to a new file for a given time. More...
 
virtual autoPtr< OFstreamcreateFile (const word &name) const
 Deprecated(2022-09) Return autoPtr to a new file using the simulation start time. More...
 

Protected Attributes

const fvMeshmesh_
 Reference to the mesh. More...
 
const word name_
 Name of operand function object. More...
 
- Protected Attributes inherited from writeFile
const objectRegistryfileObr_
 Reference to the region objectRegistry. More...
 
const fileName prefix_
 Prefix. More...
 
word fileName_
 Name of file. More...
 
autoPtr< OFstreamfilePtr_
 File pointer. More...
 
label writePrecision_
 Write precision. More...
 
bool writeToFile_
 Flag to enable/disable writing to file. More...
 
bool updateHeader_
 Flag to update the header, e.g. on mesh changes. Default is true. More...
 
bool writtenHeader_
 Flag to identify whether the header has been written. More...
 
bool useUserTime_
 Flag to use the specified user time, e.g. CA deg instead of seconds. Default = true. More...
 
scalar startTime_
 Start time value. More...
 

Additional Inherited Members

- Static Public Attributes inherited from writeFile
static label addChars = 8
 Additional characters for writing. More...
 

Detailed Description

Abstract base class for DMD models to handle DMD characteristics for the DMD function object.

Source files

Definition at line 62 of file DMDModel.H.

Constructor & Destructor Documentation

◆ DMDModel() [1/2]

DMDModel ( const fvMesh mesh,
const word name,
const dictionary dict 
)

Construct from components.

Definition at line 35 of file DMDModel.C.

◆ DMDModel() [2/2]

DMDModel ( const DMDModel )
delete

No copy construct.

◆ ~DMDModel()

virtual ~DMDModel ( )
virtualdefault

Destructor.

Member Function Documentation

◆ dynamics()

virtual bool dynamics ( )
protectedpure virtual

Compute and write mode dynamics.

◆ modes()

virtual bool modes ( )
protectedpure virtual

Compute and write modes.

◆ TypeName()

TypeName ( "DMDModel"  )

Runtime type information.

◆ declareRunTimeSelectionTable()

declareRunTimeSelectionTable ( autoPtr  ,
DMDModel  ,
dictionary  ,
(const fvMesh &mesh, const word &name, const dictionary &dict ,
(mesh, name, dict  
)

◆ New()

Foam::autoPtr< Foam::DMDModel > New ( const fvMesh mesh,
const word name,
const dictionary dict 
)
static

Return a reference to the selected DMD model.

Definition at line 26 of file DMDModelNew.C.

References dict, Foam::exit(), Foam::FatalIOError, FatalIOErrorInLookup, mesh, and Foam::name().

Here is the call graph for this function:

◆ operator=()

void operator= ( const DMDModel )
delete

No copy assignment.

◆ initialise()

virtual bool initialise ( const RMatrix snapshot)
pure virtual

Initialise model data members with a given snapshot.

Implemented in STDMD.

◆ update()

virtual bool update ( const RMatrix snapshot)
pure virtual

Update model data members with a given snapshot.

Implemented in STDMD.

◆ fit()

virtual bool fit ( )
pure virtual

Compute and write modes and mode dynamics of model data members.

Implemented in STDMD.

◆ reconstruct()

virtual void reconstruct ( const wordList  modes)
inlinevirtual

Compute and write a reconstruction of flow field based on given modes and mode dynamics (currently no-op)

Definition at line 190 of file DMDModel.H.

References NotImplemented.

◆ read()

virtual bool read ( const dictionary dict)
pure virtual

Read model settings.

Reimplemented from writeFile.

Implemented in STDMD.

Member Data Documentation

◆ mesh_

const fvMesh& mesh_
protected

Reference to the mesh.

Definition at line 77 of file DMDModel.H.

◆ name_

const word name_
protected

Name of operand function object.

Definition at line 82 of file DMDModel.H.


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