Finite Volume Solver  prototype
A framework to build finite volume solvers for the AG Klein at the Freie Universität Berlin.
Public Types | Public Member Functions | Private Attributes | List of all members
fub::amrex::DebugSnapshot Class Reference

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< Hierarchysaved_hierarchies_
 Each SaveData will append a hierarchy. More...
 
std::vector< ComponentNamesnames_per_hierarchy_
 Each SaveData will append a list of names on the hierachy. More...
 
std::vector< GeomHierarchysaved_geometries_
 Each SaveData will append a hierarchy of corresponding geometries. More...
 
std::string snapshot_directory_
 output directory of storage; More...
 

Detailed Description

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.

See also
DebugStorage
DebugSnapshotProxy

Member Typedef Documentation

◆ ComponentNames

using fub::amrex::DebugSnapshot::ComponentNames = ::amrex::Vector<std::string>

◆ GeomHierarchy

◆ Hierarchy

using fub::amrex::DebugSnapshot::Hierarchy = ::amrex::Vector<::amrex::MultiFab>

Constructor & Destructor Documentation

◆ DebugSnapshot()

fub::amrex::DebugSnapshot::DebugSnapshot ( )
default

Initializes an empty snapshot.

Member Function Documentation

◆ ClearAll()

void fub::amrex::DebugSnapshot::ClearAll ( )

Deletes all currently stored data.

◆ GatherFields()

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.

◆ GetGeometries()

const std::vector<GeomHierarchy>& fub::amrex::DebugSnapshot::GetGeometries ( ) const
noexcept

Returns all the associated geometries which are stored via SaveData.

◆ GetHierarchies()

const std::vector<Hierarchy>& fub::amrex::DebugSnapshot::GetHierarchies ( ) const
noexcept

Returns all the hierarchies which are stored via SaveData.

◆ GetNames()

const std::vector<ComponentNames>& fub::amrex::DebugSnapshot::GetNames ( ) const
noexcept

Returns all the component names which are stored via SaveData.

◆ GetSnapshotDirectory()

const std::string fub::amrex::DebugSnapshot::GetSnapshotDirectory ( ) const
inline

Returns the directory in which the output will be saved to.

◆ MakeUniqueComponentNames()

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.

◆ SaveData() [1/6]

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.

◆ SaveData() [2/6]

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.

◆ SaveData() [3/6]

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.

◆ SaveData() [4/6]

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.

◆ SaveData() [5/6]

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.

◆ SaveData() [6/6]

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.

◆ SetSnapshotDirectory()

void fub::amrex::DebugSnapshot::SetSnapshotDirectory ( const std::string &  snapshot_directory)
inline

Sets the directory in which the output will be saved to.

Member Data Documentation

◆ names_per_hierarchy_

std::vector<ComponentNames> fub::amrex::DebugSnapshot::names_per_hierarchy_
private

Each SaveData will append a list of names on the hierachy.

◆ saved_geometries_

std::vector<GeomHierarchy> fub::amrex::DebugSnapshot::saved_geometries_
private

Each SaveData will append a hierarchy of corresponding geometries.

◆ saved_hierarchies_

std::vector<Hierarchy> fub::amrex::DebugSnapshot::saved_hierarchies_
private

Each SaveData will append a hierarchy.

◆ snapshot_directory_

std::string fub::amrex::DebugSnapshot::snapshot_directory_
private

output directory of storage;


The documentation for this class was generated from the following file: