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
step-69 does not mark momentum as a vector for DataOut #15114
Comments
The would be nice. We heavily rely on scalar DoFHandler in combination with block vector. Our best solution till now was: https://github.com/hpsint/hpsint/blob/377047cf7946e5ef33175c9ff02ea6c37c512cc5/include/pf-applications/numerics/data_out.h#L7-L49 (merging components as a post-processing step within |
On my way riding to work yesterday, I thought of pretty much the same solution as yours -- but maybe even simpler:
If that were the call in step-60, one could just copy the body of that function into step-69 and use The problem is that step-69 doesn't just call |
The idea of such approach was that if the number of components having the same name is |
I very much like the idea of changing DataOut so that it merges components with the same name into a vector (including a toggle that controls this behavior). I wouldn't even base it on /Edit: @bangerth This had been a long-standing pet peeve of mine - the fact that we cannot easily mark vectors in DataOut for the case when we have a "scalar" DoFHandler. |
I like this idea and I don't think we need an option for that but we can always unconditionally do this. What else do you expect if you have several components with the same name? You can certainly not represent this in any of the file formats. |
@vovannikov Could you open a PR with the changes we did in our code? |
Yep, sure. |
As a consequence, one can't currently visualize the momentum field as a vector field. I was going to say that this should be relatively easy to fix: One just needs to add a
ComponentInterpretation
array toProblemDescription
and pass that todata_out.add_vector()
. But it's not so simple because we only have a single scalarDoFHandler
and the various solution components are stored in separate vectors. There ought to be a way to merge this kind of information into one place, though, so that it can be output all at once as a vector.The text was updated successfully, but these errors were encountered: