MAIA bb96820c
Multiphysics at AIA
|
#include <geometry2d.h>
Public Member Functions | |
Geometry2D (const MInt solverId_, const MPI_Comm comm) | |
Geometry2D (const MInt solverId_, const MString filename, const MPI_Comm comm) | |
~Geometry2D () | |
virtual MInt | getLineIntersectionElements (MFloat *targetRegion, std::vector< MInt > &nodeList) |
Returns the ids of all elements, cut by a orthogonal line (or rectangular region) More... | |
virtual MInt | getLineIntersectionElementsOld1 (MFloat *targetRegion, std::vector< MInt > &nodeList) |
virtual MInt | getLineIntersectionElementsOld2 (MFloat *targetRegion, MInt *spaceDirection, std::vector< MInt > &nodeList) |
virtual MInt | getIntersectionElements (MFloat *targetRegion, std::vector< MInt > &nodeList) |
Determines all elements that are inside or intersect the target region. More... | |
virtual MInt | getIntersectionElements (MFloat *targetRegion, std::vector< MInt > &nodeList, MFloat cellHalfLength, const MFloat *const cell_coords) |
Detemines whether a triangle and a gridcell intersect with the separating axis theorem (SAT) More... | |
virtual MBool | edgeTriangleIntersection (MFloat *trianglePoint1, MFloat *trianglePoint2, MFloat *trianglePoint3, MFloat *edgePoint1, MFloat *edgePoint2) |
Determine intersection between an edge and a triangle (in 2D between 2 edges) More... | |
virtual MInt | getIntersectionMBElements (MFloat *targetRegion, std::vector< MInt > &nodeList) |
virtual MInt | getLineIntersectionMBElements (MFloat *targetRegion, std::vector< MInt > &nodeList) |
virtual MInt | getSphereIntersectionMBElements (MFloat *P, MFloat radius, std::vector< MInt > &nodeList) |
virtual void | MoveAllMBElementVertex (MFloat *dx) |
virtual void | MoveMBElementVertex (MInt e, MInt v, MFloat *dx) |
virtual void | ReplaceMBElementVertex (MInt e, MInt v, MFloat *np) |
virtual void | UpdateMBNormalVector (MInt) |
virtual void | UpdateMBBoundingBox () |
virtual void | UpdateADT () |
Public Member Functions inherited from Geometry< 2 > | |
Geometry (const MInt solverId_, const MPI_Comm comm) | |
virtual | ~Geometry ()=default |
MInt | solverId () const |
MPI_Comm | mpiComm () const |
MInt | domainId () const |
MInt | noDomains () const |
GeometryContext & | geometryContext () |
void | getBoundingBox (MFloat *const bBox) const |
Returns the bounding box for the geometry. More... | |
const MFloat * | boundingBox () const |
void | setHaloElementOffset (MInt off) |
MInt | getHaloElementOffset () const |
MBool | isOnGeometry (const MFloat, const MFloat *, MString) |
MBool | vectorsEqual (MFloat *a, MFloat *b) |
Compares two vectors entry by entry. More... | |
MFloat | calcCircumference (MFloat **bndVs, MInt num) |
Returns the circumference of a segment. More... | |
virtual MInt | boundaryCheck (MFloat *, MFloat, MFloat *, MInt *) |
virtual MInt | getIntersectionElements (MFloat *, std::vector< MInt > &) |
virtual MInt | getIntersectionElements (MFloat *, std::vector< MInt > &, MFloat, const MFloat *const) |
virtual MInt | getLineIntersectionElementsOld1 (MFloat *, std::vector< MInt > &) |
virtual MInt | getLineIntersectionElementsOld2 (MFloat *, MInt *, std::vector< MInt > &) |
virtual MInt | getLineIntersectionElements (MFloat *, std::vector< MInt > &) |
virtual MInt | getLineIntersectionElements (MFloat *) |
virtual MBool | getClosestLineIntersectionLength (MInt, const std::vector< MInt > &, MFloat *, MFloat *) |
void | getLineIntersectingElementsBcIds (const MFloat *const line, std::set< MInt > &bcIds) |
Return the set of boundary condition ids of the elements cut by the given line. More... | |
virtual MBool | edgeTriangleIntersection (MFloat *, MFloat *, MFloat *, MFloat *, MFloat *) |
virtual MBool | edgeTriangleIntersectionLB (MFloat *, MFloat *, MFloat *, MFloat *, MFloat *) |
virtual MBool | getLineTriangleIntersectionSimple (MFloat *, MFloat *, MFloat *, MFloat *, MFloat *) |
virtual MBool | getLineTriangleIntersectionSimpleDistance (MFloat *, MFloat *, MFloat *, MFloat *, MFloat *, MFloat *) |
virtual MBool | getLineTriangleIntersection (const MFloat *const, const MFloat *const, const MFloat, const MFloat *const, const MFloat *const, const MFloat *const, MFloat *, MFloat *, MFloat *, MFloat *) |
void | getBoundingBoxMB (MFloat *const bBox) const |
virtual MInt | getIntersectionMBElements (MFloat *, std::vector< MInt > &) |
virtual MInt | getLineIntersectionMBElements (MFloat *, std::vector< MInt > &) |
virtual MInt | getLineIntersectionMBElements2 (MFloat *, MInt *, std::vector< MInt > &, MInt) |
virtual MInt | getSphereIntersectionMBElements (MFloat *, MFloat, std::vector< MInt > &) |
virtual void | MoveAllMBElementVertex (MFloat *) |
virtual void | MoveMBElementVertex (MInt, MInt, MFloat *) |
virtual void | ReplaceMBElementVertex (MInt, MInt, MFloat *) |
virtual void | UpdateMBNormalVector (MInt) |
virtual void | UpdateMBBoundingBox () |
virtual void | UpdateADT () |
virtual void | collectGlobalMemoryUsage () |
virtual void | writeSTL (const MChar *) |
virtual void | writeADTAndSTLToNetCDF (const MChar *) |
virtual void | writeSTLMB (const MChar *, MInt &, MInt *&) |
virtual void | readSTLNetCDF (const MChar *) |
virtual void | logStatistics () |
virtual MInt | GetNoElements () |
virtual MInt | GetNoSegments () |
virtual MInt * | GetBoundaryIds (MInt *noAllBcs) |
virtual MFloat ** | GetBoundaryVertices (MInt, MFloat *, MInt *, MInt, MInt *) |
virtual MBool | isEdgeAlreadyInCollection (std::vector< std::pair< MFloat *, MFloat * > >, MFloat *, MFloat *, MInt *) |
virtual MFloat | GetBoundarySize (MInt) |
virtual MFloat | GetBoundarySize (MFloat *, MInt *, MInt) |
virtual void | determineSegmentOwnership (MInt, MInt *, MInt *, MInt *, MInt *) |
virtual MFloat | getBndMaxRadius (MFloat **, MInt) |
virtual void | rebuildAdtTree () |
virtual void | calculateBoundingBox () |
virtual void | writeParallelGeometryVTK (MString) |
virtual void | addElement (MFloat *) |
virtual void | copyElement (MInt, MInt) |
virtual void | resizeCollector (MInt) |
MBool | pointIsInside (const MFloat *const coordinates) |
Determines if a point is inside of the geometry. More... | |
MBool | pointIsInside (const MFloat *const coordinates, MInt *numcutsperdir) |
Determines if a point is inside of the geometry. More... | |
MBool | pointIsInside2 (const MFloat *const coordinates, MInt *numcutsperdir=nullptr) |
Determines if a point is in or outside the geometry. More... | |
MBool | pointIsInsideMBElements (const MFloat *const coordinates, MInt *, MInt *, MInt) |
MBool | pointIsInsideMBElements2 (const MFloat *const coordinates, MInt *, MInt *, MInt) |
void | determineRayIntersectedElements (const MFloat *const coordinates, std::vector< std::vector< MInt > > *resultnodes) |
returns the geometry elements that have a cut with rays originating in the provided coordinates More... | |
MInt | noBoundaryIds () |
Protected Member Functions | |
virtual void | readSegments () |
void | countSegmentLinesASCII (const MString &fileName, MInt *noElements) |
counts the number of lines in an ASCII file, should be the in the first line More... | |
void | readSegmentLinesASCII (MString fileName, Collector< element< 2 > > *elemCollector, MInt bndCndId, MInt segmentId, MInt *offset) |
reads the lines in an ASCII file More... | |
void | calculateBoundingBox () |
Calculates the global bounding box of the geometry. More... | |
Protected Member Functions inherited from Geometry< 2 > | |
virtual void | readSegments () |
virtual void | writeSegmentsToDX () |
Protected Attributes | |
MBool | m_GFieldInitFromSTL |
MInt | m_levelSetIntfBndId {} |
MInt * | m_levelSetIntfBndIds {} |
MInt | m_noLevelSetIntfBndIds {} |
Protected Attributes inherited from Geometry< 2 > | |
MInt | m_noSegments |
std::array< MFloat, 2 *nDim > | m_minMax |
MInt | m_noElements |
MString | m_segmentBaseName |
bodyMap | m_bodyMap |
bodyIterator | m_bodyIt |
MInt | m_noMBElements |
MInt | m_noBoundaryIds |
MInt * | m_boundaryIds |
MInt * | m_allBCs |
MInt | m_noAllBCs |
MBool | m_flowSolver |
Static Protected Attributes | |
static constexpr const MInt | nDim = 2 |
Additional Inherited Members | |
Public Attributes inherited from Geometry< 2 > | |
std::vector< MInt > | m_segmentOffsets |
std::vector< MInt > | m_segmentOffsetsWithoutMB |
Collector< element< nDim > > * | m_elements |
element< nDim > * | elements |
GeometryAdt< nDim > * | m_adt |
Collector< element< nDim > > * | m_mbelements |
element< nDim > * | mbelements |
std::array< MFloat, 2 *nDim > | m_mbminMax |
MFloat | m_mbMidPnt [3] |
MBool * | m_ownSegmentId |
std::set< MInt > | m_uniqueOriginalTriId |
MFloat | m_parGeomMemFactor |
MString | m_inOutTest |
MBool | m_parallelGeometry |
MBool | m_debugParGeom |
MString | m_parallelGeomFileName |
Specialized 2D implementation
Definition at line 15 of file geometry2d.h.
Geometry2D::Geometry2D | ( | const MInt | solverId_, |
const MPI_Comm | comm | ||
) |
Definition at line 17 of file geometry2d.cpp.
Definition at line 98 of file geometry2d.cpp.
Geometry2D::~Geometry2D | ( | ) |
Definition at line 129 of file geometry2d.cpp.
|
protectedvirtual |
Reimplemented from Geometry< 2 >.
Definition at line 1108 of file geometry2d.cpp.
|
inlineprotected |
[in] | fileName | the name of the file to open |
[in] | the | number of entries to be returned (gets nulled in function again) |
Definition at line 1012 of file geometry2d.cpp.
|
inlinevirtual |
Reimplemented from Geometry< 2 >.
Definition at line 604 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 432 of file geometry2d.cpp.
|
virtual |
The separating axis theorem (SAT) states, that two convex polyhedra, that are to be tested against intersection are disjoint, if they can be separated along either an axis parallel to a normal of a face of the first or the second polyhedra, or along an axis formed from the cross product of an edge from them.
Algorithm:
1) Test projection onto \(x,y\)-axis Project the triangle and the gridcell onto both axes and check overlapping
2) Test if we have parallel lines. If this is the case we are done
This function replaces the other Geometry2D::getIntersectionElements, which cannot be used on IBM_BLUE_GENE.
Reimplemented from Geometry< 2 >.
Definition at line 310 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 688 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 654 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 679 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 683 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 856 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 883 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 950 of file geometry2d.cpp.
Reimplemented from Geometry< 2 >.
Definition at line 962 of file geometry2d.cpp.
|
inlineprotected |
[in] | fileName | the name of the file to open |
[in] | etc.. |
Definition at line 1041 of file geometry2d.cpp.
|
protectedvirtual |
Reimplemented from Geometry< 2 >.
Definition at line 141 of file geometry2d.cpp.
Reimplemented from Geometry< 2 >.
Definition at line 970 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 997 of file geometry2d.cpp.
|
virtual |
Reimplemented from Geometry< 2 >.
Definition at line 977 of file geometry2d.cpp.
|
inlinevirtual |
|
protected |
Definition at line 47 of file geometry2d.h.
|
protected |
Definition at line 48 of file geometry2d.h.
|
protected |
Definition at line 49 of file geometry2d.h.
|
protected |
Definition at line 50 of file geometry2d.h.
|
staticconstexprprotected |
Definition at line 52 of file geometry2d.h.