OOFEM 3.0
Loading...
Searching...
No Matches
oofem::DelaunayTriangulator Class Reference

#include <delaunaytriangulator.h>

Collaboration diagram for oofem::DelaunayTriangulator:

Public Member Functions

 DelaunayTriangulator (Domain *d, double setAlpha)
 Constructor.
 ~DelaunayTriangulator ()
 Destructor.
void generateMesh ()
 Main call.

Protected Attributes

Domaindomain
 Domain of the PFEM problem containing nodes to be triangulated.
double alphaValue
int nnode
Timer meshingTimer
 Measures overall time of triangulation procedure.
Timer searchingTimer
 Measures time needed by searching for non-delaunay triangles.
Timer polygonTimer
 Measures time needed for identifying polygon to be retriangulated.
Timer creativeTimer
 Measures time needed for creating new Delaunay triangles.
std ::list< DelaunayTriangle * > generalTriangleList
 Contains all triangles (even not valid).
std ::list< AlphaEdge2D * > alphaShapeEdgeList
 Contains resulting alpha-shape in form of a list.
std ::list< AlphaEdge2D * > edgeList
 contains all edges of the triangulation
OctreeSpatialLocalizerT< DelaunayTriangle * > triangleOctree
 Octree with Delaunay triangles allowing fast search.

Private Member Functions

void addUniqueEdgeToPolygon (Edge2D edge, std ::list< Edge2D > &polygon)
 Edge is added to the polygon only if it's not contained. Otherwise both are removed (edge shared by two non-Delaunay triangles).
void buildInitialBBXMesh (InsertTriangleBasedOnCircumcircle &tInsert)
 Identifies the bounding box of pfemparticles and creates initial triangulation consisting of 2 triangles conecting bounding box nodes.
void writeMesh ()
 Writes the mesh into the domain by creating new tr1_2d_pfem elements and prescribes zero-pressure boundary condition on alpha-shape nodes.
void computeAlphaComplex ()
 Reads the triangulation and fills tha edgeList container with alpha-shape edges and set their bounds.
AlphaEdge2DgiveBackEdgeIfAlreadyContainedInList (AlphaEdge2D &alphaEdge)
void giveAlphaShape ()
 Iterates through the edgeList container and compares alpha-value with alphaEdge bounds. Alpha shape is stored in the alphaShapeEdgeList.
void initializeTimers ()
 Initializes Timers and.
void findNonDelaunayTriangles (int insertedNode, InsertTriangleBasedOnCircumcircle &tInsert, std ::list< Edge2D > &polygon)
 Looks for non-Delaunay triangles in octree and creates a polygon.
void meshPolygon (int insertedNode, InsertTriangleBasedOnCircumcircle &tInsert, std ::list< Edge2D > &polygon)
 Retriangulates the polygon.
void giveTimeReport ()
 Prints the time report.
void cleanUpTriangleList ()
 Iterates through generalTringleList und removes non-valid ones or those containing bounding box nodes.
void computeBBXBasedOnNodeData (BoundingBox &BBX)
 Calculates the bounding box base on the domain's nodes.

Detailed Description

Mesh generator for the PFEM problem, using Bowyer-Watson algorithm of the Delaunay triangulation of a set of nodes (PFEMParticle) creating TR1_2D_PFEM elements.

Author
David Krybus

Definition at line 66 of file delaunaytriangulator.h.

Constructor & Destructor Documentation

◆ DelaunayTriangulator()

oofem::DelaunayTriangulator::DelaunayTriangulator ( Domain * d,
double setAlpha )

Constructor.

Definition at line 50 of file delaunaytriangulator.C.

References alphaShapeEdgeList, alphaValue, domain, nnode, and triangleOctree.

◆ ~DelaunayTriangulator()

oofem::DelaunayTriangulator::~DelaunayTriangulator ( )

Destructor.

Definition at line 61 of file delaunaytriangulator.C.

References edgeList, and generalTriangleList.

Member Function Documentation

◆ addUniqueEdgeToPolygon()

void oofem::DelaunayTriangulator::addUniqueEdgeToPolygon ( Edge2D edge,
std ::list< Edge2D > & polygon )
private

Edge is added to the polygon only if it's not contained. Otherwise both are removed (edge shared by two non-Delaunay triangles).

Definition at line 74 of file delaunaytriangulator.C.

Referenced by findNonDelaunayTriangles().

◆ buildInitialBBXMesh()

void oofem::DelaunayTriangulator::buildInitialBBXMesh ( InsertTriangleBasedOnCircumcircle & tInsert)
private

Identifies the bounding box of pfemparticles and creates initial triangulation consisting of 2 triangles conecting bounding box nodes.

Definition at line 477 of file delaunaytriangulator.C.

References oofem::FloatArray::at(), computeBBXBasedOnNodeData(), domain, generalTriangleList, oofem::BoundingBox::giveOrigin(), oofem::BoundingBox::giveSize(), nnode, and triangleOctree.

Referenced by generateMesh().

◆ cleanUpTriangleList()

void oofem::DelaunayTriangulator::cleanUpTriangleList ( )
private

Iterates through generalTringleList und removes non-valid ones or those containing bounding box nodes.

Definition at line 458 of file delaunaytriangulator.C.

References generalTriangleList, and nnode.

Referenced by generateMesh().

◆ computeAlphaComplex()

void oofem::DelaunayTriangulator::computeAlphaComplex ( )
private

◆ computeBBXBasedOnNodeData()

void oofem::DelaunayTriangulator::computeBBXBasedOnNodeData ( BoundingBox & BBX)
private

Calculates the bounding box base on the domain's nodes.

Definition at line 525 of file delaunaytriangulator.C.

References oofem::FloatArray::at(), domain, oofem::max(), oofem::min(), nnode, oofem::BoundingBox::setMask(), oofem::BoundingBox::setOrigin(), and oofem::BoundingBox::setSize().

Referenced by buildInitialBBXMesh().

◆ findNonDelaunayTriangles()

void oofem::DelaunayTriangulator::findNonDelaunayTriangles ( int insertedNode,
InsertTriangleBasedOnCircumcircle & tInsert,
std ::list< Edge2D > & polygon )
private

Looks for non-Delaunay triangles in octree and creates a polygon.

Definition at line 397 of file delaunaytriangulator.C.

References addUniqueEdgeToPolygon(), domain, oofem::DofManager::giveCoordinates(), polygonTimer, searchingTimer, and triangleOctree.

Referenced by generateMesh().

◆ generateMesh()

◆ giveAlphaShape()

void oofem::DelaunayTriangulator::giveAlphaShape ( )
private

Iterates through the edgeList container and compares alpha-value with alphaEdge bounds. Alpha shape is stored in the alphaShapeEdgeList.

Definition at line 348 of file delaunaytriangulator.C.

References alphaShapeEdgeList, alphaValue, and edgeList.

Referenced by generateMesh().

◆ giveBackEdgeIfAlreadyContainedInList()

AlphaEdge2D * oofem::DelaunayTriangulator::giveBackEdgeIfAlreadyContainedInList ( AlphaEdge2D & alphaEdge)
private

Fills the edgeList with unique alphaEdges. If an edge is already contained a pointer to it is returned and inserted edge is removed.

Definition at line 334 of file delaunaytriangulator.C.

References edgeList.

Referenced by computeAlphaComplex().

◆ giveTimeReport()

void oofem::DelaunayTriangulator::giveTimeReport ( )
private

Prints the time report.

Definition at line 437 of file delaunaytriangulator.C.

References creativeTimer, meshingTimer, polygonTimer, and searchingTimer.

◆ initializeTimers()

void oofem::DelaunayTriangulator::initializeTimers ( )
private

Initializes Timers and.

Definition at line 385 of file delaunaytriangulator.C.

References creativeTimer, meshingTimer, polygonTimer, and searchingTimer.

Referenced by generateMesh().

◆ meshPolygon()

void oofem::DelaunayTriangulator::meshPolygon ( int insertedNode,
InsertTriangleBasedOnCircumcircle & tInsert,
std ::list< Edge2D > & polygon )
private

Retriangulates the polygon.

