-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add time-dependent isotropic goal-oriented demo #112
Conversation
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.
Thanks very much for the new demo, @acse-ej321 - this is great! A few fairly minor comments.
I see what you mean about the bug. I'll see if I can get Goalie to raise an exception when the user asks it to enrich shallow copies and (if successful) will raise a separate PR.
… 110_hierarchy_transfer
…c adaptor cases
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.
Thanks for this @acse-ej321! Quite a few comments but they're mostly minor and some are repeated since you are showing two methods :)
Thanks for updating @acse-ej321 :) I started re-reviewing now and see that some links still don't work. E.g., in the first line of text, the correct link should be |
@ddundo - I had to rebuild all the demos which took some time, but the links worked for me locally after updating the path on a few. |
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.
Thanks @acse-ej321! I don't really trust my local doc build so I thought it's better to double check :)
This looks good to me! I left 2 more comments but will approve if you just want to go ahead and merge as it is now :)
pyrint( | ||
f" subinterval {i}, complexity: {complexity:4.0f}" | ||
f", dofs: {ndofs:4d}, elements: {nelem:4d}" | ||
) |
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.
Since in both methods it is the QoI which converges, I think it would be good to print that as well at each iteration.
hessians[0].intersect(hessians[1]) | ||
metric_timestep.set_parameters(mp) | ||
|
||
# Deduce an anisotropic metric from the error indicator field | ||
metric_timestep.compute_anisotropic_dwr_metric( | ||
indi, hessians[0], interpolant="L2" | ||
) |
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.
I 'm a bit worried using hessians[0]
might be a bit confusing. I'd prefer something like intersected_hessian = hessians[0].intersect(hessians[1])
and then passing intersected_hessian
to compute_anisotropic_dwr_metric
.
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.
Looks great, thanks for this contribution @acse-ej321! Nice to have a demo that's highly suited to the anisotropic approach. Just a few requests and then it's good to go.
Please could you open a linked docs PR to add it into the demo list for Goalie?
I made my revisions in suggestion mode. If you view in the Files Changed tab then you can go through and add ones you agree with to a batch before committing them. That way, they get added as a single commit, whereas adding them in the Conversation tab makes a commit for each and runs the CI many times.
Co-authored-by: Joe Wallwork <[email protected]>
… 110_hierarchy_transfer
Linked to mesh-adaptation/goalie#112 and mesh-adaptation/goalie#28 Adds unsteady, goal-oriented demo from Goalie to documentation.
@jwallwork23 - I found the cause of #107 : it was in how I was declaring my
meshes
passed into theGoalOrientedMeshSeq
. I was declaringmeshes = [UnitSquareMesh[n,n, diagonal="left"] * n_meshes
which worked when theenrichment_method
was set to 'p' but produced an error when accessing thetransfer
method between meshes when theenrichment_method
was set to 'h'. Presumably the mesh is a shallow copy with the above expression.Even though this turned into a user error, I found this while compiling the MFC for burger's demo using goal-oriented isotropic adaptation which may partially address #28 instead?
Creating a pull request here to get feedback on the additional demo.