← Back to team overview

dolfin team mailing list archive

Re: DOLFIN wrappers

 

On Tue, Jan 20, 2009 at 04:55:51PM +0100, Mehdi Nikbakht wrote:
> Hi,
> 
> I am trying to know how the new wrappers for Dolfin are generated.
> 
> Suppose this simple form.
> 
> element = FiniteElement("Lagrange", "triangle", 1)
> 
> v = TestFunction(element)
> 
> L = v*dx
> 
> If we compile this form file, the wrappers would contain these classes.
> 
> 
> // DOLFIN wrappers
> 
> class testLinearFormFunctionSpace0 : public dolfin::FunctionSpace
> {
> ---
> };
> 
> class testTestSpace : public dolfin::FunctionSpace
> {
> ---
> };
> 
> class testTrialSpace : public dolfin::FunctionSpace
> {
> ---
> };
> 
> class testFunctionSpace : public dolfin::FunctionSpace
> {
> ---
> };
> 
> class testLinearForm : public dolfin::Form
> {
> ---
> };
> 
> 
> For the first four classes derived from dolfin::FunctionSpace, we have exactly
> the same body.
> Aren't they redundant?
> 
> For example, There is no TrialFunction in the form, but we have a class called
> testTrialSpace in Wrapper.
> 
> What are the difference between testLinearFormFunctionSpace0 and
> testFunctionSpace classes?
> 
> 
> Thank you in advance,
> Mehdi

Yes, some redundant spaces may be created, but it doesn't matter.
Use whichever one you prefer.

For example, there will always be classes named

  PrefixTestSpace    (same as PrefixFunctionSpace0)
  PrefixTrialSpace   (same as PrefixFunctionSpace1)

and possibly also classes for coefficient function spaces.

If all these should happen to be the same, then another class is generated:

  PrefixFunctionSpace

-- 
Anders

Attachment: signature.asc
Description: Digital signature


Follow ups

References