Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(1) Change tag type (int -> uint) and (2) creation of the overlap #123

Merged
merged 42 commits into from
Oct 24, 2024
Merged
Show file tree
Hide file tree
Changes from 37 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
6418c24
Add file overlap_pmmg.c
laetitia-m Apr 4, 2024
1d55fdf
Merge branch 'develop' into feature/overlap
laetitia-m Apr 4, 2024
83b6796
Merge branch 'feature/overlap' of github.com:laetitia-m/ParMmg into f…
laetitia-m Apr 5, 2024
ed4916b
Merge branch 'develop' into feature/overlap
laetitia-m Apr 8, 2024
b7de387
Start to create overlap funciton - add tag MG_OVERLAP to nodes and tetra
laetitia-m Apr 12, 2024
7ccf526
Merge branch 'feature/overlap' of github.com:laetitia-m/ParMmg into f…
laetitia-m Apr 12, 2024
b74d8bd
Modify type of tags
laetitia-m May 15, 2024
2f4bf5d
Start to add the overlap
laetitia-m May 15, 2024
4c09489
Merge branch 'develop' into feature/overlap
laetitia-m May 15, 2024
cdbc02f
Add PMMG_Overlap type + send and receive points coordinates and id
laetitia-m Jun 4, 2024
bf95b6b
Rename variables
laetitia-m Jun 6, 2024
2036ad1
Clean code
laetitia-m Jun 7, 2024
ce2ed28
Clean code and improve overlap
laetitia-m Jun 14, 2024
59a9146
Fix memory error + rename variables + improve algorithm
laetitia-m Jun 19, 2024
5dedf56
Update of index of tetra DONE + start to clean code and add comments.…
laetitia-m Jun 25, 2024
a51b3bc
Rename variables + clean code + start to treat PBDY outside the loop …
laetitia-m Jun 26, 2024
1504bc6
Improve overlap
laetitia-m Jul 24, 2024
11da1f9
Add and delete overlap before and after PMMG_snpval_ls
laetitia-m Aug 30, 2024
43226e8
aesthetic modification
laetitia-m Aug 30, 2024
aa11910
Remove MPI_LS_TAG - to be moved in feature/snpval branch
laetitia-m Aug 30, 2024
7a593e3
Add PMMG_delete_overlap into list of functions
laetitia-m Aug 30, 2024
d59ad74
Add PMMG_delete_overlap function + rename variables + add transfer of…
laetitia-m Aug 30, 2024
a230194
Add print for ci_test
laetitia-m Aug 30, 2024
fefe7b7
Add overlap ci tests
laetitia-m Aug 30, 2024
eedb25b
Merge develop into feature/overlap
laetitia-m Aug 30, 2024
4962e43
pimp the overlap
laetitia-m Aug 30, 2024
8a6ac9b
revert int to static int
laetitia-m Aug 30, 2024
996e369
Take into account PR comments from Algiane
laetitia-m Sep 6, 2024
4d3f591
Clean a bit overlap_pmmg.c and ad some comments + add CI tests to che…
laetitia-m Sep 6, 2024
11fc45e
Improve comments + improve some if
laetitia-m Sep 6, 2024
2b7d022
Modify temporarily mmg git tag in CMakeLists.txt to point towards lae…
laetitia-m Sep 6, 2024
125bbfc
Modify error in point tag MG_OVERLAP assignation + fix ci_test in acc…
laetitia-m Sep 6, 2024
6a83559
Fix typo
laetitia-m Sep 6, 2024
9930f80
Fix error on MG_OVERLAP assignment + reset flag at the beginning of t…
laetitia-m Sep 6, 2024
ffc6587
Modify mmg git tag
laetitia-m Sep 10, 2024
9353db4
Fix missing conversion from int16 to uint16 for tag type.
Algiane Sep 12, 2024
e694b69
Clean extraneous parenthesis.
Algiane Sep 12, 2024
0c59f8e
Improve overlap function based on PR comments
laetitia-m Oct 16, 2024
1bb1bfe
Add Algiane modif on parenthesis
laetitia-m Oct 16, 2024
f2655c9
merge develop and resolve conflict
laetitia-m Oct 16, 2024
da2eb99
merge develop and resolve conflict
laetitia-m Oct 16, 2024
57c0a6f
Modify name of steps to be able to better identify each important ste…
laetitia-m Oct 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ IF ( DOWNLOAD_MMG )

