-
Notifications
You must be signed in to change notification settings - Fork 56
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
Fix Paraview output for error indicator #234
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sebastiangrimberg
force-pushed
the
sjg/error-estimator-dev-prep
branch
3 times, most recently
from
May 1, 2024 18:33
4a8cd42
to
eaa99fe
Compare
… fast with libCEED and required for error estimates
…e time-step than the rest of the simulation (fixes bug when these quantities were not saved correctly after accounting for all simulation steps)
sebastiangrimberg
force-pushed
the
sjg/error-estimator-dev-prep
branch
from
May 1, 2024 21:01
eaa99fe
to
4a0675a
Compare
hughcars
approved these changes
May 7, 2024
std::unique_ptr<mfem::GridFunction> rank, eta; | ||
{ | ||
rank = std::make_unique<mfem::GridFunction>(&pwconst_fespace); | ||
*rank = mesh.GetMyRank() + 1; |
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.
For the record: 1 based indexing here is going to be ok as when loading in paraview, you'll receive the full set of ranks, so if using 8, you'd have 1-8, so the shift from 0 ought to be immediately apparent.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, certain values for Paraview output would affect when or whether or not the error indicators were written, based on the simulation type. Further refactoring in preparation for #233.
The mesh partitioning and error indicators are now written at a separate time step in ParaView output to avoid confusion. Namely, they are written as some large number of repeated
9
s which is at least 10x larger than the biggest time value (frequency, time, or port number) used in the simulation to avoid confusion. For example, for an eigenmode simulation with 9 modes, the last eigenmode is written at time9
and the indicator is written at99
. For 10 modes, the indicator is written to999
.An alternative was to place the indicator and mesh partitioning at a negative time value, which is supported, like
-1
, but it is also a possibility this is used for a terminal or current source index for electrostatics or magnetostatics.We also remove the
"SaveOnlyPorts"
option for driven and transient simulations. The global field energy calculations which were previously a bottleneck are now cheap with libCEED, so the savings was not needed. In addition, these quantities are required for error estimation (in preparation for #233).