Definition at line 421 of file delaunaytriangulator.C.

References creativeTimer, domain, generalTriangleList, and triangleOctree.

Referenced by generateMesh().

◆ writeMesh()

void oofem::DelaunayTriangulator::writeMesh ( )
private

Writes the mesh into the domain by creating new tr1_2d_pfem elements and prescribes zero-pressure boundary condition on alpha-shape nodes.

Definition at line 135 of file delaunaytriangulator.C.

References alphaShapeEdgeList, alphaValue, domain, generalTriangleList, oofem::PFEM::giveAssociatedCrossSectionNumber(), oofem::PFEM::giveAssociatedMaterialNumber(), oofem::PFEM::giveAssociatedPressureBC(), oofem::Dof::setBcId(), and oofem::PFEMParticle::setOnAlphaShape().

Referenced by generateMesh().

Member Data Documentation

◆ alphaShapeEdgeList

std :: list< AlphaEdge2D * > oofem::DelaunayTriangulator::alphaShapeEdgeList
protected

Contains resulting alpha-shape in form of a list.

Definition at line 91 of file delaunaytriangulator.h.

Referenced by DelaunayTriangulator(), giveAlphaShape(), and writeMesh().

◆ alphaValue

double oofem::DelaunayTriangulator::alphaValue
protected

◆ creativeTimer

Timer oofem::DelaunayTriangulator::creativeTimer
protected

Measures time needed for creating new Delaunay triangles.

Definition at line 86 of file delaunaytriangulator.h.

Referenced by giveTimeReport(), initializeTimers(), and meshPolygon().

◆ domain

Domain* oofem::DelaunayTriangulator::domain
protected

Domain of the PFEM problem containing nodes to be triangulated.

Definition at line 70 of file delaunaytriangulator.h.

Referenced by buildInitialBBXMesh(), computeBBXBasedOnNodeData(), DelaunayTriangulator(), findNonDelaunayTriangles(), generateMesh(), meshPolygon(), and writeMesh().

◆ edgeList

std :: list< AlphaEdge2D * > oofem::DelaunayTriangulator::edgeList
protected

contains all edges of the triangulation

Definition at line 94 of file delaunaytriangulator.h.

Referenced by computeAlphaComplex(), giveAlphaShape(), giveBackEdgeIfAlreadyContainedInList(), and ~DelaunayTriangulator().

◆ generalTriangleList

std :: list< DelaunayTriangle * > oofem::DelaunayTriangulator::generalTriangleList
protected

Contains all triangles (even not valid).

Definition at line 88 of file delaunaytriangulator.h.

Referenced by buildInitialBBXMesh(), cleanUpTriangleList(), computeAlphaComplex(), generateMesh(), meshPolygon(), writeMesh(), and ~DelaunayTriangulator().

◆ meshingTimer

Timer oofem::DelaunayTriangulator::meshingTimer
protected

Measures overall time of triangulation procedure.

Definition at line 80 of file delaunaytriangulator.h.

Referenced by giveTimeReport(), and initializeTimers().

◆ nnode

int oofem::DelaunayTriangulator::nnode
protected

◆ polygonTimer

Timer oofem::DelaunayTriangulator::polygonTimer
protected

Measures time needed for identifying polygon to be retriangulated.

Definition at line 84 of file delaunaytriangulator.h.

Referenced by findNonDelaunayTriangles(), giveTimeReport(), and initializeTimers().

◆ searchingTimer

Timer oofem::DelaunayTriangulator::searchingTimer
protected

Measures time needed by searching for non-delaunay triangles.

Definition at line 82 of file delaunaytriangulator.h.

Referenced by findNonDelaunayTriangles(), giveTimeReport(), and initializeTimers().

◆ triangleOctree

OctreeSpatialLocalizerT< DelaunayTriangle * > oofem::DelaunayTriangulator::triangleOctree
protected

Octree with Delaunay triangles allowing fast search.

Definition at line 97 of file delaunaytriangulator.h.

Referenced by buildInitialBBXMesh(), DelaunayTriangulator(), findNonDelaunayTriangles(), generateMesh(), and meshPolygon().


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

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011