@@ -1667,11 +1667,20 @@ void polympo_reconstruct_velocity_with_MPI_f(MPMesh_ptr p_mpmesh){
16671667 mpmesh->assemblyVtx1 <polyMPO::MeshF_Vel>();
16681668}
16691669
1670- void polympo_init_deluDyn_f (MPMesh_ptr p_mpmesh){
1670+ void polympo_init_deludelvDyn_f (MPMesh_ptr p_mpmesh){
16711671 checkMPMeshValid (p_mpmesh);
16721672 auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh ;
16731673 auto vtxField = p_mesh->getMeshField <polyMPO::MeshF_OnSurfDispIncr>();
16741674 Kokkos::deep_copy (vtxField, 0.0 );
1675+
1676+ auto vtxFieldVel = p_mesh->getMeshField <polyMPO::MeshF_Vel>();
1677+ auto vtxFieldVel_incr = p_mesh->getMeshField <polyMPO::MeshF_OnSurfVeloIncr>();
1678+ auto nVertices = p_mesh->getNumVertices ();
1679+
1680+ Kokkos::parallel_for (" set_VelIncr" , nVertices, KOKKOS_LAMBDA (const int vtx){
1681+ vtxFieldVel_incr (vtx, 0 ) = vtxFieldVel (vtx, 0 );
1682+ vtxFieldVel_incr (vtx, 1 ) = vtxFieldVel (vtx, 1 );
1683+ });
16751684}
16761685
16771686void polympo_aggregate_deluDyn_f (MPMesh_ptr p_mpmesh){
@@ -1680,6 +1689,27 @@ void polympo_aggregate_deluDyn_f(MPMesh_ptr p_mpmesh){
16801689 p_mesh->aggregateDeluDyn ();
16811690}
16821691
1692+ void polympo_finalize_deludelvDyn_f (MPMesh_ptr p_mpmesh){
1693+
1694+ checkMPMeshValid (p_mpmesh);
1695+ auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh ;
1696+
1697+ auto nVertices = p_mesh->getNumVertices ();
1698+ auto elasticTimeStep = p_mesh->getElasticTimeStep ();
1699+ auto dynamicTimeStep = p_mesh->getDynamicTimeStep ();
1700+
1701+ auto vtxField = p_mesh->getMeshField <polyMPO::MeshF_OnSurfDispIncr>();
1702+ auto vtxFieldVel = p_mesh->getMeshField <polyMPO::MeshF_Vel>();
1703+ auto vtxFieldVel_incr = p_mesh->getMeshField <polyMPO::MeshF_OnSurfVeloIncr>();
1704+
1705+ Kokkos::parallel_for (" Finalize_increments" , nVertices, KOKKOS_LAMBDA (const int vtx){
1706+ vtxField (vtx, 0 ) = vtxField (vtx, 0 ) * elasticTimeStep;
1707+ vtxField (vtx, 1 ) = vtxField (vtx, 1 ) * elasticTimeStep;
1708+ vtxFieldVel_incr (vtx, 0 ) = vtxFieldVel (vtx, 0 ) - vtxFieldVel_incr (vtx, 0 );
1709+ vtxFieldVel_incr (vtx, 1 ) = vtxFieldVel (vtx, 1 ) - vtxFieldVel_incr (vtx, 1 );
1710+ });
1711+ }
1712+
16831713// Timing
16841714void polympo_enableTiming_f (){
16851715 pumipic::EnableTiming ();
0 commit comments