dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #10914
Re: About signatures in FFC-generated dolfin::Form subclasses
2008/12/3 Martin Sandve Alnæs <martinal@xxxxxxxxx>:
> There is a signature:
>
> // Create form on given function space(s) with given coefficient(s)
> (shared data)
> PoissonLinearForm(std::tr1::shared_ptr<const dolfin::FunctionSpace>
> V0, dolfin::Function& w0) : dolfin::Form(), f(*this)
>
> but no signature where both the function spaces and functions are
> shared pointers. For an application with full use of shared pointers,
> we need that.
>
> (I'm looking at this now because I want to generate dolfin code from SFC).
>
> --
> Martin
Also, after trying to sketch an hyperelasticity solver in C++ dolfin
with the new function design, I'm considering generating typedefs
to FunctionSpace subclasses using function names like
FooForm::FunctionSpace_u, FooForm::FunctionSpace_Q,
FooForm::FunctionSpace_dt etc.
as well as using actual form names from the .ufl file for the
dolfin::Form subclass name:
%(prefix)sForm_%(uflformname)s
examples:
ElasticityForm_f
ElasticityForm_F
ElasticityForm_J
ElasticityForm_J_adjoint
ElasticityForm_J_action
...
ElasticityForm_f::FunctionSpace_u V(mesh);
Function u(V);
since a .ufl file should be able to contain many forms to reuse things
like element and function definitions, and stuff like material laws in
both equations and postprocessing forms etc.
--
Martin
References