2#include "libmesh/libmesh_common.h"
3#include "libmesh/elem.h"
4#include "libmesh/fe_base.h"
5#include "libmesh/fem_context.h"
6#include "libmesh/point.h"
7#include "libmesh/quadrature.h"
20 FEMContext & c = cast_ref<FEMContext &>(context);
24 FEBase * side_fe =
nullptr;
28 const std::vector<Real> & JxW = side_fe->
get_JxW();
31 const std::vector<std::vector<RealGradient>> & dphi = side_fe->
get_dphi();
34 const std::vector<Point> & q_point = side_fe->
get_xyz();
37 const std::vector<Point> & face_normals = side_fe->
get_normals();
48 const Real TOL = 1.e-5;
50 for (
unsigned int qp=0; qp != n_qpoints; qp++)
52 const Real x = q_point[qp](0);
53 const Real y = q_point[qp](1);
57 if (std::abs(y - 1.0) <= TOL && x > 0.0)
58 for (
unsigned int i=0; i != n_T_dofs; i++)
59 Q1(i) += JxW[qp] * (dphi[i][qp] * face_normals[qp]) * x * (x - 1.);
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...
Defines a dense subvector for use in finite element computations.
This class provides all data required for a physics package (e.g.
unsigned int n_dof_indices() const
Total number of dof indices on the element.
const std::vector< DenseVector< Number > > & get_qoi_derivatives() const
Const accessor for QoI derivatives.
virtual_for_inffe const std::vector< Point > & get_normals() const
virtual_for_inffe const std::vector< Real > & get_JxW() const
virtual_for_inffe const std::vector< Point > & get_xyz() const
This class forms the foundation from which generic finite elements may be derived.
const std::vector< std::vector< OutputGradient > > & get_dphi() const
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...
const QBase & get_side_qrule() const
Accessor for element side quadrature rule for the dimension of the current _elem.
unsigned int n_points() const
Data structure for specifying which Quantities of Interest should be calculated in an adjoint or a pa...
The libMesh namespace provides an interface to certain functionality in the library.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real