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

Abort if nosplit option used in multimat mode #108

Merged
merged 2 commits into from
Apr 5, 2024

Conversation

laetitia-m
Copy link
Contributor

For now (until the overlap), the multimat mode does not support the nosplit option in *.mmg3d file.
This PR raises a warning and stops the code if the option nosplit is used.

@Algiane Algiane added kind: enhancement enhancement to an existing feature part: parmmg specific to parmmg code part labels Apr 4, 2024
src/ls_pmmg.c Outdated
ref = mat->ref;
refint = mat->rin;
refext = mat->rex;
if ( (ref == refint) & (ref == refext) ) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

&& instead of & I think.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks.

src/ls_pmmg.c Outdated
Comment on lines 120 to 123
if ( parmesh->info.imprim > PMMG_VERB_VERSION ) {
fprintf(stdout,"\n -- WARNING: The option `nosplit` in multimat is not supported yet.\n\n\n");
PMMG_RETURN_AND_FREE( parmesh, PMMG_LOWFAILURE );
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As the option is not supported, you always want to stop the process so I would always print an error message and exit, not only in case of PMMG_VERB_VERSION verbosity:

     fprintf(stderr,"\n      -- ERROR: The option `nosplit` in multimat is not supported yet.\n\n\n");
     PMMG_RETURN_AND_FREE( parmesh, PMMG_LOWFAILURE );

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done + modify return to be 0 instead of PMMG_RETURN_AND_FREE (here and elsewhere in the file too).

@Algiane
Copy link
Member

Algiane commented Apr 5, 2024

Thanks!

@Algiane Algiane merged commit baaf602 into MmgTools:develop Apr 5, 2024
19 checks passed
@laetitia-m laetitia-m deleted the feature/ls-cuttet-mm-nosplit branch April 8, 2024 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement enhancement to an existing feature part: parmmg specific to parmmg code part
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants