mesh-adaptation / goalie

Goal-oriented error estimation and mesh adaptation for finite element problems solved using Firedrake
Other
1 stars 1 forks source link

Use `Constant` rather than R-space #109

Closed jwallwork23 closed 5 months ago

jwallwork23 commented 5 months ago

@ddundo:

just a tiny comment here - if we pass a domain argument to Constant, i.e. y = Constant(x, domain=mesh), this is syntactic sugar for y = Function(FunctionSpace(mesh, "R", 0)).assign(x). Apparently this is because anything which is a variable needs to know what mesh it's on for parallel safety reasons. I see that you're using the latter in the demos so I wasn't sure if you prefer it for clarity or maybe weren't aware of the first one :)

[I couldn't find your comment anywhere on GitHub so am opening the issue manually.]

ddundo commented 5 months ago

Sorry, I deleted the comment because I later found that this will be deprecated in a future update :)

jwallwork23 commented 5 months ago

So we should stick with using R-space?

ddundo commented 5 months ago

Yup! Sorry for the confusion :)

jwallwork23 commented 5 months ago

In future, please edit a comment with strikeout and say why you are doing so rather than deleting comments. (Put ~~ before and after the text you want to strike out.) Deleting comments causes a lot of confusion.