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);
void SetParameter(const std::string key, const std::string value) noexcept
ADIOS2DataCollection(MPI_Comm comm, const std::string &collection_name, Mesh *mesh=nullptr, const std::string engine_type="BPFile")
virtual ~ADIOS2DataCollection()
void SetLevelsOfDetail(const int levels_of_detail) noexcept
int cycle
Time cycle; for time-dependent simulations cycle >= 0, otherwise = -1.
real_t time
Physical time (for time-dependent simulations)
virtual void SetMesh(Mesh *new_mesh)
Set/change the mesh associated with the collection.
int myid
MPI rank (in parallel)
Mesh * mesh
The (common) mesh for the collected fields.
void mfem_error(const char *msg)
OutStream out(std::cout)
Global stream used by the library for standard output. Initially it uses the same std::streambuf as s...