|
METHOD
|
#include <parallelSaveData.h>


Public Member Functions | |
| void | saveCons () |
| void | savePrims () |
| void | saveAux () |
| void | saveDomain () |
| void | saveConsts () |
| ParallelSaveData (Data *data, ParallelEnv *env, int test=0) | |
| virtual | ~ParallelSaveData () |
| void | saveAll (bool timeSeries=false) |
| void | saveVar (string variable, int num=1) |
Public Member Functions inherited from SaveData | |
| SaveData (Data *data, int test=0) | |
| virtual | ~SaveData () |
Public Attributes | |
| ParallelEnv * | env |
Public Attributes inherited from SaveData | |
| Data * | d |
| int | Nouts |
| int | Ncount |
| int | test |
| char | dir [50] |
| char | app [50] |
Private Member Functions | |
| void | packStateVectorBuffer (double *buffer, double *stateVector, int nVars) |
| void | sendStateVectorBufferToMaster (double *buffer, int numCellsSent, int rank) |
| void | unpackStateVectorBuffer (double *buffer, double *stateVector, int nVars, int rank) |
| void | copyMasterStateVectorToFullStateVector (double *fullStateVector, double *stateVector, int nVars) |
| void | writeStateVectorToFile (FILE *f, double *fullStateVector, int nVars) |
Class used to save simulation data to a text format using multiple processes
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 27 of file parallelSaveData.h.
|
inline |
Constructor.
| *data | pointer to the Data class |
| test | integar flagging if we are in the 'Examples' directory or not, Only used for running the given examples, can ignore otherwise. |
Definition at line 103 of file parallelSaveData.h.
|
inlinevirtual |
Destructor.
Definition at line 105 of file parallelSaveData.h.
|
private |
Process 0 already holds the values for its own subdomain, so does not need to send them anywhere. Instead, it needs to copy its subdomain values (cons, prims, aux) to the vector containing the full simulation domain
| [in,out] | *fullStateVector | pointer to cons, prims or aux array of size equal to the full simulation domain |
| [in] | *stateVector | pointer to cons, prims or aux array for process 0's subdomain |
| [in] | nVars | number of variables in the cons, prims or aux array |
|
private |
For each particular state vector (cons, prims, aux) packs a buffer containing all cells in a subdomain (not including ghost values) to be sent to process 0
| [out] | *buffer | pointer to the buffer to pack |
| [in] | *stateVector | pointer to cons, prims or aux array |
| [in] | nVars | number of variables in the cons, prims or aux array |
|
virtual |
Saves all cons, prims, aux and constant data.
| [in] | timeSeries | flags whether the saved data is final or transient |
Implements SaveData.
|
virtual |
Saves the auxiliary vector state.
Implements SaveData.
|
virtual |
Saves the conserved vector state.
Implements SaveData.
|
virtual |
Saves the constant data.
Implements SaveData.
|
virtual |
Saves the domain coordinates.
Implements SaveData.
|
virtual |
Saves the primitive vector state.
Implements SaveData.
|
virtual |
Saves user specified variable.
var| [in] | variable | Defines the variable the user wants to save. Should match a variable label |
| [in] | num | number of user-specified variables to save in total (required for consistent numbering of files) |
Implements SaveData.
|
private |
For each subdomain, send a buffer containing the non-ghost cells in that subdomain to a buffer on process 0.
| [in,out] | *buffer | pointer to the buffer to send or receive |
| [in] | numCellsSent | number of cells in the buffer |
| [in] | rank | global id of the process sending its buffer to process 0 |
|
private |
For each particular state vector (cons, prims, aux) unpacks a buffer containing all cells (not including ghost values) received from a particular subdomain into a vector containing the full simulation domain
| [in] | *buffer | pointer to the buffer to unpack |
| [in,out] | *stateVector | pointer to cons, prims or aux array of size equal to the full simulation domain |
| [in] | rank | global id of the process that sent its buffer to process 0 |
|
private |
| ParallelEnv* ParallelSaveData::env |
Pointer to PlatformEnv class containing platform specific info such as MPI details.
Definition at line 30 of file parallelSaveData.h.