← Back to team overview

dolfin team mailing list archive

Re: Feature request for Assembler in PyDolfin

 

On Wed, Dec 12, 2007 at 02:44:53PM +0100, Martin Sandve Alnæs wrote:
> Simply duplicating the following signatures from Assembler with
> ufc::form instead of Form in PyDolfin would be nice:
> 
> 
>         assemble(self, Form form) -> real
> 
>         assemble(self, Form form, SubDomain sub_domain) -> real
> 
>         assemble(self, Form form,
>             dolfin::MeshFunction<(dolfin::uint)> cell_domains,
>             dolfin::MeshFunction<(dolfin::uint)> exterior_facet_domains,
>             dolfin::MeshFunction<(dolfin::uint)> interior_facet_domains) -> real
> 
>         assemble(self, GenericTensor A, Form form, bool reset_tensor=True)
> 
>         assemble(self, GenericTensor A, Form form, SubDomain
> sub_domain, bool reset_tensor=True)

Is it necessary? We get an awful lot of functions. The idea is to
provide simple functions with default arguments when you use
dolfin::Form and otherwise provide one function with all the arguments
listed explicitly (like ufc::form, domains etc). All the high-level
functions with default arguments boil down to calling the "low level"
function with all the arguments prepared.

If we add a small Python layer on top, we would use the low-level call
from Python anyway (the others are just for making the application
code look nice in C++).

-- 
Anders


References