Go to the documentation of this file.
19 #include "libmesh/diff_context.h"
20 #include "libmesh/diff_physics.h"
21 #include "libmesh/system.h"
49 if (order != 1 && order != 2)
50 libmesh_error_msg(
"Input order must be 1 or 2!");
66 FEMContext & context = cast_ref<FEMContext &>(c);
76 const std::vector<dof_id_type> & dof_indices =
79 const unsigned int n_dofs = cast_int<unsigned int>
88 for (
unsigned int i=0; i != n_dofs; ++i)
97 return request_jacobian;
std::set< unsigned int > _first_order_vars
Variable indices for those variables that are first order in time.
Manages consistently variables, degrees of freedom, and coefficient vectors.
virtual bool nonlocal_mass_residual(bool request_jacobian, DiffContext &c)
Subtracts any nonlocal mass vector contributions (e.g.
const DenseVector< Number > & get_elem_residual() const
Const accessor for element residual.
unsigned int n_vars() const
virtual void time_evolving(unsigned int var)
Tells the DiffSystem that variable var is evolving with respect to time.
FEFamily family
The type of finite element.
const std::vector< dof_id_type > & get_dof_indices() const
Accessor for element dof indices.
Defines a dense submatrix for use in Finite Element-type computations.
bool is_time_evolving(unsigned int var) const
The libMesh namespace provides an interface to certain functionality in the library.
unsigned int n_vars() const
Number of variables in solution.
const System & get_system() const
Accessor for associated system.
const FEType & type() const
const Variable & variable(unsigned int var) const
Return a constant reference to Variable var.
bool _eulerian_time_deriv(bool request_jacobian, DiffContext &)
This method simply combines element_time_derivative() and eulerian_residual(), which makes its addres...
std::set< unsigned int > _second_order_vars
Variable indices for those variables that are second order in time.
The IntRange templated class is intended to make it easy to loop over integers which are indices of a...
virtual bool element_time_derivative(bool request_jacobian, DiffContext &)
Adds the time derivative contribution on elem to elem_residual.
virtual ~DifferentiablePhysics()
Destructor.
This class provides all data required for a physics package (e.g.
virtual void clear_physics()
Clear any data structures associated with the physics.
Real elem_solution_rate_derivative
The derivative of elem_solution_rate with respect to the current nonlinear solution,...
const DenseMatrix< Number > & get_elem_jacobian() const
Const accessor for element Jacobian.
virtual bool eulerian_residual(bool request_jacobian, DiffContext &)
Adds a pseudo-convection contribution on elem to elem_residual, if the nodes of elem are being transl...
const DenseVector< Number > & get_elem_solution() const
Accessor for element solution.
std::vector< unsigned int > _time_evolving
Stores unsigned int to tell us which variables are evolving as first order in time (1),...
virtual void init_physics(const System &sys)
Initialize any data structures associated with the physics.
This class provides all data required for a physics package (e.g.