← Back to team overview

dolfin team mailing list archive

Re: "Class" typedefs in generated wrapper_code

 

On Wed, Jan 19, 2011 at 05:01:45PM +0100, Marie E. Rognes wrote:
>
> Could someone remind me of the system that is supposed to be used for the
> so-called "class"
> typedefs for Test/Trial/FunctionSpace? For instance at the bottom of /demo/pde/
> poisson/cpp/Poisson.h:
>
>     typedef Form_0::TestSpace FunctionSpace;
>
> Is it so that if all argument spaces (in order words function spaces that are
> not coefficient spaces) are the same in all forms, then
>
>     typedef Form_0::TestSpace FunctionSpace
>
> should be added?
>
> Moreover, if the above is not the case, should
>
>     typedef Form_X::TestSpace TestSpace
>     typedef Form_Y::TrialSpace TrialSpace
>
> be added if there is a single test space and trial space? (I cannot find this
> in the current wrapper code code, nor is there a single example in any of the
> demos, but seemed to remember something of the sort.)

I thought the existing implementation was crystal clear on this
point. :-)

I think the following rules should apply:

1. TestSpace should be added when the rank of the form is >= 1
2. TrialSpace should be added when the rank of the form is >= 2
3. FunctionSpace should be added if all the first r spaces are the same
(4. CoefficientSpace should be added if the n coefficient space are the same)

So for a regular Poisson's equation, we could have

TestSpace
TrialSpace
FunctionSpace
CoefficientSpace

--
Anders



Follow ups

References