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

#include <geometryroot.h>

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

Public Member Functions

 SolverSTLSurface (const MPI_Comm comm, const MInt solver)
 
MBool getCellIntersectingElements (const MFloat *const coords, const MFloat cellHalfLength, MBool *const cutInfo)
 
MInt countLineIntersectingElements (const MFloat *const line)
 
void boundingBox (MFloat *const bbox)
 
MInt noSegments ()
 
void setGeometryPointer (Geometry< nDim > *&geometryPointer)
 
- Public Member Functions inherited from SolverSurface
 SolverSurface ()
 
virtual MBool getCellIntersectingElements (const MFloat *const, const MFloat, MBool *const)
 
virtual MInt countLineIntersectingElements (const MFloat *const)
 
virtual void boundingBox (MFloat *const)
 
virtual MInt noSegments ()
 
virtual void setGeometryPointer (Geometry< 2 > *&)
 
virtual void setGeometryPointer (Geometry< 3 > *&)
 

Private Attributes

Geometry< nDim > * m_stlGeometry
 

Detailed Description

template<MInt nDim>
class SolverSTLSurface< nDim >

Definition at line 44 of file geometryroot.h.

Constructor & Destructor Documentation

◆ SolverSTLSurface()

template<MInt nDim>
SolverSTLSurface< nDim >::SolverSTLSurface ( const MPI_Comm  comm,
const MInt  solver 
)

Definition at line 27 of file geometryroot.cpp.

27 {
28 m_stlGeometry = new typename GeometryXD<nDim>::type(solver, comm);
29}
Geometry< nDim > * m_stlGeometry
Definition: geometryroot.h:54

Member Function Documentation

◆ boundingBox()

template<MInt nDim>
void SolverSTLSurface< nDim >::boundingBox ( MFloat *const  bbox)
virtual

Reimplemented from SolverSurface.

Definition at line 37 of file geometryroot.cpp.

37 {
38 m_stlGeometry->getBoundingBox(bbox);
39}

◆ countLineIntersectingElements()

template<MInt nDim>
MInt SolverSTLSurface< nDim >::countLineIntersectingElements ( const MFloat *const  line)
virtual

Reimplemented from SolverSurface.

Definition at line 68 of file geometryroot.cpp.

68 {
69 std::vector<MInt> nodeList;
70 MFloat tmp_line[2 * nDim];
71
72 for(MInt dim = 0; dim < nDim; dim++) {
73 tmp_line[dim] = line[dim];
74 tmp_line[dim + nDim] = line[dim + nDim];
75 }
76
77 // call geometry
78 m_stlGeometry->getLineIntersectionElements(tmp_line, nodeList);
79
80 return nodeList.size();
81}
int32_t MInt
Definition: maiatypes.h:62
double MFloat
Definition: maiatypes.h:52

◆ getCellIntersectingElements()

template<MInt nDim>
MBool SolverSTLSurface< nDim >::getCellIntersectingElements ( const MFloat *const  coords,
const MFloat  cellHalfLength,
MBool *const  cutInfo 
)
virtual

Reimplemented from SolverSurface.

Definition at line 42 of file geometryroot.cpp.

43 {
44 std::vector<MInt> nodeList;
45 MFloat targetRegion[2 * nDim];
46 for(MInt dim = 0; dim < nDim; dim++) {
47 targetRegion[dim] = coords[dim] - cellHalfLength;
48 targetRegion[dim + nDim] = coords[dim] + cellHalfLength;
49 }
50
51 // reset cutInfo
52 for(MInt seg = 0; seg < noSegments(); seg++) {
53 cutInfo[seg] = false;
54 }
55
56 // call geometry
57 m_stlGeometry->getIntersectionElements(targetRegion, nodeList, cellHalfLength, coords);
58 const MInt noNodes = nodeList.size();
59
60 // translate from nodes to segments/elements/partialsurfaces (no unique nomenclature)
61 for(MInt n = 0; n < noNodes; n++) {
62 cutInfo[m_stlGeometry->elements[nodeList[n]].m_segmentId] = true;
63 }
64 return (MBool)noNodes;
65}
bool MBool
Definition: maiatypes.h:58

◆ noSegments()

template<MInt nDim>
MInt SolverSTLSurface< nDim >::noSegments
virtual

Reimplemented from SolverSurface.

Definition at line 32 of file geometryroot.cpp.

32 {
33 return m_stlGeometry->geometryContext().getNoSegments();
34}

◆ setGeometryPointer()

template<MInt nDim>
void SolverSTLSurface< nDim >::setGeometryPointer ( Geometry< nDim > *&  geometryPointer)
inline

Definition at line 51 of file geometryroot.h.

51{ geometryPointer = m_stlGeometry; }; // temporary

Member Data Documentation

◆ m_stlGeometry

template<MInt nDim>
Geometry<nDim>* SolverSTLSurface< nDim >::m_stlGeometry
private

Definition at line 54 of file geometryroot.h.


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