← Back to team overview

dolfin team mailing list archive

Re: [Question #95695]: Dimension-Independence (C++)

 

Question #95695 on DOLFIN changed:
https://answers.launchpad.net/dolfin/+question/95695

    Status: Open => Answered

Andy R Terrel proposed the following answer:
The easiest thing to do is just create multiple .ufl files.  See
dolfin/demo/pde/cahn-hilliard/cpp

But it is also possible to just do a switch inside the ufl file since
ffc just wraps the ufl file as a python script.  The problem with this
approach is making sure you have the right dimensions everywhere.  For
simple things (like stokes) this is trivial, but as you add more
complexity to your algorithms it begins to become a real pain.

Another option is to just use the python interface to dolfin, then every
thing gets generated as necessary and can have a larger amount of
flexibility for less code (that you write anyways).

-- 
You received this question notification because you are a member of
DOLFIN Team, which is an answer contact for DOLFIN.