← Back to team overview

dolfin team mailing list archive

Re: "Class" typedefs in generated wrapper_code

 

On 01/19/2011 05:38 PM, Anders Logg wrote:
On Wed, Jan 19, 2011 at 05:19:13PM +0100, Marie E. Rognes wrote:
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?
I think these are the rules I originally intended but they may have
been lost along the way.

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

     Poisson::Form_0::[Test|Trial|FunctionSpace]
I didn't think that far. I guess they should apply to both. I think
that will work. So if a certain space is common to all forms then it
becomes the "FunctionSpace" typedef both for the individual forms and
for the entire namespace.

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.
ok.

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


However, with the new revised wrapper code code, it will be so easy to make changes that you can add all the intelligence you want! ;)

--
Marie


Follow ups

References