20 #ifndef LIBMESH_DIFF_PHYSICS_H 21 #define LIBMESH_DIFF_PHYSICS_H 24 #include "libmesh/libmesh.h" 100 virtual std::unique_ptr<DifferentiablePhysics>
clone_physics() = 0;
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();
647 #endif // LIBMESH_DIFF_PHYSICS_H bool is_second_order_var(unsigned int var) const
virtual bool side_constraint(bool request_jacobian, DiffContext &)
Adds the constraint contribution on side of elem to elem_residual.
unsigned int get_mesh_x_var() const
bool is_first_order_var(unsigned int var) const
virtual void clear_physics()
Clear any data structures associated with the physics.
unsigned int _mesh_x_var
Variables from which to acquire moving mesh information.
This class provides all data required for a physics package (e.g.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
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...
virtual bool side_damping_residual(bool request_jacobian, DiffContext &)
Subtracts a damping vector contribution on side of elem from elem_residual.
std::set< unsigned int > _second_order_vars
Variable indices for those variables that are second order in time.
const System * get_mesh_system() const
virtual bool nonlocal_time_derivative(bool request_jacobian, DiffContext &)
Adds any nonlocal time derivative contributions (e.g.
virtual bool damping_residual(bool request_jacobian, DiffContext &)
Subtracts a damping vector contribution on elem from elem_residual.
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.
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_constraint(bool request_jacobian, DiffContext &)
Adds any nonlocal constraint contributions (e.g.
bool _eulerian_time_deriv(bool request_jacobian, DiffContext &)
This method simply combines element_time_derivative() and eulerian_residual(), which makes its addres...
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 mass_residual(bool request_jacobian, DiffContext &)
Subtracts a mass vector contribution on elem from elem_residual.
virtual void init_physics(const System &sys)
Initialize any data structures associated with the physics.
bool have_second_order_vars() const
unsigned int get_mesh_y_var() const
const std::set< unsigned int > & get_second_order_vars() const
const std::set< unsigned int > & get_first_order_vars() const
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...
Manages consistently variables, degrees of freedom, and coefficient vectors.
System * _mesh_sys
System from which to acquire moving mesh information.
DifferentiablePhysics()
Constructor.
bool have_first_order_vars() const
This class provides a specific system class.
virtual void init_context(DiffContext &)
bool compute_internal_sides
compute_internal_sides is false by default, indicating that side_* computations will only be done on ...
virtual bool nonlocal_damping_residual(bool request_jacobian, DiffContext &)
Subtracts any nonlocal damping vector contributions (e.g.
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
virtual std::unique_ptr< DifferentiablePhysics > clone_physics()=0
Copy of this object.
bool is_time_evolving(unsigned int var) const
virtual bool side_mass_residual(bool request_jacobian, DiffContext &)
Subtracts a mass vector contribution on side of elem from elem_residual.
std::set< unsigned int > _first_order_vars
Variable indices for those variables that are first order in time.
virtual bool side_time_derivative(bool request_jacobian, DiffContext &)
Adds the time derivative contribution on side of elem to elem_residual.
virtual void set_mesh_system(System *sys)
Tells the DifferentiablePhysics that system sys contains the isoparametric Lagrangian variables which...
virtual bool element_constraint(bool request_jacobian, DiffContext &)
Adds the constraint contribution on elem to elem_residual.
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.