Thank Wolf,
the code I used for the mesh is;
------------------------------
lc=0.08;
Point(1) = {0, 0, 0,lc};
Point(2) = {1, 0, 0,lc};
Point(3) = {1, 1, 0,lc};
Point(4) = {0, 1, 0,lc};
Line(1) = {1, 2};
Line(2) = {2, 3};
Line(3) = {3, 4};
Line(4) = {4, 1};
Line Loop(5) = {1, 2, 3, 4};
Plane Surface(6) = {5};
Transfinite Surface{6} = {1,2,3,4};
Recombine Surface{6};
--------------------------
I also used the Mesh.MshFileVersion = 1; to convert it to gmsh1 but both gave
me the same error (but both files work perfectly with tutorial example-5). I
have gotten stack with it for some time now. the code i used for the example 21
is (under the run function);
------------------
Triangulation<2> tria;
GridIn<2> grid_in;
grid_in.attach_triangulation (triangulation);
std::ifstream input_file("quadmesh.msh");
Assert (dim==2, ExcInternalError());
grid_in.read_msh (input_file);
static const StraightBoundary<dim> boundary;
triangulation.set_boundary (0, boundary);
std::cout << " Number of active cells: "
<< triangulation.n_active_cells()
<< std::endl
<< " Total number of cells: "
<< triangulation.n_cells()
<< std::endl;
-------------------------------
can someone pls tell me whats wrong and how to solve it.
Thanks
ricky
--- On Fri, 15/1/10, Wolfgang Bangerth <[email protected]> wrote:
> From: Wolfgang Bangerth <[email protected]>
> Subject: Re: [deal.II] importing mesh
> To: [email protected]
> Cc: "Ricky Donyina-Ameyaw" <[email protected]>
> Date: Friday, 15 January, 2010, 0:42
>
> > An error occurred in line <1955> of file
> <source/dofs/dof_handler.cc> in
> > function void dealii::DoFHandler<dim,
> spacedim>::distribute_dofs(const
> > dealii::FiniteElement<dim, spacedim>&,
> unsigned int) [with int dim = 2,
> > int spacedim = 2] The violated condition was:
> > tria->n_levels() > 0
> > The name and call sequence of the exception was:
> > ExcInvalidTriangulation()
> > Additional Information:
>
> This means that the triangulation doesn't currently store
> any cells.
> Without seeing the code it's hard to tell what is going on,
> but my guess
> is that importing the mesh doesn't happen -- either because
> you forgot the
> call that actually reads the mesh, or because the file you
> try to read
> doesn't have any cells.
>
> Best
> W.
>
> -------------------------------------------------------------------------
> Wolfgang Bangerth
> email:
> [email protected]
>
>
> www: http://www.math.tamu.edu/~bangerth/
>
>
_______________________________________________
dealii mailing list http://poisson.dealii.org/mailman/listinfo/dealii