21 const MFloat*
const cell_coords)
override;
25 std::vector<MInt>& nodeList)
override;
35 MFloat* edgePoint2)
override;
40 MFloat* edgePoint2)
override;
62 void writeSTL(
const char* fileName)
override;
98 MInt segmentId,
MInt* offset,
const MPI_Comm comm);
virtual Collector< element< 3 > > * readSegmentsParallel()
void writeSTLMB(const char *fileName, MInt &noNodes, MInt *&nodeList) override
MBool m_GFieldInitFromSTL
virtual void readSegmentTrianglesBINARY_BE(MString fileName, Collector< element< 3 > > *elemCollector, MInt bndCndId, MInt segmentId, MInt *offset)
reads triangles from a BINARY file and swaps to big endian
virtual void readSegmentTrianglesBINARY_LE(MString fileName, Collector< element< 3 > > *elemCollector, MInt bndCndId, MInt segmentId, MInt *offset)
reads triangles from a BINARY file and swaps to little endian
MBool edgeTriangleIntersectionLB(MFloat *trianglePoint1, MFloat *trianglePoint2, MFloat *trianglePoint3, MFloat *edgePoint1, MFloat *edgePoint2) override
Determine intersection between an edge and a triangle.
MInt getLineIntersectionElements(MFloat *targetRegion, std::vector< MInt > &nodeList) override
Returns the ids of all elements, cut by a ray by using the perp-dot operator.
MBool m_communicateSegmentsSerial
void rebuildAdtTree() override
Rebuilds the ADT tree.
virtual Collector< element< 3 > > * readSegmentsSerial()
reads the segments in serial
MFloat GetBoundarySize(MInt segmentId) override
Returns the area of a segment.
virtual void countSegmentTrianglesBINARY(MString fileName, MInt *noElements)
counts the number of triangles in a BINARY STL file
void MoveAllMBElementVertex(MFloat *dx) override
virtual std::vector< std::pair< MFloat *, MFloat * > > GetUniqueSegmentEdges(MInt segmentId)
Returns unique edges of a given set segment id.
static constexpr const MInt nDim
MFloat ** GetBoundaryVertices(MInt segmentId, MFloat *tri_vx, MInt *keepOffsets, MInt size, MInt *num) override
This function gets all boundary vertices of an element<3> in a circular order.
void UpdateMBNormalVector(MInt e) override
Geometry3D(const MInt solverId_, const MPI_Comm comm)
virtual MInt is_big_endian()
determines the CPU type big or little endian
void collectGlobalMemoryUsage() override
MBool edgeTriangleIntersection(MFloat *trianglePoint1, MFloat *trianglePoint2, MFloat *trianglePoint3, MFloat *edgePoint1, MFloat *edgePoint2) override
Determine intersection between an edge and a triangle.
void writeADTAndSTLToNetCDF(const char *fileName) override
virtual void correctVertexCoordinates()
MInt getLineIntersectionMBElements2(MFloat *targetRegion, MInt *spaceDirection, std::vector< MInt > &nodeList, MInt bcIc) override
MBool getLineTriangleIntersection(const MFloat *const p1, const MFloat *const p2, const MFloat radius, const MFloat *const v1, const MFloat *const v2, const MFloat *const v3, MFloat *intersection, MFloat *normal, MFloat *lambda2, MFloat *dist) override
This function determines if a line crosses a triangle.
void copyElement(MInt from, MInt to) override
Copies an element<3> from one poistion to another.
MBool getLineTriangleIntersectionSimple(MFloat *p1, MFloat *p2, MFloat *v1, MFloat *v2, MFloat *v3) override
This function determines if a line crosses a triangle.
void printMemoryUsage()
prints the current memory usage of this object
MInt getLineIntersectionElementsOld2(MFloat *targetRegion, MInt *spaceDirection, std::vector< MInt > &nodeList) override
Returns the ids of all elements, cut by a orthogonal line (or rectangular region)
MInt getIntersectionElements(MFloat *targetRegion, std::vector< MInt > &nodeList, MFloat cellHalfLength, const MFloat *const cell_coords) override
Determines all elements that are inside or intersect the target region with the separating axis theor...
virtual std::vector< std::pair< MFloat *, MFloat * > > GetUniqueSegmentEdgesParGeom(MFloat *tri_vx, MInt *keepOffsets, MInt size)
Returns unique edges of a given set segment id for parallel geometry.
MInt getSphereIntersectionMBElements(MFloat *P, MFloat radius, std::vector< MInt > &nodeList) override
MBool isEdgeAlreadyInCollection(std::vector< std::pair< MFloat *, MFloat * > > tmp_edges, MFloat *p1, MFloat *p2, MInt *pos) override
Checks if an edge given by two points is in a vector.
void addElement(MFloat *tri) override
Adds an element<3> to the collector.
void logStatistics() override
virtual void countSegmentTrianglesNETCDF(MString fileName, MInt *noElements, const MPI_Comm comm)
counts the number of triangles in a NETCDF STL file
virtual void countSegmentTrianglesASCII(MString fileName, MInt *noElements)
counts the number of triangles in an ASCII STL file
MInt m_getLIE2CallCounter
void resizeCollector(MInt new_size) override
deletes the current element<3> collector and reinitializes
virtual void readSegmentTrianglesNETCDF(MString fileName, Collector< element< 3 > > *elemCollector, MInt bndCndId, MInt segmentId, MInt *offset, const MPI_Comm comm)
reads triangles from a BINARY file
void readSTLNetCDF(const char *fileName) override
void writeParallelGeometryVTK(MString filename) override
Write the current geometry to a VTK file for parallel computation.
virtual void readSegmentTrianglesASCII(MString fileName, Collector< element< 3 > > *elemCollector, MInt bndCndId, MInt segmentId, MInt *offset)
reads triangles from an ASCII file
void calculateBoundingBox() override
Calculates the global bounding box of the geometry.
virtual MInt getIntersectionElementsTetraeder(MFloat *targetRegion, std::vector< MInt > &nodeList)
Determines all elements that are inside or intersect the target region.
void ReplaceMBElementVertex(MInt e, MInt v, MFloat *np) override
MInt m_noLevelSetIntfBndIds
void UpdateMBBoundingBox() override
MBool getClosestLineIntersectionLength(MInt bndCndId, const std::vector< MInt > &nodeList, MFloat *targetRegion, MFloat *dist) override
MInt getIntersectionMBElements(MFloat *targetRegion, std::vector< MInt > &nodeList) override
MInt * m_levelSetIntfBndIds
MFloat getBndMaxRadius(MFloat **vertices, MInt num) override
This function gets the maximal radius for a boundary segment.
void UpdateADT() override
MInt getLineIntersectionMBElements(MFloat *targetRegion, std::vector< MInt > &nodeList) override
void readSegments() override
reads the STL segments from file
MBool getLineTriangleIntersectionSimpleDistance(MFloat *p1, MFloat *p2, MFloat *v1, MFloat *v2, MFloat *v3, MFloat *dist) override
This function determines if a line crosses a triangle.
virtual void swap4BytesToBE(char *buf)
swaps 4 bytes from little to big endian
void MoveMBElementVertex(MInt e, MInt v, MFloat *dx) override
void determineSegmentOwnership(MInt segmentId, MInt *own, MInt *sumowners, MInt *firstOwner, MInt *owners) override
Determines the ownership of a segment.
void writeSTL(const char *fileName) override
std::basic_string< char > MString
MFloat dist(const Point< DIM > &p, const Point< DIM > &q)