https://mooseframework.inl.gov
Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
TriangleManifoldUtils::SurfaceChecker Class Reference
Inheritance diagram for TriangleManifoldUtils::SurfaceChecker:
[legend]

Public Member Functions

 SurfaceChecker (UnstructuredMesh &mesh)
 
void triangulate () override
 
std::string improveAndValidate ()
 
Realdesired_volume ()
 
bool & smooth_after_generating ()
 
ElemTypeelem_type ()
 
void attach_hole_list (std::unique_ptr< std::vector< std::unique_ptr< UnstructuredMesh >>> holes)
 
void set_verbosity (unsigned int v)
 

Protected Types

enum  SurfaceIntegrity
 

Protected Member Functions

std::set< SurfaceIntegritycheck_hull_integrity () const
 
std::set< SurfaceIntegrityimprove_hull_integrity ()
 
void process_hull_integrity_result (const std::set< SurfaceIntegrity > &result) const
 
void delete_2D_hull_elements ()
 

Static Protected Member Functions

static BoundingBox volume_to_surface_mesh (UnstructuredMesh &mesh)
 

Protected Attributes

 NON_TRI3
 
 MISSING_NEIGHBOR
 
 EMPTY_MESH
 
 MISSING_BACKLINK
 
 BAD_NEIGHBOR_NODES
 
 NON_ORIENTED
 
 BAD_NEIGHBOR_LINKS
 
 DEGENERATE_ELEMENT
 
 DEGENERATE_MESH
 
unsigned int _verbosity
 
Real _desired_volume
 
bool _smooth_after_generating
 
ElemType _elem_type
 
UnstructuredMesh & _mesh
 
std::unique_ptr< std::vector< std::unique_ptr< UnstructuredMesh > > > _holes
 

Detailed Description

Definition at line 47 of file TriangleManifold.C.

Constructor & Destructor Documentation

◆ SurfaceChecker()

TriangleManifoldUtils::SurfaceChecker::SurfaceChecker ( UnstructuredMesh &  mesh)
inlineexplicit

Definition at line 50 of file TriangleManifold.C.

Member Function Documentation

◆ improveAndValidate()

std::string TriangleManifoldUtils::SurfaceChecker::improveAndValidate ( )

Definition at line 276 of file TriangleManifold.C.

Referenced by TriangleManifold::finalize().

277 {
279  auto result = improve_hull_integrity();
280 
281  if (result.empty())
282  return "";
283 
284  std::ostringstream err_msg;
285  if (result.count(NON_TRI3))
286  err_msg << "- At least one non-Tri3 element was found.\n" << std::endl;
287  if (result.count(MISSING_NEIGHBOR))
288  err_msg << "- At least one triangle without three neighbors was found.\n" << std::endl;
289  if (result.count(EMPTY_MESH))
290  err_msg << "- The surface mesh was empty\n" << std::endl;
291  if (result.count(MISSING_BACKLINK))
292  err_msg << "- At least one triangle neighbor without a return neighbor link was found.\n";
293  if (result.count(BAD_NEIGHBOR_NODES))
294  err_msg << "- At least one triangle neighbor without expected node links was found.\n";
295  if (result.count(NON_ORIENTED))
296  err_msg << "- At least one triangle neighbor with an inconsistent orientation was found.\n";
297  if (result.count(BAD_NEIGHBOR_LINKS))
298  err_msg << "- At least one triangle neighbor with inconsistent node and neighbor links was "
299  "found.\n";
300  if (result.count(DEGENERATE_ELEMENT))
301  err_msg << "- At least one input triangle is degenerate, with near-zero area relative to the "
302  "manifold.\n";
303  if (result.count(DEGENERATE_MESH))
304  err_msg << "- Mesh is degenerate, with zero thickness in at least one direction.\n";
305  return err_msg.str();
306 }
std::set< SurfaceIntegrity > improve_hull_integrity()

◆ triangulate()

void TriangleManifoldUtils::SurfaceChecker::triangulate ( )
inlineoverridevirtual

Implements libMesh::MeshTetInterface.

Definition at line 51 of file TriangleManifold.C.

51 { mooseError("SurfaceChecker is not meant for triangulation."); }
void mooseError(Args &&... args)
Emit an error message with the given stringified, concatenated args and terminate the application...
Definition: MooseError.h:311

The documentation for this class was generated from the following file: