v0.16.3
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
MoFEM::CGALInterface Struct Referenceabstract

#include "src/interfaces/CGALInterface.hpp"

Inheritance diagram for MoFEM::CGALInterface:
[legend]
Collaboration diagram for MoFEM::CGALInterface:
[legend]

Classes

struct  CrackExtension
 

Public Member Functions

 ~CGALInterface () override=default
 
virtual CGALTools & getTools ()=0
 
virtual MoFEMErrorCode importMesh (const TetMeshData &data, BitRefLevel bit, Range &entities, EntityHandle &volume, EntityHandle &surface)=0
 
virtual MoFEMErrorCode exportMesh (const Range &cells, TetMeshData &data)=0
 
virtual MoFEMErrorCode remesh (const Range &source_entities, const Range &selected_cells, BitRefLevel output_bit, Range &entities, const CGALTools::RemeshSettings &settings, CGALTools::RemeshReport &report)=0
 
virtual MoFEMErrorCode reconstructDelaunay (const Range &source_entities, BitRefLevel output_bit, Range &entities, CGALTools::ReconstructionMethod method=CGALTools::ReconstructionMethod::PointDelaunay)=0
 
virtual CrackExtension & getCrackExtension ()=0
 
virtual MoFEMErrorCode retireLevel (BitRefLevel bit)=0
 
virtual MoFEMErrorCode moabToCgal (BitRefLevel bit, BitRefLevel mask=BitRefLevel().set(), int verb=QUIET)=0
 
virtual MoFEMErrorCode cgalToMoab (BitRefLevel source_bit, BitRefLevel output_bit, int verb=QUIET)=0
 
MoFEMErrorCode cgalToMoab (BitRefLevel bit, int verb=QUIET)
 
virtual MoFEMErrorCode getMesh (BitRefLevel bit, CGALMesh *&mesh)=0
 
virtual MoFEMErrorCode getLinkedVertices (BitRefLevel bit, Range &vertices) const =0
 
virtual MoFEMErrorCode clear (BitRefLevel bit)=0
 
- Public Member Functions inherited from MoFEM::UnknownInterface
virtual MoFEMErrorCode query_interface (boost::typeindex::type_index type_index, UnknownInterface **iface) const =0
 
template<class IFACE >
MoFEMErrorCode registerInterface (bool error_if_registration_failed=true)
 Register interface.
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE *&iface) const
 Get interface reference to pointer of interface.
 
template<class IFACE >
MoFEMErrorCode getInterface (IFACE **const iface) const
 Get interface pointer to pointer of interface.
 
template<class IFACE , typename boost::enable_if< boost::is_pointer< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get interface pointer to pointer of interface.
 
template<class IFACE , typename boost::enable_if< boost::is_reference< IFACE >, int >::type = 0>
IFACE getInterface () const
 Get reference to interface.
 
template<class IFACE >
IFACE * getInterface () const
 Function returning pointer to interface.
 
virtual ~UnknownInterface ()=default
 

Additional Inherited Members

- Static Public Member Functions inherited from MoFEM::UnknownInterface
static MoFEMErrorCode getLibVersion (Version &version)
 Get library version.
 
static MoFEMErrorCode getFileVersion (moab::Interface &moab, Version &version)
 Get database major version.
 
static MoFEMErrorCode setFileVersion (moab::Interface &moab, Version version=Version(MoFEM_VERSION_MAJOR, MoFEM_VERSION_MINOR, MoFEM_VERSION_BUILD))
 Get database major version.
 
static MoFEMErrorCode getInterfaceVersion (Version &version)
 Get database major version.
 

Detailed Description

Each managed point set is selected by a nonzero BitRefLevel. Import constructs a Delaunay triangulation of the selected vertices; it does not preserve input tetrahedral connectivity, surfaces or meshsets. Export is additive and never deletes old entities. Use a fresh output level after changing the CGAL mesh. Mesh distribution is the caller's responsibility.

Examples
mesh_reconstruction.cpp.

Definition at line 18 of file CGALInterface.hpp.

Constructor & Destructor Documentation

◆ ~CGALInterface()

MoFEM::CGALInterface::~CGALInterface ( )
overridedefault

Member Function Documentation

◆ cgalToMoab() [1/2]

MoFEMErrorCode MoFEM::CGALInterface::cgalToMoab ( BitRefLevel  bit,
int  verb = QUIET 
)
inline

Definition at line 245 of file CGALInterface.hpp.

245 {
246 return cgalToMoab(bit, bit, verb);
247 }
auto bit
set bit
virtual MoFEMErrorCode cgalToMoab(BitRefLevel source_bit, BitRefLevel output_bit, int verb=QUIET)=0

◆ cgalToMoab() [2/2]

virtual MoFEMErrorCode MoFEM::CGALInterface::cgalToMoab ( BitRefLevel  source_bit,
BitRefLevel  output_bit,
int  verb = QUIET 
)
pure virtual

Export vertices and finite tetrahedra to output_bit. Unchanged vertices and matching tetrahedra are reused. New or moved vertices get new MOAB handles. If import selected a linear simplicial source mesh, new vertices are classified geometrically and MeshRefinement derives/stores ancestry. Export must then be a subdivision: missing or ambiguous parents are errors. A source containing only points supplies no higher-dimensional ancestry. Existing levels and meshsets are retained. Planar sets export vertices only.

◆ clear()

virtual MoFEMErrorCode MoFEM::CGALInterface::clear ( BitRefLevel  bit)
pure virtual

◆ exportMesh()

virtual MoFEMErrorCode MoFEM::CGALInterface::exportMesh ( const Range &  cells,
TetMeshData &  data 
)
pure virtual

