20#ifndef LIBMESH_DIFF_PHYSICS_H
21#define LIBMESH_DIFF_PHYSICS_H
24#include "libmesh/libmesh.h"
128 return request_jacobian;
147 return request_jacobian;
177 return request_jacobian;
198 return request_jacobian;
217 return request_jacobian;
236 return request_jacobian;
251 virtual void time_evolving (
unsigned int var,
unsigned int order);
280 return request_jacobian;
305 return request_jacobian;
323 return request_jacobian;
363 return request_jacobian;
381 return request_jacobian;
397 return request_jacobian;
581 libmesh_experimental();
This class provides all data required for a physics package (e.g.
This class provides a specific system class.
virtual void set_mesh_y_var(unsigned int var)
Tells the DifferentiablePhysics that variable var from the mesh system should be used to update the y...
unsigned int get_mesh_y_var() const
virtual bool element_constraint(bool request_jacobian, DiffContext &)
Adds the constraint contribution on elem to elem_residual.
virtual bool element_time_derivative(bool request_jacobian, DiffContext &)
Adds the time derivative contribution on elem to elem_residual.
unsigned int get_mesh_x_var() const
const System * get_mesh_system() const
virtual void set_mesh_x_var(unsigned int var)
Tells the DifferentiablePhysics that variable var from the mesh system should be used to update the x...
virtual bool side_mass_residual(bool request_jacobian, DiffContext &)
Subtracts a mass vector contribution on side of elem from elem_residual.
virtual void set_mesh_system(System *sys)
Tells the DifferentiablePhysics that system sys contains the isoparametric Lagrangian variables which...
unsigned int _mesh_x_var
Variables from which to acquire moving mesh information.
virtual void init_context(DiffContext &)
virtual bool side_time_derivative(bool request_jacobian, DiffContext &)
Adds the time derivative contribution on side of elem to elem_residual.
virtual void clear_physics()
Clear any data structures associated with the physics.
bool is_time_evolving(unsigned int var) const
bool compute_internal_sides
compute_internal_sides is false by default, indicating that side_* computations will only be done on ...
const std::set< unsigned int > & get_second_order_vars() const
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...
bool is_second_order_var(unsigned int var) const
virtual void init_physics(const System &sys)
Initialize any data structures associated with the physics.
virtual std::unique_ptr< DifferentiablePhysics > clone_physics()=0
Copy of this object.
std::set< unsigned int > _first_order_vars
Variable indices for those variables that are first order in time.
virtual bool side_constraint(bool request_jacobian, DiffContext &)
Adds the constraint contribution on side of elem to elem_residual.
virtual bool nonlocal_constraint(bool request_jacobian, DiffContext &)
Adds any nonlocal constraint contributions (e.g.
const std::set< unsigned int > & get_first_order_vars() const
bool is_first_order_var(unsigned int var) const
virtual void set_mesh_z_var(unsigned int var)
Tells the DifferentiablePhysics that variable var from the mesh system should be used to update the z...
unsigned int get_mesh_z_var() const
std::set< unsigned int > _second_order_vars
Variable indices for those variables that are second 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_time_derivative(bool request_jacobian, DiffContext &)
Adds any nonlocal time derivative contributions (e.g.
std::map< unsigned int, unsigned int > _second_order_dot_vars
If the user adds any second order variables, then we need to also cache the map to their correspondin...
virtual bool nonlocal_damping_residual(bool request_jacobian, DiffContext &)
Subtracts any nonlocal damping vector contributions (e.g.
bool have_second_order_vars() const
virtual bool damping_residual(bool request_jacobian, DiffContext &)
Subtracts a damping vector contribution on elem from elem_residual.
bool _eulerian_time_deriv(bool request_jacobian, DiffContext &)
This method simply combines element_time_derivative() and eulerian_residual(), which makes its addres...
virtual void time_evolving(unsigned int var, unsigned int order)
Tells the DiffSystem that variable var is evolving with respect to time.
virtual bool side_damping_residual(bool request_jacobian, DiffContext &)
Subtracts a damping vector contribution on side of elem from elem_residual.
DifferentiablePhysics()
Constructor.
System * _mesh_sys
System from which to acquire moving mesh information.
bool have_first_order_vars() const
virtual bool mass_residual(bool request_jacobian, DiffContext &)
Subtracts a mass vector contribution on elem from elem_residual.
virtual ~DifferentiablePhysics()
Destructor.
virtual bool nonlocal_mass_residual(bool request_jacobian, DiffContext &c)
Subtracts any nonlocal mass vector contributions (e.g.
Manages consistently variables, degrees of freedom, and coefficient vectors.
The libMesh namespace provides an interface to certain functionality in the library.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...