-
-
Notifications
You must be signed in to change notification settings - Fork 64
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 sobolev_space method to base finite element class #118
Conversation
@@ -125,6 +123,9 @@ def symmetry(self): | |||
error("Size mismatch in symmetry algorithm.") | |||
return sm or EmptyDict | |||
|
|||
def sobolev_space(self): | |||
return min(e.sobolev_space() for e in self._sub_elements) | |||
|
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.
Is this the right thing? Suppose I have CG1 x DG0
. I think this will say that the whole thing is in H1
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.
Yes, looks like max might be what we actually want here?
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 think that's a safe conservative option. It might disallow implicit restrictions in some cases where they would actually work, but that can be dealt with in a later pass if someone cares enough.
* Add a Sobolev space spanning C infinity elements. * Put R space in HInf * Test Sobolev space additions. * Use Sobolev space as the restrictions check. * Add sobolev_space method to base finite element class (#118) * Add nano swp files to .gitignore * MAke finiteelementbase into an abstract base class and add sobolev_space method * _ * restricted element is L2 * s * make fenicsx tests run * branches * _ not - * remove branch from test config * max * main fenics and ffc Co-authored-by: Matthew Scroggs <matthew.w.scroggs@gmail.com> Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk>
* Add a Sobolev space spanning C infinity elements. * Put R space in HInf * Test Sobolev space additions. * Use Sobolev space as the restrictions check. * Add sobolev_space method to base finite element class (FEniCS#118) * Add nano swp files to .gitignore * MAke finiteelementbase into an abstract base class and add sobolev_space method * _ * restricted element is L2 * s * make fenicsx tests run * branches * _ not - * remove branch from test config * max * main fenics and ffc Co-authored-by: Matthew Scroggs <matthew.w.scroggs@gmail.com> Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk>
* Add a Sobolev space spanning C infinity elements. * Put R space in HInf * Test Sobolev space additions. * Use Sobolev space as the restrictions check. * Add sobolev_space method to base finite element class (FEniCS#118) * Add nano swp files to .gitignore * MAke finiteelementbase into an abstract base class and add sobolev_space method * _ * restricted element is L2 * s * make fenicsx tests run * branches * _ not - * remove branch from test config * max * main fenics and ffc Co-authored-by: Matthew Scroggs <matthew.w.scroggs@gmail.com> Co-authored-by: Garth N. Wells <gnw20@cam.ac.uk>
Added sobolev_space method to base finite element class
Made base finite element class into an abc abstract class, so that elements cannot be created without methods such as sobolev_space being implemented
This builds on #117, and is currently set to merge into that branch so it can be part of that PR.