← Back to team overview

dolfin team mailing list archive

Re: [Question #152508]: division in forms

 

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

Neilen Marais posted a new comment:
It seems to be related to the

 from __future__ import division

statement. The following doesn't work:

from __future__ import division

import dolfin as dol
from dolfin import dot, curl, inner, dx

# Define mesh
mesh = dol.UnitCube(1,1,1)
material_func_space = dol.FunctionSpace(mesh, 'DG', 0)
mu_r = dol.Function(material_func_space)
mu_r.vector()[:] = 1.


# Define function space
order = 3
V = dol.FunctionSpace(mesh, "Nedelec 1st kind H(curl)", order)

# Define basis and bilinear form
u = dol.TrialFunction(V)
v = dol.TestFunction(V)

s = dot(curl(v), curl(u))/mu_r*dx            # Stiffness form


But if you comment out the from __future__ statement it does work.

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



Follow ups