Exception: Form (<empty Form>) seems to be zero: cannot compile it
Hello
I am getting this error for a simple problem below. I cannot understand the mistake. I am on version 1.0-beta
from dolfin import *
class Inlet(SubDomain):
def inside(self, x, on_boundary):
return ((x[0] < DOLFIN_EPS and x[1]-0.1 < DOLFIN_EPS) or \
(x[1] < DOLFIN_EPS and x[0]-0.1 < DOLFIN_EPS)) and \
class Outlet(SubDomain):
def inside(self, x, on_boundary):
return ((x[0]-1 > -DOLFIN_EPS and x[1]-0.9 > -DOLFIN_EPS) or \
pinlet = 1.0
poutlet= 0.0
np = 50
mesh = UnitSquare(np, np)
sub_domains = MeshFunction(
inlet = Inlet()
inlet.mark(
outlet = Outlet()
outlet.
Q = FunctionSpace(mesh, "CG", 1)
r = TestFunction(Q)
q = TrialFunction(Q)
a = inner(grad(q), grad(r))*dx
pbc_inlet = DirichletBC(Q, pinlet, sub_domains, 0)
pbc_outlet = DirichletBC(Q, poutlet, sub_domains, 1)
pbc = [pbc_inlet, pbc_outlet]
#pressureProblem = LinearVariation
#pressureSolver = LinearVariation
#pressureSolver
p = Function(Q)
solve(a == 0, p, pbc)
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- DOLFIN Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Johan Hake
- Solved:
- Last query:
- Last reply: