← Back to team overview

dolfin team mailing list archive

Re: PyDOLFIN progress

 

On Wed, Jan 25, 2006 at 09:35:37AM -0600, Robert C.Kirby wrote:
> I agree with this -- currently there are too many steps that people 
> have to take
> to get stuff working (do an FFC file, compile it, write a DOLFIN code, 
> compile it,
> execute it).  Having a single file where you specify the problem/form, 
> solver,
> postprocessing, etc would make it much easier to use.  This is one of 
> the
> very attractive features in Sundance that would be attractive to emulate
> -- a single C++ (or now, Python if you have cvs access) file does 
> everything for you.
> 
> Rob
> 

Yes, that's true. But it should be fairly easy to wrap the steps using
Python, i.e. form compilation, "swigifying" and module import can be
wrapped in a single Python function. Previously the forms were tied
into the DOLFIN source tree, now it should be much simpler to develop
and manipulate forms.

I think it's ok to have several different files, one for the form, one
for the mesh etc. As long as they can be loaded and manipulated easily
by a main file or program (i.e. a Python program). This also helps to
preserve the component structure, i.e. to have many small tools, each
very good at one particular thing.

Note that coefficient functions (and solvers) can be written in Python
(that's how it's done right now in the examples). The idea of writing
small pieces of code in C++ and importing them as Python modules is
just for performance reasons.

  Johan



Follow ups

References