Skip to content

Check element maps too to decide if geometry needs an update in DiscretizationVisualizationWriterMesh#1794

Merged
vovannikov merged 1 commit into4C-multiphysics:mainfrom
vovannikov:discretization_writer_check_elem_maps
Mar 4, 2026
Merged

Check element maps too to decide if geometry needs an update in DiscretizationVisualizationWriterMesh#1794
vovannikov merged 1 commit into4C-multiphysics:mainfrom
vovannikov:discretization_writer_check_elem_maps

Conversation

@vovannikov
Copy link
Copy Markdown
Contributor

Description and Context

It turned out, that checking only the node maps when deciding whether the update of the internal data structures inside DiscretizationVisualizationWriterMesh is not sufficient. Some output implementations may produce only cell output and it may happen that the corresponding nodes remain intact whereas the elements get updated: in this situation an error is later triggered here:

if (size % n_dim != 0)
FOUR_C_THROW("The size of the data vector {} ({}) is not a multiple of the dimension ({})!",
data_name, size, n_dim);
if (size / n_dim != n_items)

This error was encountered by @mairehenke when working with a Taylor-Couette flow SPH benchmark of @slfuchs, I also then managed to reproduce it on a larger SPH benchmark.

@slfuchs
Copy link
Copy Markdown
Contributor

slfuchs commented Mar 1, 2026

I think someone else should review this PR. I have no real experience with this part of the code.

@mairehenke
Copy link
Copy Markdown
Contributor

Thanks for fixing this! Sounds reasonable to me, but I’m also not an expert in this part of the code.

Comment thread src/core/io/src/4C_io_discretization_visualization_writer_mesh.cpp
@vovannikov vovannikov force-pushed the discretization_writer_check_elem_maps branch from a468840 to 999ace2 Compare March 2, 2026 10:27
@vovannikov vovannikov force-pushed the discretization_writer_check_elem_maps branch from 999ace2 to d99b9b3 Compare March 3, 2026 14:42
@vovannikov vovannikov merged commit 7dafe13 into 4C-multiphysics:main Mar 4, 2026
29 checks passed
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.

6 participants