mirror of
https://github.com/PhasicFlow/phasicFlow.git
synced 2025-06-22 16:28:30 +00:00
Doc for Geometry added
This commit is contained in:
@ -18,38 +18,6 @@ Licence:
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
||||
template<typename MotionModel>
|
||||
bool pFlow::geometryMotion<MotionModel>::moveGeometry()
|
||||
{
|
||||
|
||||
real dt = this->dt();
|
||||
real t = this->currentTime();
|
||||
|
||||
auto pointMIndex= pointMotionIndex_.deviceVector();
|
||||
auto mModel = motionModel_.getModel(t);
|
||||
realx3* points = triSurface_.pointsData_D();
|
||||
auto numPoints = triSurface_.numPoints();
|
||||
|
||||
|
||||
Kokkos::parallel_for(
|
||||
"geometryMotion<MotionModel>::movePoints",
|
||||
numPoints,
|
||||
LAMBDA_HD(int32 i){
|
||||
auto newPos = mModel.transferPoint(pointMIndex[i], points[i], dt);
|
||||
points[i] = newPos;
|
||||
});
|
||||
|
||||
Kokkos::fence();
|
||||
|
||||
// move the motion components
|
||||
motionModel_.move(t,dt);
|
||||
|
||||
// end of calculations
|
||||
moveGeomTimer_.end();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename MotionModel>
|
||||
bool pFlow::geometryMotion<MotionModel>::findMotionIndex()
|
||||
{
|
||||
@ -88,6 +56,7 @@ bool pFlow::geometryMotion<MotionModel>::findMotionIndex()
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
template<typename MotionModel>
|
||||
pFlow::geometryMotion<MotionModel>::geometryMotion
|
||||
(
|
||||
@ -180,6 +149,13 @@ pFlow::geometryMotion<MotionModel>::geometryMotion
|
||||
findMotionIndex();
|
||||
}
|
||||
|
||||
template<typename MotionModel>
|
||||
bool pFlow::geometryMotion<MotionModel>::beforeIteration()
|
||||
{
|
||||
geometry::beforeIteration();
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename MotionModel>
|
||||
bool pFlow::geometryMotion<MotionModel>::iterate()
|
||||
{
|
||||
@ -189,5 +165,44 @@ bool pFlow::geometryMotion<MotionModel>::iterate()
|
||||
moveGeometry();
|
||||
moveGeomTimer_.end();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename MotionModel>
|
||||
bool pFlow::geometryMotion<MotionModel>::afterIteration()
|
||||
{
|
||||
geometry::afterIteration();
|
||||
return true;
|
||||
}
|
||||
|
||||
template<typename MotionModel>
|
||||
bool pFlow::geometryMotion<MotionModel>::moveGeometry()
|
||||
{
|
||||
|
||||
real dt = this->dt();
|
||||
real t = this->currentTime();
|
||||
|
||||
auto pointMIndex= pointMotionIndex_.deviceVector();
|
||||
auto mModel = motionModel_.getModel(t);
|
||||
realx3* points = triSurface_.pointsData_D();
|
||||
auto numPoints = triSurface_.numPoints();
|
||||
|
||||
|
||||
Kokkos::parallel_for(
|
||||
"geometryMotion<MotionModel>::movePoints",
|
||||
numPoints,
|
||||
LAMBDA_HD(int32 i){
|
||||
auto newPos = mModel.transferPoint(pointMIndex[i], points[i], dt);
|
||||
points[i] = newPos;
|
||||
});
|
||||
|
||||
Kokkos::fence();
|
||||
|
||||
// move the motion components
|
||||
motionModel_.move(t,dt);
|
||||
|
||||
// end of calculations
|
||||
moveGeomTimer_.end();
|
||||
|
||||
return true;
|
||||
}
|
Reference in New Issue
Block a user