← Back to team overview

dolfin team mailing list archive

Re: "Class" typedefs in generated wrapper_code

 

On 01/19/2011 05:09 PM, Anders Logg wrote:
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. :-)


Absolutely ;)

I think the following rules should apply:


These are "new" rules right?

And you are now referring to the typedefs within each form, for instance

    Poisson::Form_0::[Test|Trial|FunctionSpace]

I was trying to sort out the

    Poisson::[Test|Trial|FunctionSpace]

typedefs

1. TestSpace should be added when the rank of the form is>= 1

Check.

2. TrialSpace should be added when the rank of the form is>= 2

Check.

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)


Not currently implemented.

I'll get the new wrappers to generate the same code as the old wrappers before adding more stuff. Just FYI.

--
Marie

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

TestSpace
TrialSpace
FunctionSpace
CoefficientSpace

--
Anders


Follow ups

References