34 FEMContext & context = cast_ref<FEMContext &>(c);
38 for (
unsigned int var = 0; var != context.
n_vars(); ++var)
49 FEBase * elem_fe =
nullptr;
52 const std::vector<Real> & JxW = elem_fe->get_JxW();
54 const std::vector<std::vector<Real>> & phi = elem_fe->get_phi();
56 const unsigned int n_dofs = cast_int<unsigned int>
63 for (
unsigned int qp = 0; qp != n_qpoints; ++qp)
69 for (
unsigned int i = 0; i < n_dofs; i++)
71 Fu(i) += JxW[qp]*(udot-v)*phi[i][qp];
78 Kuu(i,i) += rate_factor*phi[i][qp];
79 Kuv(i,i) -= soln_factor*phi[i][qp];
81 for (
unsigned int j = i+1; j < n_dofs; j++)
83 Kuu(i,j) += rate_factor*phi[j][qp];
84 Kuu(j,i) += rate_factor*phi[j][qp];
86 Kuv(i,j) -= soln_factor*phi[j][qp];
87 Kuv(j,i) -= soln_factor*phi[j][qp];
94 return compute_jacobian;
bool is_second_order_var(unsigned int var) const
Real get_elem_solution_derivative() const
const DenseMatrix< Number > & get_elem_jacobian() const
bool compute_second_order_eqns(bool compute_jacobian, DiffContext &c)
Number interior_value(unsigned int var, unsigned int qp) const
const Variable & variable(unsigned int var) const
void prepare_accel(DiffContext &context)
const DenseVector< Number > & get_elem_solution_rate() const
unsigned int get_second_order_dot_var(unsigned int var) const
const System & get_system() const
const std::vector< dof_id_type > & get_dof_indices() const
unsigned int n_points() const
const DenseVector< Number > & get_elem_residual() const
void interior_rate(unsigned int var, unsigned int qp, OutputType &u) const
const DenseVector< Number > & get_elem_solution_accel() const
Real get_elem_solution_rate_derivative() const
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
unsigned int n_vars() const
Real elem_solution_accel_derivative
const QBase & get_element_qrule() const
const FEType & type() const