How to GridFunctionCoefficient::Eval on a Different Mesh? #3889
Unanswered
j-signorelli
asked this question in
Q&A
Replies: 1 comment 1 reply
-
Hi @j-signorelli, Does it work if you comment out this verification? I remember we've hit this in the past, and I think this check assumes that different meshes can only be used for LOR operations. @pazner can probably comment better. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am in the process of implementing a regression test for restarting simulations for code I wrote that relies heavily on MFEM. I have a ParGridFunction
u_0
that I write out using VisitDataCollection, and then I import that outputted ParGridFunction into a new ParGridFunctionu_r
. To ensure that the functionality is working, I am trying essentially to do:However, although the meshes associated with both ParGridFunction's are physically the same, they are different objects (pointing to different locations in memory). This leads to the following bug:
as I traced this through:
ParGridFunction::ComputeL2Error
-->GridFunction::ComputeL2Error
-->GridFunction::ComputeLpError
-->GridFunctionCoefficient::Eval
-->Mesh::GetRefinementTransforms
.In
GridFunctionCoefficient::Eval
, it seems to me that there is first a check to see if the meshes are pointing to the same location in memory, and if not, then it seems to presume that one mesh is a refined version of another?Nonetheless: I believe that this error is occurring because
u_r
has no refinement done on it. Is this true? And if so, is there anyway that I can evaluate a GridFunctionCoefficient on a "different" (in memory) mesh?Thank you for any assistance.
Beta Was this translation helpful? Give feedback.
All reactions