19 #include "libmesh/diff_context.h" 20 #include "libmesh/diff_physics.h" 21 #include "libmesh/system.h" 44 libmesh_error_msg_if(order != 1 && order != 2,
"Input order must be 1 or 2!");
60 FEMContext & context = cast_ref<FEMContext &>(c);
70 const std::vector<dof_id_type> & dof_indices =
73 const unsigned int n_dofs = cast_int<unsigned int>
82 for (
unsigned int i=0; i != n_dofs; ++i)
91 return request_jacobian;
FEFamily family
The type of finite element.
const DenseMatrix< Number > & get_elem_jacobian() const
Const accessor for element Jacobian.
virtual void clear_physics()
Clear any data structures associated with the physics.
const Variable & variable(unsigned int var) const
Return a constant reference to Variable var.
This class provides all data required for a physics package (e.g.
virtual ~DifferentiablePhysics()
Destructor.
virtual bool element_time_derivative(bool request_jacobian, DiffContext &)
Adds the time derivative contribution on elem to elem_residual.
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...
std::set< unsigned int > _second_order_vars
Variable indices for those variables that are second order in time.
The libMesh namespace provides an interface to certain functionality in the library.
virtual void time_evolving(unsigned int var, unsigned int order)
Tells the DiffSystem that variable var is evolving with respect to time.
bool _eulerian_time_deriv(bool request_jacobian, DiffContext &)
This method simply combines element_time_derivative() and eulerian_residual(), which makes its addres...
Defines a dense subvector for use in finite element computations.
virtual void init_physics(const System &sys)
Initialize 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, for use by systems with non default mass_residual terms.
const DenseVector< Number > & get_elem_solution() const
Accessor for element solution.
const System & get_system() const
Accessor for associated system.
Manages consistently variables, degrees of freedom, and coefficient vectors.
Defines a dense submatrix for use in Finite Element-type computations.
This class provides all data required for a physics package (e.g.
const std::vector< dof_id_type > & get_dof_indices() const
Accessor for element dof indices.
const DenseVector< Number > & get_elem_residual() const
Const accessor for element residual.
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...
bool is_time_evolving(unsigned int var) const
unsigned int n_vars() const
unsigned int n_vars() const
Number of variables in solution.
std::set< unsigned int > _first_order_vars
Variable indices for those variables that are first order in time.
std::vector< unsigned int > _time_evolving
Stores unsigned int to tell us which variables are evolving as first order in time (1)...
virtual bool nonlocal_mass_residual(bool request_jacobian, DiffContext &c)
Subtracts any nonlocal mass vector contributions (e.g.
const FEType & type() const