Merge pull request #27 from PhasicFlow/solvers

correctoin for particle insertion:cylinder region
This commit is contained in:
PhasicFlow 2022-09-28 11:39:33 +03:30 committed by GitHub
commit f7795b3fd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 23 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -20,8 +20,11 @@ Licence:
#include "boxRegion.H"
#include "sphereRegion.H"
#include "cylinderRegion.H"
template class pFlow::PeakableRegion<pFlow::boxRegion>;
template class pFlow::PeakableRegion<pFlow::sphereRegion>;
template class pFlow::PeakableRegion<pFlow::cylinderRegion>;

View File

@ -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)