METHOD
SaveData Class Referenceabstract

#include <saveData.h>

Inheritance diagram for SaveData:
Collaboration diagram for SaveData:

Public Member Functions

virtual void saveCons ()=0
 
virtual void savePrims ()=0
 
virtual void saveAux ()=0
 
virtual void saveDomain ()=0
 
virtual void saveConsts ()=0
 
 SaveData (Data *data, int test=0)
 
virtual ~SaveData ()
 
virtual void saveAll (bool timeSeries=false)=0
 
virtual void saveVar (string variable, int num=1)=0
 

Public Attributes

Datad
 
int Nouts
 
int Ncount
 
int test
 
char dir [50]
 
char app [50]
 

Detailed Description

Class used to save simulation data

Abstract base class to allow for different output schemes in a parallel environment. Class is initialized with the data that is to be saved. Saves the simulation data in the Data directory, located within the Project folder. All data is saved automatically, including all constant data (xmin, ymax, endTime etc) and and the values of all prims, aux and cons variables.

Definition at line 23 of file saveData.h.

Constructor & Destructor Documentation

◆ SaveData()

SaveData::SaveData ( Data data,
int  test = 0 
)
inline

Constructor.

The constructor take a pointer to the data class which the user wants to save. All this data is automatically saved in the Data directory, located in the Project folder.
Parameters
*datapointer to the Data class
testinteger flagging if we are in the 'Examples' directory or not, Only used for running the given examples, can ignore otherwise.

Definition at line 64 of file saveData.h.

◆ ~SaveData()

virtual SaveData::~SaveData ( )
inlinevirtual

Destructor.

Definition at line 73 of file saveData.h.

Member Function Documentation

◆ saveAll()

virtual void SaveData::saveAll ( bool  timeSeries = false)
pure virtual

Saves all cons, prims, aux and constant data.

This calls the other member functions to save their respective simulation data.
Parameters
[in]timeSeriesflags whether the saved data is final or transient

Implemented in ParallelSaveData, SerialSaveDataHDF5, ParallelSaveDataHDF5, and SerialSaveData.

◆ saveAux()

virtual void SaveData::saveAux ( )
pure virtual

Saves the auxiliary vector state.

Implemented in ParallelSaveData, SerialSaveDataHDF5, ParallelSaveDataHDF5, and SerialSaveData.

◆ saveCons()

virtual void SaveData::saveCons ( )
pure virtual

Saves the conserved vector state.

Implemented in ParallelSaveData, SerialSaveDataHDF5, ParallelSaveDataHDF5, and SerialSaveData.

◆ saveConsts()

virtual void SaveData::saveConsts ( )
pure virtual

Saves the constant data.

Implemented in ParallelSaveData, SerialSaveDataHDF5, ParallelSaveDataHDF5, and SerialSaveData.

◆ saveDomain()

virtual void SaveData::saveDomain ( )
pure virtual

Saves the domain coordinates.

Implemented in ParallelSaveData, SerialSaveDataHDF5, ParallelSaveDataHDF5, and SerialSaveData.

◆ savePrims()

virtual void SaveData::savePrims ( )
pure virtual

Saves the primitive vector state.

Implemented in ParallelSaveData, SerialSaveDataHDF5, ParallelSaveDataHDF5, and SerialSaveData.

◆ saveVar()

virtual void SaveData::saveVar ( string  variable,
int  num = 1 
)
pure virtual

Saves user specified variable.

Function saves the data for the variable specified by the string var
Parameters
[in]variableDefines the variable the user wants to save. Should match a variable label
[in]numnumber of user-specified variables to save in total (required for consistent numbering of files)

Implemented in ParallelSaveData, SerialSaveDataHDF5, ParallelSaveDataHDF5, and SerialSaveData.

Member Data Documentation

◆ app

char SaveData::app[50]

String appendix to add to end of file names.

Definition at line 50 of file saveData.h.

◆ d

Data* SaveData::d

Pointer to Data class containing global simulation data.

Definition at line 27 of file saveData.h.

◆ dir

char SaveData::dir[50]

String path to the directory in which to write files.

Definition at line 50 of file saveData.h.

◆ Ncount

int SaveData::Ncount

Which user defined variable is this?

Definition at line 30 of file saveData.h.

◆ Nouts

int SaveData::Nouts

Number of output files.

Definition at line 30 of file saveData.h.

◆ test

int SaveData::test

Flags if we are running one of the given examples.

Definition at line 30 of file saveData.h.


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