Skip to content
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

Introduce metric parameters documentation #99

Merged
merged 14 commits into from
Mar 28, 2024
Merged

Introduce metric parameters documentation #99

merged 14 commits into from
Mar 28, 2024

Conversation

jwallwork23
Copy link
Member

@jwallwork23 jwallwork23 commented Mar 22, 2024

Closes #98.

Fixes the issue with deep-copying metric parameters by always deep-copying these parameters upon setting them. (I can't think of a reason why you wouldn't want this.) Also moves some mechanics behind the scenes and provides a public interface to metric_parameters.

Edit: See discussion in the original issue.

Closes #31.

At long last!

@jwallwork23 jwallwork23 added the bug Something isn't working label Mar 22, 2024
@jwallwork23 jwallwork23 added this to the Version 1 milestone Mar 22, 2024
@jwallwork23 jwallwork23 self-assigned this Mar 22, 2024
@jwallwork23 jwallwork23 marked this pull request as ready for review March 22, 2024 08:59
@jwallwork23 jwallwork23 added the documentation Improvements or additions to documentation label Mar 22, 2024
* `hausdorff_number`: Spatial scale factor for the problem. Default: 0.01.
* `boundary_tag`: Mesh boundary tag to restrict attention to during
boundary-specific manipulations. Unset by default, which implies all
boundaries are considered. (Note that this parameter does not currently exist
Copy link
Collaborator

@acse-ej321 acse-ej321 Mar 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jwallwork23 It might be good to add how this parameter currently interacts with a similar flag which can be set in a mesh originating from a .gmsh, as Firedrake does seem to preserve that flag when communicating between PETSc and MMG. Is this a different flag altogether?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a different flag. Small clarification in 7b4ec08. This flag is only currently used by the private method _enforce_variable_constraints, which is called by the public method enforce_spd.

Comment on lines 169 to 170
* `num_iterations`: Number of adaptation iterations in the parallel case.
Default: 3.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The description leaves open the question of what happens in the non-parallel case. Is there only one adaptation iteration to the metric in the non-parallel case?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See 8834c49.

Copy link
Member

@ddundo ddundo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this @jwallwork23! Minor comments from me :)

animate/metric.py Outdated Show resolved Hide resolved
animate/metric.py Outdated Show resolved Hide resolved
animate/metric.py Show resolved Hide resolved
animate/metric.py Show resolved Hide resolved
animate/metric.py Show resolved Hide resolved
@jwallwork23 jwallwork23 changed the title Enable deep-copying for metric parameters Introduce metric parameters documentation Mar 26, 2024
@jwallwork23 jwallwork23 removed the bug Something isn't working label Mar 26, 2024
Comment on lines +238 to +241
if self._plex.metricRestrictAnisotropyFirst():
raise NotImplementedError(
"Restricting metric anisotropy first is not supported in Firedrake."
)
Copy link
Member Author

@jwallwork23 jwallwork23 Mar 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be easy enough to implement (just tweak the arguments to the enforce_spd call in the definition of normalise). However, I'd prefer to address it in a separate issue rather than here, considering the impact with some tests.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #100.

@jwallwork23
Copy link
Member Author

You happy with the changes @ddundo?

Copy link
Member

@ddundo ddundo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @jwallwork23 :)

@jwallwork23 jwallwork23 merged commit b402cf5 into main Mar 28, 2024
1 check passed
@jwallwork23 jwallwork23 deleted the 98_parameters branch March 28, 2024 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RiemannianMetric.copy not deep-copying parameters Docs of plex parameters
3 participants