This is a read only copy of the old FEniCS QA forum. Please visit the new QA forum to ask questions

segmentation fault with a mesh

0 votes

Hi al,
I think i have a bug with my code.
Here my code to generate my mesh :

    lc=0.05;

Point(1) = {0, 0, 0, lc};
Point(2) = {5, 0, 0, lc/10};
Point(3) = {5, -2, 0, lc};
Point(4) = {9, -2, 0, lc};
Point(5) = {9, 0, 0, lc/10};
Point(6) = {20, 0, 0, lc};
Point(7) = {20, 4, 0, 0.5};
Point(8) = {0, 4, 0, 0.5};

Point(11)={8.999,-0.1,0,lc/2};



Line(1) = {8, 1};
Line(2) = {1, 2};
Line(3) = {2, 3};
Line(4) = {3, 4};
Line(5) = {4, 5};
Line(6) = {5, 6};
Line(7) = {6, 7};
Line(8) = {7, 8};
Line Loop(9) = {8, 1, 2, 3, 4, 5, 6, 7};
Line(12) ={2,5};


Plane Surface(10) = {9};
Point{11} In Surface{10};
Line{12} In Surface{10};

Physical Line("In")={1};
Physical Line("Out")={7};
Physical Line("Boundary")={2,3,4,5,6};
Physical Line("Top")={8};

Then I convert my .msh to a .xml
and here my cpp code

#include <dolfin.h>
#include "TentativeVelocity.h"
#include "PressureUpdate.h"
#include "VelocityUpdate.h"

using namespace dolfin;



int main()
{
  parameters["std_out_all_processes"]=false;

  Mesh mesh("cavity.xml");

  // Create function spaces
  VelocityUpdate::FunctionSpace V(mesh);
  PressureUpdate::FunctionSpace Q(mesh);

}

And the output is a segmentation fault... Do you have any idea about that?
Thanks!

asked Nov 20, 2015 by Chacha-hx2 FEniCS Novice (120 points)
...