-
-
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
Conversation
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.
…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.76% 63.76% -0.01%
===========================================
Files 47 47
Lines 19194 19275 +81
Branches 3573 3600 +27
===========================================
+ Hits 12240 12290 +50
- Misses 6030 6056 +26
- Partials 924 929 +5 ☔ View full report in Codecov by Sentry. |
The `tetraQual_toRecv` array was used without being allocated due to an erroneous merge. As the tetra quality seems to not be used after (not stored in the overlap tetra when we create it), this part of code has been deleted.
Thanks! |
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.