20 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 66 for (
unsigned int v=0; v<
n_vars; v++)
72 FEBase * side_fe =
nullptr;
74 const std::set<unsigned char> & elem_dims =
77 for (
const auto & dim : elem_dims)
98 unsigned short dim = fine_elem.
dim();
100 FEBase * fe_fine =
nullptr;
103 FEBase * fe_coarse =
nullptr;
109 std::vector<std::vector<RealTensor>> d2phi_coarse = fe_coarse->
get_d2phi();
110 std::vector<std::vector<RealTensor>> d2phi_fine = fe_fine->
get_d2phi();
111 std::vector<Real> JxW_face = fe_fine->
get_JxW();
113 for (
unsigned int qp=0; qp != n_qp; ++qp)
117 Number laplacian_fine = 0., laplacian_coarse = 0.;
119 const unsigned int n_coarse_dofs = Ucoarse.
size();
120 for (
unsigned int i=0; i != n_coarse_dofs; ++i)
122 laplacian_coarse += d2phi_coarse[i][qp](0,0) * Ucoarse(i);
124 laplacian_coarse += d2phi_coarse[i][qp](1,1) * Ucoarse(i);
126 laplacian_coarse += d2phi_coarse[i][qp](2,2) * Ucoarse(i);
129 const unsigned int n_fine_dofs = Ufine.
size();
130 for (
unsigned int i=0; i != n_fine_dofs; ++i)
132 laplacian_fine += d2phi_fine[i][qp](0,0) * Ufine(i);
134 laplacian_fine += d2phi_fine[i][qp](1,1) * Ufine(i);
136 laplacian_fine += d2phi_fine[i][qp](2,2) * Ufine(i);
142 const Number jump = laplacian_fine - laplacian_coarse;
146 error += JxW_face[qp] * jump2;
158 #else // defined (LIBMESH_ENABLE_SECOND_DERIVATIVES) 168 libmesh_error_msg(
"Error: LaplacianErrorEstimator requires second " \
169 <<
"derivative support; try configuring libmesh with " \
170 <<
"--enable-second");
177 libmesh_error_msg(
"Error: LaplacianErrorEstimator requires second " \
178 <<
"derivative support; try configuring libmesh with " \
179 <<
"--enable-second");
184 #endif // defined (LIBMESH_ENABLE_SECOND_DERIVATIVES) virtual unsigned int size() const override
virtual void internal_side_integration() override
std::unique_ptr< FEMContext > fine_context
The base class for all geometric element types.
virtual unsigned int n_quadrature_points() const =0
const unsigned int n_vars
virtual Real hmax() const
const std::vector< Real > & get_JxW() const
const std::vector< std::vector< OutputTensor > > & get_d2phi() const
std::unique_ptr< FEMContext > coarse_context
virtual void init_context(FEMContext &c) override
Real weight(unsigned int var) const
virtual ErrorEstimatorType type() const override
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
LaplacianErrorEstimator()
virtual unsigned short dim() const =0
unsigned int n_vars() const
const std::set< unsigned char > & elem_dimensions() const