56 {
57 LOG_UNIT_TEST;
58
60
65
66 const unsigned int n_elem_per_side = 5;
67 const std::unique_ptr<Elem> test_elem =
Elem::build(elem_type);
68 const unsigned int ymax = test_elem->dim() > 1;
69 const unsigned int zmax = test_elem->dim() > 2;
70 const unsigned int ny = ymax * n_elem_per_side;
71 const unsigned int nz = zmax * n_elem_per_side;
72
74 n_elem_per_side,
75 ny,
76 nz,
77 0., 1.,
78 0., ymax,
79 0., zmax,
80 elem_type);
81
82 es.init();
84
85 std::set<dof_id_type> evaluable_elements;
86
87 for (
const auto & elem :
mesh.active_local_element_ptr_range())
88 {
90 evaluable_elements.insert(elem->id());
91
92 for (unsigned int s1=0; s1 != elem->n_neighbors(); ++s1)
93 {
95
96
97 if (!n1 ||
99 continue;
100
101 if (!evaluable_elements.count(n1->
id()))
102 {
104 evaluable_elements.insert(n1->
id());
105 }
106
107 for (unsigned int s2=0; s2 != elem->n_neighbors(); ++s2)
108 {
110 if (!n2 ||
112 continue;
113
114 if (!evaluable_elements.count(n2->
id()))
115 {
117 evaluable_elements.insert(n2->
id());
118 }
119
120 for (unsigned int s3=0; s3 != elem->n_neighbors(); ++s3)
121 {
123 if (!n3 ||
125 evaluable_elements.count(n3->
id()))
126 continue;
127
129 evaluable_elements.insert(n3->
id());
130
132
133 LIBMESH_ASSERT_NUMBERS_EQUAL(sys.
point_value(0,p,n3),
136 }
137 }
138 }
139 }
140
141 const std::size_t n_evaluable =
144
145 CPPUNIT_ASSERT_EQUAL(evaluable_elements.size(), n_evaluable);
146 }
void set_n_levels(unsigned int n_levels)
DefaultCoupling & default_algebraic_ghosting()
Default algebraic ghosting functor.
bool is_evaluable(const DofObjectSubclass &obj, unsigned int var_num=libMesh::invalid_uint) const
processor_id_type processor_id() const
This is the base class from which all geometric element types are derived.
static std::unique_ptr< Elem > build(const ElemType type, Elem *p=nullptr)
const Elem * neighbor_ptr(unsigned int i) const
Point vertex_average() const
This is the EquationSystems class.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
processor_id_type processor_id() const
A Point defines a location in LIBMESH_DIM dimensional Real space.
Manages consistently variables, degrees of freedom, and coefficient vectors.
void project_solution(FunctionBase< Number > *f, FunctionBase< Gradient > *g=nullptr, std::optional< ConstElemRange > active_local_range=std::nullopt, std::optional< std::vector< unsigned int > > variable_numbers=std::nullopt) const
Projects arbitrary functions onto the current solution.
Number point_value(unsigned int var, const Point &p, const bool insist_on_success=true, const NumericVector< Number > *sol=nullptr) 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.
const DofMap & get_dof_map() const
Number cubic_default_coupling_test(const Point &p, const Parameters &, const std::string &, const std::string &)
static constexpr Real TOLERANCE