On Fri, May 15, 2009 at 1:37 PM, Anders Logg <logg@xxxxxxxxx> wrote:
There have been some big changes to the code lately. Here's a summary:
1. We now use the wrappers module in dolfin_utils to generate the
DOLFIN wrapper code (in both FFC and SFC). This module generates
slightly different code to the old FFC wrappers. Most notably,
typedefs are used to avoid code duplication and classes/namespaces are
now nested. For application code, that means one must change from
PrefixBilinearForm
PrefixLinearForm
PrefixTestSpace
PrefixTrialSpace
to
Prefix::BilinearForm
Prefix::LinearForm
Prefix::BilinearForm::TestSpace
Prefix::BilinearForm::TrialSpace
etc.
If all test and trial spaces are equal, then a common class named
Prefix::FunctionSpace
will be created (a typedef).
Some of you may remember that we've had this interface before, but
then had to remove it due to problems with SWIG. Now that SWIG just
looks at the pure UFC code it's not a problem anymore.
Also note that forms and function spaces for coefficients are available by name:
a = c*u*v*dx
L = f*v*dx
->
Prefix::Form_a
Prefix::Form_L
Prefix::Form_a::CoefficientSpace_c
Prefix::Form_a::CoefficientSpace_L
and coefficients can be set easily using
Prefix::CoefficientSet coeffs;
coeffs.c = my_function_c;
coeffs.f = my_function_f;
Prefix::Form_a a(V, V, coeffs);
Prefix::Form_L L(V, coeffs);
which avoids duplication of lines like "my_form.f = my_function_f;"
for coefficients shared by multiple forms.