12#include <libmesh/elem.h>
13#include <libmesh/enum_fe_family.h>
14#include <libmesh/enum_order.h>
15#include <libmesh/fe_interface.h>
16#include <libmesh/fe_type.h>
17#include <libmesh/int_range.h>
18#include <libmesh/mesh.h>
19#include <libmesh/mesh_generation.h>
20#include <libmesh/parallel_implementation.h>
21#include <libmesh/quadrature_gauss_lobatto.h>
31template <ElemType elem_type, Order order>
50 MeshTools::Generation::build_cube(*
_mesh, 1, 1, 1, 0., 1., 0., 1., 0., 1., elem_type);
58 const unsigned int n =
static_cast<unsigned int>(order) + 1;
65 unsigned int stride = 1;
69 q(d) = rule.
qp((i / stride) % n)(0);
103 std::vector<Point> samples;
107 samples.emplace_back(a/7., (
dim > 1) ?
b/7. : 0., (
dim > 2) ? c/7. : 0.);
109 unsigned int n_paired = 0;
111 for (
const auto * elem :
_mesh->active_local_element_ptr_range())
117 CPPUNIT_ASSERT_EQUAL(n_lag, n_gll);
124 for (
const Point & q : samples)
133 _mesh->comm().sum(n_paired);
134 CPPUNIT_ASSERT(n_paired > 0);
138#define INSTANTIATE_FEGLLAGREEMENTTEST(elemtype, order) \
139 class FEGLLLagrangeAgreementTest_##order##_##elemtype : \
140 public FEGLLLagrangeAgreementTest<elemtype, order> { \
142 FEGLLLagrangeAgreementTest_##order##_##elemtype() : \
143 FEGLLLagrangeAgreementTest<elemtype, order>() { \
144 if (unitlog->summarized_logs_enabled()) \
145 this->libmesh_suite_name = "FEGLLLagrangeAgreementTest"; \
147 this->libmesh_suite_name = \
148 "FEGLLLagrangeAgreementTest_" #order "_" #elemtype; \
150 CPPUNIT_TEST_SUITE( FEGLLLagrangeAgreementTest_##order##_##elemtype ); \
151 CPPUNIT_TEST( testAgreesWithLagrange ); \
152 CPPUNIT_TEST_SUITE_END(); \
155 CPPUNIT_TEST_SUITE_REGISTRATION( FEGLLLagrangeAgreementTest_##order##_##elemtype )
unsigned int node_at(const Elem &elem, const Point &q)
The node of elem whose reference position is q, or invalid_uint if it has none.
void testAgreesWithLagrange()
std::unique_ptr< Mesh > _mesh
std::string libmesh_suite_name
Point gll_point(const unsigned int i, const unsigned int dim)
The interpolation point of Gauss-Lobatto shape function i.
This is the base class from which all geometric element types are derived.
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...
IntRange< unsigned short > node_index_range() const
virtual Point master_point(const unsigned int i) const =0
static Real shape(const unsigned int dim, const FEType &fe_t, const ElemType t, const unsigned int i, const Point &p)
static unsigned int n_shape_functions(const unsigned int dim, const FEType &fe_t, const ElemType t)
class FEType hides (possibly multiple) FEFamily and approximation orders, thereby enabling specialize...
A Point defines a location in LIBMESH_DIM dimensional Real space.
Point qp(const unsigned int i) const
virtual void init(const Elem &e, unsigned int p_level=invalid_uint)
Initializes the data structures for a quadrature rule for the element e.
This class implements Gauss-Lobatto quadrature for 1D elements and 2D/3D tensor product elements.
bool relative_fuzzy_equals(const TypeVector< T > &rhs, Real tol=TOLERANCE) const
Communicator * TestCommWorld
INSTANTIATE_FEGLLAGREEMENTTEST(EDGE2, FIRST)
The libMesh namespace provides an interface to certain functionality in the library.
const unsigned int invalid_uint
A number which is used quite often to represent an invalid or uninitialized value for an unsigned int...
static constexpr Real TOLERANCE
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...