MAIA bb96820c
Multiphysics at AIA
Loading...
Searching...
No Matches
Geometry< nDim > Class Template Reference

#include <geometry.h>

Inheritance diagram for Geometry< nDim >:
[legend]
Collaboration diagram for Geometry< nDim >:
[legend]

Public Member Functions

 Geometry (const MInt solverId_, const MPI_Comm comm)
 
virtual ~Geometry ()=default
 
MInt solverId () const
 
MPI_Comm mpiComm () const
 
MInt domainId () const
 
MInt noDomains () const
 
GeometryContextgeometryContext ()
 
void getBoundingBox (MFloat *const bBox) const
 Returns the bounding box for the geometry. More...
 
const MFloatboundingBox () 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 MIntGetBoundaryIds (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 ()
 

Public Attributes

std::vector< MIntm_segmentOffsets
 
std::vector< MIntm_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]
 
MBoolm_ownSegmentId = nullptr
 
std::set< MIntm_uniqueOriginalTriId
 
MFloat m_parGeomMemFactor
 
MString m_inOutTest
 
MBool m_parallelGeometry = false
 
MBool m_debugParGeom = false
 
MString m_parallelGeomFileName
 

Protected Member Functions

virtual void readSegments ()
 
virtual void writeSegmentsToDX ()
 

Protected Attributes

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
 
MIntm_boundaryIds
 
MIntm_allBCs = nullptr
 
MInt m_noAllBCs
 
MBool m_flowSolver
 

Private Attributes

const MInt m_solverId
 
const MPI_Comm m_mpiComm
 
MInt m_domainId
 
MInt m_noDomains
 
GeometryContext m_geometryContext
 
MInt m_haloElementOffset
 

Friends

template<MInt nDim_>
class GeometryAdt
 

Detailed Description

template<MInt nDim>
class Geometry< nDim >

Basic implementation

Definition at line 36 of file geometry.h.

Constructor & Destructor Documentation

◆ Geometry()

template<MInt nDim>
Geometry< nDim >::Geometry ( const MInt  solverId_,
const MPI_Comm  comm 
)

◆ ~Geometry()

template<MInt nDim>
virtual Geometry< nDim >::~Geometry ( )
virtualdefault

Member Function Documentation

◆ addElement()

template<MInt nDim>
virtual void Geometry< nDim >::addElement ( MFloat )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 168 of file geometry.h.

168{};

◆ boundaryCheck()

template<MInt nDim>
virtual MInt Geometry< nDim >::boundaryCheck ( MFloat ,
MFloat  ,
MFloat ,
MInt  
)
inlinevirtual

Definition at line 59 of file geometry.h.

60 {
61 return false;
62 };

◆ boundingBox()

template<MInt nDim>
const MFloat * Geometry< nDim >::boundingBox ( ) const
inline

Definition at line 50 of file geometry.h.

50{ return &m_minMax[0]; }
std::array< MFloat, 2 *nDim > m_minMax
Definition: geometry.h:187

◆ calcCircumference()

template<MInt nDim>
MFloat Geometry< nDim >::calcCircumference ( MFloat **  bndVs,
MInt  num 
)
Author
Andreas Lintermann
Date
17.09.2015
Parameters
[in]bndVsholds the edges of the boundary
[in]numsize of the input array
Returns
the circumference

Definition at line 133 of file geometry.cpp.

133 {
134 MFloat circ = 0.0;
135 MFloat tmp_length = 0.0;
136 std::array<MFloat, nDim> edge;
137 for(MInt i = 0; i < num; i++) {
138 tmp_length = 0.0;
139 for(MInt j = 0; j < nDim; j++) {
140 edge[j] = bndVs[(i + 1) % num][j] - bndVs[i][j];
141 tmp_length += edge[j] * edge[j];
142 }
143 circ += sqrt(tmp_length);
144 }
145
146 return circ;
147}
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52

◆ calculateBoundingBox()

template<MInt nDim>
virtual void Geometry< nDim >::calculateBoundingBox ( )
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 166 of file geometry.h.

166{};

◆ collectGlobalMemoryUsage()

template<MInt nDim>
virtual void Geometry< nDim >::collectGlobalMemoryUsage ( )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 134 of file geometry.h.

134{};

◆ copyElement()

