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

Add sobolev_space method to base finite element class #118

Merged
merged 10 commits into from
Aug 16, 2022

Conversation

mscroggs
Copy link
Member

@mscroggs mscroggs commented Aug 12, 2022

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.

@mscroggs mscroggs marked this pull request as draft August 12, 2022 10:32
@mscroggs mscroggs mentioned this pull request Aug 12, 2022
@mscroggs mscroggs marked this pull request as ready for review August 12, 2022 11:42
@@ -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)

Copy link
Collaborator

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

Copy link
Member Author

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?

Copy link
Collaborator

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.

@mscroggs mscroggs merged commit ac5bedf into h_inf_sobolev_space Aug 16, 2022
@mscroggs mscroggs deleted the h_inf_sobolev_space2 branch August 16, 2022 10:56
garth-wells added a commit that referenced this pull request Aug 23, 2022
* 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>
pbrubeck pushed a commit to firedrakeproject/ufl that referenced this pull request Oct 10, 2022
* 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>
pbrubeck pushed a commit to firedrakeproject/ufl that referenced this pull request Nov 1, 2022
* 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>
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 this pull request may close these issues.

2 participants