← Back to team overview

dolfin team mailing list archive

Re: [Question #152123]: problem with project and cell_domains

 

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

    Status: Solved => Open

Chaffra is still having a problem:
I still need an answer. I checked that I am up to date on all the
libraries and I passed all the dolfin tests. I still don't get this.
Take this example.

m = UnitInterval(11)
Q = FunctionSpace(m,'CG',1)
mf = m.data().create_mesh_function("cell_domains", m.topology().dim())
a = Constant(1.0)

project(a,Q)
#fails with
#[0]PETSC ERROR: Object is in wrong state!
#[0]PETSC ERROR: Matrix is missing diagonal entry 11!.....

mf.array()[:] = 0
project(a,Q) #works

mf.array()[5:] = 1
project(a,Q)
#fails with
#[0]PETSC ERROR: Object is in wrong state!
#[0]PETSC ERROR: Matrix is missing diagonal entry 11!.....

I need to set cell_domains for my problem. You can now set them on the
forms or on the mesh. When I set cell_domains on the mesh I run into the
errors above.

Thanks,
Chaffra

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