not using "from dolfin import *"

Asked by Nico Schlömer


if I remember correctly, dolfin_adjoint assumes that

from dolfin import *

 is called, then

from dolfin_adjoint import *

which overrides some functions of dolfin. Now, I like to keep my code clean so I always imported dolfin as

import dolfin as df

The above idea won't work anymore then, of course. When importing dolfin_adjoint as

import dolfin_adjoint as da

which methods will I have to prefix with "da" instead of "df"?

Question information

English Edit question
dolfin-adjoint Edit question
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Patrick Farrell (pefarrell) said :

Hi Nico,

You can get a list with the following snippet of code:

print [key for key in df.__dict__ if key in da.__dict__ and '__' not in key]



Hope this helps,


Can you help with this problem?

Provide an answer of your own, or ask Nico Schlömer for more information if necessary.

To post a message you must log in.