diff --git a/src/phasicFlow/CMakeLists.txt b/src/phasicFlow/CMakeLists.txt index bf46ae87..70d96a57 100644 --- a/src/phasicFlow/CMakeLists.txt +++ b/src/phasicFlow/CMakeLists.txt @@ -48,6 +48,7 @@ structuredData/cylinder/cylinder.C structuredData/sphere/sphere.C structuredData/iBox/iBoxs.C structuredData/line/line.C +structuredData/zAxis/zAxis.C structuredData/pointStructure/pointStructure.C structuredData/pointStructure/selectors/pStructSelector/pStructSelector.C structuredData/pointStructure/selectors/boxAll/boxAll.C diff --git a/src/phasicFlow/structuredData/cylinder/cylinder.C b/src/phasicFlow/structuredData/cylinder/cylinder.C index 02319a7f..30123bd8 100644 --- a/src/phasicFlow/structuredData/cylinder/cylinder.C +++ b/src/phasicFlow/structuredData/cylinder/cylinder.C @@ -20,6 +20,7 @@ Licence: #include "cylinder.H" +#include "zAxis.H" FUNCTION_H bool pFlow::cylinder::calculateParams() @@ -31,11 +32,21 @@ bool pFlow::cylinder::calculateParams() { axisVector2_ = dot(p1p2,p1p2); axisVector_ = p1p2; - return true; + }else { return false; } + + zAxis zA(p1_,p2_); + + realx3 minPinZ(-sqrt(radius2_), -sqrt(radius2_), 0.0); + realx3 maxPinZ( sqrt(radius2_), sqrt(radius2_), sqrt(axisVector2_)); + + minPoint_ = zA.transferBackZ(minPinZ); + maxPoint_ = zA.transferBackZ(maxPinZ); + + return true; } FUNCTION_H diff --git a/src/phasicFlow/structuredData/cylinder/cylinder.H b/src/phasicFlow/structuredData/cylinder/cylinder.H index dd93e1ee..8b81de20 100644 --- a/src/phasicFlow/structuredData/cylinder/cylinder.H +++ b/src/phasicFlow/structuredData/cylinder/cylinder.H @@ -46,6 +46,10 @@ protected: real axisVector2_; + realx3 minPoint_; + + realx3 maxPoint_; + FUNCTION_H bool calculateParams(); @@ -116,13 +120,13 @@ public: INLINE_FUNCTION_HD realx3 minPoint()const { - return min( p1_ - realx3(radius()), p2_ - realx3(radius())); // should be improved + return minPoint_; } INLINE_FUNCTION_HD realx3 maxPoint()const { - return max( p1_ + realx3(radius()), p2_ + realx3(radius())); // should be improved + return maxPoint_; } INLINE_FUNCTION_HD diff --git a/src/phasicFlow/structuredData/peakableRegion/peakableRegionInstantiate.C b/src/phasicFlow/structuredData/peakableRegion/peakableRegionInstantiate.C index d2741163..7e6106e5 100644 --- a/src/phasicFlow/structuredData/peakableRegion/peakableRegionInstantiate.C +++ b/src/phasicFlow/structuredData/peakableRegion/peakableRegionInstantiate.C @@ -20,8 +20,11 @@ Licence: #include "boxRegion.H" #include "sphereRegion.H" +#include "cylinderRegion.H" template class pFlow::PeakableRegion; -template class pFlow::PeakableRegion; \ No newline at end of file +template class pFlow::PeakableRegion; + +template class pFlow::PeakableRegion; \ No newline at end of file diff --git a/utilities/geometryPhasicFlow/cylinderWall/zAxis.C b/src/phasicFlow/structuredData/zAxis/zAxis.C similarity index 100% rename from utilities/geometryPhasicFlow/cylinderWall/zAxis.C rename to src/phasicFlow/structuredData/zAxis/zAxis.C diff --git a/utilities/geometryPhasicFlow/cylinderWall/zAxis.H b/src/phasicFlow/structuredData/zAxis/zAxis.H similarity index 100% rename from utilities/geometryPhasicFlow/cylinderWall/zAxis.H rename to src/phasicFlow/structuredData/zAxis/zAxis.H diff --git a/utilities/geometryPhasicFlow/CMakeLists.txt b/utilities/geometryPhasicFlow/CMakeLists.txt index 31aed235..54fc654f 100644 --- a/utilities/geometryPhasicFlow/CMakeLists.txt +++ b/utilities/geometryPhasicFlow/CMakeLists.txt @@ -4,7 +4,6 @@ geometryPhasicFlow.C Wall/Wall.C planeWall/planeWall.C stlWall/stlWall.C -cylinderWall/zAxis.C cylinderWall/cylinderWall.C ) set(link_lib phasicFlow Geometry Kokkos::kokkos)