Skip to content

Commit 2c095bb

Browse files
committed
Some more cleaning
1 parent b380e26 commit 2c095bb

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

src/pmpo_MPMesh.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void MPMesh::calculateStrain(){
2323
auto solveStress = p_mesh->getMeshField<polyMPO::MeshF_SolveStress>();
2424

2525
bool isRotated = p_mesh->getRotatedFlag();
26-
26+
2727
auto setMPStrainRate = PS_LAMBDA(const int& elm, const int& mp, const int& mask){
2828
if(mask){
2929

@@ -84,25 +84,25 @@ void MPMesh::calculateStress(const int constitutive_relation){
8484
auto MPsArea = p_MPs->getData<polyMPO::MPF_Area>();
8585
auto MPsIcePressure = p_MPs->getData<polyMPO::MPF_IcePressure>();
8686
auto MPsRepPressure = p_MPs->getData<polyMPO::MPF_ReplacementPressure>();
87-
87+
8888
auto setMPStress = PS_LAMBDA(const int& elm, const int& mp, const int& mask){
8989
if(mask){
9090
Vec3d strain_rate (MPsStrainRate(mp, 0), MPsStrainRate(mp, 1), MPsStrainRate(mp, 2));
9191
Vec3d stress(MPsStress(mp, 0), MPsStress(mp, 1), MPsStress(mp, 2));
92-
92+
9393
if (constitutive_relation == 1)
9494
constitutive_evp(strain_rate, stress, MPsIcePressure(mp,0), MPsRepPressure(mp,0), MPsArea(mp,0), elasticTimeStep, dampingTimescale);
9595
else if(constitutive_relation == 3)
96-
constitutive_linear(strain_rate, stress);
96+
constitutive_linear(strain_rate, stress);
9797
for (int m=0 ; m<3; m++)
9898
MPsStress(mp, m) = stress[m]*solveStress(elm);
9999
}
100100
};
101101
p_MPs->parallel_for(setMPStress, "setMPStress");
102-
}
102+
}
103103

104104
void MPMesh::calculateStressDivergence(){
105-
105+
106106
Kokkos::Timer timer;
107107
int self, numProcsTot;
108108
MPI_Comm comm = p_MPs->getMPIComm();
@@ -116,7 +116,7 @@ void MPMesh::calculateStressDivergence(){
116116
int numVertices = p_mesh->getNumVertices();
117117
auto tanLatVertexRotatedOverRadius = p_mesh->getMeshField<MeshF_TanLatVertexRotatedOverRadius>();
118118
auto interiorVertex = p_mesh->getMeshField<MeshF_InteriorVertex>();
119-
119+
120120
//Material Points
121121
auto MPsAppID = p_MPs->getData<MPF_MP_APP_ID>();
122122
auto weight = p_MPs->getData<MPF_Basis_Vals>();
@@ -159,7 +159,7 @@ void MPMesh::calculateStressDivergence(){
159159
auto factor2 = (w_vtx/radius)*(VtxCoeffs_new(vID,2, 0) + VtxCoeffs_new(vID,2, 1)*CoordDiffs[1] +
160160
VtxCoeffs_new(vID,2, 2)*CoordDiffs[2] +
161161
VtxCoeffs_new(vID,2, 3)*CoordDiffs[3]);
162-
162+
163163
Kokkos::atomic_add(&stress_divUV(vID, 0), factor1 * MPsStress(mp, 0) + factor2 * MPsStress(mp, 2) -
164164
2 * tanLatVertexRotatedOverRadius(vID, 0) * factor * MPsStress(mp, 2));
165165
Kokkos::atomic_add(&stress_divUV(vID, 1), factor2 * MPsStress(mp, 1) + factor1*MPsStress(mp, 2) +
@@ -182,7 +182,7 @@ void MPMesh::calculateStressDivergence(){
182182
communicate_and_take_halo_contributions(stress_divUV, numVertices, 2, 1, 1);
183183
communicate_and_take_halo_contributions(divUV_edge, numVertices, 2, 1, 1);
184184
}
185-
185+
186186
auto stressDivergence = p_mesh->getMeshField<MeshF_StressDivergence>();
187187
Kokkos::parallel_for("calculate_divergence", numVtxOwned, KOKKOS_LAMBDA(const int vtx){
188188
double ramp = nearAnEdge_l(vtx);
@@ -192,7 +192,7 @@ void MPMesh::calculateStressDivergence(){
192192
stressDivergence(vtx, 0) = ramp * stress_divUV(vtx, 0) + (1 - ramp) * divUV_edge(vtx, 0) * invM ;
193193
stressDivergence(vtx, 1) = ramp * stress_divUV(vtx, 1) + (1 - ramp) * divUV_edge(vtx, 1) * invM ;
194194
});
195-
195+
196196
pumipic::RecordTime("Stress_Divergence_Reconstruction" + std::to_string(self), timer.seconds());
197197
}
198198

@@ -580,13 +580,13 @@ void MPMesh::push_swap_pos(){
580580

581581
void MPMesh::push(){
582582
Kokkos::Timer timer;
583-
583+
584584
p_mesh->computeRotLatLonIncr();
585-
585+
586586
sphericalInterpolation<MeshF_RotLatLonIncr>(*this);
587-
587+
588588
p_MPs->updateRotLatLonAndXYZ2Tgt(p_mesh->getSphereRadius(), p_mesh->getRotatedFlag());
589-
589+
590590
auto elm2Process = p_mesh->getElm2Process();
591591

592592
bool anyIsMigrating = false;
@@ -596,15 +596,15 @@ void MPMesh::push(){
596596
p_MPs->updateMPSlice<MPF_Cur_Pos_Rot_Lat_Lon, MPF_Tgt_Pos_Rot_Lat_Lon>(); // Tgt becomes Cur
597597

598598
bool anyIsMigrating = getAnyIsMigrating(p_MPs, p_MPs->check_migrate());
599-
599+
600600
if(anyIsMigrating)
601601
p_MPs->migrate();
602602
else
603603
p_MPs->rebuild();
604-
604+
605605
p_MPs->updateMPElmID(); //update mpElm IDs slices
606606
reconstructSlices();
607-
}
607+
}
608608
while (anyIsMigrating);
609609

610610
pumipic::RecordTime("PolyMPO_push", timer.seconds());

0 commit comments

Comments
 (0)