![]() |
MFEM
v4.2.0
Finite element discretization library
|
#include <adios2stream.hpp>
Public Types | |
| enum | openmode { openmode::out, openmode::in, openmode::app } |
| enum | mode { mode::sync, mode::deferred } |
| enum | data_type { data_type::none, data_type::point_data, data_type::cell_data } |
Public Member Functions | |
| adios2stream (const std::string &name, const openmode mode, MPI_Comm comm, const std::string engine_type="BPFile") | |
| adios2stream (const std::string &name, const openmode mode, const std::string engine_type="BPFile") | |
| virtual | ~adios2stream () |
| void | SetParameters (const std::map< std::string, std::string > ¶meters=std::map< std::string, std::string >()) |
| void | SetParameter (const std::string key, const std::string value) noexcept |
| void | BeginStep () |
| void | EndStep () |
| void | SetTime (const double time) |
| void | SetCycle (const int cycle) |
| void | SetRefinementLevel (const int level) noexcept |
| size_t | CurrentStep () const |
| void | Close () |
Protected Member Functions | |
| void | Print (const Mesh &mesh, const adios2stream::mode print_mode=mode::sync) |
| void | Save (const GridFunction &grid_function, const std::string &variable_name, const data_type type) |
Friends | |
| class | Vector |
| class | GridFunction |
| class | Mesh |
| class | ADIOS2DataCollection |
Definition at line 47 of file adios2stream.hpp.
|
strong |
| Enumerator | |
|---|---|
| none | |
| point_data | |
| cell_data | |
Definition at line 66 of file adios2stream.hpp.
|
strong |
Print and Save modes, deferred is done at Close or EndStep, sync is immediate
| Enumerator | |
|---|---|
| sync | |
| deferred | |
Definition at line 64 of file adios2stream.hpp.
|
strong |
Open modes for adios2stream (from std::fstream) out: write in: read app: append
| Enumerator | |
|---|---|
| out | |
| in | |
| app | |
Definition at line 61 of file adios2stream.hpp.
| mfem::adios2stream::adios2stream | ( | const std::string & | name, |
| const openmode | mode, | ||
| MPI_Comm | comm, | ||
| const std::string | engine_type = "BPFile" |
||
| ) |
adios2stream MPI constructor, allows for passing parameters in source code (compile-time) only.
| name | stream name |
| mode | adios2stream::openmode::in (Read), adios2stream::openmode::out (Write) |
| comm | MPI communicator establishing domain for fstream |
| engine_type | available adios2 engine, default is BPFile see https://adios2.readthedocs.io/en/latest/engines/engines.html |
| std::invalid_argument | (user input error) or std::runtime_error (system error) |
Definition at line 114 of file adios2stream.cpp.
| mfem::adios2stream::adios2stream | ( | const std::string & | name, |
| const openmode | mode, | ||
| const std::string | engine_type = "BPFile" |
||
| ) |
adios2stream Non-MPI serial constructor, allows for passing parameters in source code (compile-time) only.
| name | stream name |
| mode | adios2stream::openmode::in (Read), adios2stream::openmode::out (Write) |
| engine_type | available adios2 engine, default is BPFile |
| std::invalid_argument | (user input error) or std::runtime_error (system error) |
Definition at line 124 of file adios2stream.cpp.
|
virtual |
calls Close if stream is valid basically follows C++ RAII
Definition at line 135 of file adios2stream.cpp.
| void mfem::adios2stream::BeginStep | ( | ) |
Begins an I/O step
Definition at line 161 of file adios2stream.cpp.
| void mfem::adios2stream::Close | ( | ) |
Finished interaction with adios2stream and flushes the data
Definition at line 208 of file adios2stream.cpp.
| size_t mfem::adios2stream::CurrentStep | ( | ) | const |
Return the current step between BeginStep and EndStep
Definition at line 203 of file adios2stream.cpp.
| void mfem::adios2stream::EndStep | ( | ) |
Ends the current step, by default transports the data
Definition at line 171 of file adios2stream.cpp.
|
protected |
Called from friend class Mesh (which is called from ParMesh)
| mesh | input Mesh object to print |
| print_mode | sync: one at a time, deferred: collected (pre-fetch) |
Definition at line 226 of file adios2stream.cpp.
|
protected |
Definition at line 534 of file adios2stream.cpp.
| void mfem::adios2stream::SetCycle | ( | const int | cycle | ) |
Associates a current time step (cycle) with the current I/O step as CYCLE variable
| cycle | physical time |
Definition at line 192 of file adios2stream.cpp.
|
noexcept |
Single parameter version of SetParameters passing a key/value pair See https://adios2.readthedocs.io/en/latest/engines/engines.html
| key | input parameter key |
| value | input parameter value |
Definition at line 151 of file adios2stream.cpp.
| void mfem::adios2stream::SetParameters | ( | const std::map< std::string, std::string > & | parameters = std::map<std::string, std::string>() | ) |
Set parameters for a particular adios2stream Engine See https://adios2.readthedocs.io/en/latest/engines/engines.html
| parameters | map of key/value string elements |
Definition at line 144 of file adios2stream.cpp.
|
noexcept |
Input to the Global Geometry Refiner
| level | input level |
Definition at line 198 of file adios2stream.cpp.
| void mfem::adios2stream::SetTime | ( | const double | time | ) |
Associates a physical time with the current I/O step as TIME variable
| time | input physical time |
Definition at line 185 of file adios2stream.cpp.
|
friend |
Definition at line 52 of file adios2stream.hpp.
|
friend |
Definition at line 50 of file adios2stream.hpp.
|
friend |
Definition at line 51 of file adios2stream.hpp.
|
friend |
Definition at line 49 of file adios2stream.hpp.
1.8.5