#include <fem_physics.h>
Public Member Functions  
FEMPhysics ()  
virtual  ~FEMPhysics () 
virtual bool  eulerian_residual (bool request_jacobian, DiffContext &context) 
virtual bool  mass_residual (bool request_jacobian, DiffContext &) 
virtual AutoPtr < DifferentiablePhysics >  clone_physics ()=0 
virtual void  clear_physics () 
virtual void  init_physics (const System &sys) 
virtual bool  element_time_derivative (bool request_jacobian, DiffContext &) 
virtual bool  element_constraint (bool request_jacobian, DiffContext &) 
virtual bool  side_time_derivative (bool request_jacobian, DiffContext &) 
virtual bool  side_constraint (bool request_jacobian, DiffContext &) 
virtual void  time_evolving (unsigned int var) 
bool  is_time_evolving (unsigned int var) const 
virtual bool  side_mass_residual (bool request_jacobian, DiffContext &) 
virtual void  init_context (DiffContext &) 
virtual void  set_mesh_system (System *sys) 
const System *  get_mesh_system () const 
System *  get_mesh_system () 
virtual void  set_mesh_x_var (unsigned int var) 
unsigned int  get_mesh_x_var () const 
virtual void  set_mesh_y_var (unsigned int var) 
unsigned int  get_mesh_y_var () const 
virtual void  set_mesh_z_var (unsigned int var) 
unsigned int  get_mesh_z_var () const 
Public Attributes  
bool  compute_internal_sides 
Protected Attributes  
System *  _mesh_sys 
unsigned int  _mesh_x_var 
unsigned int  _mesh_y_var 
unsigned int  _mesh_z_var 
std::vector< bool >  _time_evolving 
Detailed Description
This class provides a specific system class. It aims to generalize any system, linear or nonlinear, which provides both a residual and a Jacobian.
This class is part of the new DifferentiableSystem framework, which is still experimental. Users of this framework should beware of bugs and future API changes.
Definition at line 48 of file fem_physics.h.
Constructor & Destructor Documentation

inline 

inlinevirtual 
Member Function Documentation

virtualinherited 
Clear any data structures associated with the physics.
Referenced by libMesh::DifferentiableSystem::clear().

pure virtualinherited 
Copy of this object. User should override to copy any needed state.
Implemented in libMesh::DifferentiableSystem.
Referenced by libMesh::DifferentiableSystem::attach_physics().

inlinevirtualinherited 
Adds the constraint contribution on elem
to elem_residual. If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.
Users may need to reimplement this for their particular PDE.
To implement the constraint 0 = G(u), the user should examine u = elem_solution and add (G(u), phi_i) to elem_residual in elem_constraint().
Definition at line 123 of file diff_physics.h.
Referenced by libMesh::EulerSolver::element_residual(), libMesh::Euler2Solver::element_residual(), libMesh::SteadySolver::element_residual(), and libMesh::EigenTimeSolver::element_residual().

inlinevirtualinherited 
Adds the time derivative contribution on elem
to elem_residual. If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.
Users need to reimplement this for their particular PDE.
To implement the physics model du/dt = F(u), the user should examine u = elem_solution and add (F(u), phi_i) to elem_residual in elem_time_derivative().
Definition at line 105 of file diff_physics.h.
Referenced by libMesh::EulerSolver::element_residual(), libMesh::Euler2Solver::element_residual(), libMesh::SteadySolver::element_residual(), and libMesh::EigenTimeSolver::element_residual().

virtual 
Adds a pseudoconvection contribution on elem
to elem_residual, if the nodes of elem
are being translated by a moving mesh.
This function assumes that the user's time derivative equations (except for any equations involving unknown mesh xyz coordinates themselves) are expressed in an Eulerian frame of reference, and that the user is satisfied with an unstabilized convection term. Lagrangian equations will probably require overriding eulerian_residual() with a blank function; ALE or stabilized formulations will require reimplementing eulerian_residual() entirely.
Reimplemented from libMesh::DifferentiablePhysics.

