Skip to content

Improvement: Deactivate cmesh load and save for now#2279

Open
spenke91 wants to merge 5 commits intomainfrom
deactive_cmesh_load_save
Open

Improvement: Deactivate cmesh load and save for now#2279
spenke91 wants to merge 5 commits intomainfrom
deactive_cmesh_load_save

Conversation

@spenke91
Copy link
Copy Markdown
Collaborator

Closes #2265.

Describe your changes here:

We decided not to add a test to cmesh saving and loading, because they are heavily outdated anyway. Instead, we deactivate the code for now and throw an error message if it is called.

All these boxes must be checked by the AUTHOR before requesting review:

  • The PR is small enough to be reviewed easily. If not, consider splitting up the changes in multiple PRs.
  • The title starts with one of the following prefixes: Documentation:, Bugfix:, Feature:, Improvement: or Other:.
  • If the PR is related to an issue, make sure to link it.
  • The author made sure that, as a reviewer, he/she would check all boxes below.

All these boxes must be checked by the REVIEWERS before merging the pull request:

As a reviewer please read through all the code lines and make sure that the code is fully understood, bug free, well-documented and well-structured.

General

  • The reviewer executed the new code features at least once and checked the results manually.
  • The code follows the t8code coding guidelines.
  • New source/header files are properly added to the CMake files.
  • The code is well documented. In particular, all function declarations, structs/classes and their members have a proper doxygen documentation. Make sure to add a file documentation for each file!
  • All new algorithms and data structures are sufficiently optimal in terms of memory and runtime (If this should be merged, but there is still potential for optimization, create a new issue).

Tests

  • The code is covered in an existing or new test case using Google Test.
  • The code coverage of the project (reported in the CI) should not decrease. If coverage is decreased, make sure that this is reasonable and acceptable.
  • Valgrind doesn't find any bugs in the new code. This script can be used to check for errors; see also this wiki article.

If the Pull request introduces code that is not covered by the github action (for example coupling with a new library):

  • Should this use case be added to the github action?
  • If not, does the specific use case compile and all tests pass (check manually).

Scripts and Wiki

  • If a new directory with source files is added, it must be covered by the scripts/internal/find_all_source_files.sh to check the indentation of these files.
  • If this PR introduces a new feature, it must be covered in an example or tutorial and a Wiki article.

License

  • The author added a BSD statement to doc/ (or already has one).

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 17, 2026

Codecov Report

❌ Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.59%. Comparing base (ad12034) to head (1f6b502).

Files with missing lines Patch % Lines
...8_cmesh_io/deprecated/deprecated_t8_cmesh_save.cxx 0.00% 6 Missing ⚠️
...esh_io/deprecated/deprecated_t8_cmesh_triangle.cxx 0.00% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2279      +/-   ##
==========================================
+ Coverage   79.42%   82.59%   +3.16%     
==========================================
  Files         115      115              
  Lines       19285    18545     -740     
==========================================
  Hits        15318    15318              
+ Misses       3967     3227     -740     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@@ -586,8 +615,16 @@ t8_cmesh_save (const t8_cmesh_t cmesh, const char *fileprefix)
t8_cmesh_t
t8_cmesh_load (const char *filename, sc_MPI_Comm comm)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

In the remaining code, we prefer [[maybe_unused]], is there a reason why you decided to not use this?

Copy link
Copy Markdown
Collaborator Author

@spenke91 spenke91 Apr 24, 2026

Choose a reason for hiding this comment

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

Yes, good point, I mixed something up here: Using [[maybe_unused]] in the source only, but not in the header (where we can't use it in this case, because it's a .h header) used to cause problems with the old doxygen version, but that is no longer an issue :-)

Comment thread src/t8_cmesh/t8_cmesh.h
@@ -432,7 +432,9 @@ t8_cmesh_commit (t8_cmesh_t cmesh, sc_MPI_Comm comm);
* \param[in] cmesh The cmesh to save.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The example IO/cmesh/t8_cmesh_load_save.cxx is relying on this function, maybe you can add a warning or even leave this out via cmake or also with #if 0? There are also other examples in IO that maybe should get a comment at least

@@ -49,6 +49,7 @@
return 0; \
}

#if 0 // Beginning of deactivated code section.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I am not a very big fan of the #if 0 and would prefer to somehow deactivate whole files via cmake but i understand the idea of printing error messages so maybe this is the way to go here. The functionality is well documented.

@spenke91 spenke91 assigned lenaploetzke and unassigned spenke91 Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improvement: Add first tests for src/t8_cmesh/t8_cmesh_io/

2 participants