pyclaw icon indicating copy to clipboard operation
pyclaw copied to clipboard

Add function space class.

Open ketch opened this issue 10 years ago • 6 comments

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.

ketch avatar Nov 17 '14 11:11 ketch

I am a bit confused now as to how this abstraction plays with the State object. I figured that the FunctionSpace object would always be present in a State object rather than only being present in the PETSc version of the State. It's more overhead I guess but it seems cleaner to me.

mandli avatar Nov 17 '14 23:11 mandli

I figured that the FunctionSpace object would always be present in a State object rather than only being present in the PETSc version of the State.

That's right. Did you see https://github.com/clawpack/pyclaw/pull/477/files#diff-f5c0f62513f67848fc9cc6eb2b3f8446R10 ?

ketch avatar Nov 18 '14 03:11 ketch

I'm doing more work on this, so don't bother spending much time on reviewing it until I've pushed more.

ketch avatar Nov 18 '14 10:11 ketch

Ah, I see, I was confused by the variable naming.

mandli avatar Nov 18 '14 10:11 mandli

Coverage Status

Coverage increased (+0.24%) when pulling 93a8fdfa15a4afd517bc18db81eebb737c7e2e60 on ketch:function_space into 011422a2483581bbb9d0245e67a13b5cda142900 on clawpack:master.

coveralls avatar Nov 18 '14 12:11 coveralls

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.

ketch avatar Nov 18 '14 12:11 ketch