1#include <libmesh/boundary_info.h>
2#include <libmesh/elem.h>
3#include <libmesh/enum_elem_type.h>
4#include <libmesh/enum_quadrature_type.h>
5#include <libmesh/function_base.h>
6#include <libmesh/libmesh.h>
7#include <libmesh/mesh_generation.h>
8#include <libmesh/mesh_modification.h>
9#include <libmesh/mesh_smoother_laplace.h>
10#include <libmesh/mesh_smoother_vsmoother.h>
11#include <libmesh/mesh_tools.h>
12#include <libmesh/node.h>
13#include <libmesh/reference_elem.h>
14#include <libmesh/replicated_mesh.h>
15#include <libmesh/mesh.h>
16#include <libmesh/system.h>
17#include <libmesh/variational_smoother_constraint.h>
18#include "libmesh/face_tri.h"
19#include "libmesh/cell_prism.h"
20#include "libmesh/utility.h"
21#include "libmesh/enum_to_string.h"
22#include "libmesh/parallel_ghost_sync.h"
38 std::unique_ptr<FunctionBase<Real>>
clone()
const override
40 return std::make_unique<DistortSquare>();
45 libmesh_not_implemented();
52 const Real eta = 2 * p(0) - 1;
53 const Real zeta = 2 * p(1) - 1;
54 output(0) = p(0) + (pow<3>(eta) - eta) * p(1) * (1 - p(1));
55 output(1) = p(1) + (pow<3>(zeta) - zeta) * p(0) * (1 - p(0));
65 DistortHyperCube(
const unsigned int dim) : _dim(
dim) {}
68 std::unique_ptr<FunctionBase<Real>>
clone()
const override
70 return std::make_unique<DistortHyperCube>(_dim);
81 std::array<bool, 3> is_on_boundary = {
false,
false,
false};
82 for (
unsigned int i = 0; i < _dim; ++i)
84 is_on_boundary[i] =
true;
87 for (
unsigned int i = 0; i < _dim; ++i)
89 if (!is_on_boundary[i])
92 Real modulation = 0.3;
93 Real xi = 2. * p(i) - 1.;
94 for (
unsigned int j = 0; j < _dim; ++j)
98 Real pj = std::clamp(p(j), 0., 1.);
99 modulation *= (pj - 0.5) * (pj - 0.5) * 4.;
102 const auto delta = (pow<3>(xi) - xi) * modulation;
104 output(i) = (delta >
TOLERANCE) ? p(i) + delta : 1.03 * p(i);
111 const unsigned int _dim;
116 std::unique_ptr<FunctionBase<Real>>
clone()
const override
118 return std::make_unique<SquareToParallelogram>();
123 libmesh_not_implemented();
132 output(0) = p(0) - 0.5 * p(1);
133 output(1) = 0.5 * std::sqrt(
Real(3)) * p(1);
140 std::unique_ptr<FunctionBase<Real>>
clone()
const override
142 return std::make_unique<ParallelogramToSquare>();
147 libmesh_not_implemented();
156 output(0) = p(0) + p(1) / std::sqrt(
Real(3));
157 output(1) = (2. / std::sqrt(
Real(3))) * p(1);
164 std::unique_ptr<FunctionBase<Real>>
clone()
const override
166 return std::make_unique<CubeToParallelepiped>();
171 libmesh_not_implemented();
183 output(0) = p(0) + 0.5 * p(1);
184 output(1) = 0.5 * std::sqrt(3) * p(1);
187 output(2) = p(2) * 0.25 * std::sqrt(3.);
193 std::unique_ptr<FunctionBase<Real>>
clone()
const override
195 return std::make_unique<ParallelepipedToCube>();
200 libmesh_not_implemented();
212 output(0) = p(0) - p(1) / std::sqrt(3.);
213 output(1) = (2. / std::sqrt(3)) * p(1);
216 output(2) = p(2) * 4. / std::sqrt(3.);
237#if defined(LIBMESH_ENABLE_VSMOOTHER) && defined(LIBMESH_HAVE_SOLVER)
277#if defined(LIBMESH_HAVE_GZSTREAM)
297 constexpr unsigned int n_elems_per_side = 4;
300 mesh, n_elems_per_side, n_elems_per_side, 0., 1., 0., 1., type);
307 auto center_distortion_is =
309 const Real r = node(d);
310 const Real R = r * n_elems_per_side;
318 const Real R1 = node(1) * n_elems_per_side;
326 const Real R0 = node(0) * n_elems_per_side;
336 return ((std::abs(R - std::round(R)) > distortion_tol) == distortion);
339 for (
auto node :
mesh.node_ptr_range())
341 CPPUNIT_ASSERT(center_distortion_is(*node, 0,
true));
342 CPPUNIT_ASSERT(center_distortion_is(*node, 1,
true));
348 for (
unsigned int i = 0; i != 8; ++i)
352 for (
auto node :
mesh.node_ptr_range())
354 CPPUNIT_ASSERT(center_distortion_is(*node, 0,
false, 1e-3));
355 CPPUNIT_ASSERT(center_distortion_is(*node, 1,
false, 1e-3));
361 std::pair<unsigned int, unsigned int>
364 const auto half_length = 0.5 * side_length;
365 unsigned int num_centered = 0;
366 unsigned int num_face = 0;
369 const auto num_half_lengths = point(d) / half_length;
370 if (std::abs(num_half_lengths - std::round(num_half_lengths)) > tol)
374 if (std::lround(num_half_lengths) % 2)
382 return std::make_pair(num_centered, num_face);
404 return (result.first == 2) && (result.second == 1);
410 const bool multiple_subdomains =
false,
411 const bool tangle_mesh =
false,
412 const Real tangle_damping_factor = 1.0)
416 if (multiple_subdomains && tangle_mesh)
417 libmesh_not_implemented_msg(
418 "Arbitrary mesh tangling with multiple subdomains is not supported.");
422 const auto dim = ref_elem->dim();
431 const auto side_length = 1.0 / n_elems_per_side;
440 mesh, n_elems_per_side, n_elems_per_side, 0., 1., 0., 1., type);
458 libmesh_error_msg(
"Unsupported dimension " <<
dim);
462 DistortHyperCube dh(
dim);
485 std::map<dof_id_type, Real> dist1_map;
487 std::map<dof_id_type, Real> dist2_map;
489 for (
const auto * node :
mesh.local_node_ptr_range())
491 dist1_map[node->id()] = (*node - p1).norm();
492 dist2_map[node->id()] = (*node - p2).norm();
498 auto get_closet_point_accross_all_procs =
499 [&
mesh, &proc_id](
const std::map<dof_id_type, Real> &dist_map) {
502 Real d_min_local = std::numeric_limits<Real>::max();
511 std::min_element(dist_map.begin(), dist_map.end(),
512 [](
const auto &a,
const auto &
b) {
513 return a.second < b.second;
516 node_id = min_it->first;
517 d_min_local = min_it->second;
521 auto d_min_global = d_min_local;
527 if (d_min_local == d_min_global) {
528 broadcasting_proc = proc_id;
537 return std::pair(node_id, node);
540 const auto [node_id1, node1] =
541 get_closet_point_accross_all_procs(dist1_map);
542 const auto [node_id2, node2] =
543 get_closet_point_accross_all_procs(dist2_map);
546 const auto displacement = tangle_damping_factor * (node1 - node2);
554 mesh.nodes_end(), sync_object);
560 CPPUNIT_ASSERT(unsmoothed_info.mesh_is_tangled);
564 std::unordered_map<subdomain_id_type, Real> distorted_subdomain_volumes;
566 if (multiple_subdomains)
569 for (
auto * elem :
mesh.active_element_ptr_range())
571 unsigned int subdomain_id = 0;
573 if (elem->vertex_average()(d) > 0.5)
575 elem->subdomain_id() += subdomain_id;
581 for (
auto *elem :
mesh.active_element_ptr_range()) {
582 const auto sub_id = elem->subdomain_id();
584 if (elem->processor_id() != proc_id)
586 distorted_subdomain_volumes[sub_id] += elem->volume();
587 highest_subdomain_id = std::max(sub_id, highest_subdomain_id);
592 for (
const auto sub_id :
make_range(highest_subdomain_id + 1)) {
594 if (distorted_subdomain_volumes.find(sub_id) ==
595 distorted_subdomain_volumes.end())
596 distorted_subdomain_volumes[sub_id] = 0.;
598 mesh.
comm().
sum(distorted_subdomain_volumes[sub_id]);
611 libmesh_error_msg_if(elem_orders.size() != 1,
612 "The variational smoother cannot be used for mixed-order meshes!");
617 const auto scale_factor = *elem_orders.begin() * ((type_is_pyramid || type_is_tet) ? 2 * 4 : 1);
620 auto node_distortion_is = [&n_elems_per_side, &
dim, &boundary_info, &scale_factor, &type_is_prism](
623 std::vector<boundary_id_type> boundary_ids;
624 boundary_info.boundary_ids(&node, boundary_ids);
627 const auto num_dofs =
dim - boundary_ids.size();
647 std::size_t num_zero_or_one = 0;
649 bool distorted =
false;
652 const Real r = node(d);
653 const Real R = r * n_elems_per_side * scale_factor;
654 CPPUNIT_ASSERT_GREATER(-distortion_tol * distortion_tol, r);
655 CPPUNIT_ASSERT_GREATER(-distortion_tol * distortion_tol, 1 - r);
657 bool d_distorted = std::abs(R - std::round(R)) > distortion_tol;
658 if (type_is_prism && (scale_factor == 3))
663 const Real R_prism = R / scale_factor * 2;
664 const bool d_distorted_prism =
665 std::abs(R_prism - std::round(R_prism)) > distortion_tol;
666 d_distorted &= d_distorted_prism;
668 distorted |= d_distorted;
672 CPPUNIT_ASSERT_GREATEREQUAL(
dim - num_dofs, num_zero_or_one);
678 return distorted == distortion;
682 for (
auto node :
mesh.node_ptr_range())
683 CPPUNIT_ASSERT(node_distortion_is(*node,
true));
693 SquareToParallelogram stp;
696 else if (type_is_prism)
701 CubeToParallelepiped ctp;
712 ParallelogramToSquare pts;
715 else if (type_is_prism)
720 ParallelepipedToCube ptc;
724 if (multiple_subdomains)
729 std::unordered_map<subdomain_id_type, Real> smoothed_subdomain_volumes;
730 for (
auto *elem :
mesh.active_element_ptr_range()) {
732 if (elem->processor_id() != proc_id)
734 smoothed_subdomain_volumes[elem->subdomain_id()] += elem->volume();
738 for (
const auto sub_id :
make_range(highest_subdomain_id + 1)) {
740 if (smoothed_subdomain_volumes.find(sub_id) ==
741 smoothed_subdomain_volumes.end())
742 smoothed_subdomain_volumes[sub_id] = 0.;
744 mesh.
comm().
sum(smoothed_subdomain_volumes[sub_id]);
747 for (
const auto sub_id :
make_range(highest_subdomain_id + 1))
749 libmesh_map_find(distorted_subdomain_volumes, sub_id),
750 libmesh_map_find(smoothed_subdomain_volumes, sub_id),
TOLERANCE));
754 std::unordered_map<dof_id_type, std::vector<const Elem *>> nodes_to_elem_map;
759 std::set<dof_id_type> nodes_checked;
762 for (
const auto * elem :
mesh.active_element_ptr_range())
764 for (
const auto local_node_id :
make_range(elem->n_nodes()))
766 const auto & node = elem->node_ref(local_node_id);
767 if (nodes_checked.find(node.id()) != nodes_checked.end())
770 nodes_checked.insert(node.id());
776 if (local_node_id > 8 && local_node_id < 13)
788 const auto & base = elem->node_ref(local_node_id - 9);
789 const auto & apex = elem->node_ref(4);
790 const Real x = (type ==
PYRAMID18) ? 0.56646084 : 0.54985875;
792 CPPUNIT_ASSERT(node.absolute_fuzzy_equals(base + x * (apex - base), tol));
795 else if (local_node_id > 13)
805 const auto & base1 = elem->node_ref(local_node_id - 14);
806 const auto & base2 = elem->node_ref((local_node_id - 13) % 4);
807 const auto & apex = elem->node_ref(4);
809 const auto node_approx =
810 (0.31401599 * base1 + 0.31401599 * base2 + 0.37196802 * apex);
811 CPPUNIT_ASSERT(node.absolute_fuzzy_equals(node_approx, tol));
818 else if (type_is_tet && !elem->is_vertex(local_node_id))
823 std::vector<const Node *> neighbors;
825 mesh, node, nodes_to_elem_map, neighbors);
827 switch (neighbors.size())
834 const auto is_0_cube_center =
836 const auto is_1_cube_center =
840 if (is_0_cube_center || is_1_cube_center)
842 const auto & cube_center =
843 is_0_cube_center ? *neighbors[0] : *neighbors[1];
845 is_0_cube_center ? *neighbors[1] : *neighbors[0];
852 const Real x = (type ==
TET10) ? 0.42895041 : 0.41486385;
853 CPPUNIT_ASSERT(node.absolute_fuzzy_equals(
854 other + x * (cube_center - other), tol));
859 const Real x = (type ==
TET10) ? 0.55388920 : 0.58093516;
860 CPPUNIT_ASSERT(node.absolute_fuzzy_equals(
861 other + x * (cube_center - other), tol));
870 const auto is_0_cube_vertex =
872 const auto is_1_cube_vertex =
874 const auto is_0_cube_face_center =
876 const auto is_1_cube_face_center =
879 if (is_0_cube_vertex && is_1_cube_vertex)
883 CPPUNIT_ASSERT(node_distortion_is(node,
false));
887 libmesh_error_msg_if(
888 (is_0_cube_center || is_0_cube_face_center) &&
889 (is_1_cube_center || is_1_cube_face_center),
890 "We should never get here!");
891 const auto & cube_vertex =
892 is_0_cube_vertex ? *neighbors[0] : *neighbors[1];
893 const auto & cube_face_center =
894 is_0_cube_face_center ? *neighbors[0] : *neighbors[1];
895 const Real x = (type ==
TET10) ? 0.61299101 : 0.65125580;
896 CPPUNIT_ASSERT(node.absolute_fuzzy_equals(
897 cube_vertex + x * (cube_face_center - cube_vertex), tol));
908 neighbors.erase(std::remove_if(neighbors.begin(),
910 [&elem](
const Node * n) {
911 return !elem->is_vertex(
912 elem->local_node(n->id()));
929 unsigned int num_vertices_at_cube_center = 0;
930 unsigned int num_vertices_at_cube_vertices = 0;
931 unsigned int num_vertices_at_cube_face_centers = 0;
932 for (
const auto * neighbor : neighbors)
935 num_vertices_at_cube_center += 1;
937 num_vertices_at_cube_vertices += 1;
939 num_vertices_at_cube_face_centers += 1;
947 if (num_vertices_at_cube_vertices == 2)
950 if (num_vertices_at_cube_center)
951 for (
const auto * neighbor : neighbors)
959 libmesh_error_msg(
"We should never get here!");
961 node_approx += weight * (*neighbor);
965 else if (num_vertices_at_cube_face_centers)
966 for (
const auto * neighbor : neighbors)
974 libmesh_error_msg(
"We should never get here!");
976 node_approx += weight * (*neighbor);
980 libmesh_error_msg(
"We should never get here!");
984 else if (num_vertices_at_cube_center && num_vertices_at_cube_vertices &&
985 num_vertices_at_cube_face_centers)
986 for (
const auto * neighbor : neighbors)
996 libmesh_error_msg(
"We should never get here!");
998 node_approx += weight * (*neighbor);
1002 libmesh_error_msg(
"We should never get here!");
1004 CPPUNIT_ASSERT(node.absolute_fuzzy_equals(node_approx, tol));
1010 libmesh_error_msg(node <<
" has unexpected number of neighbors ("
1011 << neighbors.size() <<
")");
1017 CPPUNIT_ASSERT(node_distortion_is(node,
false));
1038 const bool distortion,
1044 const auto & gold_node = gold_mesh.
node_ref(node_id);
1048 const bool d_distorted = std::abs(gold_node(d) - node(d)) > distortion_tol;
1060 CPPUNIT_ASSERT(mesh_distortion_is(gold_mesh,
mesh,
true));
1071 CPPUNIT_ASSERT(mesh_distortion_is(gold_mesh,
mesh,
false));
1100 for (
const auto & intersection :
1103 CPPUNIT_ASSERT(std::holds_alternative<PointConstraint>(intersection));
1122 CPPUNIT_ASSERT(!(plane1 == plane2));
1126 CPPUNIT_ASSERT(std::holds_alternative<LineConstraint>(intersection));
1127 const auto & line = std::get<LineConstraint>(intersection);
1128 CPPUNIT_ASSERT(line.direction().absolute_fuzzy_equals(
Point(0, 1, 0)));
1132#ifdef LIBMESH_ENABLE_VSMOOTHER
1412 mesh.
read(
"meshes/quad4_tri3_smoothed.xda.gz");
1438 auto count_non_invertible = [](
const MeshBase & m) {
1439 unsigned int n_bad = 0;
1440 for (
const auto * elem : m.active_element_ptr_range())
1441 if (!elem->has_invertible_map())
1451 mesh.
read(
"meshes/quad4_tri3_hourglass.xda.gz");
1456 CPPUNIT_ASSERT(count_non_invertible(
mesh) > 0);
1463 mesh.
read(
"meshes/quad4_tri3_hourglass.xda.gz");
1469 CPPUNIT_ASSERT_EQUAL(0u, count_non_invertible(
mesh));
1476 mesh.
read(
"meshes/hex8_prism6_smoothed.xda.gz");
CPPUNIT_TEST(testVariationalHex27MultipleSubdomains)
CPPUNIT_TEST(testVariationalPrism15)
CPPUNIT_TEST(testVariationalTri3)
CPPUNIT_TEST(testVariationalEdge3MultipleSubdomains)
CPPUNIT_TEST(testLaplaceQuad)
CPPUNIT_TEST(testVariationalTet4)
CPPUNIT_TEST(testVariationalPyramid18)
void testVariationalPyramid13()
void testVariationalEdge2()
CPPUNIT_TEST(testVariationalHex27Tangled)
void testVariationalQuadratureHourglass()
void testLaplaceSmoother(ReplicatedMesh &mesh, MeshSmoother &smoother, ElemType type)
void testVariationalQuad4Tangled()
CPPUNIT_TEST(testVariationalQuadratureHourglass)
void testVariationalHex27Tangled()
CPPUNIT_TEST(testVariationalHex20)
CPPUNIT_TEST(testVariationalMixed2D)
void testVariationalQuad9MultipleSubdomains()
LIBMESH_CPPUNIT_TEST_SUITE(MeshSmootherTest)
The goal of this test is to verify proper operation of the MeshSmoother subclasses.
void testVariationalPrism6()
void testVariationalPyramid5()
void testVariationalHex8()
void testVariationalTet10()
void testVariationalPrism21MultipleSubdomains()
void testVariationalQuad4MultipleSubdomains()
void testConstraintNearlyParallelPlanes()
void testVariationalEdge3()
CPPUNIT_TEST(testVariationalPyramid18MultipleSubdomains)
void testVariationalPrism20()
CPPUNIT_TEST(testVariationalQuad4MultipleSubdomains)
void testConstraintLinePlane()
void testVariationalSmootherRegression(const ReplicatedMesh &gold_mesh)
void testVariationalPrism21()
CPPUNIT_TEST(testVariationalPyramid5)
void testVariationalSmoother(Mesh &mesh, VariationalMeshSmoother &smoother, const ElemType type, const bool multiple_subdomains=false, const bool tangle_mesh=false, const Real tangle_damping_factor=1.0)
std::pair< unsigned int, unsigned int > numCenteredAndFacedDimensions(const Point &point, const Real &side_length, const Real &tol)
CPPUNIT_TEST(testVariationalTet14)
CPPUNIT_TEST(testVariationalPrism18)
CPPUNIT_TEST(testVariationalQuad8)
CPPUNIT_TEST(testVariationalHex27)
void testVariationalTet14MultipleSubdomains()
void testVariationalHex27MultipleSubdomains()
CPPUNIT_TEST(testVariationalPrism21)
bool pointIsCubeFaceCenter(const Point &point, const Real &side_length, const Real &tol=TOLERANCE)
void testVariationalPyramid18MultipleSubdomains()
void testVariationalTet4()
CPPUNIT_TEST(testVariationalTri6)
CPPUNIT_TEST(testVariationalTet10)
void testVariationalMixed2D()
CPPUNIT_TEST(testVariationalQuad4)
void testVariationalHex20()
void testVariationalMixed3D()
void testVariationalQuad8()
CPPUNIT_TEST(testVariationalTet14MultipleSubdomains)
void testVariationalTri6()
CPPUNIT_TEST(testVariationalMixed3D)
CPPUNIT_TEST(testVariationalQuad9)
void testVariationalPrism15()
bool pointIsCubeCenter(const Point &point, const Real &side_length, const Real &tol=TOLERANCE)
void testVariationalPyramid18()
void testVariationalPrism18()
void testVariationalQuad9()
void testVariationalQuad4()
CPPUNIT_TEST(testConstraintNearlyParallelPlanes)
CPPUNIT_TEST(testVariationalPrism20)
CPPUNIT_TEST(testVariationalPyramid14)
CPPUNIT_TEST(testVariationalPyramid13)
void testVariationalHex27()
CPPUNIT_TEST(testVariationalPrism21MultipleSubdomains)
void testVariationalTri6MultipleSubdomains()
CPPUNIT_TEST(testVariationalHex8)
CPPUNIT_TEST(testVariationalTri6MultipleSubdomains)
CPPUNIT_TEST(testVariationalEdge2)
CPPUNIT_TEST(testVariationalEdge3)
CPPUNIT_TEST(testVariationalQuad4Tangled)
void testVariationalPyramid14()
CPPUNIT_TEST(testVariationalQuad9MultipleSubdomains)
void testVariationalEdge3MultipleSubdomains()
bool pointIsCubeVertex(const Point &point, const Real &side_length, const Real &tol=TOLERANCE)
CPPUNIT_TEST(testConstraintLinePlane)
CPPUNIT_TEST(testLaplaceTri)
void testVariationalTri3()
void testVariationalTet14()
CPPUNIT_TEST(testVariationalPrism6)
void max(const T &r, T &o, Request &req) const
void min(const T &r, T &o, Request &req) const
void broadcast(T &data, const unsigned int root_id=0, const bool identical_sizes=false) const
streambufT * rdbuf() const
Get the associated stream buffer.
Defines a dense vector for use in Finite Element-type computations.
void resize(const unsigned int n)
Resize the vector.
virtual void zero() override final
Set every element in the vector to 0.
static constexpr dof_id_type invalid_id
An invalid id to distinguish an uninitialized DofObject.
static const Order type_to_default_order_map[INVALID_ELEM]
This array maps the integer representation of the ElemType enum to the default approximation order of...
Base class for functors that can be evaluated at a point and (optionally) time.
virtual std::unique_ptr< FunctionBase< Output > > clone() const =0
virtual Output operator()(const Point &p, const Real time=0.)=0
This class defines the data structures necessary for Laplace smoothing.
Represents a line constraint defined by a base point and direction vector.
bool is_parallel(const LineConstraint &l) const
Query whether a line is parallel to this line.
This is the MeshBase class.
virtual const Node & node_ref(const dof_id_type i) const
const BoundaryInfo & get_boundary_info() const
The information about boundary ids on the mesh.
unsigned int mesh_dimension() const
void allow_renumbering(bool allow)
If false is passed in then this mesh will no longer be renumbered when being prepared for use.
virtual dof_id_type n_nodes() const =0
virtual void read(const std::string &name, void *mesh_data=nullptr, bool skip_renumber_nodes_and_elements=false, bool skip_find_neighbors=false, bool skip_detect_interior_parents=false)=0
Interfaces for reading/writing a mesh to/from a file.
virtual const Node * query_node_ptr(const dof_id_type i) const =0
const std::set< Order > & elem_default_orders() const
This class provides the necessary interface for mesh smoothing.
virtual void smooth()=0
Function which actually performs the smoothing operations.
The Mesh class is a thin wrapper, around the ReplicatedMesh class by default.
A Node is like a Point, but with more information.
processor_id_type processor_id() const
const Parallel::Communicator & comm() const
Represents a plane constraint defined by a point and normal vector.
bool is_parallel(const PlaneConstraint &p) const
Query whether a plane is parallel to this plane.
Represents a fixed point constraint.
A Point defines a location in LIBMESH_DIM dimensional Real space.
The ReplicatedMesh class is derived from the MeshBase class, and is used to store identical copies of...
virtual dof_id_type n_nodes() const override final
This is an implementation of Larisa Branets' smoothing algorithms.
virtual void smooth() override
Redefinition of the smooth function from the base class.
void set_quadrature_type(QuadratureType qt)
Set the quadrature rule type used by the underlying VariationalSmootherSystem to integrate the distor...
const MeshQualityInfo & get_mesh_info() const
Getter for the _system's _mesh_info attribute.
virtual void setup()
Setup method that creates equation systems, system, and constraints, to be called just prior to smoot...
Communicator * TestCommWorld
CPPUNIT_TEST_SUITE_REGISTRATION(MeshSmootherTest)
void sync_dofobject_data_by_id(const Communicator &comm, const Iterator &range_begin, const Iterator &range_end, SyncFunctor &sync)
Request data about a range of ghost dofobjects uniquely identified by their id.
const Elem & get(const ElemType type_in)
std::string enum_to_string(const T e)
The libMesh namespace provides an interface to certain functionality in the library.
bool relative_fuzzy_equals(const T &var1, const T2 &var2, const Real tol=TOLERANCE *TOLERANCE)
Function to check whether two variables are equal within a relative tolerance.
bool absolute_fuzzy_equals(const T &var1, const T2 &var2, const Real tol=TOLERANCE *TOLERANCE)
Function to check whether two variables are equal within an absolute tolerance.
ElemType
Defines an enum for geometric element types.
static constexpr Real TOLERANCE
ConstraintVariant intersect_constraints(const ConstraintVariant &a, const ConstraintVariant &b)
Dispatch intersection between two constraint variants.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
uint8_t processor_id_type
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...