EXTERNALPROJECT_ADD ( Mmg
GIT_REPOSITORY https://github.com/MmgTools/mmg.git
GIT_TAG 2263f92c
GIT_TAG 88d9d1ed6746a1e68713623859ca070224a5abbc
INSTALL_COMMAND ${CMAKE_MAKE_PROGRAM} install
CMAKE_ARGS ${MMG_ARGS} -DUSE_ELAS=OFF ${COMPILER_CFG} ${FLAGS_CFG}
${SCOTCH_CFG} ${VTK_CFG} -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
Expand Down
111 changes: 111 additions & 0 deletions cmake/testing/pmmg_tests.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -434,6 +434,117 @@ IF( BUILD_TESTING )
${CI_DIR}/LevelSet/2p_toygeom/cube-distributed-faces-nomat-1edge.mesh -v 10 -hsiz 0.1
-out ${CI_DIR_RESULTS}/update-ref-tag.o.mesh)

###############################################################################
#####
##### Tests overlap
#####
###############################################################################
# Test if overlap is created
set(overlapCreation "## Create Overlap.")

add_test( NAME overlap-create
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-out ${CI_DIR_RESULTS}/overlap-create.o.mesh)
set_property(TEST overlap-create
PROPERTY PASS_REGULAR_EXPRESSION "${overlapCreation}")

# Test if overlap is deleted
set(overlapDelete "## Delete Overlap.")

add_test( NAME overlap-delete
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-out ${CI_DIR_RESULTS}/overlap-delete.o.mesh)
set_property(TEST overlap-delete
PROPERTY PASS_REGULAR_EXPRESSION "${overlapDelete}")

# Tests if overlap is created correctly
set(overlapCheckP0P1 "OVERLAP - part 0 sends 74 pts and 257 tetra to part 1")
set(overlapCheckP0P2 "OVERLAP - part 0 sends 29 pts and 110 tetra to part 2")
set(overlapCheckP0P3 "OVERLAP - part 0 sends 61 pts and 204 tetra to part 3")
set(overlapCheckP0P4 "OVERLAP - part 0 sends 28 pts and 66 tetra to part 4")
set(overlapCheckP0 "OVERLAP - part 0 has 433 pts and 1492 tetras after overlap creation")

add_test( NAME overlap-check-P0P1
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-out ${CI_DIR_RESULTS}/overlap-check-P0P1.o.mesh)
set_property(TEST overlap-check-P0P1
PROPERTY PASS_REGULAR_EXPRESSION "${overlapCheckP0P1}")

add_test( NAME overlap-check-P0P2
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-out ${CI_DIR_RESULTS}/overlap-check-P0P2.o.mesh)
set_property(TEST overlap-check-P0P2
PROPERTY PASS_REGULAR_EXPRESSION "${overlapCheckP0P2}")

add_test( NAME overlap-check-P0P3
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-out ${CI_DIR_RESULTS}/overlap-check-P0P3.o.mesh)
set_property(TEST overlap-check-P0P3
PROPERTY PASS_REGULAR_EXPRESSION "${overlapCheckP0P3}")

add_test( NAME overlap-check-P0P4
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-out ${CI_DIR_RESULTS}/overlap-check-P0P4.o.mesh)
set_property(TEST overlap-check-P0P4
PROPERTY PASS_REGULAR_EXPRESSION "${overlapCheckP0P4}")

add_test( NAME overlap-check-P0
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-out ${CI_DIR_RESULTS}/overlap-check-P0.o.mesh)
set_property(TEST overlap-check-P0
PROPERTY PASS_REGULAR_EXPRESSION "${overlapCheckP0}")

add_test( NAME overlap-check-P0-met
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-met ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-metric.sol
-out ${CI_DIR_RESULTS}/overlap-check-P0-met.o.mesh)
set_property(TEST overlap-check-P0-met
PROPERTY PASS_REGULAR_EXPRESSION "${overlapCheckP0}")

# Tests if overlap is deleted correctly
set(overlapCheckDelete "OVERLAP - part 0 has 282 pts and 882 tetras after overlap deletion")
add_test( NAME overlap-check-delete
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-out ${CI_DIR_RESULTS}/overlap-check-delete.o.mesh)
set_property(TEST overlap-check-delete
PROPERTY PASS_REGULAR_EXPRESSION "${overlapCheckDelete}")

