Skip to content

Commit

Permalink
Merge pull request #112 from coprigent/feature/api-distrib-faces
Browse files Browse the repository at this point in the history
API_DISTRIB_FACES prioritized over API_DISTRIB_NODES
  • Loading branch information
Algiane authored Aug 22, 2024
2 parents 535b533 + aa2de6a commit c224b90
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/inout_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,10 @@ int PMMG_loadCommunicators( PMMG_pParMesh parmesh,const char *filename ) {
} else if(!strncmp(chaine,"ParallelVertexCommunicators",strlen("ParallelVertexCommunicators"))) {
MMG_FSCANF(inm,"%d",&ncomm);
pos = ftell(inm);
API_mode = PMMG_APIDISTRIB_nodes;
if (API_mode == PMMG_UNSET) {
/** if both parallel nodes and parallel faces are provided, use faces to build communicators */
API_mode = PMMG_APIDISTRIB_nodes;
}
break;
}
}
Expand Down Expand Up @@ -292,7 +295,9 @@ int PMMG_loadCommunicators( PMMG_pParMesh parmesh,const char *filename ) {
MMG_FREAD(&ncomm,MMG5_SW,1,inm);
if(iswp) ncomm=MMG5_swapbin(ncomm);
pos = ftell(inm);
API_mode = PMMG_APIDISTRIB_nodes;
if (API_mode == PMMG_UNSET) {
API_mode = PMMG_APIDISTRIB_nodes;
}
rewind(inm);
fseek(inm,bpos,SEEK_SET);
continue;
Expand Down

0 comments on commit c224b90

Please sign in to comment.