libMesh
Public Types | Public Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
libMesh::MemorySolutionHistory Class Reference

Subclass of Solution History that stores the solutions and other important vectors in memory. More...

#include <memory_solution_history.h>

Inheritance diagram for libMesh::MemorySolutionHistory:
[legend]

Public Types

typedef std::map< std::string, std::unique_ptr< NumericVector< Number > > > map_type
 Typedef for Stored Solutions iterator, a list of pairs of the current system time, map of strings and saved vectors. More...
 
typedef std::list< std::pair< Real, map_type > > list_type
 
typedef list_type::iterator stored_solutions_iterator
 

Public Member Functions

 MemorySolutionHistory (System &system_)
 Constructor, reference to system to be passed by user, set the stored_sols iterator to some initial value. More...
 
 ~MemorySolutionHistory ()
 Destructor. More...
 
virtual void store () override
 Virtual function store which we will be overriding to store timesteps. More...
 
virtual void retrieve () override
 Virtual function retrieve which we will be overriding to retrieve timesteps. More...
 
virtual std::unique_ptr< SolutionHistoryclone () const override
 Definition of the clone function needed for the setter function. More...
 
void set_overwrite_previously_stored (bool val)
 Turn on overwrite_previously_stored to overwrite any already-saved data encountered during subsequent store() calls. More...
 

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
 

Detailed Description

Subclass of Solution History that stores the solutions and other important vectors in memory.

Author
Vikram Garg
Date
2012 Stores past solutions in memory.

Definition at line 42 of file memory_solution_history.h.

Member Typedef Documentation

◆ list_type

typedef std::list<std::pair<Real, map_type> > libMesh::MemorySolutionHistory::list_type

Definition at line 73 of file memory_solution_history.h.

◆ map_type

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.

◆ stored_solutions_iterator

Definition at line 74 of file memory_solution_history.h.

Constructor & Destructor Documentation

◆ MemorySolutionHistory()

libMesh::MemorySolutionHistory::MemorySolutionHistory ( System system_)

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.

50  : stored_sols(stored_solutions.end()), _system(system_)
51  { libmesh_experimental(); }
stored_solutions_iterator stored_sols

◆ ~MemorySolutionHistory()

libMesh::MemorySolutionHistory::~MemorySolutionHistory ( )

Destructor.

Member Function Documentation

◆ clone()

virtual std::unique_ptr<SolutionHistory > libMesh::MemorySolutionHistory::clone ( ) const
overridevirtual

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.

80  {
81  return libmesh_make_unique<MemorySolutionHistory>(_system);
82  }

◆ find_stored_entry()

void libMesh::MemorySolutionHistory::find_stored_entry ( )
private

◆ retrieve()

virtual void libMesh::MemorySolutionHistory::retrieve ( )
overridevirtual

Virtual function retrieve which we will be overriding to retrieve timesteps.

Implements libMesh::SolutionHistory.

◆ set_overwrite_previously_stored()

void libMesh::SolutionHistory::set_overwrite_previously_stored ( bool  val)
inherited

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.

◆ store()

virtual void libMesh::MemorySolutionHistory::store ( )
overridevirtual

Virtual function store which we will be overriding to store timesteps.

Implements libMesh::SolutionHistory.

Member Data Documentation

◆ _system

System& libMesh::MemorySolutionHistory::_system
private

Definition at line 97 of file memory_solution_history.h.

Referenced by clone().

◆ overwrite_previously_stored

bool libMesh::SolutionHistory::overwrite_previously_stored
protectedinherited

◆ stored_sols

stored_solutions_iterator libMesh::MemorySolutionHistory::stored_sols
private

Definition at line 91 of file memory_solution_history.h.

◆ stored_solutions

list_type libMesh::MemorySolutionHistory::stored_solutions
private

Definition at line 88 of file memory_solution_history.h.


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