inlineinherited 
Returns a const reference to the system with variables corresponding to mesh nodal coordinates, or NULL if the mesh is fixed. Useful for ALE calculations.
Definition at line 414 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_sys.
Referenced by libMesh::FEMSystem::build_context().

inlineinherited 
Returns a reference to the system with variables corresponding to mesh nodal coordinates, or NULL if the mesh is fixed.
Definition at line 420 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_sys.

inlineinherited 
Returns the variable number corresponding to the mesh x coordinate. Useful for ALE calculations.
Definition at line 426 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_x_var.
Referenced by libMesh::FEMSystem::build_context().

inlineinherited 
Returns the variable number corresponding to the mesh y coordinate. Useful for ALE calculations.
Definition at line 432 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_y_var.
Referenced by libMesh::FEMSystem::build_context().

inlineinherited 
Returns the variable number corresponding to the mesh z coordinate. Useful for ALE calculations.
Definition at line 438 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_z_var.
Referenced by libMesh::FEMSystem::build_context().

inlinevirtualinherited 

virtualinherited 
Initialize any data structures associated with the physics.
Referenced by libMesh::DifferentiableSystem::attach_physics(), and libMesh::DifferentiableSystem::init_data().

inlineinherited 
Returns true iff variable var
is evolving with respect to time. In general, the user's init() function should have set time_evolving() for any variables which behave like du/dt = F(u), and should not call time_evolving() for any variables which behave like 0 = G(u).
Definition at line 201 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_time_evolving.
Referenced by libMesh::FEMSystem::init_context().

virtual 
Adds a mass vector contribution on elem
to elem_residual. If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.
Most problems can use the reimplementation in FEMPhysics::mass_residual; few users will need to reimplement this themselves.
Reimplemented from libMesh::DifferentiablePhysics.

inlinevirtualinherited 
Tells the DifferentiablePhysics that system sys
contains the isoparametric Lagrangian variables which correspond to the coordinates of mesh nodes, in problems where the mesh itself is expected to move in time.
The system with mesh coordinate data (which may be this
system itself, for fully coupled moving mesh problems) is currently assumed to have new (end of time step) mesh coordinates stored in solution, old (beginning of time step) mesh coordinates stored in _old_nonlinear_solution, and constant velocity motion during each time step.
Activating this function ensures that local (but not neighbor!) element geometry is correctly repositioned when evaluating element residuals.
Currently sys
must be *this
for a tightly coupled moving mesh problem or NULL to stop mesh movement; loosely coupled moving mesh problems are not implemented.
This code is experimental. "Trust but verify, and not in that order"
Definition at line 370 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_sys.

inlinevirtualinherited 
Tells the DifferentiablePhysics that variable var
from the mesh system should be used to update the x coordinate of mesh nodes, in problems where the mesh itself is expected to move in time.
The system with mesh coordinate data (which may be this system itself, for fully coupled moving mesh problems) is currently assumed to have new (end of time step) mesh coordinates stored in solution, old (beginning of time step) mesh coordinates stored in _old_nonlinear_solution, and constant velocity motion during each time step.
Activating this function ensures that local (but not neighbor!) element geometry is correctly repositioned when evaluating element residuals.
Definition at line 390 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_x_var.

inlinevirtualinherited 
Tells the DifferentiablePhysics that variable var
from the mesh system should be used to update the y coordinate of mesh nodes.
Definition at line 398 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_y_var.

inlinevirtualinherited 
Tells the DifferentiablePhysics that variable var
from the mesh system should be used to update the z coordinate of mesh nodes.
Definition at line 406 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_mesh_z_var.

inlinevirtualinherited 
Adds the time derivative contribution on side
of elem
to elem_residual. If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.
Users may need to reimplement this for their particular PDE depending on the boundary conditions.
To implement a weak form of the constraint 0 = G(u), the user should examine u = elem_solution and add (G(u), phi_i) boundary integral contributions to elem_residual in side_constraint().
Definition at line 172 of file diff_physics.h.
Referenced by libMesh::EulerSolver::side_residual(), libMesh::Euler2Solver::side_residual(), libMesh::SteadySolver::side_residual(), and libMesh::EigenTimeSolver::side_residual().

