3 #include "libmesh/system.h" 18 FEMContext & c = cast_ref<FEMContext &>(context);
25 FEBase * u_elem_fe =
nullptr;
29 FEBase * p_elem_fe =
nullptr;
33 FEBase * side_fe =
nullptr;
41 FEBase * p_side_fe =
nullptr;
52 FEMContext & c = cast_ref<FEMContext &>(context);
54 FEBase * side_fe =
nullptr;
58 const std::vector<Real> & JxW = side_fe->get_JxW();
61 const std::vector<std::vector<Real>> & phi = side_fe->get_phi();
62 const std::vector<Point > & q_point = side_fe->get_xyz();
85 for (
unsigned int qp=0; qp != n_qpoints; qp++)
87 Real x = q_point[qp](0);
97 for (
unsigned int i=0; i != n_u_dofs; i++)
99 Qu(i) += JxW[qp] * -phi[i][qp] * C;
100 QC(i) += JxW[qp] * phi[i][qp] * -u;
114 FEMContext & c = cast_ref<FEMContext &>(context);
118 FEBase * side_fe =
nullptr;
122 const std::vector<Real> & JxW = side_fe->get_JxW();
123 const std::vector<Point> & q_point = side_fe->get_xyz();
137 for (
unsigned int qp=0; qp != n_qpoints; qp++)
139 Real x = q_point[qp](0);
147 dQoI_0 += JxW[qp] * -u * C;
const std::vector< Number > & get_qois() const
Const accessor for QoI vector.
Number side_value(unsigned int var, unsigned int qp) const
virtual void side_qoi(DiffContext &context, const QoISet &qois)
Does any work that needs to be done on side of elem in a quantity of interest assembly loop...
This class provides all data required for a physics package (e.g.
void get_side_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Accessor for edge/face (2D/3D) finite element object for variable var for the largest dimension in th...
Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a pa...
unsigned int n_dof_indices() const
Total number of dof indices on the element.
void init_qois(unsigned int n_qois)
Accessors for qoi and qoi_error_estimates vectors.
The libMesh namespace provides an interface to certain functionality in the library.
bool has_side_boundary_id(boundary_id_type id) const
Reports if the boundary id is found on the current side.
unsigned int variable_number(std::string_view var) const
Defines a dense subvector for use in finite element computations.
const System & get_system() const
Accessor for associated system.
Manages consistently variables, degrees of freedom, and coefficient vectors.
virtual void init_qoi_count(System &sys)
Initialize system qoi.
virtual_for_inffe const std::vector< Real > & get_JxW() const
This class provides all data required for a physics package (e.g.
unsigned int n_points() const
virtual_for_inffe const std::vector< Point > & get_xyz() const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
virtual void side_qoi_derivative(DiffContext &context, const QoISet &qois)
Does any work that needs to be done on side of elem in a quantity of interest derivative assembly loo...
void get_element_fe(unsigned int var, FEGenericBase< OutputShape > *&fe) const
Accessor for interior finite element object for variable var for the largest dimension in the mesh...
const std::vector< DenseVector< Number > > & get_qoi_derivatives() const
Const accessor for QoI derivatives.
This class forms the foundation from which generic finite elements may be derived.
const QBase & get_side_qrule() const
Accessor for element side quadrature rule for the dimension of the current _elem. ...
virtual void init_context(DiffContext &)
Prepares the result of a build_context() call for use.
const std::vector< std::vector< OutputShape > > & get_phi() const