18 #ifdef MFEM_USE_ADIOS2
25 const std::string& collection_name,
Mesh* mesh,
26 const std::string engine_type) :
DataCollection(collection_name, mesh),
33 const std::string& collection_name,
Mesh* mesh,
34 const std::string engine_type):
DataCollection(collection_name, mesh),
51 if (stream->CurrentStep() == 0)
55 const std::string error_message =
56 "MFEM ADIOS2DataCollection Save error: Mesh is null. Please call SetMesh before Save\n";
65 stream->SetTime(
time);
66 stream->SetCycle(
cycle);
71 const std::string& variable_name = field.first;
72 field.second->Save(*stream.get(), variable_name);
79 const std::string value) noexcept
81 stream->SetParameter(key, value);
87 stream->SetRefinementLevel(levels_of_detail);
92 #endif // MFEM_USE_ADIOS2
double time
Physical time (for time-dependent simulations)
Mesh * mesh
The (common) mesh for the collected fields.
int cycle
Time cycle; for time-dependent simulations cycle >= 0, otherwise = -1.
void mfem_error(const char *msg)
Function called when an error is encountered. Used by the macros MFEM_ABORT, MFEM_ASSERT, MFEM_VERIFY.
void SetParameter(const std::string key, const std::string value) noexcept
virtual ~ADIOS2DataCollection()
int myid
MPI rank (in parallel)
void SetLevelsOfDetail(const int levels_of_detail) noexcept
virtual void SetMesh(Mesh *new_mesh)
Set/change the mesh associated with the collection.
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...
ADIOS2DataCollection(MPI_Comm comm, const std::string &collection_name, Mesh *mesh=nullptr, const std::string engine_type="BPFile")