1#include <libmesh/boundary_info.h>
2#include <libmesh/elem.h>
3#include <libmesh/mesh.h>
4#include <libmesh/mesh_generation.h>
5#include <libmesh/mesh_tools.h>
6#include <libmesh/parallel_implementation.h>
7#include <libmesh/simplex_refiner.h>
39 Real expected_total_measure)
46 Real total_measure = 0;
47 for (
const Elem * elem :
mesh.local_element_ptr_range())
49 Real measure = elem->volume();
50 CPPUNIT_ASSERT_LESSEQUAL(desired_measure, measure);
51 total_measure += measure;
55 LIBMESH_ASSERT_FP_EQUAL(total_measure, expected_total_measure,
67 0.0, 2.0, 0.0, 2.0,
TRI3);
86 (trimesh, -1, 1, -1, 1, -1, 1);
LIBMESH_CPPUNIT_TEST_SUITE(SimplexRefinementTest)
The goal of this test is to verify proper operation of the interfaces to tetrahedralization libraries...
void test3DTriRefinement()
CPPUNIT_TEST(testTriRefinement)
void testRefinement(UnstructuredMesh &mesh, Real desired_measure, Real expected_total_measure)
CPPUNIT_TEST(test3DTriRefinement)
This is the base class from which all geometric element types are derived.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
A C++ class to refine a simplicial mesh via splitting edges that exceed a given metric.
bool refine_elements()
Finds elements which exceed the requested metric and refines them via subdivision into new simplices ...
Real & desired_volume()
Sets and/or gets the desired element volume.
The UnstructuredMesh class is derived from the MeshBase class.
Communicator * TestCommWorld
The libMesh namespace provides an interface to certain functionality in the library.
static constexpr Real TOLERANCE
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
CPPUNIT_TEST_SUITE_REGISTRATION(SimplexRefinementTest)