AMReX I/O interfaces. More...
Classes | |
| class | amrex::PlotFileData |
| class | amrex::VisMF |
| File I/O for FabArray<FArrayBox>. Wrapper class for reading/writing FabArray<FArrayBox> objects to disk in various "smart" ways. More... | |
Functions | |
| virtual void | amrex::Amr::writePlotFile () |
| virtual void | amrex::Amr::checkPoint () |
| void | amrex::WriteMultiLevelPlotfile (const std::string &plotfilename, int nlevels, const Vector< const MultiFab * > &mf, const Vector< std::string > &varnames, const Vector< Geometry > &geom, Real time, const Vector< int > &level_steps, const Vector< IntVect > &ref_ratio, const std::string &versionName="HyperCLaw-V1.1", const std::string &levelPrefix="Level_", const std::string &mfPrefix="Cell", const Vector< std::string > &extra_dirs=Vector< std::string >()) |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::Checkpoint (const std::string &dir, const std::string &name, bool is_checkpoint, const Vector< std::string > &real_comp_names=Vector< std::string >(), const Vector< std::string > &int_comp_names=Vector< std::string >()) const |
| Writes a particle checkpoint to file, suitable for restarting. This version allows the particle component names to be passed in. This overload exists for backwards compatibility. The is_checkpoint parameter is ignored. | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name) const |
| This version of WritePlotFile writes all components and assigns component names. | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names) const |
| This version of WritePlotFile writes all components and allows the user to specify the names of the components. | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names) const |
| This version of WritePlotFile writes all components and allows the user to specify the names of the components. | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp) const |
| This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components. | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names) const |
| This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not. | |
| template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string > > > * = nullptr> | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name, F &&f) const |
| This version of WritePlotFile writes all components and assigns component names. | |
| template<class F > | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const |
| This version of WritePlotFile writes all components and allows the user to specify the names of the components. | |
| template<class F , std::enable_if_t<!std::is_same_v< std::decay_t< F >, Vector< std::string > > > * = nullptr> | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name, const Vector< std::string > &real_comp_names, F &&f) const |
| This version of WritePlotFile writes all components and allows the user to specify the names of the components. | |
| template<class F > | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, F &&f) const |
| This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components. | |
| template<class F > | |
| void | amrex::ParticleContainer_impl< T_ParticleType, T_NArrayReal, T_NArrayInt, Allocator, T_CellAssignor >::WritePlotFile (const std::string &dir, const std::string &name, const Vector< int > &write_real_comp, const Vector< int > &write_int_comp, const Vector< std::string > &real_comp_names, const Vector< std::string > &int_comp_names, F &&f) const |
| This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not. | |
AMReX I/O interfaces.
This covers I/O related topics.
Central utility functions and classes include:
|
virtual |
Write current state into a chk* file.
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::Checkpoint | ( | const std::string & | dir, |
| const std::string & | name, | ||
| bool | is_checkpoint, | ||
| const Vector< std::string > & | real_comp_names = Vector<std::string>(), |
||
| const Vector< std::string > & | int_comp_names = Vector<std::string>() |
||
| ) | const |
Writes a particle checkpoint to file, suitable for restarting. This version allows the particle component names to be passed in. This overload exists for backwards compatibility. The is_checkpoint parameter is ignored.
| void amrex::WriteMultiLevelPlotfile | ( | const std::string & | plotfilename, |
| int | nlevels, | ||
| const Vector< const MultiFab * > & | mf, | ||
| const Vector< std::string > & | varnames, | ||
| const Vector< Geometry > & | geom, | ||
| Real | time, | ||
| const Vector< int > & | level_steps, | ||
| const Vector< IntVect > & | ref_ratio, | ||
| const std::string & | versionName, | ||
| const std::string & | levelPrefix, | ||
| const std::string & | mfPrefix, | ||
| const Vector< std::string > & | extra_dirs | ||
| ) |
|
virtual |
Write the plot file to be used for visualization.
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name | ||
| ) | const |
This version of WritePlotFile writes all components and assigns component names.
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name, | ||
| const Vector< int > & | write_real_comp, | ||
| const Vector< int > & | write_int_comp | ||
| ) | const |
This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components.
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| write_real_comp | for each real component, whether to include that comp in the file |
| write_int_comp | for each integer component, whether to include that comp in the file |
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name, | ||
| const Vector< int > & | write_real_comp, | ||
| const Vector< int > & | write_int_comp, | ||
| const Vector< std::string > & | real_comp_names, | ||
| const Vector< std::string > & | int_comp_names | ||
| ) | const |
This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not.
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| write_real_comp | for each real component, whether to include that comp in the file |
| write_int_comp | for each integer component, whether to include that comp in the file |
| real_comp_names | for each real component, a name to label the data with |
| int_comp_names | for each integer component, a name to label the data with |
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name, | ||
| const Vector< int > & | write_real_comp, | ||
| const Vector< int > & | write_int_comp, | ||
| const Vector< std::string > & | real_comp_names, | ||
| const Vector< std::string > & | int_comp_names, | ||
| F && | f | ||
| ) | const |
This is the most general version of WritePlotFile, which takes component names and flags for whether to write each variable as components. Note that the user should pass in vectors containing names of all the components, whether they are written or not.
This version also lets you pass in a functor to toggle whether each particle gets output.
| F | function type |
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| write_real_comp | for each real component, whether to include that comp in the file |
| write_int_comp | for each integer component, whether to include that comp in the file |
| real_comp_names | for each real component, a name to label the data with |
| int_comp_names | for each integer component, a name to label the data with |
| f | callable that returns whether or not to write each particle |
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name, | ||
| const Vector< int > & | write_real_comp, | ||
| const Vector< int > & | write_int_comp, | ||
| F && | f | ||
| ) | const |
This version of WritePlotFile assigns component names, but allows the user to pass in a vector of ints that toggle on / off the writing of specific components.
This version also lets you pass in a functor to toggle whether each particle gets output.
| F | function type |
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| write_real_comp | for each real component, whether to include that comp in the file |
| write_int_comp | for each integer component, whether to include that comp in the file |
| f | callable that returns whether or not to write each particle |
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name, | ||
| const Vector< std::string > & | real_comp_names | ||
| ) | const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components.
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| real_comp_names | for each real component, a name to label the data with |
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name, | ||
| const Vector< std::string > & | real_comp_names, | ||
| const Vector< std::string > & | int_comp_names | ||
| ) | const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components.
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| real_comp_names | for each real component, a name to label the data with |
| int_comp_names | for each integer component, a name to label the data with |
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name, | ||
| const Vector< std::string > & | real_comp_names, | ||
| const Vector< std::string > & | int_comp_names, | ||
| F && | f | ||
| ) | const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components.
This version also lets you pass in a functor to toggle whether each particle gets output.
| F | function type |
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| real_comp_names | for each real component, a name to label the data with |
| int_comp_names | for each integer component, a name to label the data with |
| f | callable that returns whether or not to write each particle |
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name, | ||
| const Vector< std::string > & | real_comp_names, | ||
| F && | f | ||
| ) | const |
This version of WritePlotFile writes all components and allows the user to specify the names of the components.
This version also lets you pass in a functor to toggle whether each particle gets output.
| F | function type |
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| real_comp_names | for each real component, a name to label the data with |
| f | callable that returns whether or not to write each particle |
| void amrex::ParticleContainer_impl< ParticleType, NArrayReal, NArrayInt, Allocator, CellAssignor >::WritePlotFile | ( | const std::string & | dir, |
| const std::string & | name, | ||
| F && | f | ||
| ) | const |
This version of WritePlotFile writes all components and assigns component names.
This version also lets you pass in a functor to toggle whether each particle gets output.
| F | function type |
| dir | The base directory into which to write (i.e. "plt00000") |
| name | The name of the sub-directory for this particle type (i.e. "Tracer") |
| f | callable that returns whether or not to write each particle |