-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
Snap val for level-set discretization PMMG_snpval_ls
#124
base: develop
Are you sure you want to change the base?
Conversation
… Adding tetra works but then fail in the analysis for now
…- not finished yet
… LS data + improve overall overlap creation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the ongoing work. I commit the review to feed or remote discussions.
src/ls_pmmg.c
Outdated
for (i=0; i < nitem_ext; i++) { | ||
/* Get the indices of the nodes in internal communicators */ | ||
idx_ext = ext_comm->int_comm_index[i]; | ||
idx_int = grp->node2int_node_comm_index2[idx_ext]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Misunderstanding of the array content / index error: see #123 (comment)
I think that we have to do something as the following piece of pseudo-code:
alloc ( parmesh->int_node_comm );
memset ( parmesh->int_node_comm, 0 );
for (icomm=0; icomm<next_comm; icomm++) {
...
for (i=0; i < nitem_ext; i++) {
idx_ext = ext_comm->int_comm_index[i];
val_max = parmesh->int_node_comm [idx_ext];
parmesh->int_node_comm [idx_ext] = MG_MAX ( val_max, MG_MAX(color_in, color_out) );
}
for ( i = 0; i<parmesh->ngrps; ++i ) {
grp = parmhesh->grp[i];
for ( k = 0; k<= grp->nitem_int_node_comm; ++k ) {
ip = grp->node2int_node_comm_index1[k];
pos_buf = grp->node2int_node_comm_index2[k];
mesh->point[ip].s = parmesh->int_node_comm[ pos_buf ];
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok for the misunderstand - this has been modified accordingly.
By filling intvalues
with point index ip
for( i = 0; i < grp->nitem_int_node_comm; i++ ){
ip = grp->node2int_node_comm_index1[i];
idx = grp->node2int_node_comm_index2[i];
int_comm->intvalues[idx] = ip;
}
Then, I still guess that what I was doing to find the proc owner is okay because only one group is allowed for PMMG_snpval_ls
. (An assert has been added to ensure it assert(parmesh->ngrp == 1 && "more than one group per rank not implemented");
)
if (p0->tag & MG_OVERLAP) continue; // Ignore overlap points | ||
/* Snap points in the interior of the partition and | ||
interface points with proc owner being this proc color */ | ||
if ( (p0->s == -1) || (p0->s == parmesh->myrank)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To check:
- What happens if the ls of one point is snapped by one of the neighbour (because it is in the interface+overlap but owned by the neighbour), another point is snaped by the current rank and both snap creates a non-manifold situation?
- I think that we are not abble to detect that without gathering the "snaped" points through all process a first time, then checking the manifoldness and then unsnapping the values and shared the unsnap info again ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to think about it to be sure I fully understand what you mean, but I think this case will be covered.
…ck if overlap if deleted correctly
…titia feature/overlap branch the time the associated PR is merged in mmg
…he overlap as the flag is used before if the test case has a metric + add ci test overlap with metric to ensure it works
…quality in the overlap as it might be needed by snap val
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #124 +/- ##
===========================================
+ Coverage 63.14% 63.52% +0.37%
===========================================
Files 46 47 +1
Lines 18962 19274 +312
Branches 3548 3610 +62
===========================================
+ Hits 11974 12243 +269
- Misses 6060 6088 +28
- Partials 928 943 +15 ☔ View full report in Codecov by Sentry. |
WARNING not to be merged for now because:
PMMG_snapval_ls
function are copy-paste ofMMG3D_snpval_ls
function. Need to see if we can factorise the functions.Creation of the snap value function
PMMG_snpval_ls
in filels_pmmg.c
when in LS mode.