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

@ -190,7 +190,7 @@ pFlow::geometry::geometry
objectFile(
"contactForceWall",
"",
objectFile::READ_IF_PRESENT,
objectFile::READ_NEVER,
objectFile::WRITE_ALWAYS),
surface(),
zero3) ),
@ -199,7 +199,7 @@ pFlow::geometry::geometry
objectFile(
"stressWall",
"",
objectFile::READ_IF_PRESENT,
objectFile::READ_NEVER,
objectFile::WRITE_ALWAYS),
surface(),
zero3) )
@ -271,6 +271,33 @@ pFlow::uniquePtr<pFlow::geometry>
return nullptr;
}
bool pFlow::geometry::beforeIteration()
{
this->zeroForce();
return true;
}
bool pFlow::geometry::afterIteration()
{
auto Force = contactForceWall_.deviceVectorAll();
auto area = triSurface_.area().deviceVectorAll();
auto stress = stressWall_.deviceVectorAll();
auto numTri =triSurface_.size();
Kokkos::parallel_for(
"geometry::calculateStress",
numTri,
LAMBDA_HD(int32 i){
stress[i] = Force[i]/area[i];
});
Kokkos::fence();
return true;
}
pFlow::uniquePtr<pFlow::geometry>
pFlow::geometry::create(
systemControl& control,