inlinevirtualinherited 
Adds a mass vector contribution on side
of elem
to elem_residual. If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.
For most problems, the default implementation of "do nothing" is correct; users with boundary conditions including time derivatives may need to reimplement this themselves.
Definition at line 246 of file diff_physics.h.
Referenced by libMesh::EulerSolver::side_residual(), libMesh::Euler2Solver::side_residual(), and libMesh::EigenTimeSolver::side_residual().

inlinevirtualinherited 
Adds the time derivative contribution on side
of elem
to elem_residual. If this method receives request_jacobian = true, then it should compute elem_jacobian and return true if possible. If elem_jacobian has not been computed then the method should return false.
Users may need to reimplement this for their particular PDE depending on the boundary conditions.
To implement a weak form of the source term du/dt = F(u) on sides, such as might arise in a flux boundary condition, the user should examine u = elem_solution and add (F(u), phi_i) boundary integral contributions to elem_residual in side_constraint().
Definition at line 152 of file diff_physics.h.
Referenced by libMesh::EulerSolver::side_residual(), libMesh::Euler2Solver::side_residual(), libMesh::SteadySolver::side_residual(), and libMesh::EigenTimeSolver::side_residual().

inlinevirtualinherited 
Tells the DiffSystem that variable var is evolving with respect to time. In general, the user's init() function should call time_evolving() for any variables which behave like du/dt = F(u), and should not call time_evolving() for any variables which behave like 0 = G(u).
Most derived systems will not have to reimplment this function; however any system which reimplements mass_residual() may have to reimplement time_evolving() to prepare data structures.
Definition at line 188 of file diff_physics.h.
References libMesh::DifferentiablePhysics::_time_evolving.
Member Data Documentation

protectedinherited 
System from which to acquire moving mesh information
Definition at line 349 of file diff_physics.h.
Referenced by libMesh::DifferentiablePhysics::get_mesh_system(), libMesh::FEMSystem::mesh_position_get(), libMesh::FEMSystem::mesh_position_set(), libMesh::FEMSystem::numerical_jacobian(), and libMesh::DifferentiablePhysics::set_mesh_system().

protectedinherited 
Variables from which to acquire moving mesh information
Definition at line 354 of file diff_physics.h.
Referenced by libMesh::DifferentiablePhysics::get_mesh_x_var(), libMesh::FEMSystem::mesh_position_get(), libMesh::FEMSystem::numerical_jacobian(), and libMesh::DifferentiablePhysics::set_mesh_x_var().

protectedinherited 
Definition at line 354 of file diff_physics.h.
Referenced by libMesh::DifferentiablePhysics::get_mesh_y_var(), libMesh::FEMSystem::mesh_position_get(), libMesh::FEMSystem::numerical_jacobian(), and libMesh::DifferentiablePhysics::set_mesh_y_var().

protectedinherited 
Definition at line 354 of file diff_physics.h.
Referenced by libMesh::DifferentiablePhysics::get_mesh_z_var(), libMesh::FEMSystem::mesh_position_get(), libMesh::FEMSystem::numerical_jacobian(), and libMesh::DifferentiablePhysics::set_mesh_z_var().

protectedinherited 
Stores bools to tell us which variables are evolving in time and which are just constraints
Definition at line 360 of file diff_physics.h.
Referenced by libMesh::DifferentiablePhysics::is_time_evolving(), and libMesh::DifferentiablePhysics::time_evolving().

inherited 
compute_internal_sides
is false by default, indicating that side_* computations will only be done on boundary sides. If compute_internal_sides is true, computations will be done on sides between elements as well.
Definition at line 134 of file diff_physics.h.
The documentation for this class was generated from the following file: