|
Cholla 3.0.1-dev
Cholla - Massively parallel hydro on GPUs
|
A callable type that writes general grid data. More...
#include <FieldWriter.h>
Public Member Functions | |
| void | operator() (Grid3D &G, Parameters P, int nfile, const FnameTemplate &fname_template) const |
Static Public Member Functions | |
| static std::pair< WriterFn, std::string > | try_create (int ndim, ParameterMap &pmap, const FieldInfo &field_info, bool write_h5_f32) |
A callable type that writes general grid data.
For more context, a "callable" object is sometimes called a "functor." Essentially a "callable" object carries around state and can be called like a function.
| void io::FieldWriter::operator() | ( | Grid3D & | G, |
| Parameters | P, | ||
| int | nfile, | ||
| const FnameTemplate & | fname_template | ||
| ) | const |
Writes the field data to disk.
obj, then you call this method by invoking obj(G, P, nfile, fname_template). In python, this method would be called __call__
|
inlinestatic |
Factory method that tries to construct a FieldWriter instance
If this is unsuccessful, the returned WriterFn will be "empty" and the string will describe the underlying issue.