◆ getCrackExtension()

virtual CrackExtension & MoFEM::CGALInterface::getCrackExtension ( )
pure virtual

◆ getLinkedVertices()

virtual MoFEMErrorCode MoFEM::CGALInterface::getLinkedVertices ( BitRefLevel  bit,
Range &  vertices 
) const
pure virtual

◆ getMesh()

virtual MoFEMErrorCode MoFEM::CGALInterface::getMesh ( BitRefLevel  bit,
CGALMesh *&  mesh 
)
pure virtual

Borrowed mesh, valid until this level is replaced or cleared. Include CGALInterfaceTypes.hpp to access its triangulation.

◆ getTools()

virtual CGALTools & MoFEM::CGALInterface::getTools ( )
pure virtual

◆ importMesh()

virtual MoFEMErrorCode MoFEM::CGALInterface::importMesh ( const TetMeshData &  data,
BitRefLevel  bit,
Range &  entities,
EntityHandle &  volume,
EntityHandle &  surface 
)
pure virtual

Local indexed mesh transfer. An empty vertexIds list requests fresh local IDs and new vertices, even where another mesh has coincident points. Supplied global vertex IDs are preserved; vertices and matching simplices already in MOAB are reused. No ancestry is inferred. CGAL reads only corner connectivity. Matching higher-order MOAB entities retain their attached nodes; returned closure contains topological nodes. Exterior faces are oriented with sense +1 relative to the complete output bit level, including consistent reordering of higher-order edge nodes. Internal faces retain their connectivity. Newly created entities are linear. Labels are stored on returned volume/boundary meshsets (zero if absent). The caller owns these containers. Distributed callers must provide coordinated global IDs; local allocation does not identify shared copies.

Examples
mesh_reconstruction.cpp.

◆ moabToCgal()

virtual MoFEMErrorCode MoFEM::CGALInterface::moabToCgal ( BitRefLevel  bit,
BitRefLevel  mask = BitRefLevel().set(),
int  verb = QUIET 
)
pure virtual

Replace the managed triangulation with the selected MOAB point set. Duplicate coordinates are rejected, rather than merging MOAB identities.

◆ reconstructDelaunay()

virtual MoFEMErrorCode MoFEM::CGALInterface::reconstructDelaunay ( const Range &  source_entities,
BitRefLevel  output_bit,
Range &  entities,
CGALTools::ReconstructionMethod  method = CGALTools::ReconstructionMethod::PointDelaunay 
)
pure virtual

Reconstruct selected tetrahedra and preserve supplied lower-dimensional source_entities. Cell closure is derived internally. Surface patches retain topology and vertex IDs; getTools().surfaceFlipAngle controls reconnection across adjacent facet planes (degrees, 0 is flat). Explicit edges retain their curve support. Exterior nodes and feature boundaries are always preserved; a nonzero angle allows piecewise-planar shape changes. Volume meshset classification must be uniform on selected cells. Unsupported constraint recovery fails before import, except disconnected reconstructed surface vertex links: these warn and retain the available patch for inspection. ConstrainedStrict (CGAL 6.2) instead recovers exact PLC surfaces and removes outside cells, allowing non-convex domains. Exactly planar simple patches of equal classification may reconnect; the flip angle is unused. Added points or patch defects reject the call; no inspection exception or fallback applies to this method. All corner coordinates and IDs survive. Records topological ancestry; call MeshsetsManager to add children to meshsets. Failure removes newly created entities and leaves output_bit available.

selected.merge(crack_faces);
CHKERR bridge->reconstructDelaunay(selected, BitRefLevel().set(1), output);
bool selected
Definition CGALTools.cpp:97
std::vector< Cell > cells
#define CHKERR
Inline error check.
std::bitset< BITREFLEVEL_SIZE > BitRefLevel
Bit structure attached to each entity identifying to what mesh entity is attached.
Definition Types.hpp:40
Examples
mesh_reconstruction.cpp.

◆ remesh()

virtual MoFEMErrorCode MoFEM::CGALInterface::remesh ( const Range &  source_entities,
const Range &  selected_cells,
BitRefLevel  output_bit,
Range &  entities,
const CGALTools::RemeshSettings &  settings,
CGALTools::RemeshReport &  report 
)
pure virtual

Remesh selected tetrahedra within the complete source mesh. Supply protected faces/edges/fixed vertices in source_entities. Adjacent unselected cells may change to retain conformity. Returns the entire output closure on a fresh bit; source coordinates and levels are retained. Transfers registered meshset membership using region/patch/curve labels. CGAL 6.2 recovers a constrained supporting triangulation for non-convex domains and cavities. Neighbouring cells may be subdivided for conformity; communication and solution transfer belong to the caller. A zero settings.targetEdgeLength performs constraint recovery only, retaining all source corner coordinates and IDs and allowing Steiner additions, without isotropic remeshing or a quality-improvement gate.

source.merge(crack_faces);
CHKERR bridge->remesh(source, selected_cells, BitRefLevel().set(1),
output, settings, report);
Report & report
std::vector< int > source
const Settings & settings
double targetEdgeLength
Zero: constraint recovery only.
Definition CGALTools.hpp:33

◆ retireLevel()

virtual MoFEMErrorCode MoFEM::CGALInterface::retireLevel ( BitRefLevel  bit)
pure virtual

Retire an inactive level: delete entities whose only level is bit, clearing parent references to them and removing them from meshsets, then clear bit from all remaining entities, so it can be reused. Fails if an entity on another level still uses a retired entity. One rank.


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