Stores past solutions in memory. More...
#include <memory_solution_history.h>
Public Types | |
typedef std::map< std::string, std::unique_ptr< NumericVector< Number > > > | map_type |
typedef std::list< std::pair< Real, map_type > > | list_type |
typedef list_type::iterator | stored_solutions_iterator |
Public Member Functions | |
MemorySolutionHistory (System &system_) | |
~MemorySolutionHistory () | |
virtual void | store () override |
virtual void | retrieve () override |
virtual std::unique_ptr< SolutionHistory > | clone () const override |
void | set_overwrite_previously_stored (bool val) |
Protected Attributes | |
bool | overwrite_previously_stored |
Private Member Functions | |
void | find_stored_entry () |
Private Attributes | |
list_type | stored_solutions |
stored_solutions_iterator | stored_sols |
System & | _system |
Stores past solutions in memory.
Subclass of Solution History that stores the solutions and other important vectors in memory.
Definition at line 42 of file memory_solution_history.h.
typedef std::list<std::pair<Real, map_type> > libMesh::MemorySolutionHistory::list_type |
Definition at line 73 of file memory_solution_history.h.
typedef std::map<std::string, std::unique_ptr<NumericVector<Number> > > libMesh::MemorySolutionHistory::map_type |
Typedef for Stored Solutions iterator, a list of pairs of the current system time, map of strings and saved vectors
Definition at line 72 of file memory_solution_history.h.
typedef list_type::iterator libMesh::MemorySolutionHistory::stored_solutions_iterator |
Definition at line 74 of file memory_solution_history.h.
|
inline |
Constructor, reference to system to be passed by user, set the stored_sols iterator to some initial value
Definition at line 50 of file memory_solution_history.h.
libMesh::MemorySolutionHistory::~MemorySolutionHistory | ( | ) |
|
inlineoverridevirtual |
Definition of the clone function needed for the setter function
Implements libMesh::SolutionHistory.
Definition at line 79 of file memory_solution_history.h.
References _system.
|
private |
Definition at line 32 of file memory_solution_history.C.
References _system, std::abs(), stored_sols, stored_solutions, libMesh::System::time, and libMesh::TOLERANCE.
Referenced by retrieve(), and store().
|
overridevirtual |
Virtual function retrieve which we will be overriding to retrieve timesteps
Implements libMesh::SolutionHistory.
Definition at line 129 of file memory_solution_history.C.
References _system, std::abs(), find_stored_entry(), libMesh::System::get_vector(), libMesh::Real, libMesh::System::solution, stored_sols, stored_solutions, libMesh::System::time, and libMesh::TOLERANCE.
|
inlineinherited |
Turn on overwrite_previously_stored to overwrite any already-saved data encountered during subsequent store() calls
Definition at line 70 of file solution_history.h.
References libMesh::SolutionHistory::overwrite_previously_stored.
|
overridevirtual |
Virtual function store which we will be overriding to store timesteps
Implements libMesh::SolutionHistory.
Definition at line 67 of file memory_solution_history.C.
References _system, std::abs(), find_stored_entry(), libMesh::SolutionHistory::overwrite_previously_stored, libMesh::System::project_solution_on_reinit(), libMesh::System::solution, stored_sols, stored_solutions, libMesh::System::time, libMesh::TOLERANCE, libMesh::System::vector_preservation(), libMesh::System::vectors_begin(), and libMesh::System::vectors_end().
|
private |
Definition at line 97 of file memory_solution_history.h.
Referenced by clone(), find_stored_entry(), retrieve(), and store().
|
protectedinherited |
Definition at line 77 of file solution_history.h.
Referenced by libMesh::SolutionHistory::set_overwrite_previously_stored(), and store().
|
private |
Definition at line 91 of file memory_solution_history.h.
Referenced by find_stored_entry(), retrieve(), and store().
|
private |
Definition at line 88 of file memory_solution_history.h.
Referenced by find_stored_entry(), retrieve(), and store().