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" 10 #include "heatsystem.h" 19 FEMContext & c = cast_ref<FEMContext &>(context);
21 FEBase * elem_fe =
nullptr;
25 const std::vector<Real> & JxW = elem_fe->get_JxW();
41 for (
unsigned int qp = 0; qp != n_qpoints; qp++)
46 if(std::abs(sys.
time - (dynamic_cast<const HeatSystem &>(sys).QoI_time_instant)[0]) <
TOLERANCE)
48 dQoI_0 += JxW[qp] * ( u * 1.0 );
54 dQoI_1 += (JxW[qp] * ( u * q ));
Real time
For time-dependent problems, this is the time t at the beginning of the current timestep.
const std::vector< Number > & get_qois() const
Const accessor for QoI vector.
Number interior_value(unsigned int var, unsigned int qp) const
This class provides all data required for a physics package (e.g.
static constexpr Real TOLERANCE
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.
const System & get_system() const
Accessor for associated system.
Manages consistently variables, degrees of freedom, and coefficient vectors.
This class provides all data required for a physics package (e.g.
unsigned int n_points() const
virtual void element_qoi(DiffContext &context, const QoISet &qois)
Does any work that needs to be done on elem in a quantity of interest assembly loop, outputting to elem_qoi.
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...
This class forms the foundation from which generic finite elements may be derived.
const QBase & get_element_qrule() const
Accessor for element interior quadrature rule for the dimension of the current _elem.