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

VectorElement constructor drops quadrature rule when family is a FiniteElement #36

Closed
mrambausek opened this issue Aug 4, 2020 · 0 comments · Fixed by #37
Closed

VectorElement constructor drops quadrature rule when family is a FiniteElement #36

mrambausek opened this issue Aug 4, 2020 · 0 comments · Fixed by #37

Comments

@mrambausek
Copy link
Contributor

When constructing a VectorElement based from a scalar FiniteElement, the quadrature scheme of that element is dropped.
This is not the case for TensorElement, although one would expect the same behavior for both types.
The reason lies in the call to FiniteElementBase.__init__ in line 298 of ufl/finiteelement/mixedelement.py, which sets quad_scheme to None if it is not given explicitly. This call is not present in the constructor of TensorElement.

@mscroggs mscroggs linked a pull request Sep 12, 2023 that will close this issue
mscroggs added a commit that referenced this issue Sep 12, 2023
* removed probably unneeded troublesome lines in VectorElement

The removed code overwrites some properties for whatever reason,
in particular, quad_scheme.
In TensorElement these two lines were not there at all.

* added back FiniteElementBase constructor but (re)use sub-element data properly

Note: the call to FiniteElementBase.__init__ overrides some properties set by the MixedElement
constructor. Essentially the same seems to be done in TensorElement, but more explicitly.

---------

Co-authored-by: rambausek <[email protected]>
Co-authored-by: Jørgen Schartum Dokken <[email protected]>
Co-authored-by: Matthew Scroggs <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant