Go to the documentation of this file.
20 #ifndef LIBMESH_TIME_SOLVER_H
21 #define LIBMESH_TIME_SOLVER_H
24 #include "libmesh/libmesh_common.h"
25 #include "libmesh/linear_solver.h"
26 #include "libmesh/numeric_vector.h"
27 #include "libmesh/reference_counted_object.h"
28 #include "libmesh/solution_history.h"
39 class DifferentiablePhysics;
40 class DifferentiableSystem;
41 class ParameterVector;
103 virtual void solve ();
288 #endif // LIBMESH_TIME_SOLVER_H
DifferentiableSystem sys_type
The type of system.
virtual void reinit()
The reinitialization function.
bool(DifferentiablePhysics::* ResFuncType)(bool, DiffContext &)
Definitions of argument types for use in refactoring subclasses.
unsigned int reduce_deltat_on_diffsolver_failure
This value (which defaults to zero) is the number of times the TimeSolver is allowed to halve deltat ...
virtual ~TimeSolver()
Destructor.
virtual void init()
The initialization function.
This class provides a specific system class.
bool quiet
Print extra debugging information if quiet == false.
std::unique_ptr< DiffSolver > _diff_solver
An implicit linear or nonlinear solver to use at each timestep.
This class implements reference counting.
The libMesh namespace provides an interface to certain functionality in the library.
void(DiffContext::* ReinitFuncType)(Real)
virtual void advance_timestep()
This method advances the solution to the next timestep, after a solve() has been performed.
This class provides a specific system class.
virtual bool element_residual(bool request_jacobian, DiffContext &)=0
This method uses the DifferentiablePhysics element_time_derivative(), element_constraint(),...
virtual void adjoint_advance_timestep()
This method advances the adjoint solution to the previous timestep, after an adjoint_solve() has been...
void set_solution_history(const SolutionHistory &_solution_history)
A setter function users will employ if they need to do something other than save no solution history.
bool _is_adjoint
This boolean tells the TimeSolver whether we are solving a primal or adjoint problem.
TimeSolver(sys_type &s)
Constructor.
virtual std::unique_ptr< LinearSolver< Number > > & linear_solver()
An implicit linear solver to use for adjoint and sensitivity problems.
virtual bool nonlocal_residual(bool request_jacobian, DiffContext &)=0
This method uses the DifferentiablePhysics nonlocal_time_derivative(), nonlocal_constraint(),...
virtual std::unique_ptr< DiffSolver > & diff_solver()
An implicit linear or nonlinear solver to use at each timestep.
void set_is_adjoint(bool _is_adjoint_value)
Accessor for setting whether we need to do a primal or adjoint solve.
sys_type & _system
A reference to the system we are solving.
virtual void before_timestep()
This method is for subclasses or users to override to do arbitrary processing between timesteps.
This class provides all data required for a physics package (e.g.
virtual void init_data()
The data initialization function.
bool is_adjoint() const
Accessor for querying whether we need to do a primal or adjoint solve.
virtual Real du(const SystemNorm &norm) const =0
Computes the size of ||u^{n+1} - u^{n}|| in some norm.
virtual void retrieve_timestep()
This method retrieves all the stored solutions at the current system.time.
MetaPhysicL::DualNumber< T, D > norm(const MetaPhysicL::DualNumber< T, D > &in)
This is a generic class that defines a solver to handle time integration of DifferentiableSystems.
This class defines a norm/seminorm to be applied to a NumericVector which contains coefficients in a ...
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const sys_type & system() const
virtual bool side_residual(bool request_jacobian, DiffContext &)=0
This method uses the DifferentiablePhysics side_time_derivative(), side_constraint(),...
std::unique_ptr< SolutionHistory > solution_history
A std::unique_ptr to a SolutionHistory object.
A SolutionHistory class that enables the storage and retrieval of timesteps and (in the future) adapt...
virtual bool is_steady() const =0
Is this effectively a steady-state solver?
std::unique_ptr< LinearSolver< Number > > _linear_solver
An implicit linear solver to use for adjoint problems.
virtual void solve()
This method solves for the solution at the next timestep (or solves for a steady-state solution).