352 _mesh = std::make_unique<Mesh>(*TestCommWorld);
353 _dim = Elem::type_to_dim_map[elem_type];
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);
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();
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.,
454 if (elem && elem->
id())
455 _mesh->delete_elem(elem);
457 _mesh->prepare_for_use();
484 for (
auto elem :
_mesh->active_element_ptr_range())
487 const unsigned int nn = elem->
n_nodes();
490 const unsigned int n_edges =
492 const unsigned int 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)
499 for (
unsigned int i = nv; i != nve; ++i)
502 for (
unsigned int i = nve; i != nvef; ++i)
505 for (
unsigned int i = nvef; i != nn; ++i)
510 _es = std::make_unique<EquationSystems>(*_mesh);
525 else if (FE_CAN_TEST_CUBIC)
539 _fe = FEBase::build(
_dim, fe_type);
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;
576 #if LIBMESH_ENABLE_SECOND_DERIVATIVES 585 _fe->get_d2phidxdy();
589 _fe->get_d2phidxdz();
590 _fe->get_d2phidydz();
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
void dof_indices(const Elem *const elem, std::vector< dof_id_type > &di) const
static constexpr Real TOLERANCE
std::unique_ptr< QGauss > _qrule
Gradient quadratic_test_grad(const Point &p, const Parameters &, const std::string &, const std::string &)
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
Gradient fe_cubic_test_grad(const Point &p, const Parameters &, const std::string &, const std::string &)
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.
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 &)
const Node & node_ref(const unsigned int i) const
virtual unsigned int n_nodes() const =0
Manages consistently variables, degrees of freedom, and coefficient vectors.
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.
void set_extra_datum(const unsigned int index, const T value)
Sets the value on this object of the extra datum associated with index, which should have been obtain...
Number quadratic_test(const Point &p, const Parameters &, const std::string &, const std::string &)
virtual unsigned int n_edges() const =0
std::unique_ptr< Mesh > _mesh
virtual unsigned int n_vertices() const =0
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
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
virtual unsigned int n_faces() const =0
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 &)
const DofMap & get_dof_map() const
virtual ElemType type() const =0
A Point defines a location in LIBMESH_DIM dimensional Real space.
auto index_range(const T &sizable)
Helper function that returns an IntRange<std::size_t> representing all the indices of the passed-in v...