← Back to team overview

dolfin team mailing list archive

Re: DofMap has been re-ordered -> Abort

 

On Thu, May 22, 2008 at 10:00:50AM +0200, Dag Lindbo wrote:
> 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

Do you ever see the following message?

  BUILDING

It is printed in DofMap::build(). As far as I can see, that is the
only place where we set the member DofMap::dof_map to anything but
zero, which is what triggers the error message about the dof map being
rebuilt.

-- 
Anders

Attachment: signature.asc
Description: Digital signature


References