[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Getfem-users] Bus error when exporting mesh_fem (but computations are O
From: |
Sébastien Janas |
Subject: |
[Getfem-users] Bus error when exporting mesh_fem (but computations are OK !) |
Date: |
Wed, 30 Mar 2011 11:24:23 +0200 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; fr; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 |
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] Bus error when exporting mesh_fem (but computations are OK !),
Sébastien Janas <=