dolfin team mailing list archive
-
dolfin team
-
Mailing list archive
-
Message #08005
DofMap has been re-ordered -> Abort
Hello Dolfin!
I'm getting a strange abort:
Error: DofMap has been re-ordered. Cannot return signature string.
This minimal example takes a user/constant Function and projects it to a
discrete funciton:
// Begin crash example ---------------------------------------------
#include <dolfin.h>
#include "Restrict.h"
using namespace dolfin;
void restrict_to_FE_space(Function& f, Function& f_discr, Mesh& mesh)
{
RestrictBilinearForm a;
RestrictLinearForm L(f);
LinearPDE proj(a,L,mesh);
proj.solve(f_discr);
}
int main(void)
{
UnitSquare mesh(16,16);
Function f(mesh,1.0);
Function g;
restrict_to_FE_space(f,g,mesh);
File file("g.xml");
file << g;
return 0;
}
// end crash example --------------------------------------------------
The abort occurs when the function is to be written to disk. In the
context where I originally encountered this, I use the the function
restrict_to_FE_space to set initial values for a function which occurs
in a form. The subsequent call to the assembler cases a segmentation
violation (!)
Note that if the code from the function restrict_to_FE_space is pasted
into main, everything works as expected. This makes me think that this
could be a bug.
The Restrict form is simply u*v*dx = f*v*dx:
# begin form ----------------------------------------
element = FiniteElement("Lagrange", "triangle", 1)
v = TestFunction(element)
u = TrialFunction(element)
f = Function(element)
a = u*v*dx
L = f*v*dx
# end form ------------------------------------------
Any thoughts?
/Dag
Attachment:
signature.asc
Description: OpenPGP digital signature
Follow ups