37 {
38 _mesh = std::make_unique<Mesh>(*TestCommWorld);
39 const std::unique_ptr<Elem> test_elem =
Elem::build(elem_type);
40 _dim = test_elem->dim();
41 const unsigned int ny =
_dim > 1;
42 const unsigned int nz =
_dim > 2;
43
44
45 _mesh->add_node_integer(
"buffer integer1");
46 _mesh->add_node_integer(
"buffer integer2");
47
48
49
50 const Real default_weight = 1.0;
51 unsigned char weight_index = cast_int<unsigned char>
52 (
_mesh->add_node_datum<
Real>(
"rational_weight",
true,
53 &default_weight));
54
55 libmesh_assert_not_equal_to(weight_index, 0);
56
58 _mesh->set_default_mapping_data(weight_index);
59
61 1, ny, nz,
62 0., 1., 0., ny, 0., nz,
63 elem_type);
64
65 for (
auto elem :
_mesh->element_ptr_range())
66 {
68 CPPUNIT_ASSERT_EQUAL(elem->mapping_data(), weight_index);
69 }
70
71
72
73
74 for (
auto node :
_mesh->node_ptr_range())
75 {
76
78
79 Real & x = (*node)(0);
80 Real & y = (*node)(1);
82 if (y > .6)
83 {
84 y = .5 + x;
85 x = -.5;
86 }
87 else if (y > .4)
88 {
89 y = .5 + x;
90 x = y - .5;
92 }
93 }
94
95 _es = std::make_unique<EquationSystems>(*
_mesh);
99
105#if LIBMESH_DIM > 1
107#endif
108#if LIBMESH_DIM > 2
110#endif
111
112 auto rng =
_mesh->active_local_element_ptr_range();
113 _elem = rng.begin() == rng.end() ? nullptr : *(rng.begin());
114
118 }
std::unique_ptr< Mesh > _mesh
std::unique_ptr< EquationSystems > _es
std::unique_ptr< FEBase > _fe
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...
static std::unique_ptr< Elem > build(const ElemType type, Elem *p=nullptr)
static std::unique_ptr< FEGenericBase > build(const unsigned int dim, const FEType &type)
Builds a specific finite element type.
A Node is like a Point, but with more information.
Manages consistently variables, degrees of freedom, and coefficient vectors.
const FEType & variable_type(const unsigned int i) const
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.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real