PhyStar  v0.0.0 thu24
gsmpi::HexZone< 3 > Struct Reference

HexZone 3-dimension. More...

#include <gsmpicartzone.hpp>

Inheritance diagram for gsmpi::HexZone< 3 >:
Collaboration diagram for gsmpi::HexZone< 3 >:

Public Member Functions

 HexZone ()
 default Construct a new Hex Zone object More...
 
 HexZone (const int rk, std::vector< Point< 3 >> points)
 Construct a new Hex Zone by points vector list. More...
 
 HexZone (const int rk, std::vector< std::vector< double >> points)
 Construct a new Hex Zone object by points vector list. More...
 
 HexZone (const int rk)
 Construct a new Hex Zone object. More...
 
void SetNode (int i, Point< 3 > &point)
 Set the Node. More...
 
void SetNodes (std::vector< Point< 3 >> points)
 Set the Nodes by a point vector list. More...
 
void SetNodes (std::vector< std::vector< double >> points)
 Set the Nodes by a point vector list. More...
 
int GetNodeSize ()
 Get the size of nodes. More...
 
bool IsInPlane (int ind0, int ind1, int ind2, const double p[])
 judge whether the point is inside or outside of plane? More...
 
virtual bool IsInZone (const double p[])
 judge whether the point is inside or outside of the zone More...
 

Public Attributes

Point< 3 > node [8]
 
- Public Attributes inherited from gsmpi::ZoneBase
int rank
 

Detailed Description

HexZone 3-dimension.

  • the order of the vertices(nodes) of 3D box
    ^ y
    |
    3_________________2
    
    /| /| / | / | 7/__|_____________6/ | | 0|_____________|___|1---—> x | / | / | / | / |/_______________|/ 4 5 |/_ z
    Template Parameters

Constructor & Destructor Documentation

◆ HexZone() [1/4]

gsmpi::HexZone< 3 >::HexZone ( )
inline

default Construct a new Hex Zone object

◆ HexZone() [2/4]

gsmpi::HexZone< 3 >::HexZone ( const int  rk,
std::vector< Point< 3 >>  points 
)
inline

Construct a new Hex Zone by points vector list.

Parameters
rkwhich rank, when use mpi
points

References gsmpi::ZoneBase::rank.

◆ HexZone() [3/4]

gsmpi::HexZone< 3 >::HexZone ( const int  rk,
std::vector< std::vector< double >>  points 
)
inline

Construct a new Hex Zone object by points vector list.

Parameters
rkwhich rank, when use mpi
points

References gsmpi::ZoneBase::rank.

◆ HexZone() [4/4]

gsmpi::HexZone< 3 >::HexZone ( const int  rk)
inline

Construct a new Hex Zone object.

Parameters
rkwhich rank, when use mpi

References gsmpi::ZoneBase::rank.

Member Function Documentation

◆ GetNodeSize()

int gsmpi::HexZone< 3 >::GetNodeSize ( )
inline

Get the size of nodes.

Returns
int

◆ IsInPlane()

bool gsmpi::HexZone< 3 >::IsInPlane ( int  ind0,
int  ind1,
int  ind2,
const double  p[] 
)
inline

judge whether the point is inside or outside of plane?

  • schematic ind2 3_________________2 | |

    + P
    _________________

    0 1 ind0 ind1

    V0 = nodes(ind1)- nodes(ind0); V1 = nodes(ind2)- nodes(ind0); P = nodes(p) - nodes(ind0) n = V0 x V1 (cross product) if p \cdot n >0, inside if p \cdot n <0, outside

Parameters
ind0node number
ind1node number
ind2node number
pposition of points
Returns
true inside
false outside

References gsmpi::Point< N_dim >::pos.

◆ IsInZone()

virtual bool gsmpi::HexZone< 3 >::IsInZone ( const double  p[])
inlinevirtual

judge whether the point is inside or outside of the zone

Parameters
p
Returns
true inside of the zone
false outside of the zone

Implements gsmpi::ZoneBase.

◆ SetNode()

void gsmpi::HexZone< 3 >::SetNode ( int  i,
Point< 3 > &  point 
)
inline

Set the Node.

Parameters
iwhich node
point

◆ SetNodes() [1/2]

void gsmpi::HexZone< 3 >::SetNodes ( std::vector< Point< 3 >>  points)
inline

Set the Nodes by a point vector list.

Parameters
points

◆ SetNodes() [2/2]

void gsmpi::HexZone< 3 >::SetNodes ( std::vector< std::vector< double >>  points)
inline

Set the Nodes by a point vector list.

Parameters
points

References gsmpi::Point< N_dim >::SetPos().

Here is the call graph for this function:

Member Data Documentation

◆ node

Point<3> gsmpi::HexZone< 3 >::node[8]

The documentation for this struct was generated from the following file: