Doc for Geometry added

This commit is contained in:
Hamidreza Norouzi
2023-04-13 11:42:41 -07:00
parent c34c55bdde
commit 1fe2256079
5 changed files with 198 additions and 131 deletions

View File

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