add_test( NAME overlap-check-delete-met
COMMAND ${MPIEXEC} ${MPI_ARGS} ${MPIEXEC_NUMPROC_FLAG} 5 $<TARGET_FILE:${PROJECT_NAME}>
${CI_DIR}/LevelSet/5p_cubegeom/3D-cube.mesh -v 10 -nomove -noinsert -noswap -nobalance -niter 1
-ls 0.0
-sol ${CI_DIR}/LevelSet/5p_cubegeom/3D-cube-ls.sol
-out ${CI_DIR_RESULTS}/overlap-check-delete-met.o.mesh)
set_property(TEST overlap-check-delete-met
PROPERTY PASS_REGULAR_EXPRESSION "${overlapCheckDelete}")

###############################################################################
#####
##### Test isovalue mode - ls discretization
Expand Down
24 changes: 12 additions & 12 deletions src/analys_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ typedef struct {
MMG5_pxTetra pxt;
MMG5_pPoint ppt;
double n[3];
int16_t tag;
uint16_t tag;
int ie,ifac,iloc,iadj;
int ip,ip1,ip2;
int updloc,updpar;
Expand All @@ -110,7 +110,7 @@ typedef struct {
*/
static inline
int PMMG_hGetOri( MMG5_HGeom *hash,int ip0,int ip1,int *ref,int16_t *color ) {
int16_t tag;
uint16_t tag;

/* Get edge from hash table */
if( !MMG5_hGet( hash,
Expand All @@ -137,7 +137,7 @@ int PMMG_hGetOri( MMG5_HGeom *hash,int ip0,int ip1,int *ref,int16_t *color ) {
*/
static inline
int PMMG_hTagOri( MMG5_HGeom *hash,int ip0,int ip1,int ref,int16_t color ) {
int16_t tag;
uint16_t tag;

/* Set bitwise tag from color */
if( color ) {
Expand Down Expand Up @@ -273,8 +273,8 @@ int PMMG_hashNorver_loop( PMMG_pParMesh parmesh,PMMG_hn_loopvar *var,int16_t ski
*/
static inline
int PMMG_hash_nearParEdges( PMMG_pParMesh parmesh,PMMG_hn_loopvar *var ) {
int ia[2],ip[2],j;
int16_t tag;
int ia[2],ip[2],j;
uint16_t tag;

/* Get points */
ia[0] = MMG5_iarf[var->ifac][MMG5_iprv2[var->iloc]];
Expand Down Expand Up @@ -312,8 +312,8 @@ int PMMG_hashNorver_edges( PMMG_pParMesh parmesh,PMMG_hn_loopvar *var ) {
double *doublevalues;
int ia[2],ip[2],gip;
int *intvalues,idx,d,edg,j,pos;
int16_t tag;
int8_t found;
uint16_t tag;
int8_t found;

doublevalues = parmesh->int_node_comm->doublevalues;
intvalues = parmesh->int_node_comm->intvalues;
Expand Down Expand Up @@ -383,7 +383,7 @@ static inline
int PMMG_hashNorver_switch( PMMG_pParMesh parmesh,PMMG_hn_loopvar *var ) {
int idx;
int ia[2],ip[2],j;
int16_t tag;
uint16_t tag;

/* Only process ridge points */
if( !(var->ppt->tag & MG_GEO ) ) return 1;
Expand Down Expand Up @@ -1207,7 +1207,7 @@ int PMMG_set_edge_owners( PMMG_pParMesh parmesh,MMG5_HGeom *hpar,MPI_Comm comm )
MMG5_pEdge pa;
int *intvalues,*itosend,*itorecv;
int idx,k,nitem,color,edg,ia,ie,ifac,ip[2],i;
int16_t tag;
uint16_t tag;
MPI_Status status;

assert( parmesh->ngrp == 1 );
Expand Down Expand Up @@ -1587,7 +1587,7 @@ int PMMG_update_nmgeom(PMMG_pParMesh parmesh,MMG5_pMesh mesh){
}

static inline
int MMG5_skip_nonOldParBdy ( int8_t tag ) {
uint16_t MMG5_skip_nonOldParBdy ( uint16_t tag ) {
return !(tag & MG_OLDPARBDY);
}

Expand Down Expand Up @@ -1670,7 +1670,7 @@ int PMMG_loopr(PMMG_pParMesh parmesh,PMMG_hn_loopvar *var ) {
MMG5_pPoint ppt[2];
double *doublevalues;
int *intvalues,ip[2],k,j,idx,ns0,edg,d;
int16_t tag;
uint16_t tag;
int8_t isEdg;

/* Get node communicator */
Expand Down Expand Up @@ -2069,7 +2069,7 @@ int PMMG_setdhd(PMMG_pParMesh parmesh,MMG5_pMesh mesh,MMG5_HGeom *pHash,MPI_Comm
int k,ne,nr,nm,j;
int i,i1,i2;
int idx,edg,d;
int16_t tag;
uint16_t tag;
MPI_Status status;

assert( parmesh->ngrp == 1 );
Expand Down
2 changes: 1 addition & 1 deletion src/boulep_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ int PMMG_boulen(PMMG_pParMesh parmesh,MMG5_pMesh mesh,int start,int ip,int iface
double dd,l0,l1;
int base,nump,nr,nnm,k,piv,na,nb,adj,nvstart,fstart,aux,ip0,ip1;
int *adja,color;
int16_t tag;
uint16_t tag;
int8_t iopp,ipiv,indb,inda,i,isface;
int8_t indedg[4][4] = { {-1,0,1,2}, {0,-1,3,4}, {1,3,-1,5}, {2,4,5,-1} };

Expand Down
4 changes: 2 additions & 2 deletions src/communicators_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ int PMMG_fillExtEdgeComm_fromFace( PMMG_pParMesh parmesh,MMG5_pMesh mesh,MMG5_HG
PMMG_pExt_comm ext_edge_comm,MMG5_pTetra pt,int ifac,int iloc,int j,int color,int *item ) {
MMG5_pEdge pa;
int edg;
int16_t tag;
uint16_t tag;
int8_t i1,i2;

/* Take the edge opposite to vertex iloc+j on face ifac */
Expand Down Expand Up @@ -661,7 +661,7 @@ int PMMG_build_edgeComm( PMMG_pParMesh parmesh,MMG5_pMesh mesh,MMG5_HGeom *hpar,
MMG5_hgeom *ph;
int *nitems_ext_comm,color,k,i,idx,ie,ifac,iloc,j,item;
int edg;
int16_t tag;
uint16_t tag;
int8_t ia,i1,i2;

assert( parmesh->ngrp == 1 );
Expand Down
2 changes: 1 addition & 1 deletion src/debug_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@
* Write group surface mesh and edges with given tag in medit format.
*
*/
int PMMG_grp_to_saveEdges( PMMG_pParMesh parmesh,int grpId,int16_t tag,char *basename ) {
int PMMG_grp_to_saveEdges( PMMG_pParMesh parmesh,int grpId,uint16_t tag,char *basename ) {

Check warning on line 458 in src/debug_pmmg.c

View check run for this annotation

Codecov / codecov/patch

src/debug_pmmg.c#L458

Added line #L458 was not covered by tests
PMMG_pGrp grp;
MMG5_pMesh mesh;
MMG5_pTria ptr;
Expand Down
2 changes: 1 addition & 1 deletion src/debug_pmmg.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ void PMMG_grplst_meshes_to_txt( char *name, PMMG_pGrp grp, int ngrp );
void PMMG_tetras_of_mesh_to_txt( char *name, MMG5_pMesh mesh, int num );
void PMMG_find_tetras_referencing_null_points_to_txt( char *name, PMMG_pGrp grp, int nmsh );
void PMMG_listgrp_meshes_adja_of_tetras_to_txt( char *name, PMMG_pGrp grp, int ngrp );
int PMMG_grp_to_saveEdges( PMMG_pParMesh parmesh,int grpId,int16_t tag,char *basename );
int PMMG_grp_to_saveEdges( PMMG_pParMesh parmesh,int grpId,uint16_t tag,char *basename );
int PMMG_grp_to_saveMesh( PMMG_pParMesh parmesh, int grpId, char *basename );
int PMMG_listgrp_to_saveMesh( PMMG_pParMesh parmesh, char *basename );
int PMMG_listgrp_quality_to_saveMesh( PMMG_pParMesh parmesh, char *basename );
Expand Down
2 changes: 1 addition & 1 deletion src/hash_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ int PMMG_bdryUpdate( MMG5_pMesh mesh )
MMG5_pxTetra pxt;
MMG5_HGeom hash;
int k,edg;
int16_t tag;
uint16_t tag;
int8_t i,i1,i2;


Expand Down
8 changes: 7 additions & 1 deletion src/libparmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,7 @@ int PMMG_preprocessMesh_distributed( PMMG_pParMesh parmesh )
if ( !PMMG_build_nodeCommFromFaces(parmesh,parmesh->info.read_comm) ) {
return PMMG_STRONGFAILURE;
}

break;

case PMMG_APIDISTRIB_nodes :
Expand Down Expand Up @@ -397,9 +398,12 @@ int PMMG_preprocessMesh_distributed( PMMG_pParMesh parmesh )
fprintf(stdout,"\n -- PHASE 1a: ISOVALUE DISCRETIZATION \n");
fprintf(stdout," -- under development \n");
}

/* Iso-value discretization */
if ( !PMMG_ls(parmesh,mesh,ls,met) ) {
return PMMG_STRONGFAILURE;
}

chrono(OFF,&(ctim[tim]));
printim(ctim[tim].gdif,stim);
if ( parmesh->info.imprim > PMMG_VERB_VERSION ) {
Expand Down Expand Up @@ -1093,6 +1097,7 @@ int PMMG_Compute_verticesGloNum( PMMG_pParMesh parmesh,MPI_Comm comm ){
/* Store owner in the point flag */
for( ip = 1; ip <= mesh->np; ip++ ) {
ppt = &mesh->point[ip];
if (ppt->tag & MG_OVERLAP) continue;
ppt->flag = parmesh->myrank;
}

Expand Down Expand Up @@ -1128,13 +1133,13 @@ int PMMG_Compute_verticesGloNum( PMMG_pParMesh parmesh,MPI_Comm comm ){
counter = 0;
for( ip = 1; ip <= mesh->np; ip++ ) {
ppt = &mesh->point[ip];
if (ppt->tag & MG_OVERLAP) continue;
if( ppt->flag != parmesh->myrank ) continue;
ppt->tmp = ++counter+offsets[parmesh->myrank];
assert(ppt->tmp);
}
assert( counter == nowned );


/** Step 2: Communicate global numbering */

/* Store numbering in the internal communicator */
Expand Down Expand Up @@ -1233,6 +1238,7 @@ int PMMG_Compute_verticesGloNum( PMMG_pParMesh parmesh,MPI_Comm comm ){
#ifndef NDEBUG
for( ip = 1; ip <= mesh->np; ip++ ) {
ppt = &mesh->point[ip];
if (ppt->tag & MG_OVERLAP) continue;
assert(ppt->tmp > 0);
assert(ppt->tmp <= offsets[parmesh->nprocs]);
}
Expand Down
20 changes: 19 additions & 1 deletion src/libparmmgtypes.h
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,22 @@ typedef struct {
MPI_Comm read_comm; /*!< MPI comm containing the procs that read the mesh (HDF5 input) */
} PMMG_Info;

/**
* \struct PMMG_overlap
* \brief Overlap structure.
*/
typedef struct {
int color_in; /*!< Color of the hosting processor */
int color_out; /*!< Color of the remote processor */
int np_in2out; /*!< Nbr of points sends from color_in to color_out */
int np_out2in; /*!< Nbr of points receives on color_in from color_out */
int nt_in2out; /*!< Nbr of tetra sends from color_in to color_out */
int nt_out2in; /*!< Nbr of tetra receives on color_in from color_out */
int *hash_in2out; /*!< Hash table to find pts index on color_out from pts index on color_in */
int *hash_out2in; /*!< Hash table to find pts index on color_in from pts index on color_out */

} PMMG_Overlap;
typedef PMMG_Overlap * PMMG_pOverlap;

/**
* \struct PMMG_ParMesh
Expand Down Expand Up @@ -416,7 +432,6 @@ typedef struct {
int nold_grp; /*!< Number of old grp */
PMMG_pGrp old_listgrp; /*!< List of old grp */


/* internal communicators */
PMMG_pInt_comm int_node_comm; /*!< Internal node communicator (only one PMMG_Int_comm, it is not an array) */
PMMG_pInt_comm int_edge_comm; /*!< Internal edge communicator */
Expand All @@ -430,6 +445,9 @@ typedef struct {
int next_face_comm; /*!< Number of external face communicator */
PMMG_pExt_comm ext_face_comm; /*!< External communicators (in increasing order w.r. to the remote proc index) */

/* overlap variables */
PMMG_pOverlap overlap; /*!< Overlap variables */

/* global variables */
int ddebug; //! Debug level
int iter; //! Current adaptation iteration
Expand Down
Loading