Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
6d6f9c1
Modify code to not go through remeshing - for development convenience
laetitia-m Jun 22, 2023
2d6c838
Add a if to not remesh for coding convience - it will be remove later
laetitia-m Jun 22, 2023
229ce87
Fix the if for coding convenience and allow ci tests to pass - this i…
laetitia-m Jun 22, 2023
3ec071b
Remove condition on remeshing used for coding convenience
laetitia-m Jun 26, 2023
39e74cd
Merge branch 'develop' into feature/ls-cuttet
laetitia-m Jun 26, 2023
fe13143
Start to develop PMMG_cuttet_ls
laetitia-m Jun 26, 2023
a810a60
Add a if option to not remesh for coding convenience - to be removed …
laetitia-m Jun 26, 2023
99d7aa2
Modify if remesh for coding convenience
laetitia-m Jun 26, 2023
a551dc5
Add comments to cuttet and modify it for parallel split
laetitia-m Jun 30, 2023
bbeb763
Modify mmg commit
laetitia-m Jul 17, 2023
6e21bd0
Modify the solution to be equal to 0 once at the start of the algo. M…
laetitia-m Jul 17, 2023
2355b7f
In cuttet - 1. update int and ext node communicator 2. attempt to use…
laetitia-m Aug 4, 2023
b4b9095
Resolve conflict
laetitia-m Aug 28, 2023
28ae7c2
(1) Modify algo to loop over edges communicator instead of faces; (2)…
laetitia-m Aug 30, 2023
01df5f2
Modify grab by get in comments
laetitia-m Aug 30, 2023
2bc440a
Do the actual splitting for parallel face first then for the everywhe…
laetitia-m Aug 31, 2023
fb9a103
Progress in split using global num
laetitia-m Sep 1, 2023
ec9add2
Face comm in split
laetitia-m Sep 5, 2023
db8c9aa
Add face communicator
laetitia-m Sep 11, 2023
dbb8227
Update face comm
laetitia-m Sep 12, 2023
1df60d1
Update face comm
laetitia-m Sep 13, 2023
83f5857
Update face communicators
laetitia-m Sep 14, 2023
99ef9ff
Fix merge conflict
laetitia-m Sep 15, 2023
b047bb2
Update face communicator when a tetra belongs to more than 2 procs - …
laetitia-m Sep 15, 2023
d87da51
Fix bug in update face comm when tetra shared by more than 2 proc
laetitia-m Sep 19, 2023
50dec44
Fix bug in update face comms
laetitia-m Sep 21, 2023
60843b2
Debug ls-cuttet face communicator
laetitia-m Sep 26, 2023
250eb51
Start to fix bug on tria tag
laetitia-m Sep 29, 2023
a3ea634
Start to take into account Algiane feedback + fix bug on tag for Proc…
laetitia-m Oct 3, 2023
47a452b
Resolve conflit
laetitia-m Oct 3, 2023
ec3f152
Fix bugs
laetitia-m Oct 3, 2023
881e48a
Take into account Algiane feedbacks
laetitia-m Oct 4, 2023
9c469b5
Fix bug of missing some MG_PARBDY in xtetra.tag
laetitia-m Oct 11, 2023
a630a10
Modify comments in ls-cuttet + Algiane feedbacks
laetitia-m Oct 13, 2023
263169e
Change numerotation by numbering!
laetitia-m Oct 17, 2023
afdf0a2
Fix type inconsistency
laetitia-m Oct 17, 2023
80dbf67
Modification based on mmg PR feedbacks
laetitia-m Nov 6, 2023
9712e30
Modify mmg commit to be the latest mmg develop
laetitia-m Nov 7, 2023
bbdfa0b
change the use of MMG3D_split2sf_cfg as it has been changed in mmg
laetitia-m Nov 8, 2023
6c87d29
Modify argument -oversubscribe for mpi with two hyphens instead of one
laetitia-m Nov 8, 2023
63edaf4
Modify mmg git repo to poitn towards the latest develop
laetitia-m Nov 9, 2023
6fd8e46
Merge branch 'develop' into feature/ls-cuttet
laetitia-m Dec 6, 2023
2b6b8c1
Try to fix tag for LS
laetitia-m Dec 7, 2023
d542113
Resolve conflict from merge
laetitia-m Dec 11, 2023
f3d0624
Resolve conflict from merge
laetitia-m Dec 11, 2023
73b18ca
(i) Modify LS comments; (ii) Fix bug on LS edges reference not previo…
laetitia-m Jan 12, 2024
71f7bb7
Improve ls-cuttet
laetitia-m Jan 24, 2024
2bdfa9c
Delete some comments
laetitia-m Jan 25, 2024
95ede16
Remove update tag after group split
laetitia-m Feb 6, 2024
f4c94e9
In LS: Replace metric interpolation functions and fix bug in edge tag
laetitia-m Feb 6, 2024
fc04c80
Remove remesh variable to avoid remeshing directly. That was for debu…
laetitia-m Feb 6, 2024
949e7cb
Merge branch 'develop' into feature/ls-cuttet
laetitia-m Feb 8, 2024
0f20779
Update mmg git tag to point towards the latest mmg develop
laetitia-m Feb 8, 2024
8e4fd53
Add fields interpolation in LS mode
laetitia-m Feb 9, 2024
9859d0a
Add ci tests for LS with metric and or fields
laetitia-m Feb 12, 2024
8326bf7
Add comment on the use of MMG5_isSplit function when we split the par…
laetitia-m Feb 16, 2024
16e0621
Add of ls ci tests on toy geom on 2 and 5 partitions
laetitia-m Feb 16, 2024
48175f0
Update testparmmg commit tag
laetitia-m Feb 19, 2024
3247166
Modify find node of triangle on parallel interface to be the highest …
laetitia-m Feb 22, 2024
aec4cb1
Merge branch 'develop' into feature/ls-cuttet
laetitia-m Mar 4, 2024
959f378
try to debug memory bug when transfer group after LS
laetitia-m Mar 4, 2024
4936a70
Remove debug comments in PMMG_resize_extComm function
laetitia-m Mar 4, 2024
652c19c
Add resize of communicators size at the end of PMMG_cuttet_ls function
laetitia-m Mar 4, 2024
eb185c5
Revert modif on rtorecv type in PMMG_resize_extCommArray funciton. Th…
laetitia-m Mar 4, 2024
502391c
Add ci test for complex geom + mfix bug for ci test on toy geom
laetitia-m Mar 5, 2024
1cca2b2
Merge branch 'develop' into feature/ls-cuttet
laetitia-m Mar 6, 2024
b456f0f
Update mmg tag version to point towards the latest develop version
laetitia-m Mar 6, 2024
9006493
Add ci tests for level-set discretization
laetitia-m Mar 6, 2024
4319ba7
Update tag version of testparmmg to point towards latest version
laetitia-m Mar 6, 2024
f0429a9
point towards latest testparmmg commit
laetitia-m Mar 6, 2024
4f45a52
fix typo in ci test ls-DisIn-cubegeom-metric-5
laetitia-m Mar 6, 2024
a329804
Update ci test for ls-cuttet
laetitia-m Mar 7, 2024
d051efe
Create function PMMG_tria_highestcoord to determine local node index …
laetitia-m Mar 7, 2024
2060ea0
Add function PMMG_tria_highestcoord in parmmg.h
laetitia-m Mar 7, 2024
356509b
(1) Rename PMMG_sort_vertices by PMMG_swap_vertices. (2) Code factori…
laetitia-m Mar 7, 2024
b6853f9
Update some comments
laetitia-m Mar 11, 2024
d70e614
Modify some comments
laetitia-m Mar 11, 2024
74b4ac5
Fix typo
laetitia-m Mar 11, 2024
54b9917
Update mesh->npi and mesh->nei in ls discretization
laetitia-m Mar 11, 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 3a5e3abc38f7f100a481bcebe8aa23e105d7c381
GIT_TAG 5788cf5b872d6f2e627b4279260ac39706d2a7f6
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
345 changes: 253 additions & 92 deletions cmake/testing/pmmg_tests.cmake

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/analys_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -1602,7 +1602,7 @@ int PMMG_loopr(PMMG_pParMesh parmesh,PMMG_hn_loopvar *var ) {
doublevalues = parmesh->int_node_comm->doublevalues;

/* Loop on near-parallel edges */
for( k = 1; k <= var->hash->max; k++ ) {
for( k = 0; k <= var->hash->max; k++ ) {
ph = &var->hash->geom[k];
if( !ph->a ) continue;

Expand Down
55 changes: 37 additions & 18 deletions src/communicators_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -871,24 +871,7 @@ void PMMG_tria2elmFace_coords( PMMG_pParMesh parmesh ) {
ifac = ptt->cc%4;

/* Get triangle node with highest coordinates */
iploc = 0;
ppt = &mesh->point[ptt->v[0]];
cmax[0] = ppt->c[0];
cmax[1] = ppt->c[1];
cmax[2] = ppt->c[2];
for( iloc=1; iloc<3; iloc++ ) {
ppt = &mesh->point[ptt->v[iloc]];
for( idim=0; idim<3; idim++ ) {
if( ppt->c[idim] - cmax[idim] < -MMG5_EPSOK*20 ) break;
if( ppt->c[idim] - cmax[idim] > MMG5_EPSOK*20 ) {
cmax[0] = ppt->c[0];
cmax[1] = ppt->c[1];
cmax[2] = ppt->c[2];
iploc = iloc;
break;
}
}
}
iploc = PMMG_tria_highestcoord(mesh,ptt->v);

/* Store ie-ifac-iploc in index1 */
grp->face2int_face_comm_index1[i] = 12*ie+3*ifac+iploc;
Expand All @@ -900,6 +883,42 @@ void PMMG_tria2elmFace_coords( PMMG_pParMesh parmesh ) {
}
}

/**
* \param mesh pointer toward the mesh structure
* \param ptt_v indices of a triangle vertices
* \return iploc (0, 1 or 2) local node index
*
* Get triangle node with highest coordinates
*
*/
int PMMG_tria_highestcoord( MMG5_pMesh mesh, MMG5_int *ptt_v) {
MMG5_pPoint ppt;
int idim,iloc,iploc;
double cmax[3];

/* Get triangle node with highest coordinates */
iploc = 0;
ppt = &mesh->point[ptt_v[0]];
cmax[0] = ppt->c[0];
cmax[1] = ppt->c[1];
cmax[2] = ppt->c[2];
for( iloc=1; iloc<3; iloc++ ) {
ppt = &mesh->point[ptt_v[iloc]];
for( idim=0; idim<3; idim++ ) {
if( ppt->c[idim] - cmax[idim] < -MMG5_EPSOK*20 ) break;
if( ppt->c[idim] - cmax[idim] > MMG5_EPSOK*20 ) {
cmax[0] = ppt->c[0];
cmax[1] = ppt->c[1];
cmax[2] = ppt->c[2];
iploc = iloc;
break;
}
}
}

return iploc;
}

/**
* \param parmesh pointer toward a parmesh structure
* \return 0 if fail, 1 if success
Expand Down
85 changes: 85 additions & 0 deletions src/hash_pmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
* \author Algiane Froehly (Inria/UBordeaux)
* \author Nikolas Pattakos (Inria)
* \author Luca Cirrottola (Inria)
* \author Laetitia Mottet (UBordeaux)
* \version
* \copyright
*
Expand Down Expand Up @@ -273,3 +274,87 @@ int PMMG_bdryUpdate( MMG5_pMesh mesh )

return PMMG_SUCCESS;
}

/**
* \param mesh pointer toward the mesh structure.
* \param hash pointer toward the hash table of edges.
* \param a index of the first extremity of the edge.
* \param b index of the second extremity of the edge.
* \param k index of new point along the edge [a,b].
* \param s If ls mode in ParMmg: index of new point in internal edge communicator;
* otherwise, the value stored in variable s.
* \return PMMG_SUCCESS if success, PMMG_FAILURE if fail (edge is not found).
*
* Update the index of the new point stored along the edge \f$[a;b]\f$ (similar to MMG5_hashUpdate in mmg).
* If ls mode in ParMmg: update the index of the new point in internal edge communicator in variable s;
* otherwise, update the value stored in variable s.
*
*/
int PMMG_hashUpdate_all(MMG5_Hash *hash, MMG5_int a,MMG5_int b,MMG5_int k,MMG5_int s) {
MMG5_hedge *ph;
MMG5_int key;
MMG5_int ia,ib;

ia = MG_MIN(a,b);
ib = MG_MAX(a,b);
key = (MMG5_KA*(int64_t)ia + MMG5_KB*(int64_t)ib) % hash->siz;
ph = &hash->item[key];

while ( ph->a ) {
if ( ph->a == ia && ph->b == ib ) {
ph->k = k;
ph->s = s;
return PMMG_SUCCESS;
}

if ( !ph->nxt ) return PMMG_FAILURE;

ph = &hash->item[ph->nxt];

}

return PMMG_FAILURE;
}

/**
* \param hash pointer toward the hash table of edges.
* \param a index of the first extremity of the edge.
* \param b index of the second extremity of the edge.
* \param k index of new point along the edge [a,b].
* \param s If ls mode in ParMmg: index of new point in internal edge communicator;
* otherwise, the value stored in variable s.
* \return PMMG_SUCCESS if success, PMMG_FAILURE if fail (edge is not found).
*
* Find the index of the new point stored along the edge \f$[a;b]\f$ (similar to MMG5_hashGet in mmg).
* If ls mode in ParMmg: find the index of the new point in internal edge communicator;
* otherwise, find the value stored in variable s.
*
*/
MMG5_int PMMG_hashGet_all(MMG5_Hash *hash,MMG5_int a,MMG5_int b,MMG5_int *k,MMG5_int *s) {
MMG5_hedge *ph;
MMG5_int key;
MMG5_int ia,ib;

if ( !hash->item ) return 0;

ia = MG_MIN(a,b);
ib = MG_MAX(a,b);
key = (MMG5_KA*(int64_t)ia + MMG5_KB*(int64_t)ib) % hash->siz;
ph = &hash->item[key];

if ( !ph->a ) return PMMG_FAILURE;
if ( ph->a == ia && ph->b == ib ) {
*k = ph->k;
*s = ph->s;
return PMMG_SUCCESS;
}
while ( ph->nxt ) {
ph = &hash->item[ph->nxt];
if ( ph->a == ia && ph->b == ib ) {
*k = ph->k;
*s = ph->s;
return PMMG_SUCCESS;
}
}
return PMMG_FAILURE;
}
4 changes: 2 additions & 2 deletions src/libparmmg.c
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ int PMMG_preprocessMesh_distributed( PMMG_pParMesh parmesh )
mesh->info.sethmax = 1;
}

/* Note :: Needed before ls discretization to include tetras with poor qualities
/* Note: Needed before ls discretization to include tetras with poor qualities
inside one or the other part of the level-set */
if ( !MMG3D_tetraQual( mesh, met, 0 ) ) {
return PMMG_STRONGFAILURE;
Expand Down Expand Up @@ -356,7 +356,7 @@ int PMMG_preprocessMesh_distributed( PMMG_pParMesh parmesh )

/* Convert tria index into iel face index (it needs a valid cc field in
* each tria), and tag xtetra face as PARBDY before the tag is transmitted
* to edges and nodes - Why we do that? */
* to edges and nodes */
if ( parmesh->myrank < parmesh->info.npartin ) {
PMMG_tria2elmFace_coords( parmesh );
}
Expand Down
2 changes: 1 addition & 1 deletion src/libparmmg1.c
Original file line number Diff line number Diff line change
Expand Up @@ -764,7 +764,7 @@ int PMMG_parmmglib1( PMMG_pParMesh parmesh )
}

if ( parmesh->iter < parmesh->niter-1 && (!parmesh->info.inputMet) ) {
/* Delete the metrec computed by Mmg except at last iter */
/* Delete the metric computed by Mmg except at last iter */
PMMG_DEL_MEM(mesh,met->m,double,"internal metric");
}

Expand Down
Loading