-
Notifications
You must be signed in to change notification settings - Fork 99
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 function space class. #477
base: master
Are you sure you want to change the base?
Conversation
The functionSpace class sits between State and Patch. A function space lives on a patch but also has a number of DOFs. It is intended to match the PETSc DMDA abstraction. This will allow us to reduce the number of DA's and Vecs we use, by reusing DA's from the main State object in the _register objects in SharpClaw. It is also anticipated that this abstraction will be useful when implementing DG finite element methods.
@@ -1,5 +1,53 @@ | |||
import clawpack.pyclaw | |||
|
|||
class functionSpace(clawpack.pyclaw.state.functionSpace): |
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.
Did you mean to not capitalize the first letter of the class names?
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, but now I realize that's inconsistent with the rest of PyClaw. I'll change it.
I am a bit confused now as to how this abstraction plays with the |
That's right. Did you see https://github.com/clawpack/pyclaw/pull/477/files#diff-f5c0f62513f67848fc9cc6eb2b3f8446R10 ? |
I'm doing more work on this, so don't bother spending much time on reviewing it until I've pushed more. |
Ah, I see, I was confused by the variable naming. |
Okay, it's much improved now and the tests are passing. I still feel like all this code is not as elegant as it could be. But I can't put my finger on how to improve it at the moment. |
The functionSpace class sits between State and Patch.
A function space lives on a patch but also has a number of DOFs.
It is intended to match the PETSc DMDA abstraction.
This will allow us to reduce the number of DA's and Vecs we use,
by reusing DA's from the main State object in the _register objects
in SharpClaw.
It is also anticipated that this abstraction will be useful when
implementing DG finite element methods.
@jedbrown please take a look and let me know if this is what you had in mind. I think there are still some improvements to be made in terms of not creating so many local vectors.