template<MInt nDim>
virtual void Geometry< nDim >::copyElement ( MInt  ,
MInt   
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 169 of file geometry.h.

169{};

◆ determineRayIntersectedElements()

template<MInt nDim>
void Geometry< nDim >::determineRayIntersectedElements ( const MFloat *const  coordinates,
std::vector< std::vector< MInt > > *  resultnodes 
)
Author
Andreas Lintermann
Date
04.05.2016

The algorithm does the following

  1. create the orginal target from the coordinates
  2. do the check for all directions 2.1 create a ray from current target to bounding box in direction dim 2.2 get the intersecting elements 2.3 create the resulting nodes vector
Parameters
[in]coordinatesthe original coordinates to cast rays from
[in]resultnodescontains the intersected elements per direction

Definition at line 696 of file geometry.cpp.

697 {
698 TRACE();
699
700 std::vector<MInt> nodeList;
701 const MFloat* bb = boundingBox();
702
703 // 1. create the orginal target from the coordinates
704 std::array<MFloat, nDim * 2> target;
705 for(MInt j = 0; j < nDim; j++) {
706 target[j] = coordinates[j];
707 target[j + nDim] = coordinates[j];
708 }
709
710 // 2. do the check for all directions
711 for(MInt dim = 0; dim < nDim; dim++) {
712 // 2.1 create a ray from current target to bounding box in direction dim
713 std::array<MFloat, nDim * 2> raybb;
714 for(MInt j = 0; j < 2 * nDim; j++)
715 raybb[j] = target[j];
716 raybb[dim] = bb[dim] - (target[dim] - bb[dim]);
717
718 // 2.2 get the intersecting elements
719 getLineIntersectionElements(raybb.data(), nodeList);
720
721 // 2.3 create the resulting nodes vector
722 vector<MInt> v;
723 for(MInt i = 0; i < (signed)nodeList.size(); i++)
724 v.push_back(nodeList[i]);
725
726 resultnodes->push_back(v);
727 }
728}
const MFloat * boundingBox() const
Definition: geometry.h:50
virtual MInt getLineIntersectionElements(MFloat *, std::vector< MInt > &)
Definition: geometry.h:73

◆ determineSegmentOwnership()

template<MInt nDim>
virtual void Geometry< nDim >::determineSegmentOwnership ( MInt  ,
MInt ,
MInt ,
MInt ,
MInt  
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 161 of file geometry.h.

162 {};

◆ domainId()

template<MInt nDim>
MInt Geometry< nDim >::domainId ( ) const
inline

Definition at line 46 of file geometry.h.

46{ return m_domainId; }
MInt m_domainId
Definition: geometry.h:206

◆ edgeTriangleIntersection()

template<MInt nDim>
virtual MBool Geometry< nDim >::edgeTriangleIntersection ( MFloat ,
MFloat ,
MFloat ,
MFloat ,
MFloat  
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 82 of file geometry.h.

86 {
87 return 0;
88 };

◆ edgeTriangleIntersectionLB()

template<MInt nDim>
virtual MBool Geometry< nDim >::edgeTriangleIntersectionLB ( MFloat ,
MFloat ,
MFloat ,
MFloat ,
MFloat  
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 89 of file geometry.h.

93 {
94 return 0;
95 };

◆ geometryContext()

template<MInt nDim>
GeometryContext & Geometry< nDim >::geometryContext ( )
inline

Definition at line 48 of file geometry.h.

48{ return m_geometryContext; }
GeometryContext m_geometryContext
Definition: geometry.h:208

◆ getBndMaxRadius()

template<MInt nDim>
virtual MFloat Geometry< nDim >::getBndMaxRadius ( MFloat **  ,
MInt   
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 163 of file geometry.h.

163{ return F0; };

◆ GetBoundaryIds()

template<MInt nDim>
virtual MInt * Geometry< nDim >::GetBoundaryIds ( MInt noAllBcs)
inlinevirtual

Definition at line 146 of file geometry.h.

146 {
147 *noAllBcs = m_noAllBCs;
148 return m_allBCs;
149 };
MInt m_noAllBCs
Definition: geometry.h:199
MInt * m_allBCs
Definition: geometry.h:198

◆ GetBoundarySize() [1/2]

template<MInt nDim>
virtual MFloat Geometry< nDim >::GetBoundarySize ( MFloat ,
MInt ,
MInt   
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 160 of file geometry.h.

160{ return F0; };

◆ GetBoundarySize() [2/2]

template<MInt nDim>
virtual MFloat Geometry< nDim >::GetBoundarySize ( MInt  )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 159 of file geometry.h.

159{ return F0; };

◆ GetBoundaryVertices()

template<MInt nDim>
virtual MFloat ** Geometry< nDim >::GetBoundaryVertices ( MInt  ,
MFloat ,
MInt ,
MInt  ,
MInt  
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 151 of file geometry.h.

152 {
153 return nullptr;
154 };

◆ getBoundingBox()

template<MInt nDim>
void Geometry< nDim >::getBoundingBox ( MFloat *const  bBox) const

Definition at line 84 of file geometry.cpp.

84 {
85 for(MInt i = 0; i < nDim * 2; i++) {
86 bBox[i] = m_minMax[i];
87 }
88}

◆ getBoundingBoxMB()

template<MInt nDim>
void Geometry< nDim >::getBoundingBoxMB ( MFloat *const  bBox) const

Definition at line 92 of file geometry.cpp.

92 {
93 for(MInt i = 0; i < nDim * 2; i++) {
94 bBox[i] = m_mbminMax[i];
95 }
96}
std::array< MFloat, 2 *nDim > m_mbminMax
Definition: geometry.h:219

◆ getClosestLineIntersectionLength()

template<MInt nDim>
virtual MBool Geometry< nDim >::getClosestLineIntersectionLength ( MInt  ,
const std::vector< MInt > &  ,
MFloat ,
MFloat  
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 75 of file geometry.h.

76 {
77 return false;
78 };

◆ getHaloElementOffset()

template<MInt nDim>
MInt Geometry< nDim >::getHaloElementOffset ( ) const
inline

Definition at line 52 of file geometry.h.

52{ return m_haloElementOffset; }
MInt m_haloElementOffset
Definition: geometry.h:209

◆ getIntersectionElements() [1/2]

template<MInt nDim>
virtual MInt Geometry< nDim >::getIntersectionElements ( MFloat ,
std::vector< MInt > &   
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 63 of file geometry.h.

63{ return 0; };

◆ getIntersectionElements() [2/2]

template<MInt nDim>
virtual MInt Geometry< nDim >::getIntersectionElements ( MFloat ,
std::vector< MInt > &  ,
MFloat  ,
const MFloat * const   
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 64 of file geometry.h.

65 {
66 return 0;
67 };

◆ getIntersectionMBElements()

template<MInt nDim>
virtual MInt Geometry< nDim >::getIntersectionMBElements ( MFloat ,
std::vector< MInt > &   
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 119 of file geometry.h.

119{ return 0; }

◆ getLineIntersectingElementsBcIds()

template<MInt nDim>
void Geometry< nDim >::getLineIntersectingElementsBcIds ( const MFloat *const  line,
std::set< MInt > &  bcIds 
)

Definition at line 733 of file geometry.cpp.

733 {
734 std::vector<MInt> nodeList;
735 MFloat tmp_line[2 * nDim];
736 std::copy_n(line, 2 * nDim, tmp_line);
737
738 getLineIntersectionElements(tmp_line, nodeList);
739
740 bcIds.clear();
741 for(MInt i = 0; i < (signed)nodeList.size(); i++) {
742 const MInt bndCndId = elements[nodeList[i]].m_bndCndId;
743 bcIds.insert(bndCndId);
744 }
745}
element< nDim > * elements
Definition: geometry.h:215

◆ getLineIntersectionElements() [1/2]

template<MInt nDim>
virtual MInt Geometry< nDim >::getLineIntersectionElements ( MFloat )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 74 of file geometry.h.

74{ return 0; };

◆ getLineIntersectionElements() [2/2]

template<MInt nDim>
virtual MInt Geometry< nDim >::getLineIntersectionElements ( MFloat ,
std::vector< MInt > &   
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 73 of file geometry.h.

73{ return 0; };

◆ getLineIntersectionElementsOld1()

template<MInt nDim>
virtual MInt Geometry< nDim >::getLineIntersectionElementsOld1 ( MFloat ,
std::vector< MInt > &   
)
inlinevirtual

Reimplemented in Geometry2D.

Definition at line 68 of file geometry.h.

68{ return 0; };

◆ getLineIntersectionElementsOld2()

template<MInt nDim>
virtual MInt Geometry< nDim >::getLineIntersectionElementsOld2 ( MFloat ,
MInt ,
std::vector< MInt > &   
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 69 of file geometry.h.

70 {
71 return 0;
72 };

◆ getLineIntersectionMBElements()

template<MInt nDim>
virtual MInt Geometry< nDim >::getLineIntersectionMBElements ( MFloat ,
std::vector< MInt > &   
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 120 of file geometry.h.

120{ return 0; }

◆ getLineIntersectionMBElements2()

template<MInt nDim>
virtual MInt Geometry< nDim >::getLineIntersectionMBElements2 ( MFloat ,
MInt ,
std::vector< MInt > &  ,
MInt   
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 121 of file geometry.h.

122 {
123 return 0;
124 }

◆ getLineTriangleIntersection()

template<MInt nDim>
virtual MBool Geometry< nDim >::getLineTriangleIntersection ( const MFloat * const  ,
const MFloat * const  ,
const  MFloat,
const MFloat * const  ,
const MFloat * const  ,
const MFloat * const  ,
MFloat ,
MFloat ,
MFloat ,
MFloat  
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 105 of file geometry.h.

114 {
115 return false;
116 };

◆ getLineTriangleIntersectionSimple()

template<MInt nDim>
virtual MBool Geometry< nDim >::getLineTriangleIntersectionSimple ( MFloat ,
MFloat ,
MFloat ,
MFloat ,
MFloat  
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 97 of file geometry.h.

98 {
99 return false;
100 };

◆ getLineTriangleIntersectionSimpleDistance()

template<MInt nDim>
virtual MBool Geometry< nDim >::getLineTriangleIntersectionSimpleDistance ( MFloat ,
MFloat ,
MFloat ,
MFloat ,
MFloat ,
MFloat  
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 101 of file geometry.h.

102 {
103 return false;
104 };

◆ GetNoElements()

template<MInt nDim>
virtual MInt Geometry< nDim >::GetNoElements ( )
inlinevirtual

Definition at line 144 of file geometry.h.

144{ return m_noElements; };
MInt m_noElements
Definition: geometry.h:189

◆ GetNoSegments()

template<MInt nDim>
virtual MInt Geometry< nDim >::GetNoSegments ( )
inlinevirtual

Definition at line 145 of file geometry.h.

145{ return m_noSegments; };
MInt m_noSegments
Definition: geometry.h:185

◆ getSphereIntersectionMBElements()

template<MInt nDim>
virtual MInt Geometry< nDim >::getSphereIntersectionMBElements ( MFloat ,
MFloat  ,
std::vector< MInt > &   
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 125 of file geometry.h.

125 {
126 return 0;
127 };

◆ isEdgeAlreadyInCollection()

template<MInt nDim>
virtual MBool Geometry< nDim >::isEdgeAlreadyInCollection ( std::vector< std::pair< MFloat *, MFloat * > >  ,
MFloat ,
MFloat ,
MInt  
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 155 of file geometry.h.

156 {
157 return false;
158 };

◆ isOnGeometry()

template<MInt nDim>
MBool Geometry< nDim >::isOnGeometry ( const MFloat  cellHalfLength,
const MFloat coordinates,
MString  gridCutTest 
)

Definition at line 748 of file geometry.cpp.

748 {
749 MFloat target[2 * nDim] = {0.0};
750 std::vector<MInt> nodeList;
751
752 for(MInt dim = 0; dim < nDim; dim++) {
753 target[dim] = coordinates[dim] - cellHalfLength;
754 target[dim + nDim] = coordinates[dim] + cellHalfLength;
755 }
756
757 if(gridCutTest == "SAT") {
758 this->getIntersectionElements(target, nodeList, cellHalfLength, coordinates);
759 } else {
760 this->getIntersectionElements(target, nodeList);
761 }
762
763 return nodeList.size() > 0;
764}
virtual MInt getIntersectionElements(MFloat *, std::vector< MInt > &)
Definition: geometry.h:63

◆ logStatistics()

template<MInt nDim>
virtual void Geometry< nDim >::logStatistics ( )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 142 of file geometry.h.

142{};

◆ MoveAllMBElementVertex()

template<MInt nDim>
virtual void Geometry< nDim >::MoveAllMBElementVertex ( MFloat )
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 128 of file geometry.h.

128{};

◆ MoveMBElementVertex()

template<MInt nDim>
virtual void Geometry< nDim >::MoveMBElementVertex ( MInt  ,
MInt  ,
MFloat  
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 129 of file geometry.h.

129{};

◆ mpiComm()

template<MInt nDim>
MPI_Comm Geometry< nDim >::mpiComm ( ) const
inline

Definition at line 45 of file geometry.h.

45{ return m_mpiComm; }
const MPI_Comm m_mpiComm
Definition: geometry.h:205

◆ noBoundaryIds()

template<MInt nDim>
MInt Geometry< nDim >::noBoundaryIds ( )
inline

Definition at line 221 of file geometry.h.

221{ return m_noBoundaryIds; }
MInt m_noBoundaryIds
Definition: geometry.h:196

◆ noDomains()

template<MInt nDim>
MInt Geometry< nDim >::noDomains ( ) const
inline

Definition at line 47 of file geometry.h.

47{ return m_noDomains; }
MInt m_noDomains
Definition: geometry.h:207

◆ pointIsInside() [1/2]

template<MInt nDim>
MBool Geometry< nDim >::pointIsInside ( const MFloat *const  coordinates)
Author
(Miro Gondrum refactored; original by Lintermann/Schlottke)
Date
20.10.2020
Parameters
[in]coordinatesthe coordinates to test for inside/outside
[out]numcutsperdirthe number of cuts per direction
Returns
if the point is inside the geometry (inside=true; outside=false)

Definition at line 158 of file geometry.cpp.

158 {
159 std::array<MInt, nDim> numcutsperdir{};
160 return pointIsInside(coordinates, numcutsperdir.data());
161}
MBool pointIsInside(const MFloat *const coordinates)
Determines if a point is inside of the geometry.
Definition: geometry.cpp:158

◆ pointIsInside() [2/2]

template<MInt nDim>
MBool Geometry< nDim >::pointIsInside ( const MFloat *const  coordinates,
MInt numcutsperdir 
)
Author
(Miro Gondrum refactored; original by Lintermann/Schlottke)
Date
20.10.2020
Parameters
[in]coordinatesthe coordinates to test for inside/outside
[out]numcutsperdirthe number of cuts per direction
Returns
if the point is inside the geometry (inside=true; outside=false)

Definition at line 172 of file geometry.cpp.

172 {
173 // TODO labels:GEOM,toenhance This function is not considering the distance from the next triangle.
174 // If coordinates is located exactly on the surface the result
175 // (inside/outside) is depended on its orientation.
176 // By using distance to next element and one single ray the state
177 // (inside/outside) should be defined better.
178 TRACE();
179
180 const MFloat* const box = boundingBox();
181 MBool isInside = true;
182 for(MInt dir = 0; dir < nDim; dir++) {
183 // cast ray between point in question and a point out side the domain
184 array<MFloat, 2 * nDim> ray;
185 for(MInt i = 0; i < nDim; i++) {
186 ray[i] = coordinates[i];
187 ray[i + nDim] = coordinates[i]; // point in question
188 }
189 ray[dir] = box[dir] - (ray[dir] - box[dir]); // outside point
190
191 // get list of intersecting geometry elements
192 std::vector<MInt> nodeList;
193 getLineIntersectionElements(&ray[0], nodeList);
194 numcutsperdir[dir] = nodeList.size();
195 isInside = isInside && (numcutsperdir[dir] % 2 == 0);
196 }
197 return isInside;
198}
bool MBool
Definition: maiatypes.h:58

◆ pointIsInside2()

template<MInt nDim>
MBool Geometry< nDim >::pointIsInside2 ( const MFloat *const  coordinates,
MInt numcutsperdir = nullptr 
)
Author
Andreas Lintermann
Date
21.09.2015
Parameters
[in]coordinatesthe coordinates to test for inside/outside
[in]thenumber of cuts per direction to be retunred
Returns
if the point is inside (false) or outside (true)

Definition at line 213 of file geometry.cpp.

213 {
214 TRACE();
215 MInt noNodes = 0;
216 std::vector<MInt> nodeList;
217
218 const MBool onlyCheck = (numcutsperdir == nullptr);
219
220 MInt spaceDirectionId[3];
221 MFloat target[6];
222 const MFloat* tmp = boundingBox();
223
224 // 1. Take an arbitrary unmarked cell
225 // Cast rays in x,y and z direction and check for intersections
226 for(MInt j = 0; j < nDim; j++) {
227 target[j] = coordinates[j];
228 target[j + nDim] = coordinates[j];
229 }
230
231 target[0] = tmp[0] - (target[0] - tmp[0]); // x-ray to bounding box
232
233 if(m_inOutTest == "perpOp") {
234 getLineIntersectionElements(target, nodeList);
235 } else {
236 spaceDirectionId[0] = 1;
237 spaceDirectionId[1] = 2;
238 spaceDirectionId[2] = 0;
239 getLineIntersectionElementsOld2(target, spaceDirectionId, nodeList);
240 }
241 const MInt noNodesX = nodeList.size();
242
243 for(MInt j = 0; j < nDim; j++) {
244 target[j] = coordinates[j];
245 target[j + nDim] = coordinates[j];
246 }
247
248 target[1] = tmp[1] - (target[1] - tmp[1]); // y-ray to bounding box
249 nodeList.clear();
250 if(m_inOutTest == "perpOp") {
251 getLineIntersectionElements(target, nodeList);
252 } else {
253 spaceDirectionId[0] = 2;
254 spaceDirectionId[1] = 0;
255 spaceDirectionId[2] = 1;
256 getLineIntersectionElementsOld2(target, spaceDirectionId, nodeList);
257 }
258 const MInt noNodesY = nodeList.size();
259
260 // if modulo for x and y do not match return early if the number of cuts per direction is not needed
261 if(onlyCheck) {
262 if(noNodesX % 2 != noNodesY % 2) {
263 return false;
264 }
265 }
266
267 // only for 3D
268 MInt noNodesZ = 0;
269 IF_CONSTEXPR(nDim == 3) {
270 for(MInt j = 0; j < nDim; j++) {
271 target[j] = coordinates[j];
272 target[j + nDim] = coordinates[j];
273 }
274
275 target[2] = tmp[2] - (target[2] - tmp[2]); // z-ray to bounding box
276 // 2.b and c
277 nodeList.clear();
278 if(m_inOutTest == "perpOp") {
279 getLineIntersectionElements(target, nodeList);
280 } else {
281 spaceDirectionId[0] = 0;
282 spaceDirectionId[1] = 1;
283 spaceDirectionId[2] = 2;
284 getLineIntersectionElementsOld2(target, spaceDirectionId, nodeList);
285 }
286 noNodesZ = nodeList.size();
287
288 if(noNodesX % 2 == noNodesY % 2 && noNodesX % 2 == noNodesZ % 2) {
289 noNodes = noNodesX;
290 } else {
291 // cerr << " Different results for ray intersection, casting further rays. " << endl;
292 // if(noNodesX)
293 // noNodes = noNodesX;
294 // else if(noNodesY)
295 // noNodes = noNodesY;
296 // else
297 // noNodes = noNodesZ;
298 noNodes = 1;
299 }
300 }
301 else {
302 if(noNodesX % 2 == noNodesY % 2) {
303 noNodes = noNodesX;
304 } else {
305 // cerr << " Different results for ray intersection, casting further rays. " << endl;
306 noNodes = 1;
307 }
308 }
309
310 if(!onlyCheck) {
311 numcutsperdir[0] = noNodesX;
312 numcutsperdir[1] = noNodesY;
313 numcutsperdir[2] = noNodesZ;
314 }
315
316 if(noNodes % 2) {
317 return false;
318 } else {
319 return true;
320 }
321}
virtual MInt getLineIntersectionElementsOld2(MFloat *, MInt *, std::vector< MInt > &)
Definition: geometry.h:69
MString m_inOutTest
Definition: geometry.h:225

◆ pointIsInsideMBElements()

template<MInt nDim>
MBool Geometry< nDim >::pointIsInsideMBElements ( const MFloat *const  coordinates,
MInt bodyBndryCndIds,
MInt setToBodiesTable,
MInt  noBodiesInSet 
)

Definition at line 326 of file geometry.cpp.

329 {
330 TRACE();
331
332 MInt noNodes;
333 MInt noNodesX_set = 0;
334 MInt noNodesY_set = 0;
335 MInt noNodesZ_set = 0;
336 MInt body;
337 MInt bcId;
338 std::vector<MInt> nodeList;
339
340 MFloat target[2 * nDim]{};
341 MFloat tmp[2 * nDim]{};
342 getBoundingBoxMB(&tmp[0]);
343
344 // 1. Take an arbitrary unmarked cell
345 // Cast rays in x,y and z direction and check for intersections
346 for(MInt j = 0; j < nDim; j++) {
347 target[j] = coordinates[j];
348 target[j + nDim] = coordinates[j];
349 }
350 target[0] = tmp[0] - (target[0] - tmp[0]); // x-ray to bounding box
351 getLineIntersectionMBElements(target, nodeList);
352 const MInt noNodesX = nodeList.size();
353 for(MInt node = 0; node < noNodesX; node++) {
354 for(MInt b = 0; b < noBodiesInSet; b++) {
355 body = setToBodiesTable[b];
356 bcId = bodyBndryCndIds[body];
357 if(mbelements[nodeList[node]].m_bndCndId == bcId) {
358 noNodesX_set++;
359 break;
360 }
361 }
362 }
363
364 for(MInt j = 0; j < nDim; j++) {
365 target[j] = coordinates[j];
366 target[j + nDim] = coordinates[j];
367 }
368 target[1] = tmp[1] - (target[1] - tmp[1]); // y-ray to bounding box
369 nodeList.clear();
370 getLineIntersectionMBElements(target, nodeList);
371 const MInt noNodesY = nodeList.size();
372 for(MInt node = 0; node < noNodesY; node++) {
373 for(MInt b = 0; b < noBodiesInSet; b++) {
374 body = setToBodiesTable[b];
375 bcId = bodyBndryCndIds[body];
376 if(mbelements[nodeList[node]].m_bndCndId == bcId) {
377 noNodesY_set++;
378 break;
379 }
380 }
381 }
382
383 // only for 3D
384 IF_CONSTEXPR(nDim == 3) {
385 for(MInt j = 0; j < nDim; j++) {
386 target[j] = coordinates[j];
387 target[j + nDim] = coordinates[j];
388 }
389
390 target[2] = tmp[2] - (target[2] - tmp[2]); // z-ray to bounding box
391 // 2.b and c
392 nodeList.clear();
393 getLineIntersectionMBElements(target, nodeList);
394 const MInt noNodesZ = nodeList.size();
395 for(MInt node = 0; node < noNodesZ; node++) {
396 for(MInt b = 0; b < noBodiesInSet; b++) {
397 body = setToBodiesTable[b];
398 bcId = bodyBndryCndIds[body];
399 if(mbelements[nodeList[node]].m_bndCndId == bcId) {
400 noNodesZ_set++;
401 break;
402 }
403 }
404 }
405
406 if(noNodesX_set % 2 == noNodesY_set % 2 && noNodesX_set % 2 == noNodesZ_set % 2) {
407 noNodes = noNodesX_set;
408 } else {
409 // cerr << " Different results for ray intersection, casting further rays. " << endl;
410 // if(noNodesX)
411 // noNodes = noNodesX;
412 // else if(noNodesY)
413 // noNodes = noNodesY;
414 // else
415 // noNodes = noNodesZ;
416 noNodes = 1;
417 }
418 }
419 else {
420 if(noNodesX_set % 2 == noNodesY_set % 2) {
421 noNodes = noNodesX_set;
422 } else {
423 // cerr << " Different results for ray intersection, casting further rays. " << endl;
424 noNodes = 1;
425 }
426 }
427
428 // delete [] tmp; tmp=nullptr;
429
430 if(noNodes % 2) {
431 // 3.
432 return true;
433 } else {
434 return false;
435 }
436}
element< nDim > * mbelements
Definition: geometry.h:218
void getBoundingBoxMB(MFloat *const bBox) const
Definition: geometry.cpp:92
virtual MInt getLineIntersectionMBElements(MFloat *, std::vector< MInt > &)
Definition: geometry.h:120

◆ pointIsInsideMBElements2()

template<MInt nDim>
MBool Geometry< nDim >::pointIsInsideMBElements2 ( const MFloat *const  coordinates,
MInt bodyBndryCndIds,
MInt setToBodiesTable,
MInt  noBodiesInSet 
)

Definition at line 442 of file geometry.cpp.

445 {
446 TRACE();
447
448 MInt noNodes;
449 MInt noNodesX = 0;
450 MInt noNodesY = 0;
451 MInt noNodesZ = 0;
452 MInt noNodesX_set = 0;
453 MInt noNodesY_set = 0;
454 MInt noNodesZ_set = 0;
455 MInt body;
456 MInt bcId;
457 MBool debug = false;
458 const MInt maxNoNodesDebug = 1000;
459 MIntScratchSpace nodesXBackup(maxNoNodesDebug, AT_, "nodesXBackup");
460 MIntScratchSpace nodesYBackup(maxNoNodesDebug, AT_, "nodesYBackup");
461 MIntScratchSpace nodesZBackup(maxNoNodesDebug, AT_, "nodesZBackup");
462
463 MInt spaceDirectionId[3];
464 MFloat target[6];
465
466 MFloat tmp[6];
467 MFloat* tmpPtr = &tmp[0];
468 getBoundingBoxMB(tmpPtr);
469
470 // 1. Take an arbitrary unmarked cell
471 // Cast rays in x,y and z direction and check for intersections
472 for(MInt j = 0; j < nDim; j++) {
473 target[j] = coordinates[j];
474 target[j + nDim] = coordinates[j];
475 }
476 spaceDirectionId[0] = 1;
477 spaceDirectionId[1] = 2;
478 spaceDirectionId[2] = 0;
479
480
481 target[0] = tmp[0] - (target[0] - tmp[0]); // x-ray to bounding box
482 MInt count = 0;
483 for(MInt b = 0; b < noBodiesInSet; b++) {
484 body = setToBodiesTable[b];
485 bcId = bodyBndryCndIds[body];
486 std::vector<MInt> nodeList;
487 getLineIntersectionMBElements2(target, spaceDirectionId, nodeList, bcId);
488 noNodesX = nodeList.size();
489 noNodesX_set += noNodesX;
490 if(debug) {
491 if(noNodesX > maxNoNodesDebug)
492 mTerm(1, AT_, " too many intersecting nodes to debug... please check or increase maxNoNodesDebug! ");
493 for(MInt n = 0; n < noNodesX; n++) {
494 nodesXBackup[count] = nodeList[n];
495 count++;
496 }
497 }
498 }
499
500 for(MInt j = 0; j < nDim; j++) {
501 target[j] = coordinates[j];
502 target[j + nDim] = coordinates[j];
503 }
504 spaceDirectionId[0] = 2;
505 spaceDirectionId[1] = 0;
506 spaceDirectionId[2] = 1;
507
508 target[1] = tmp[1] - (target[1] - tmp[1]); // y-ray to bounding box
509 count = 0;
510 for(MInt b = 0; b < noBodiesInSet; b++) {
511 body = setToBodiesTable[b];
512 bcId = bodyBndryCndIds[body];
513 std::vector<MInt> nodeList;
514 getLineIntersectionMBElements2(target, spaceDirectionId, nodeList, bcId);
515 noNodesY = nodeList.size();
516 noNodesY_set += noNodesY;
517 if(debug) {
518 if(noNodesY > maxNoNodesDebug)
519 mTerm(1, AT_, " too many intersecting nodes to debug... please check or increase maxNoNodesDebug! ");
520 for(MInt n = 0; n < noNodesY; n++) {
521 nodesYBackup[count] = nodeList[n];
522 count++;
523 }
524 }
525 }
526
527 // only for 3D
528 IF_CONSTEXPR(nDim == 3) {
529 for(MInt j = 0; j < nDim; j++) {
530 target[j] = coordinates[j];
531 target[j + nDim] = coordinates[j];
532 }
533 spaceDirectionId[0] = 0;
534 spaceDirectionId[1] = 1;
535 spaceDirectionId[2] = 2;
536
537
538 target[2] = tmp[2] - (target[2] - tmp[2]); // z-ray to bounding box
539 count = 0;
540 // 2.b and c
541 for(MInt b = 0; b < noBodiesInSet; b++) {
542 body = setToBodiesTable[b];
543 bcId = bodyBndryCndIds[body];
544 std::vector<MInt> nodeList;
545 getLineIntersectionMBElements2(target, spaceDirectionId, nodeList, bcId);
546 noNodesZ = nodeList.size();
547 noNodesZ_set += noNodesZ;
548 if(debug) {
549 if(noNodesZ > maxNoNodesDebug)
550 mTerm(1, AT_, " too many intersecting nodes to debug... please check or increase maxNoNodesDebug! ");
551 for(MInt n = 0; n < noNodesZ; n++) {
552 nodesZBackup[count] = nodeList[n];
553 count++;
554 }
555 }
556 }
557
558 if(noNodesX_set % 2 == noNodesY_set % 2 && noNodesX_set % 2 == noNodesZ_set % 2) {
559 noNodes = noNodesX_set;
560 } else {
561 cerr << " Different results for ray intersection, continue with most probable result. Please check your "
562 "geometry! "
563 << endl;
564 cerr << " nodesX: " << noNodesX << " " << noNodesX_set << " nodesY: " << noNodesY << " " << noNodesY_set
565 << " nodesZ: " << noNodesZ << " " << noNodesZ_set << endl;
566 cerr << " write stl of all intersecting nodes, point is " << coordinates[0] << " " << coordinates[1];
567 IF_CONSTEXPR(nDim == 3) cerr << " " << coordinates[2];
568 cerr << endl;
569 cerr << " bounding box is " << tmp[0] << " " << tmp[1] << " " << tmp[2] << " " << tmp[3] << " " << tmp[4] << " "
570 << tmp[5] << endl;
571 for(MInt j = 0; j < nDim; j++) {
572 target[j] = coordinates[j];
573 target[j + nDim] = coordinates[j];
574 }
575
576 ofstream ofl;
577 stringstream filename;
578 filename << "IntersectingNodes_D" << domainId() << ".stl";
579 ofl.open((filename.str()).c_str());
580 ofl.precision(12);
581
582 if(ofl) {
583 if(noNodesX_set) {
584 ofl << "solid intersecting triangles X " << domainId() << endl;
585
586 for(MInt i = 0; i < noNodesX_set; i++) {
587 ofl << " facet normal";
588 for(MInt j = 0; j < 3; j++)
589 ofl << " " << mbelements[nodesXBackup[i]].m_normal[j];
590 ofl << endl << " outer loop" << endl;
591
592 for(MInt k = 0; k < 3; k++) {
593 ofl << " vertex";
594 for(MInt l = 0; l < 3; l++) {
595 ofl << " " << mbelements[nodesXBackup[i]].m_vertices[k][l];
596 }
597 ofl << endl;
598 }
599
600 ofl << " endloop" << endl << " endfacet" << endl;
601 }
602 ofl << "endsolid intersecting triangles X " << domainId() << endl;
603 }
604 if(noNodesY_set) {
605 ofl << "solid intersecting triangles Y " << domainId() << endl;
606
607 for(MInt i = 0; i < noNodesY_set; i++) {
608 ofl << " facet normal";
609 for(MInt j = 0; j < 3; j++)
610 ofl << " " << mbelements[nodesYBackup[i]].m_normal[j];
611 ofl << endl << " outer loop" << endl;
612
613 for(MInt k = 0; k < 3; k++) {
614 ofl << " vertex";
615 for(MInt l = 0; l < 3; l++) {
616 ofl << " " << mbelements[nodesYBackup[i]].m_vertices[k][l];
617 }
618 ofl << endl;
619 }
620
621 ofl << " endloop" << endl << " endfacet" << endl;
622 }
623 ofl << "endsolid intersecting triangles Y " << domainId() << endl;
624 }
625 if(noNodesZ_set) {
626 ofl << "solid intersecting triangles Z " << domainId() << endl;
627
628 for(MInt i = 0; i < noNodesZ_set; i++) {
629 ofl << " facet normal";
630 for(MInt j = 0; j < 3; j++)
631 ofl << " " << mbelements[nodesZBackup[i]].m_normal[j];
632 ofl << endl << " outer loop" << endl;
633
634 for(MInt k = 0; k < 3; k++) {
635 ofl << " vertex";
636 for(MInt l = 0; l < 3; l++) {
637 ofl << " " << mbelements[nodesZBackup[i]].m_vertices[k][l];
638 }
639 ofl << endl;
640 }
641
642 ofl << " endloop" << endl << " endfacet" << endl;
643 }
644 ofl << "endsolid intersecting triangles Z " << domainId() << endl;
645 }
646 }
647
648
649 if(noNodesX % 2 == noNodesY % 2)
650 noNodes = noNodesX;
651 else if(noNodesX % 2 == noNodesZ % 2)
652 noNodes = noNodesX;
653 else if(noNodesY % 2 == noNodesZ % 2)
654 noNodes = noNodesY;
655 else
656 noNodes = 1;
657 }
658 }
659 else {
660 if(noNodesX_set % 2 == noNodesY_set % 2) {
661 noNodes = noNodesX_set;
662 } else {
663 cerr << " Different results for ray intersection, continue with most probable result. Please check your "
664 "geometry! "
665 << endl;
666 noNodes = 1;
667 }
668 }
669
670 // delete [] tmp; tmp=nullptr;
671
672 if(noNodes % 2) {
673 return true;
674 } else {
675 return false;
676 }
677}
virtual MInt getLineIntersectionMBElements2(MFloat *, MInt *, std::vector< MInt > &, MInt)
Definition: geometry.h:121
MInt domainId() const
Definition: geometry.h:46
This class is a ScratchSpace.
Definition: scratch.h:758
void mTerm(const MInt errorCode, const MString &location, const MString &message)
Definition: functions.cpp:29
void debug(const MString &objectName, const MString &elementsName)
Debug output for mAlloc.
Definition: alloc.h:31

◆ readSegments()

template<MInt nDim>
virtual void Geometry< nDim >::readSegments ( )
inlineprotectedvirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 181 of file geometry.h.

181{};

◆ readSTLNetCDF()

template<MInt nDim>
virtual void Geometry< nDim >::readSTLNetCDF ( const MChar )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 140 of file geometry.h.

140{};

◆ rebuildAdtTree()

template<MInt nDim>
virtual void Geometry< nDim >::rebuildAdtTree ( )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 165 of file geometry.h.

165{};

◆ ReplaceMBElementVertex()

template<MInt nDim>
virtual void Geometry< nDim >::ReplaceMBElementVertex ( MInt  ,
MInt  ,
MFloat  
)
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 130 of file geometry.h.

130{};

◆ resizeCollector()

template<MInt nDim>
virtual void Geometry< nDim >::resizeCollector ( MInt  )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 170 of file geometry.h.

170{};

◆ setHaloElementOffset()

template<MInt nDim>
void Geometry< nDim >::setHaloElementOffset ( MInt  off)
inline

Definition at line 51 of file geometry.h.

51{ m_haloElementOffset = off; }

◆ solverId()

template<MInt nDim>
MInt Geometry< nDim >::solverId ( ) const
inline

Definition at line 44 of file geometry.h.

44{ return m_solverId; }
const MInt m_solverId
Definition: geometry.h:204

◆ UpdateADT()

template<MInt nDim>
virtual void Geometry< nDim >::UpdateADT ( )
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 133 of file geometry.h.

133{};

◆ UpdateMBBoundingBox()

template<MInt nDim>
virtual void Geometry< nDim >::UpdateMBBoundingBox ( )
inlinevirtual

Reimplemented in Geometry2D, and Geometry3D.

Definition at line 132 of file geometry.h.

132{};

◆ UpdateMBNormalVector()

template<MInt nDim>
virtual void Geometry< nDim >::UpdateMBNormalVector ( MInt  )
inlinevirtual

Reimplemented in Geometry3D, and Geometry2D.

Definition at line 131 of file geometry.h.

131{};

◆ vectorsEqual()

template<MInt nDim>
MBool Geometry< nDim >::vectorsEqual ( MFloat a,
MFloat b 
)
Author
Andreas Lintermann
Date
18.09.2015
Parameters
[in]avector a
[in]bvector b return if both input vectors are equal

Definition at line 114 of file geometry.cpp.

114 {
115 MBool ret = true;
116 for(MInt d = 0; d < nDim; d++)
117 ret = ret && approx(a[d], b[d], MFloatEps);
118
119 return ret;
120}
MBool approx(const T &, const U &, const T)
Definition: functions.h:272
Definition: contexttypes.h:19

◆ writeADTAndSTLToNetCDF()

template<MInt nDim>
virtual void Geometry< nDim >::writeADTAndSTLToNetCDF ( const MChar )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 138 of file geometry.h.

138{};

◆ writeParallelGeometryVTK()

template<MInt nDim>
virtual void Geometry< nDim >::writeParallelGeometryVTK ( MString  )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 167 of file geometry.h.

167{};

◆ writeSegmentsToDX()

template<MInt nDim>
void Geometry< nDim >::writeSegmentsToDX
protectedvirtual

Definition at line 99 of file geometry.cpp.

99 {
100 m_adt->writeTreeToDx();
101}
GeometryAdt< nDim > * m_adt
Definition: geometry.h:216

◆ writeSTL()

template<MInt nDim>
virtual void Geometry< nDim >::writeSTL ( const MChar )
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 137 of file geometry.h.

137{};

◆ writeSTLMB()

template<MInt nDim>
virtual void Geometry< nDim >::writeSTLMB ( const MChar ,
MInt ,
MInt *&   
)
inlinevirtual

Reimplemented in Geometry3D.

Definition at line 139 of file geometry.h.

139{};

Friends And Related Function Documentation

◆ GeometryAdt

template<MInt nDim>
template<MInt nDim_>
friend class GeometryAdt
friend

Definition at line 39 of file geometry.h.

Member Data Documentation

◆ elements

template<MInt nDim>
element<nDim>* Geometry< nDim >::elements

Definition at line 215 of file geometry.h.

◆ m_adt

template<MInt nDim>
GeometryAdt<nDim>* Geometry< nDim >::m_adt

Definition at line 216 of file geometry.h.

◆ m_allBCs

template<MInt nDim>
MInt* Geometry< nDim >::m_allBCs = nullptr
protected

Definition at line 198 of file geometry.h.

◆ m_bodyIt

template<MInt nDim>
bodyIterator Geometry< nDim >::m_bodyIt
protected

Definition at line 193 of file geometry.h.

◆ m_bodyMap

template<MInt nDim>
bodyMap Geometry< nDim >::m_bodyMap
protected

Definition at line 192 of file geometry.h.

◆ m_boundaryIds

template<MInt nDim>
MInt* Geometry< nDim >::m_boundaryIds
protected

Definition at line 197 of file geometry.h.

◆ m_debugParGeom

template<MInt nDim>
MBool Geometry< nDim >::m_debugParGeom = false

Definition at line 229 of file geometry.h.

◆ m_domainId

template<MInt nDim>
MInt Geometry< nDim >::m_domainId
private

Definition at line 206 of file geometry.h.

◆ m_elements

template<MInt nDim>
Collector<element<nDim> >* Geometry< nDim >::m_elements

Definition at line 214 of file geometry.h.

◆ m_flowSolver

template<MInt nDim>
MBool Geometry< nDim >::m_flowSolver
protected

Definition at line 201 of file geometry.h.

◆ m_geometryContext

template<MInt nDim>
GeometryContext Geometry< nDim >::m_geometryContext
private

Definition at line 208 of file geometry.h.

◆ m_haloElementOffset

template<MInt nDim>
MInt Geometry< nDim >::m_haloElementOffset
private

Definition at line 209 of file geometry.h.

◆ m_inOutTest

template<MInt nDim>
MString Geometry< nDim >::m_inOutTest

Definition at line 225 of file geometry.h.

◆ m_mbelements

template<MInt nDim>
Collector<element<nDim> >* Geometry< nDim >::m_mbelements

Definition at line 217 of file geometry.h.

◆ m_mbMidPnt

template<MInt nDim>
MFloat Geometry< nDim >::m_mbMidPnt[3]

Definition at line 220 of file geometry.h.

◆ m_mbminMax

template<MInt nDim>
std::array<MFloat, 2 * nDim> Geometry< nDim >::m_mbminMax {}

Definition at line 219 of file geometry.h.

◆ m_minMax

template<MInt nDim>
std::array<MFloat, 2 * nDim> Geometry< nDim >::m_minMax {}
protected

Definition at line 187 of file geometry.h.

◆ m_mpiComm

template<MInt nDim>
const MPI_Comm Geometry< nDim >::m_mpiComm
private

Definition at line 205 of file geometry.h.

◆ m_noAllBCs

template<MInt nDim>
MInt Geometry< nDim >::m_noAllBCs
protected

Definition at line 199 of file geometry.h.

◆ m_noBoundaryIds

template<MInt nDim>
MInt Geometry< nDim >::m_noBoundaryIds
protected

Definition at line 196 of file geometry.h.

◆ m_noDomains

template<MInt nDim>
MInt Geometry< nDim >::m_noDomains
private

Definition at line 207 of file geometry.h.

◆ m_noElements

template<MInt nDim>
MInt Geometry< nDim >::m_noElements
protected

Definition at line 189 of file geometry.h.

◆ m_noMBElements

template<MInt nDim>
MInt Geometry< nDim >::m_noMBElements
protected

Definition at line 195 of file geometry.h.

◆ m_noSegments

template<MInt nDim>
MInt Geometry< nDim >::m_noSegments
protected

Definition at line 185 of file geometry.h.

◆ m_ownSegmentId

template<MInt nDim>
MBool* Geometry< nDim >::m_ownSegmentId = nullptr

Definition at line 222 of file geometry.h.

◆ m_parallelGeometry

template<MInt nDim>
MBool Geometry< nDim >::m_parallelGeometry = false

Definition at line 228 of file geometry.h.

◆ m_parallelGeomFileName

template<MInt nDim>
MString Geometry< nDim >::m_parallelGeomFileName

Definition at line 230 of file geometry.h.

◆ m_parGeomMemFactor

template<MInt nDim>
MFloat Geometry< nDim >::m_parGeomMemFactor

Definition at line 224 of file geometry.h.

◆ m_segmentBaseName

template<MInt nDim>
MString Geometry< nDim >::m_segmentBaseName
protected

Definition at line 191 of file geometry.h.

◆ m_segmentOffsets

template<MInt nDim>
std::vector<MInt> Geometry< nDim >::m_segmentOffsets

Definition at line 212 of file geometry.h.

◆ m_segmentOffsetsWithoutMB

template<MInt nDim>
std::vector<MInt> Geometry< nDim >::m_segmentOffsetsWithoutMB

Definition at line 213 of file geometry.h.

◆ m_solverId

template<MInt nDim>
const MInt Geometry< nDim >::m_solverId
private

Definition at line 204 of file geometry.h.

◆ m_uniqueOriginalTriId

template<MInt nDim>
std::set<MInt> Geometry< nDim >::m_uniqueOriginalTriId

Definition at line 223 of file geometry.h.

◆ mbelements

template<MInt nDim>
element<nDim>* Geometry< nDim >::mbelements

Definition at line 218 of file geometry.h.


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