|
OOFEM 3.0
|
#include <delaunaytriangulator.h>
Public Member Functions | |
| DelaunayTriangulator (Domain *d, double setAlpha) | |
| Constructor. | |
| ~DelaunayTriangulator () | |
| Destructor. | |
| void | generateMesh () |
| Main call. | |
Protected Attributes | |
| Domain * | domain |
| 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. | |
| AlphaEdge2D * | giveBackEdgeIfAlreadyContainedInList (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. | |
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.
Definition at line 66 of file delaunaytriangulator.h.
| oofem::DelaunayTriangulator::DelaunayTriangulator | ( | Domain * | d, |
| double | setAlpha ) |
Constructor.
Definition at line 50 of file delaunaytriangulator.C.
References alphaShapeEdgeList, alphaValue, domain, nnode, and triangleOctree.
| oofem::DelaunayTriangulator::~DelaunayTriangulator | ( | ) |
Destructor.
Definition at line 61 of file delaunaytriangulator.C.
References edgeList, and generalTriangleList.
|
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().
|
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().
|
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().
|
private |
Reads the triangulation and fills tha edgeList container with alpha-shape edges and set their bounds.
Definition at line 219 of file delaunaytriangulator.C.
References edgeList, generalTriangleList, giveBackEdgeIfAlreadyContainedInList(), oofem::AlphaEdge2D::giveInnerAlphaBound(), oofem::AlphaEdge2D::giveOuterAlphaBound(), oofem::min(), oofem::AlphaEdge2D::setHullFlag(), oofem::AlphaEdge2D::setInnerAlphaBound(), oofem::AlphaEdge2D::setOuterAlphaBound(), and oofem::AlphaEdge2D::setSharing().
Referenced by generateMesh().
|
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().
|
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().
| void oofem::DelaunayTriangulator::generateMesh | ( | ) |
Main call.
Definition at line 94 of file delaunaytriangulator.C.
References alphaValue, buildInitialBBXMesh(), cleanUpTriangleList(), computeAlphaComplex(), domain, findNonDelaunayTriangles(), generalTriangleList, giveAlphaShape(), initializeTimers(), oofem::PFEMParticle::isActive(), meshPolygon(), nnode, triangleOctree, VERBOSE_PRINT0, and writeMesh().
Referenced by oofem::PFEM::preInitializeNextStep().
|
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().
|
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().
|
private |
Prints the time report.
Definition at line 437 of file delaunaytriangulator.C.
References creativeTimer, meshingTimer, polygonTimer, and searchingTimer.
|
private |
Initializes Timers and.
Definition at line 385 of file delaunaytriangulator.C.
References creativeTimer, meshingTimer, polygonTimer, and searchingTimer.
Referenced by generateMesh().
|
private |
Retriangulates the polygon.
Definition at line 421 of file delaunaytriangulator.C.
References creativeTimer, domain, generalTriangleList, and triangleOctree.
Referenced by generateMesh().
|
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().
|
protected |
Contains resulting alpha-shape in form of a list.
Definition at line 91 of file delaunaytriangulator.h.
Referenced by DelaunayTriangulator(), giveAlphaShape(), and writeMesh().
|
protected |
Definition at line 72 of file delaunaytriangulator.h.
Referenced by DelaunayTriangulator(), generateMesh(), giveAlphaShape(), and writeMesh().
|
protected |
Measures time needed for creating new Delaunay triangles.
Definition at line 86 of file delaunaytriangulator.h.
Referenced by giveTimeReport(), initializeTimers(), and meshPolygon().
|
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().
|
protected |
contains all edges of the triangulation
Definition at line 94 of file delaunaytriangulator.h.
Referenced by computeAlphaComplex(), giveAlphaShape(), giveBackEdgeIfAlreadyContainedInList(), and ~DelaunayTriangulator().
|
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().
|
protected |
Measures overall time of triangulation procedure.
Definition at line 80 of file delaunaytriangulator.h.
Referenced by giveTimeReport(), and initializeTimers().
|
protected |
Definition at line 74 of file delaunaytriangulator.h.
Referenced by buildInitialBBXMesh(), cleanUpTriangleList(), computeBBXBasedOnNodeData(), DelaunayTriangulator(), and generateMesh().
|
protected |
Measures time needed for identifying polygon to be retriangulated.
Definition at line 84 of file delaunaytriangulator.h.
Referenced by findNonDelaunayTriangles(), giveTimeReport(), and initializeTimers().
|
protected |
Measures time needed by searching for non-delaunay triangles.
Definition at line 82 of file delaunaytriangulator.h.
Referenced by findNonDelaunayTriangles(), giveTimeReport(), and initializeTimers().
|
protected |
Octree with Delaunay triangles allowing fast search.
Definition at line 97 of file delaunaytriangulator.h.
Referenced by buildInitialBBXMesh(), DelaunayTriangulator(), findNonDelaunayTriangles(), generateMesh(), and meshPolygon().