13 #include <openvdb/openvdb.h> 30 AutoSettingNode(
const std::shared_ptr<MF::Database::ConfigData> & ConfigData_Ptr,
const openvdb::Int64Grid::Ptr & GeometryGrid_Ptr,
31 const std::shared_ptr<MF::GU::LatticeParametersD3Q19> & LatticeParameters_Ptr,
const openvdb::Int32Grid::Ptr & PropagationGrid_Ptr) :
32 m_ConfigData_Ptr(ConfigData_Ptr),
33 m_GeometryGrid_Ptr(GeometryGrid_Ptr),
34 m_LatticeParameters_Ptr(LatticeParameters_Ptr),
35 m_PropagationGrid_Ptr(PropagationGrid_Ptr)
40 static std::shared_ptr<MF::GB::AutoSettingNode>
New(
const std::shared_ptr<MF::Database::ConfigData> & ConfigData_Ptr,
41 const openvdb::Int64Grid::Ptr & GeometryGrid_Ptr,
42 const std::shared_ptr<MF::GU::LatticeParametersD3Q19> & LatticeParameters_Ptr,
43 const openvdb::Int32Grid::Ptr & PropagationGrid_Ptr) {
44 auto AutoSettingNode_Ptr = std::make_shared<MF::GB::AutoSettingNode>(ConfigData_Ptr, GeometryGrid_Ptr, LatticeParameters_Ptr, PropagationGrid_Ptr);
45 return AutoSettingNode_Ptr;
54 std::shared_ptr<MF::Database::ConfigData> m_ConfigData_Ptr;
55 openvdb::Int64Grid::Ptr m_GeometryGrid_Ptr;
56 std::shared_ptr<MF::GU::LatticeParametersD3Q19> m_LatticeParameters_Ptr;
57 openvdb::Int32Grid::Ptr m_PropagationGrid_Ptr;
59 int32_t BN = m_ConfigData_Ptr->getCaseIntParam(
"DefaultBoundaryCondition.DefaultWallNode_BN");
60 int32_t NN = m_ConfigData_Ptr->getCaseIntParam(
"DefaultBoundaryCondition.DefaultNode_NN");
62 static unsigned char ExternalNodeNormal(int32_t nodePropagation);
66 static inline bool isOnWall_N(int32_t nodePropagationValue) {
return nodePropagationValue == 126254715;};
68 static inline bool isOnWall_S(int32_t nodePropagationValue) {
return nodePropagationValue == 7993839; };
70 static inline bool isOnWall_W(int32_t nodePropagationValue) {
return nodePropagationValue == 53976311; };
72 static inline bool isOnWall_E(int32_t nodePropagationValue) {
return nodePropagationValue == 80733053; };
74 static inline bool isOnWall_T(int32_t nodePropagationValue) {
return nodePropagationValue == 26949599; };
76 static inline bool isOnWall_B(int32_t nodePropagationValue) {
return nodePropagationValue == 107270079; };
80 static bool Wall_N(int32_t nodePropagationValue) {
return ((~nodePropagationValue & 127) & ~123) > 0;};
82 static bool Wall_S(int32_t nodePropagationValue) {
return ((~nodePropagationValue & 127) & ~111) > 0;};
84 static bool Wall_W(int32_t nodePropagationValue) {
return ((~nodePropagationValue & 127) & ~119) > 0;};
86 static bool Wall_E(int32_t nodePropagationValue) {
return ((~nodePropagationValue & 127) & ~125) > 0;};
88 static bool Wall_T(int32_t nodePropagationValue) {
return ((~nodePropagationValue & 127) & ~95) > 0;};
90 static bool Wall_B(int32_t nodePropagationValue) {
return ((~nodePropagationValue & 127) & ~63) > 0;};
92 static bool isInCorner_NET(int32_t nodePropagationValue) {
return (Wall_N(nodePropagationValue) && Wall_E(nodePropagationValue) && Wall_T(nodePropagationValue));};
94 static bool isInCorner_NWT(int32_t nodePropagationValue) {
return (Wall_N(nodePropagationValue) && Wall_W(nodePropagationValue) && Wall_T(nodePropagationValue));};
96 static bool isInCorner_NEB(int32_t nodePropagationValue) {
return (Wall_N(nodePropagationValue) && Wall_E(nodePropagationValue) && Wall_B(nodePropagationValue));};
98 static bool isInCorner_NWB(int32_t nodePropagationValue) {
return (Wall_N(nodePropagationValue) && Wall_W(nodePropagationValue) && Wall_B(nodePropagationValue));};
100 static bool isInCorner_SET(int32_t nodePropagationValue) {
return (Wall_S(nodePropagationValue) && Wall_E(nodePropagationValue) && Wall_T(nodePropagationValue));};
102 static bool isInCorner_SWT(int32_t nodePropagationValue) {
return (Wall_S(nodePropagationValue) && Wall_W(nodePropagationValue) && Wall_T(nodePropagationValue));};
104 static bool isInCorner_SEB(int32_t nodePropagationValue) {
return (Wall_S(nodePropagationValue) && Wall_E(nodePropagationValue) && Wall_B(nodePropagationValue));};
106 static bool isInCorner_SWB(int32_t nodePropagationValue) {
return (Wall_S(nodePropagationValue) && Wall_W(nodePropagationValue) && Wall_B(nodePropagationValue));};
108 static bool isOnEdge_NW(int32_t nodePropagationValue) {
return (Wall_N(nodePropagationValue) && Wall_W(nodePropagationValue));};
110 static bool isOnEdge_NE(int32_t nodePropagationValue) {
return (Wall_N(nodePropagationValue) && Wall_E(nodePropagationValue));};
112 static bool isOnEdge_NT(int32_t nodePropagationValue) {
return (Wall_N(nodePropagationValue) && Wall_T(nodePropagationValue));};
114 static bool isOnEdge_NB(int32_t nodePropagationValue) {
return (Wall_N(nodePropagationValue) && Wall_B(nodePropagationValue));};
116 static bool isOnEdge_SW(int32_t nodePropagationValue) {
return (Wall_S(nodePropagationValue) && Wall_W(nodePropagationValue));};
118 static bool isOnEdge_SE(int32_t nodePropagationValue) {
return (Wall_S(nodePropagationValue) && Wall_E(nodePropagationValue));};
120 static bool isOnEdge_ST(int32_t nodePropagationValue) {
return (Wall_S(nodePropagationValue) && Wall_T(nodePropagationValue));};
122 static bool isOnEdge_SB(int32_t nodePropagationValue) {
return (Wall_S(nodePropagationValue) && Wall_B(nodePropagationValue));};
124 static bool isOnEdge_WT(int32_t nodePropagationValue) {
return (Wall_W(nodePropagationValue) && Wall_T(nodePropagationValue));};
126 static bool isOnEdge_WB(int32_t nodePropagationValue) {
return (Wall_W(nodePropagationValue) && Wall_B(nodePropagationValue));};
128 static bool isOnEdge_ET(int32_t nodePropagationValue) {
return (Wall_E(nodePropagationValue) && Wall_T(nodePropagationValue));};
130 static bool isOnEdge_EB(int32_t nodePropagationValue) {
return (Wall_E(nodePropagationValue) && Wall_B(nodePropagationValue));};
void BoundaryFind()
Finds geometry boundary nodes and set its value to 3.
A class of methods that automatically classify nodes of any geometry.
void DefaultTypeSet()
Sets default node types on walls, edges and corners of geometry that are automatically detected and w...
static std::shared_ptr< MF::GB::AutoSettingNode > New(const std::shared_ptr< MF::Database::ConfigData > &ConfigData_Ptr, const openvdb::Int64Grid::Ptr &GeometryGrid_Ptr, const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &LatticeParameters_Ptr, const openvdb::Int32Grid::Ptr &PropagationGrid_Ptr)
~AutoSettingNode()=default
void NodeTypeClass()
Classifies primary node types (e.g 20,30,40) into subtypes 21,22,23... for North/South/Est/West/Top/B...
AutoSettingNode(const std::shared_ptr< MF::Database::ConfigData > &ConfigData_Ptr, const openvdb::Int64Grid::Ptr &GeometryGrid_Ptr, const std::shared_ptr< MF::GU::LatticeParametersD3Q19 > &LatticeParameters_Ptr, const openvdb::Int32Grid::Ptr &PropagationGrid_Ptr)