EDIT: removed everything now, still an error
Dear all,
I have the usual simple linear elastic problem, and now I'd like to have a vector of expressions and detection classes to specify arbitrary Neumann conditions. In order to do that, I'm using vectors of shared pointers, but somewhere I'm doing bad things.
You can find a minimal example here.
The error is this:
*** -------------------------------------------------------------------------
*** Error: Unable to assemble form.
*** Reason: Invalid value rank for coefficient 0 (got 0 but expecting 1). You might have forgotten to specify the value rank correctly in an Expression subclass.
*** Where: This error was encountered inside AssemblerBase.cpp.
*** Process: unknown
***
*** DOLFIN version: 1.5.0
*** Git changeset: f467b66dcfd821ec20e9f9070c7cef5a991dbc42
*** -------------------------------------------------------------------------
I've removed everything from the UFL, now it's this:
# Bilinear form
a = inner(u, v) * dx #inner(sigma(u), eps(v))*dx
# Known term
L = inner(f, v) * dx #+ inner(f1, v) * ds(1) + inner(f2, v) * ds(2) + inner(f3, v) * ds(3) + inner(f4, v) * ds(4) + inner(f5, v) * ds(5)
# Export
forms = [a, L]
The only coefficient now is f
, which is assigned as follows:
// Bulk force
rhs.f = dolfin::Constant(0.0, 0.0);
When assembling the matrix, I get the exception:
// Assign RHS markers
rhs.ds = boundary_markers;
// Numerical system
dolfin::PETScMatrix A;
dolfin::PETScVector b;
// Assemble
dolfin::assemble_system(A, b, lhs, rhs, bcs); // <---- BOOM
I am missing something stupid probably...
Thanks for any pointers!