Hi,

I use a simple 1D mesh which works well for computations, but I can't export it.

Here is the way I define the mesh and the mesh_fem (certainly not the best way, but it works)

***************************************************
int nbV = 100;    // number of elements
double dx = 1.;  // size of the elements

getfem::mesh mymesh;

double start = 0.0;
double end   = start + dx;
for (unsigned i=0;i<nbV;i++)
{
            std::vector<bgeot::size_type> ind(2);
            ind[0] = mymesh.add_point(bgeot::base_node(start,0.,0.));
            ind[1] = mymesh.add_point(bgeot::base_node(end,0.,0.));
            mymesh.add_convex(bgeot::simplex_geotrans(1,1), ind.begin());
            start = end;
            end += dx;
}

getfem::mesh_fem mf(mymesh);
mf.set_finite_element(getfem::fem_descriptor("FEM_PK(1,1)"));

***************************************************

but when I want to export it with something like


***************************************************
mf.write_to_file("solution.mf", true);
***************************************************

I always get a Bus error.

Can somebody spot the trick ?

Thanks a lot for your help,

Sébastien

_______________________________________________
Getfem-users mailing list
[email protected]
https://mail.gna.org/listinfo/getfem-users

Reply via email to