6 #include <libmesh/cell_c0polyhedron.h> 7 #include <libmesh/dof_map.h> 8 #include <libmesh/elem.h> 9 #include <libmesh/equation_systems.h> 10 #include <libmesh/face_c0polygon.h> 11 #include <libmesh/fe.h> 12 #include <libmesh/fe_base.h> 13 #include <libmesh/fe_interface.h> 14 #include <libmesh/function_base.h> 15 #include <libmesh/mesh.h> 16 #include <libmesh/mesh_generation.h> 17 #include <libmesh/mesh_modification.h> 18 #include <libmesh/numeric_vector.h> 19 #include <libmesh/system.h> 20 #include <libmesh/quadrature_gauss.h> 27 CPPUNIT_TEST( testFEInterface ); \ 28 CPPUNIT_TEST( testU ); \ 29 CPPUNIT_TEST( testPartitionOfUnity ); \ 30 CPPUNIT_TEST( testGradU ); \ 31 CPPUNIT_TEST( testGradUComp ); \ 32 CPPUNIT_TEST( testHessU ); \ 33 CPPUNIT_TEST( testHessUComp ); \ 34 CPPUNIT_TEST( testDualDoesntScreamAndDie ); \ 35 CPPUNIT_TEST( testCustomReinit ); 42 std::unique_ptr<FunctionBase<Real>>
clone ()
const override 43 {
return std::make_unique<SkewFunc>(); }
46 const Real = 0.)
override 47 { libmesh_not_implemented(); }
50 void operator() (
const Point & p,
74 const Real & x = p(0);
75 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
76 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
78 return x + 0.25*y + 0.0625*z;
103 const Real & x = p(0);
104 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
105 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
107 return x*x + 0.5*y*y + 0.25*z*z + 0.125*x*y + 0.0625*x*z + 0.03125*y*z;
116 const Real & x = p(0);
117 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
118 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
120 Gradient grad = 2*x + 0.125*y + 0.0625*z;
122 grad(1) = y + 0.125*x + 0.03125*z;
124 grad(2) = 0.5*z + 0.0625*x + 0.03125*y;
136 const Real & x = p(0);
137 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
138 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
140 return x*(1-x)*(1-x) + x*x*(1-y) + x*(1-y)*(1-z) + y*(1-y)*z + z*(1-z)*(1-z);
149 const Real & x = p(0);
150 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
151 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
153 Gradient grad = 3*x*x-4*x+1 + 2*x*(1-y) + (1-y)*(1-z);
155 grad(1) = -x*x - x*(1-z) + (1-2*y)*z;
157 grad(2) = -x*(1-y) + y*(1-y) + 3*z*z-4*z+1;
169 const Real & x = p(0);
170 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
171 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
173 return x*x*(1-x)*(1-x) + x*x*z*(1-y) + x*(1-x)*(1-y)*(1-z) + (1-x)*y*(1-y)*z + z*z*(1-z)*(1-z);
182 const Real & x = p(0);
183 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
184 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
186 Gradient grad = 4*x*x*x-6*x*x+2*x + 2*x*z*(1-y) + (1-2*x)*(1-y)*(1-z) - y*(1-y)*z;
188 grad(1) = -x*x*z - x*(1-x)*(1-z) + (1-x)*(1-2*y)*z;
190 grad(2) = x*x*(1-y) - x*(1-x)*(1-y) + (1-x)*y*(1-y) + 4*z*z*z-6*z*z+2*z;
208 const Real & x = p(0);
209 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
210 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
216 return (x + 0.25*y + 0.0625*z)/denom;
225 const Real & x = p(0);
226 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
227 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
236 const Real denom = xpoly * ypoly * zpoly;
238 const Real numer = (x + 0.25*y + 0.0625*z);
240 Gradient grad_n = 1, grad_d = xderiv * ypoly * zpoly;
244 grad_d(1) = xpoly * yderiv * zpoly;
249 grad_d(2) = xpoly * ypoly * zderiv;
252 Gradient grad = (grad_n - numer * grad_d / denom) / denom;
258 #define FE_CAN_TEST_CUBIC \ 259 (((family != LAGRANGE && family != L2_LAGRANGE) || \ 260 (elem_type != TRI7 && elem_type != TET14 && \ 261 elem_type != PRISM20 && elem_type != PRISM21 && \ 262 elem_type != PYRAMID18)) && order > 2) 265 template <Order order, FEFamily family, ElemType elem_type,
unsigned int build_nx>
271 unsigned int _dim, _nx, _ny,
_nz;
276 std::unique_ptr<EquationSystems>
_es;
277 std::unique_ptr<FEBase>
_fe;
294 else if (FE_CAN_TEST_CUBIC)
298 const Real & x = p(0);
299 const Real & y = (LIBMESH_DIM > 1) ? p(1) : 0;
300 const Real & z = (LIBMESH_DIM > 2) ? p(2) : 0;
302 true_grad =
Gradient(2*x+0.125*y+0.0625*z,
304 0.5*z+0.0625*x+0.03125*y);
307 true_grad =
Gradient(1.0, 0.25, 0.0625);
309 for (
unsigned int d=0; d != LIBMESH_DIM; ++d)
311 CPPUNIT_ASSERT(true_grad(d) ==
323 const Real & x = p(0);
324 const Real & y = LIBMESH_DIM > 1 ? p(1) : 0;
325 const Real & z = LIBMESH_DIM > 2 ? p(2) : 0;
329 { 12*x*x-12*x+2+2*z*(1-y)-2*(1-y)*(1-z), -2*x*z-(1-2*x)*(1-z)-(1-2*y)*z, 2*x*(1-y)-(1-2*x)*(1-y)-y*(1-y),
330 -2*x*z-(1-2*x)*(1-z)-(1-2*y)*z, -2*(1-x)*z, -x*x+x*(1-x)+(1-x)*(1-2*y),
331 2*x*(1-y)-(1-2*x)*(1-y)-y*(1-y), -x*x+x*(1-x)+(1-x)*(1-2*y), 12*z*z-12*z+2 };
332 else if (FE_CAN_TEST_CUBIC)
334 { 6*x-4+2*(1-y), -2*x+z-1, y-1,
335 -2*x+z-1, -2*z, x+1-2*y,
336 y-1, x+1-2*y, 6*z-4 };
341 0.0625, 0.03125, 0.5 };
352 _mesh = std::make_unique<Mesh>(*TestCommWorld);
354 const unsigned int build_ny = (_dim > 1) * build_nx;
355 const unsigned int build_nz = (_dim > 2) * build_nx;
357 unsigned char weight_index = 0;
362 _mesh->add_node_integer(
"buffer integer");
366 const Real default_weight = 1.0;
367 weight_index = cast_int<unsigned char>
368 (_mesh->add_node_datum<
Real>(
"rational_weight",
true,
370 libmesh_assert_not_equal_to(weight_index, 0);
375 _mesh->set_default_mapping_data(weight_index);
384 _mesh->add_point(
Point(0, 0), 0);
385 _mesh->add_point(
Point(1, 0), 1);
390 std::unique_ptr<Elem> polygon = std::make_unique<C0Polygon>(5);
392 polygon->set_node(i, _mesh->node_ptr(i));
393 polygon->set_id() = 0;
395 _mesh->add_elem(std::move(polygon));
396 _mesh->prepare_for_use();
407 _mesh->add_point(
Point(0, 0, 0), 0);
408 _mesh->add_point(
Point(1, 0, 0), 1);
409 _mesh->add_point(
Point(1, 1, 0), 2);
410 _mesh->add_point(
Point(0, 1, 0), 3);
411 _mesh->add_point(
Point(0, 0, 1), 4);
412 _mesh->add_point(
Point(1, 0, 1), 5);
413 _mesh->add_point(
Point(1, 1, 1), 6);
414 _mesh->add_point(
Point(0, 1, 1), 7);
416 const std::vector<std::vector<unsigned int>> nodes_on_side =
425 std::vector<std::shared_ptr<Polygon>> sides(nodes_on_side.size());
429 const auto & nodes_on_s = nodes_on_side[s];
430 sides[s] = std::make_shared<C0Polygon>(nodes_on_s.size());
432 sides[s]->set_node(i, _mesh->node_ptr(nodes_on_s[i]));
435 std::unique_ptr<Elem> polyhedron = std::make_unique<C0Polyhedron>(sides);
436 _mesh->add_elem(std::move(polyhedron));
437 _mesh->prepare_for_use();
442 build_nx, build_ny, build_nz,
443 0., 1., 0., 1., 0., 1.,
451 for (
dof_id_type i = 0; i != _mesh->max_elem_id(); ++i)
453 Elem * elem = _mesh->query_elem_ptr(i);
454 if (elem && elem->
id())
455 _mesh->delete_elem(elem);
457 _mesh->prepare_for_use();
458 CPPUNIT_ASSERT_EQUAL(_mesh->n_elem(),
dof_id_type(1));
475 8*(_dim>2), 16*(_dim>2));
484 for (
auto elem : _mesh->active_element_ptr_range())
486 const unsigned int nv = elem->n_vertices();
487 const unsigned int nn = elem->n_nodes();
490 const unsigned int n_edges =
491 (elem->type() ==
EDGE3) ? 1 : elem->n_edges();
492 const unsigned int n_faces =
493 (elem->type() ==
QUAD9) ? 1 : elem->n_faces();
494 const unsigned int nve = std::min(nv + n_edges, nn);
495 const unsigned int nvef = std::min(nve + n_faces, nn);
497 for (
unsigned int i = 0; i != nv; ++i)
498 elem->node_ref(i).set_extra_datum<
Real>(weight_index, 1.);
499 for (
unsigned int i = nv; i != nve; ++i)
500 elem->node_ref(i).set_extra_datum<
Real>(weight_index,
rational_w);
502 for (
unsigned int i = nve; i != nvef; ++i)
503 elem->node_ref(i).set_extra_datum<
Real>(weight_index, w2);
505 for (
unsigned int i = nvef; i != nn; ++i)
506 elem->node_ref(i).set_extra_datum<
Real>(weight_index, w3);
510 _es = std::make_unique<EquationSystems>(*_mesh);
511 _sys = &(_es->add_system<
System> (
"SimpleSystem"));
525 else if (FE_CAN_TEST_CUBIC)
543 _fe->attach_quadrature_rule(_qrule.get());
545 auto rng = _mesh->active_local_element_ptr_range();
546 this->_elem = rng.begin() == rng.end() ? nullptr : *(rng.begin());
551 _ny = (_dim > 1) ? _nx : 1;
552 _nz = (_dim > 2) ? _nx : 1;
576 #if LIBMESH_ENABLE_SECOND_DERIVATIVES 585 _fe->get_d2phidxdy();
589 _fe->get_d2phidxdz();
590 _fe->get_d2phidydz();
602 template <Order order, FEFamily family, ElemType elem_type>
607 template <
typename Functor>
619 #ifdef LIBMESH_ENABLE_EXCEPTIONS 620 for (
unsigned int i=0; i != this->_nx; ++i)
621 for (
unsigned int j=0; j != this->_ny; ++j)
622 for (
unsigned int k=0; k != this->_nz; ++k)
626 p(1) =
Real(j)/this->_ny;
628 p(2) =
Real(k)/this->_nz;
629 if (!this->_elem->contains_point(p))
633 if (this->_elem->local_singular_node(p) !=
invalid_uint)
636 std::vector<Point> master_points
640 this->_fe->reinit(this->_elem, &master_points);
644 #endif // LIBMESH_ENABLE_EXCEPTIONS 652 this->_fe->reinit(this->_elem);
654 bool satisfies_partition_of_unity =
true;
655 for (
const auto qp :
make_range(this->_qrule->n_points()))
658 for (std::size_t d = 0; d != this->_dof_indices.size(); ++d)
659 phi_sum += this->_fe->get_phi()[d][qp];
662 satisfies_partition_of_unity =
false;
667 switch (this->_fe->get_family())
671 switch (this->_fe->get_order())
674 CPPUNIT_ASSERT(satisfies_partition_of_unity);
678 CPPUNIT_ASSERT(!satisfies_partition_of_unity);
687 switch (this->_fe->get_order())
690 CPPUNIT_ASSERT(satisfies_partition_of_unity);
694 CPPUNIT_ASSERT(!satisfies_partition_of_unity);
704 CPPUNIT_ASSERT(!satisfies_partition_of_unity);
713 CPPUNIT_ASSERT(satisfies_partition_of_unity);
718 CPPUNIT_FAIL(
"Uncovered FEFamily");
731 this->_fe->reinit(this->_elem);
733 const FEType fe_type = this->_sys->variable_type(0);
735 unsigned int my_n_dofs = 0;
737 switch (this->_elem->dim())
755 CPPUNIT_ASSERT_EQUAL(
759 CPPUNIT_ASSERT_EQUAL(
761 this->_fe->get_continuity());
763 CPPUNIT_ASSERT_EQUAL(
765 this->_fe->is_hierarchic());
772 auto f = [
this](
Point p)
777 for (std::size_t d = 0; d != this->_dof_indices.size(); ++d)
778 u += this->_fe->get_phi()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
786 else if (FE_CAN_TEST_CUBIC)
789 true_u = p(0)*p(0) + 0.5*p(1)*p(1) + 0.25*p(2)*p(2) +
790 0.125*p(0)*p(1) + 0.0625*p(0)*p(2) + 0.03125*p(1)*p(2);
792 true_u = p(0) + 0.25*p(1) + 0.0625*p(2);
794 LIBMESH_ASSERT_NUMBERS_EQUAL (true_u, u, this->_value_tol);
809 this->_fe->get_dual_phi();
812 this->_fe->reinit(this->_elem);
820 auto f = [
this](
Point p)
825 for (std::size_t d = 0; d != this->_dof_indices.size(); ++d)
826 grad_u += this->_fe->get_dphi()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
830 LIBMESH_ASSERT_NUMBERS_EQUAL
831 (grad_u(0), true_grad(0), this->_grad_tol);
833 LIBMESH_ASSERT_NUMBERS_EQUAL
834 (grad_u(1), true_grad(1), this->_grad_tol);
836 LIBMESH_ASSERT_NUMBERS_EQUAL
837 (grad_u(2), true_grad(2), this->_grad_tol);
847 auto f = [
this](
Point p)
851 Number grad_u_x = 0, grad_u_y = 0, grad_u_z = 0;
852 for (std::size_t d = 0; d != this->_dof_indices.size(); ++d)
854 grad_u_x += this->_fe->get_dphidx()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
856 grad_u_y += this->_fe->get_dphidy()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
859 grad_u_z += this->_fe->get_dphidz()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
865 LIBMESH_ASSERT_NUMBERS_EQUAL(grad_u_x,
866 true_grad(0), this->_grad_tol);
868 LIBMESH_ASSERT_NUMBERS_EQUAL
869 (grad_u_y, true_grad(1), this->_grad_tol);
871 LIBMESH_ASSERT_NUMBERS_EQUAL
872 (grad_u_z, true_grad(2), this->_grad_tol);
887 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 888 auto f = [
this](
Point p)
891 for (std::size_t d = 0; d != this->_dof_indices.size(); ++d)
892 hess_u += this->_fe->get_d2phi()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
900 LIBMESH_ASSERT_NUMBERS_EQUAL
901 (true_hess(0,0), hess_u(0,0), this->_hess_tol);
904 LIBMESH_ASSERT_NUMBERS_EQUAL
905 (hess_u(0,1), hess_u(1,0), this->_hess_tol);
906 LIBMESH_ASSERT_NUMBERS_EQUAL
907 (true_hess(0,1), hess_u(0,1), this->_hess_tol);
908 LIBMESH_ASSERT_NUMBERS_EQUAL
909 (true_hess(1,1), hess_u(1,1), this->_hess_tol);
913 LIBMESH_ASSERT_NUMBERS_EQUAL
914 (hess_u(0,2), hess_u(2,0), this->_hess_tol);
915 LIBMESH_ASSERT_NUMBERS_EQUAL
916 (hess_u(1,2), hess_u(2,1), this->_hess_tol);
917 LIBMESH_ASSERT_NUMBERS_EQUAL
918 (true_hess(0,2), hess_u(0,2), this->_hess_tol);
919 LIBMESH_ASSERT_NUMBERS_EQUAL
920 (true_hess(1,2), hess_u(1,2), this->_hess_tol);
921 LIBMESH_ASSERT_NUMBERS_EQUAL
922 (true_hess(2,2), hess_u(2,2), this->_hess_tol);
927 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 932 #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES 939 auto f = [
this](
Point p)
941 Number hess_u_xx = 0, hess_u_xy = 0, hess_u_yy = 0,
942 hess_u_xz = 0, hess_u_yz = 0, hess_u_zz = 0;
943 for (std::size_t d = 0; d != this->_dof_indices.size(); ++d)
945 hess_u_xx += this->_fe->get_d2phidx2()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
947 hess_u_xy += this->_fe->get_d2phidxdy()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
948 hess_u_yy += this->_fe->get_d2phidy2()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
951 hess_u_xz += this->_fe->get_d2phidxdz()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
952 hess_u_yz += this->_fe->get_d2phidydz()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
953 hess_u_zz += this->_fe->get_d2phidz2()[d][0] * (*this->_sys->current_local_solution)(this->_dof_indices[d]);
963 LIBMESH_ASSERT_NUMBERS_EQUAL
964 (true_hess(0,0), hess_u_xx, this->_hess_tol);
967 LIBMESH_ASSERT_NUMBERS_EQUAL
968 (true_hess(0,1), hess_u_xy, this->_hess_tol);
969 LIBMESH_ASSERT_NUMBERS_EQUAL
970 (true_hess(1,1), hess_u_yy, this->_hess_tol);
974 LIBMESH_ASSERT_NUMBERS_EQUAL
975 (true_hess(0,2), hess_u_xz, this->_hess_tol);
976 LIBMESH_ASSERT_NUMBERS_EQUAL
977 (true_hess(1,2), hess_u_yz, this->_hess_tol);
978 LIBMESH_ASSERT_NUMBERS_EQUAL
979 (true_hess(2,2), hess_u_zz, this->_hess_tol);
984 #endif // LIBMESH_ENABLE_SECOND_DERIVATIVES 991 std::vector<Point> q_points;
992 std::vector<Real> weights;
993 q_points.resize(3); weights.resize(3);
994 q_points[0](0) = 0.0; q_points[0](1) = 0.0; weights[0] =
Real(1)/6;
995 q_points[1](0) = 1.0; q_points[1](1) = 0.0; weights[1] = weights[0];
996 q_points[2](0) = 0.0; q_points[2](1) = 1.0; weights[2] = weights[0];
998 FEType fe_type = this->_sys->variable_type(0);
999 std::unique_ptr<FEBase> fe (
FEBase::build(this->_dim, fe_type));
1000 const int extraorder = 3;
1002 fe->attach_quadrature_rule (qrule.get());
1004 const std::vector<Point> & q_pos = fe->get_xyz();
1006 for (
const auto & elem : this->_mesh->active_local_element_ptr_range()) {
1007 fe->reinit (elem, &q_points, &weights);
1008 CPPUNIT_ASSERT_EQUAL(q_points.size(), std::size_t(3));
1009 CPPUNIT_ASSERT_EQUAL(q_pos.size(), std::size_t(3));
1016 #define INSTANTIATE_FETEST(order, family, elemtype) \ 1017 class FETest_##order##_##family##_##elemtype : public FETest<order, family, elemtype> { \ 1019 FETest_##order##_##family##_##elemtype() : \ 1020 FETest<order,family,elemtype>() { \ 1021 if (unitlog->summarized_logs_enabled()) \ 1022 this->libmesh_suite_name = "FETest"; \ 1024 this->libmesh_suite_name = "FETest_" #order "_" #family "_" #elemtype; \ 1026 CPPUNIT_TEST_SUITE( FETest_##order##_##family##_##elemtype ); \ 1028 CPPUNIT_TEST_SUITE_END(); \ 1031 CPPUNIT_TEST_SUITE_REGISTRATION( FETest_##order##_##family##_##elemtype );
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
std::unique_ptr< FunctionBase< Real > > clone() const override
static unsigned int n_dofs(const ElemType t, const Order o)
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
void testDualDoesntScreamAndDie()
This class provides the ability to map between arbitrary, user-defined strings and several data types...
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
static constexpr Real TOLERANCE
std::unique_ptr< QGauss > _qrule
static Point inverse_map(const unsigned int dim, const Elem *elem, const Point &p, const Real tolerance=TOLERANCE, const bool secure=true, const bool extra_checks=true)
Gradient quadratic_test_grad(const Point &p, const Parameters &, const std::string &, const std::string &)
void resize(const unsigned int n)
Resize the vector.
static const unsigned int type_to_dim_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the geometric dimension of the ele...
This is the base class from which all geometric element types are derived.
Gradient rational_test_grad(const Point &p, const Parameters &, const std::string &, const std::string &)
Order default_quadrature_order() const
This class defines a vector in LIBMESH_DIM dimensional Real or Complex space.
Gradient fe_cubic_test_grad(const Point &p, const Parameters &, const std::string &, const std::string &)
The libMesh namespace provides an interface to certain functionality in the library.
Gradient fe_quartic_test_grad(const Point &p, const Parameters &, const std::string &, const std::string &)
Number fe_cubic_test(const Point &p, const Parameters &, const std::string &, const std::string &)
static const Real rational_w
std::unique_ptr< EquationSystems > _es
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr) const
Projects arbitrary functions onto the current solution.
std::unique_ptr< QBase > default_quadrature_rule(const unsigned int dim, const int extraorder=0) const
Number linear_test(const Point &p, const Parameters &, const std::string &, const std::string &)
Number rational_test(const Point &p, const Parameters &, const std::string &, const std::string &)
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
static RealTensor true_hessian(Point p)
Manages consistently variables, degrees of freedom, and coefficient vectors.
NumberVectorValue Gradient
static bool is_hierarchic(const FEType &fe_type)
Returns whether or not the input FEType's higher-order shape functions are always hierarchic...
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
unsigned int add_variable(std::string_view var, const FEType &type, const std::set< subdomain_id_type > *const active_subdomains=nullptr)
Adds the variable var to the list of variables for this system.
Number quadratic_test(const Point &p, const Parameters &, const std::string &, const std::string &)
std::string libmesh_suite_name
std::unique_ptr< Mesh > _mesh
static FEContinuity get_continuity(const FEType &fe_type)
Returns the input FEType's FEContinuity based on the underlying FEFamily and potentially the Order...
const FEType & variable_type(const unsigned int i) const
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::vector< dof_id_type > _dof_indices
static RealGradient true_gradient(Point p)
IntRange< T > make_range(T beg, T end)
The 2-parameter make_range() helper function returns an IntRange<T> when both input parameters are of...
std::unique_ptr< FEBase > _fe
Defines a dense vector for use in Finite Element-type computations.
Number fe_quartic_test(const Point &p, const Parameters &, const std::string &, const std::string &)
Gradient linear_test_grad(const Point &, const Parameters &, const std::string &, const std::string &)
Base class for functors that can be evaluated at a point and (optionally) time.
const DofMap & get_dof_map() const
A Point defines a location in LIBMESH_DIM dimensional Real space.
void testPartitionOfUnity()
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...
This class defines a tensor in LIBMESH_DIM dimensional Real or Complex space.