Skip to content

Commit 12417d3

Browse files
committed
Conditional for HALO exchange of nProcsTot=1 in polyMPO
1 parent b98b69a commit 12417d3

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/pmpo_c.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1624,10 +1624,18 @@ void polympo_set_free_slip_bc_f(MPMesh_ptr p_mpmesh){
16241624
}
16251625

16261626
void polympo_set_halo_vel_from_owner_f(MPMesh_ptr p_mpmesh){
1627+
1628+
int numProcsTot;
1629+
auto p_MPs = ((polyMPO::MPMesh*)p_mpmesh)->p_MPs;
1630+
MPI_Comm comm = p_MPs->getMPIComm();
1631+
MPI_Comm_size(comm, &numProcsTot);
1632+
if(numProcsTot == 1) return;
1633+
16271634
auto mpMesh = ((polyMPO::MPMesh*)p_mpmesh);
16281635
auto p_mesh = ((polyMPO::MPMesh*)p_mpmesh)->p_mesh;
16291636
int numVertices = p_mesh->getNumVertices();
16301637
auto vtxFieldVel = p_mesh->getMeshField<polyMPO::MeshF_Vel>();
1638+
16311639
mpMesh->communicate_and_take_halo_contributions1(vtxFieldVel, numVertices, 2, 1, 1);
16321640
}
16331641

0 commit comments

Comments
 (0)