Go to the documentation of this file.
19 #include "libmesh/diff_context.h"
20 #include "libmesh/diff_system.h"
21 #include "libmesh/diff_system.h"
22 #include "libmesh/unsteady_solver.h"
23 #include "libmesh/auto_ptr.h"
32 system_time(sys.time),
33 elem_solution_derivative(1.),
34 elem_solution_rate_derivative(1.),
35 elem_solution_accel_derivative(1.),
36 fixed_solution_derivative(0.),
37 _dof_indices_var(sys.
n_vars()),
43 unsigned int nv = sys.
n_vars();
55 std::size_t n_qoi = sys.
qoi.size();
59 for (std::size_t q=0; q != n_qoi; ++q)
62 for (
unsigned int i=0; i != nv; ++i)
66 for (std::size_t q=0; q != n_qoi; ++q)
91 for (
unsigned int j=0; j != nv; ++j)
124 unsigned int nv = sys.
n_vars();
129 for (
unsigned int i=0; i != nv; ++i)
144 return localized_vectors_it->second.first;
158 return *localized_vectors_it->second.second[var];
Manages consistently variables, degrees of freedom, and coefficient vectors.
std::vector< std::vector< std::unique_ptr< DenseSubVector< Number > > > > _elem_qoi_subderivatives
unsigned int n_vars() const
DenseSubVector< Number > & get_localized_subvector(const NumericVector< Number > &localized_vector, unsigned int var)
Return a reference to DenseSubVector localization of localized_vector at variable var contained in th...
DiffContext(const System &)
Constructor.
Real * _deltat
Defaults to nullptr, can optionally be used to point to a timestep value in the System-derived class ...
DenseVector< Number > _elem_solution_accel
Element by element components of du/dt as adjusted by a time_solver.
Defines a dense submatrix for use in Finite Element-type computations.
The libMesh namespace provides an interface to certain functionality in the library.
DenseVector< Number > _elem_residual
Element residual vector.
DenseVector< Number > & get_localized_vector(const NumericVector< Number > &localized_vector)
Return a reference to DenseVector localization of localized_vector contained in the _localized_vector...
This class provides a specific system class.
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolutions
bool use_fixed_solution
A boolean to be set to true by systems using elem_fixed_solution, for optional use by e....
std::map< const NumericVector< Number > *, std::pair< DenseVector< Number >, std::vector< std::unique_ptr< DenseSubVector< Number > > > > > _localized_vectors
Contains pointers to vectors the user has asked to be localized, keyed with pairs of element localize...
DenseVector< Number > _elem_solution
Element by element components of nonlinear_solution as adjusted by a time_solver.
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolution_rates
const std::set< unsigned int > & get_second_order_vars() const
std::vector< Number > qoi
Values of the quantities of interest.
This is a generic class that defines a solver to handle time integration of DifferentiableSystems.
void set_deltat_pointer(Real *dt)
Points the _deltat member of this class at a timestep value stored in the creating System,...
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_fixed_subsolutions
TimeSolver & get_time_solver()
DenseVector< Number > _elem_fixed_solution
Element by element components of nonlinear_solution at a fixed point in a timestep,...
std::vector< DenseVector< Number > > _elem_qoi_derivative
Element quantity of interest derivative contributions.
std::vector< Number > _elem_qoi
Element quantity of interest contributions.
DenseVector< Number > _elem_solution_rate
Element by element components of du/dt as adjusted by a time_solver.
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subresiduals
Element residual subvectors and Jacobian submatrices.
virtual unsigned int time_order() const =0
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< std::vector< std::unique_ptr< DenseSubMatrix< Number > > > > _elem_subjacobians
virtual ~DiffContext()
Destructor.
DenseMatrix< Number > _elem_jacobian
Element jacobian: derivatives of elem_residual with respect to elem_solution.
void add_localized_vector(NumericVector< Number > &localized_vector, const System &sys)
Adds a vector to the map of localized vectors.
std::vector< std::unique_ptr< DenseSubVector< Number > > > _elem_subsolution_accels
virtual bool is_steady() const =0
Is this effectively a steady-state solver?