Skip to content

Commit 215764a

Browse files
committed
More formatting
1 parent 3b6fccd commit 215764a

4 files changed

Lines changed: 22 additions & 22 deletions

File tree

src/pmpo_MPMesh.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void MPMesh::calculateStrain(){
3131
MPsStrainRate(mp, 2) = 0.0;
3232
return;
3333
}
34-
34+
3535
int numVtx = elm2VtxConn(elm,0);
3636

3737
double v11 = 0.0;
@@ -40,7 +40,7 @@ void MPMesh::calculateStrain(){
4040
double v22 = 0.0;
4141
double uTanOverR = 0.0;
4242
double vTanOverR = 0.0;
43-
43+
4444
for (int i = 0; i < numVtx; i++){
4545
int iVertex = elm2VtxConn(elm, i+1)-1;
4646
v11 = v11 + MPsBasisGrads(mp, i*2 + 0) * velField(iVertex, 0);
@@ -85,7 +85,7 @@ void MPMesh::calculateStress(const int constitutive_relation){
8585
constitutive_evp(strain_rate, stress, MPsIcePressure(mp,0), rep_pressure, MPsArea(mp,0), elasticTimeStep, dampingTimescale);
8686
else if(constitutive_relation == 3)
8787
constitutive_linear(strain_rate, stress);
88-
88+
8989
for (int m=0 ; m<3; m++)
9090
MPsStress(mp, m) = stress[m]*solveStress(elm);
9191
MPsRepPressure(mp,0)=rep_pressure;
@@ -152,7 +152,7 @@ void MPMesh::calculateStressDivergence(){
152152
(1.0 - ramp) * invM * w_vtx;
153153

154154
factor = factor * tanLatVertexRotatedOverRadius(vID, 0);
155-
155+
156156
auto factor1 = ramp * (w_vtx/radius) * (VtxCoeffs_new(vID, 1, 0) + VtxCoeffs_new(vID, 1, 1)*CoordDiffs[1] +
157157
VtxCoeffs_new(vID, 1, 2)*CoordDiffs[2] +
158158
VtxCoeffs_new(vID, 1, 3)*CoordDiffs[3]) -
@@ -287,7 +287,7 @@ void MPMesh::CVTTrackingElmCenterBased(const int printVTPIndex){
287287
Vec3d dx = MPnew-MP;
288288
while(true){
289289
int numConnElms = elm2ElmConn(iElm,0);
290-
290+
291291
Vec3d center(elmCenter(iElm, 0), elmCenter(iElm, 1), elmCenter(iElm, 2));
292292
Vec3d delta = MPnew - center;
293293

@@ -749,8 +749,8 @@ void MPMesh::T2LTracking(Vec2dView dx){
749749
Vec2d MP(mpPositions(mp,0),mpPositions(mp,1));//XXX:the input is XYZ, but we only support 2d vector
750750
if(mask){
751751
int iElm = elm;
752-
Vec2d MPnew = MP + dx(mp);
753-
752+
Vec2d MPnew = MP + dx(mp);
753+
754754
while(true){
755755
int numVtx = elm2VtxConn(iElm,0);
756756
bool goToNeighbour = false;
@@ -760,25 +760,25 @@ void MPMesh::T2LTracking(Vec2dView dx){
760760
v[i] = elm2VtxConn(iElm,i+1)-1;
761761
//get edges and perpendiculardx
762762
Vec2d e[maxVtxsPerElm];
763-
double pdx[maxVtxsPerElm];
763+
double pdx[maxVtxsPerElm];
764764
for(int i=0; i< numVtx; i++){
765765
int idx_ip1 = (i+1)%numVtx;
766766
Vec2d v_i(vtxCoords(v[i],0),vtxCoords(v[i],1));
767767
Vec2d v_ip1(vtxCoords(v[idx_ip1],0),vtxCoords(v[idx_ip1],1));
768768
e[i] = v_ip1 - v_i;
769769
pdx[i] = (v_i - MP).cross(dx(mp));
770770
}
771-
771+
772772
for(int i=0; i<numVtx; i++){
773773
int ip1 = (i+1)%numVtx;
774-
//pdx*pdx<0 and edge is acrossed
774+
//pdx*pdx<0 and edge is acrossed
775775
if(pdx[i]*pdx[ip1] <0 && e[i].cross(Vec2d(MPnew[0]-vtxCoords(v[i],0),
776776
MPnew[1]-vtxCoords(v[i],1)))<0){
777777
//go to the next elm
778778
iElm = elm2ElmConn(iElm,i+1);
779779
goToNeighbour = true;
780780
if(iElm <0){
781-
mpStatus(mp) = 0;
781+
mpStatus(mp) = 0;
782782
MPs2Elm(mp) = -1;
783783
goToNeighbour = false;
784784
}

src/pmpo_c.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1862,7 +1862,7 @@ void polympo_aggregate_deluDyn_f(MPMesh_ptr p_mpmesh){
18621862
}
18631863

18641864
void polympo_finalize_deludelvDyn_f(MPMesh_ptr p_mpmesh){
1865-
1865+
18661866
checkMPMeshValid(p_mpmesh);
18671867
auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh;
18681868

@@ -1873,7 +1873,7 @@ void polympo_finalize_deludelvDyn_f(MPMesh_ptr p_mpmesh){
18731873
auto vtxField = p_mesh->getMeshField<polyMPO::MeshF_OnSurfDispIncr>();
18741874
auto vtxFieldVel = p_mesh->getMeshField<polyMPO::MeshF_Vel>();
18751875
auto vtxFieldVel_incr = p_mesh->getMeshField<polyMPO::MeshF_OnSurfVeloIncr>();
1876-
1876+
18771877
Kokkos::parallel_for("Finalize_increments", nVertices, KOKKOS_LAMBDA(const int vtx){
18781878
vtxField(vtx, 0) = vtxField(vtx, 0) * elasticTimeStep;
18791879
vtxField(vtx, 1) = vtxField(vtx, 1) * elasticTimeStep;

src/pmpo_fortran.f90

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ subroutine polympo_calculateMPStrainRate(mpMesh) &
369369
use :: iso_c_binding
370370
type(c_ptr), value :: mpMesh
371371
end subroutine
372-
372+
373373
subroutine polympo_setMPStrainRate(mpMesh, nComps, numMPs, array) &
374374
bind(C, NAME='polympo_setMPStrainRate_f')
375375
use :: iso_c_binding
@@ -386,7 +386,7 @@ subroutine polympo_getMPStrainRate(mpMesh, nComps, numMPs, array) &
386386
type(c_ptr), value :: array
387387
end subroutine
388388

389-
389+
390390
!MP Stress
391391
subroutine polympo_calculateMPStress(mpMesh, constitutive_model) &
392392
bind(C, NAME='polympo_calculateMPStress_f')
@@ -1032,7 +1032,7 @@ subroutine polympo_setDynamicTimeStep(mpMesh, dynamicTimeStep) &
10321032
type(c_ptr), value :: mpMesh
10331033
real(c_double), value :: dynamicTimeStep
10341034
end subroutine
1035-
1035+
10361036
subroutine polympo_setSolveStressMesh(mpMesh, nCells, array) &
10371037
bind(C, NAME='polympo_setSolveStressMesh_f')
10381038
use :: iso_c_binding
@@ -1086,7 +1086,7 @@ subroutine polympo_set_airStress(mpMesh, nVertices, uArray, vArray) &
10861086
integer(c_int), value :: nVertices
10871087
type(c_ptr), value :: uArray, vArray
10881088
end subroutine
1089-
1089+
10901090
subroutine polympo_set_surfaceTiltForce(mpMesh, nVertices, uArray, vArray) &
10911091
bind(C, NAME='polympo_set_surfaceTiltForce_f')
10921092
use :: iso_c_binding
@@ -1144,13 +1144,13 @@ subroutine polympo_set_free_slip_bc(mpMesh) &
11441144
bind(C, NAME='polympo_set_free_slip_bc_f')
11451145
use :: iso_c_binding
11461146
type(c_ptr), value :: mpMesh
1147-
end subroutine
1147+
end subroutine
11481148

11491149
subroutine polympo_set_halo_vel_from_owner(mpMesh) &
11501150
bind(C, NAME='polympo_set_halo_vel_from_owner_f')
11511151
use :: iso_c_binding
11521152
type(c_ptr), value :: mpMesh
1153-
end subroutine
1153+
end subroutine
11541154

11551155
!---------------------------------------------------------------------------
11561156
!> @brief calculate the MPs from given mesh vertices rotational latitude
@@ -1163,13 +1163,13 @@ subroutine polympo_push(mpMesh) &
11631163
use :: iso_c_binding
11641164
type(c_ptr), value :: mpMesh
11651165
end subroutine
1166-
1166+
11671167
subroutine polympo_push_ahead(mpMesh) &
11681168
bind(C, NAME='polympo_push_ahead_f')
11691169
use :: iso_c_binding
11701170
type(c_ptr), value :: mpMesh
11711171
end subroutine
1172-
1172+
11731173
!---------------------------------------------------------------------------
11741174
!> @brief calculate the MPs from given mesh vertices rotational latitude
11751175
!---------------------------------------------------------------------------

src/pmpo_materialPoints.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class MaterialPoints {
148148
void rebuild(IntView addedMP2elm, IntView addedMPAppID);
149149
void startRebuild(IntView tgtElm, int addedNumMPs, IntView addedMP2elm, IntView addedMPAppID, Kokkos::View<const int*> addedMPMask);
150150
void startRebuild(IntView tgtElm, int addedNumMPs, IntView addedMP2elm, IntView addedMPAppID);
151-
151+
152152
void finishRebuild();
153153
bool rebuildOngoing();
154154

0 commit comments

Comments
 (0)