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();
48 std::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);
199 if(dynamic_cast<FileHistoryData &>(*(
stored_datum->second)).get_adjoint_filename().empty())
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.
~FileSolutionHistory()
Destructor, defaulted out-of-line.
static constexpr Real TOLERANCE
unsigned int n_qois() const
Number of currently active quantities of interest.
virtual std::unique_ptr< NumericVector< T > > clone() const =0
The libMesh namespace provides an interface to certain functionality in the library.
A SolutionHistory class that enables the storage and retrieval of timesteps and (in the future) adapt...
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...
virtual void retrieve(bool is_adjoint_solve, Real time) override
Virtual function retrieve which we will be overriding to retrieve timesteps.
DifferentiableSystem & _system
virtual void update()
Update the local values to reflect the solution on neighboring processors.
map_type::iterator stored_data_iterator
FileSolutionHistory(DifferentiableSystem &system)
Constructor, reference to system to be passed by user, set the stored_sols iterator to some initial v...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual std::unique_ptr< SolutionHistory > clone() const override
Definition of the clone function needed for the setter function.
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...
NumericVector< Number > & get_adjoint_solution(unsigned int i=0)
stored_data_iterator stored_datum
virtual void store(bool is_adjoint_solve, Real time) override
Virtual function store which we will be overriding to store timesteps.
std::vector< std::unique_ptr< NumericVector< Number > > > old_dual_solution_copies
const NumericVector< Number > & get_vector(std::string_view vec_name) const
void find_stored_entry(Real time, bool storing=false)