Finite Volume Solver
prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
|
This class stores debug data for a debug output for a single hierarchy state. More...
#include <DebugOutput.hpp>
Public Types | |
using | Hierarchy = ::amrex::Vector<::amrex::MultiFab > |
using | GeomHierarchy = ::amrex::Vector<::amrex::Geometry > |
using | ComponentNames = ::amrex::Vector< std::string > |
Public Member Functions | |
DebugSnapshot ()=default | |
Initializes an empty snapshot. More... | |
void | ClearAll () |
Deletes all currently stored data. More... | |
const std::vector< Hierarchy > & | GetHierarchies () const noexcept |
Returns all the hierarchies which are stored via SaveData. More... | |
const std::vector< ComponentNames > & | GetNames () const noexcept |
Returns all the component names which are stored via SaveData. More... | |
const std::vector< GeomHierarchy > & | GetGeometries () const noexcept |
Returns all the associated geometries which are stored via SaveData. More... | |
void | MakeUniqueComponentNames () |
Changes component names that appear more than once by appending assending numbers to each. More... | |
std::vector< std::tuple< Hierarchy, ComponentNames, GeomHierarchy > > | GatherFields (::amrex::IndexType location) const |
Collects all hierachies and associated names which are stored on the specified location. More... | |
void | SetSnapshotDirectory (const std::string &snapshot_directory) |
Sets the directory in which the output will be saved to. More... | |
const std::string | GetSnapshotDirectory () const |
Returns the directory in which the output will be saved to. More... | |
void | SaveData (const ::amrex::MultiFab &mf, const std::string &name, const ::amrex::Geometry &geom, ::amrex::SrcComp component=::amrex::SrcComp(0)) |
Saves a current hierarchy state with given component names. More... | |
void | SaveData (const ::amrex::MultiFab &mf, const ComponentNames &names, const ::amrex::Geometry &geom, ::amrex::SrcComp first_component=::amrex::SrcComp(0)) |
Saves a current hierarchy state with given component names. More... | |
void | SaveData (const ::amrex::Vector< const ::amrex::MultiFab * > &hierarchy, const std::string &name, const ::amrex::Vector< const ::amrex::Geometry * > &geomhier, ::amrex::SrcComp component=::amrex::SrcComp(0)) |
Saves a current hierarchy state with given component names. More... | |
void | SaveData (const ::amrex::Vector<::amrex::MultiFab > &hierarchy, const std::string &name, const ::amrex::Vector<::amrex::Geometry > &geomhier, ::amrex::SrcComp component=::amrex::SrcComp(0)) |
Saves a current hierarchy state with given component names. More... | |
void | SaveData (const ::amrex::Vector< const ::amrex::MultiFab * > &hierarchy, const ComponentNames &names, const ::amrex::Vector< const ::amrex::Geometry * > &geomhier, ::amrex::SrcComp first_component=::amrex::SrcComp(0)) |
Saves a current hierarchy state with given component names. More... | |
void | SaveData (const ::amrex::Vector<::amrex::MultiFab > &hierarchy, const ComponentNames &names, const ::amrex::Vector<::amrex::Geometry > &geomhier, ::amrex::SrcComp first_component=::amrex::SrcComp(0)) |
Saves a current hierarchy state with given component names. More... | |
Private Attributes | |
std::vector< Hierarchy > | saved_hierarchies_ |
Each SaveData will append a hierarchy. More... | |
std::vector< ComponentNames > | names_per_hierarchy_ |
Each SaveData will append a list of names on the hierachy. More... | |
std::vector< GeomHierarchy > | saved_geometries_ |
Each SaveData will append a hierarchy of corresponding geometries. More... | |
std::string | snapshot_directory_ |
output directory of storage; More... | |
This class stores debug data for a debug output for a single hierarchy state.
This class will be created by DebugStorage and modified through DebugSnapshotProxy.
using fub::amrex::DebugSnapshot::ComponentNames = ::amrex::Vector<std::string> |
using fub::amrex::DebugSnapshot::GeomHierarchy = ::amrex::Vector<::amrex::Geometry> |
using fub::amrex::DebugSnapshot::Hierarchy = ::amrex::Vector<::amrex::MultiFab> |
|
default |
Initializes an empty snapshot.
void fub::amrex::DebugSnapshot::ClearAll | ( | ) |
Deletes all currently stored data.
std::vector<std::tuple<Hierarchy, ComponentNames, GeomHierarchy> > fub::amrex::DebugSnapshot::GatherFields | ( | ::amrex::IndexType | location | ) | const |
Collects all hierachies and associated names which are stored on the specified location.
This function will join all compatible hierachies to a common big one if possible.
|
noexcept |
Returns all the associated geometries which are stored via SaveData.
|
noexcept |
Returns all the hierarchies which are stored via SaveData.
|
noexcept |
Returns all the component names which are stored via SaveData.
|
inline |
Returns the directory in which the output will be saved to.
void fub::amrex::DebugSnapshot::MakeUniqueComponentNames | ( | ) |
Changes component names that appear more than once by appending assending numbers to each.
This also makes names unique, which appear more than once in one hierarchy.
void fub::amrex::DebugSnapshot::SaveData | ( | const ::amrex::MultiFab & | mf, |
const ComponentNames & | names, | ||
const ::amrex::Geometry & | geom, | ||
::amrex::SrcComp | first_component = ::amrex::SrcComp(0) |
||
) |
Saves a current hierarchy state with given component names.
The actual output will be handled by the DebugOutput class and will usually happen at a later time point.
void fub::amrex::DebugSnapshot::SaveData | ( | const ::amrex::MultiFab & | mf, |
const std::string & | name, | ||
const ::amrex::Geometry & | geom, | ||
::amrex::SrcComp | component = ::amrex::SrcComp(0) |
||
) |
Saves a current hierarchy state with given component names.
The actual output will be handled by the DebugOutput class and will usually happen at a later time point.
void fub::amrex::DebugSnapshot::SaveData | ( | const ::amrex::Vector< const ::amrex::MultiFab * > & | hierarchy, |
const ComponentNames & | names, | ||
const ::amrex::Vector< const ::amrex::Geometry * > & | geomhier, | ||
::amrex::SrcComp | first_component = ::amrex::SrcComp(0) |
||
) |
Saves a current hierarchy state with given component names.
The actual output will be handled by the DebugOutput class and will usually happen at a later time point.
void fub::amrex::DebugSnapshot::SaveData | ( | const ::amrex::Vector< const ::amrex::MultiFab * > & | hierarchy, |
const std::string & | name, | ||
const ::amrex::Vector< const ::amrex::Geometry * > & | geomhier, | ||
::amrex::SrcComp | component = ::amrex::SrcComp(0) |
||
) |
Saves a current hierarchy state with given component names.
The actual output will be handled by the DebugOutput class and will usually happen at a later time point.
void fub::amrex::DebugSnapshot::SaveData | ( | const ::amrex::Vector<::amrex::MultiFab > & | hierarchy, |
const ComponentNames & | names, | ||
const ::amrex::Vector<::amrex::Geometry > & | geomhier, | ||
::amrex::SrcComp | first_component = ::amrex::SrcComp(0) |
||
) |
Saves a current hierarchy state with given component names.
The actual output will be handled by the DebugOutput class and will usually happen at a later time point.
void fub::amrex::DebugSnapshot::SaveData | ( | const ::amrex::Vector<::amrex::MultiFab > & | hierarchy, |
const std::string & | name, | ||
const ::amrex::Vector<::amrex::Geometry > & | geomhier, | ||
::amrex::SrcComp | component = ::amrex::SrcComp(0) |
||
) |
Saves a current hierarchy state with given component names.
The actual output will be handled by the DebugOutput class and will usually happen at a later time point.
|
inline |
Sets the directory in which the output will be saved to.
|
private |
Each SaveData will append a list of names on the hierachy.
|
private |
Each SaveData will append a hierarchy of corresponding geometries.
|
private |
Each SaveData will append a hierarchy.
|
private |
output directory of storage;