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

This class stores a list of snapshots and returns proxy objects to those. More...

#include <DebugOutput.hpp>

Public Member Functions

 DebugStorage ()=default
 Initializes the storage. More...
 
bool IsEnabled () const noexcept
 Checks if debug storage is enabled. More...
 
void Enable ()
 
void Disable ()
 
DebugSnapshotProxy AddSnapshot (const std::string &snapshot_directory)
 Adds snapshot with given directory name to storage. More...
 
void FlushData (const std::string &directory, int cycle=-1, Duration time_point=Duration(0.0))
 Writes data to disk and clears all data present in the storage. More...
 
void ClearAll ()
 Deletes all currently stored snapshots in the debug storage. More...
 

Private Attributes

std::list< DebugSnapshotsaved_snapshots_
 List of snapshots. More...
 
bool is_enabled_
 If this is false no data will be saved. More...
 
int cycle_
 

Detailed Description

This class stores a list of snapshots and returns proxy objects to those.

As long as this class is in a disabled mode the returned proxy objects are invalid and subsequent calls to SaveData will have no effect. Only if this the storage is enabled debug data will be stored.

Constructor & Destructor Documentation

◆ DebugStorage()

fub::amrex::DebugStorage::DebugStorage ( )
default

Initializes the storage.

Member Function Documentation

◆ AddSnapshot()

DebugSnapshotProxy fub::amrex::DebugStorage::AddSnapshot ( const std::string &  snapshot_directory)

Adds snapshot with given directory name to storage.

◆ ClearAll()

void fub::amrex::DebugStorage::ClearAll ( )
inline

Deletes all currently stored snapshots in the debug storage.

◆ Disable()

void fub::amrex::DebugStorage::Disable ( )
inline

◆ Enable()

void fub::amrex::DebugStorage::Enable ( )
inline

◆ FlushData()

void fub::amrex::DebugStorage::FlushData ( const std::string &  directory,
int  cycle = -1,
Duration  time_point = Duration(0.0) 
)

Writes data to disk and clears all data present in the storage.

◆ IsEnabled()

bool fub::amrex::DebugStorage::IsEnabled ( ) const
inlinenoexcept

Checks if debug storage is enabled.

Member Data Documentation

◆ cycle_

int fub::amrex::DebugStorage::cycle_
private

◆ is_enabled_

bool fub::amrex::DebugStorage::is_enabled_
private

If this is false no data will be saved.

◆ saved_snapshots_

std::list<DebugSnapshot> fub::amrex::DebugStorage::saved_snapshots_
private

List of snapshots.


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