19#include "libmesh/file_solution_history.h"
20#include "libmesh/file_history_data.h"
21#include "libmesh/diff_system.h"
22#include "libmesh/numeric_vector.h"
42 libmesh_experimental();
48std::unique_ptr<SolutionHistory>
51 return std::make_unique<FileSolutionHistory>(
_system);
100 else if((
stored_datum->second)->get_previously_stored() ==
false)
130 _system.
deltat = (stored_datum_past->second)->get_deltat_at();
146 _system.
deltat = (stored_datum_past->second)->get_deltat_at();
157 std::abs(recovery_time - time) >
TOLERANCE)
176 std::string old_adjoint_solution_name =
"_old_adjoint_solution";
177 old_adjoint_solution_name+= std::to_string(j);
189 std::string old_adjoint_solution_name =
"_old_adjoint_solution";
190 old_adjoint_solution_name+= std::to_string(j);
This class provides a specific system class.
Real deltat
For time-dependent problems, this is the amount delta t to advance the solution in time.
HistoryData subclass that provides a struct to store history data such as timestamps,...
std::string & get_adjoint_filename()
virtual void retrieve(bool is_adjoint_solve, Real time) override
Virtual function retrieve which we will be overriding to retrieve timesteps.
virtual void store(bool is_adjoint_solve, Real time) override
Virtual function store which we will be overriding to store timesteps.
virtual std::unique_ptr< SolutionHistory > clone() const override
Definition of the clone function needed for the setter function.
std::vector< std::unique_ptr< NumericVector< Number > > > dual_solution_copies
A vector of pointers to adjoint and old adjoint solutions at the last time step.
DifferentiableSystem & _system
std::vector< std::unique_ptr< NumericVector< Number > > > old_dual_solution_copies
FileSolutionHistory(DifferentiableSystem &system)
Constructor, reference to system to be passed by user, set the stored_sols iterator to some initial v...
~FileSolutionHistory()
Destructor, defaulted out-of-line.
virtual std::unique_ptr< NumericVector< T > > clone() const =0
A SolutionHistory class that enables the storage and retrieval of timesteps and (in the future) adapt...
void find_stored_entry(Real time, bool storing=false)
map_type::iterator stored_data_iterator
stored_data_iterator stored_datum
unsigned int n_qois() const
Number of currently active quantities of interest.
virtual void update()
Update the local values to reflect the solution on neighboring processors.
NumericVector< Number > & get_adjoint_solution(unsigned int i=0)
const NumericVector< Number > & get_vector(std::string_view vec_name) const
The libMesh namespace provides an interface to certain functionality in the library.
static constexpr Real TOLERANCE
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...