Go to the documentation of this file.
   19 #include "libmesh/diff_system.h" 
   20 #include "libmesh/euler_solver.h" 
  103                                      ResFuncType time_deriv,
 
  104                                      ResFuncType constraint,
 
  105                                      ReinitFuncType reinit_func,
 
  106                                      bool compute_second_order_eqns)
 
  113   if (request_jacobian)
 
  118   for (
unsigned int i=0; i != n_dofs; ++i)
 
  119     old_elem_solution(i) =
 
  136   theta_solution *= 
theta;
 
  137   theta_solution.
add(1. - 
theta, old_elem_solution);
 
  150   (context.*reinit_func)(
theta);
 
  153   bool jacobian_computed =
 
  171   (context.*reinit_func)(1);
 
  178   jacobian_computed = (
_system.
get_physics()->*constraint)(jacobian_computed, context) &&
 
  182   if (request_jacobian)
 
  184       if (jacobian_computed)
 
  190   return jacobian_computed;
 
  
virtual bool nonlocal_mass_residual(bool request_jacobian, DiffContext &c)
Subtracts any nonlocal mass vector contributions (e.g.
 
virtual bool side_constraint(bool request_jacobian, DiffContext &)
Adds the constraint contribution on side of elem to elem_residual.
 
Real deltat
For time-dependent problems, this is the amount delta t to advance the solution in time.
 
Generic class from which first order UnsteadySolvers should subclass.
 
const std::vector< dof_id_type > & get_dof_indices() const
Accessor for element dof indices.
 
virtual void elem_reinit(Real)
Gives derived classes the opportunity to reinitialize data (FE objects in FEMSystem,...
 
The libMesh namespace provides an interface to certain functionality in the library.
 
void prepare_accel(DiffContext &context)
If there are second order variables in the system, then we also prepare the accel for those variables...
 
virtual bool nonlocal_constraint(bool request_jacobian, DiffContext &)
Adds any nonlocal constraint contributions (e.g.
 
Real theta
The value for the theta method to employ: 1.0 corresponds to backwards Euler, 0.0 corresponds to forw...
 
virtual bool side_damping_residual(bool request_jacobian, DiffContext &)
Subtracts a damping vector contribution on side of elem from elem_residual.
 
This class provides a specific system class.
 
virtual void nonlocal_reinit(Real)
Gives derived classes the opportunity to reinitialize data needed for nonlocal calculations at a new ...
 
bool _eulerian_time_deriv(bool request_jacobian, DiffContext &)
This method simply combines element_time_derivative() and eulerian_residual(), which makes its addres...
 
bool use_fixed_solution
A boolean to be set to true by systems using elem_fixed_solution, for optional use by e....
 
Number old_nonlinear_solution(const dof_id_type global_dof_number) const
 
virtual bool nonlocal_time_derivative(bool request_jacobian, DiffContext &)
Adds any nonlocal time derivative contributions (e.g.
 
virtual bool _general_residual(bool request_jacobian, DiffContext &, ResFuncType mass, ResFuncType damping, ResFuncType time_deriv, ResFuncType constraint, ReinitFuncType reinit, bool compute_second_order_eqns)
This method is the underlying implementation of the public residual methods.
 
boostcopy::enable_if_c< ScalarTraits< T2 >::value, void >::type add(const T2 factor, const DenseVector< T3 > &vec)
Adds factor times vec to this vector.
 
virtual bool element_constraint(bool request_jacobian, DiffContext &)
Adds the constraint contribution on elem to elem_residual.
 
void swap(DenseMatrix< T > &other_matrix)
STL-like swap method.
 
virtual bool nonlocal_residual(bool request_jacobian, DiffContext &) override
This method uses the DifferentiablePhysics' nonlocal_time_derivative() and nonlocal_constraint() to b...
 
virtual Real error_order() const override
Error convergence order: 2 for Crank-Nicolson, 1 otherwise.
 
virtual bool side_mass_residual(bool request_jacobian, DiffContext &)
Subtracts a mass vector contribution on side of elem from elem_residual.
 
sys_type & _system
A reference to the system we are solving.
 
bool compute_second_order_eqns(bool compute_jacobian, DiffContext &c)
If there are second order variables, then we need to compute their residual equations and correspondi...
 
Real fixed_solution_derivative
The derivative of elem_fixed_solution with respect to the nonlinear solution, for use by systems cons...
 
virtual unsigned int size() const override
 
EulerSolver(sys_type &s)
Constructor.
 
This class provides all data required for a physics package (e.g.
 
Real elem_solution_derivative
The derivative of elem_solution with respect to the current nonlinear solution.
 
void swap(DenseVector< T > &other_vector)
STL-like swap method.
 
virtual bool element_residual(bool request_jacobian, DiffContext &) override
This method uses the DifferentiablePhysics' element_time_derivative() and element_constraint() to bui...
 
Real elem_solution_rate_derivative
The derivative of elem_solution_rate with respect to the current nonlinear solution,...
 
virtual ~EulerSolver()
Destructor.
 
const DenseMatrix< Number > & get_elem_jacobian() const
Const accessor for element Jacobian.
 
const DenseVector< Number > & get_elem_solution() const
Accessor for element solution.
 
virtual bool side_residual(bool request_jacobian, DiffContext &) override
This method uses the DifferentiablePhysics' side_time_derivative() and side_constraint() to build a f...
 
const DifferentiablePhysics * get_physics() const
 
const DenseVector< Number > & get_elem_fixed_solution() const
Accessor for element fixed solution.
 
const DenseVector< Number > & get_elem_solution_rate() const
Accessor for element solution rate of change w.r.t.
 
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
 
bool have_second_order_vars() const
 
virtual bool mass_residual(bool request_jacobian, DiffContext &)
Subtracts a mass vector contribution on elem from elem_residual.
 
virtual bool side_time_derivative(bool request_jacobian, DiffContext &)
Adds the time derivative contribution on side of elem to elem_residual.
 
virtual bool damping_residual(bool request_jacobian, DiffContext &)
Subtracts a damping vector contribution on elem from elem_residual.
 
virtual void elem_side_reinit(Real)
Gives derived classes the opportunity to reinitialize data needed for a side integration at a new poi...
 
virtual bool nonlocal_damping_residual(bool request_jacobian, DiffContext &)
Subtracts any nonlocal damping vector contributions (e.g.
 
bool have_second_order_scalar_vars() const
Check for any second order vars that are also belong to FEFamily::SCALAR.