getfem-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Getfem-users] Problem with vtk_export of the solution of a 2D lapla


From: Renard Yves
Subject: Re: [Getfem-users] Problem with vtk_export of the solution of a 2D laplacian problem embedded in 3D
Date: Sat, 29 Aug 2009 18:56:02 +0200
User-agent: Dynamic Internet Messaging Program (DIMP) H3 (1.1.2)


Dear Andres,

The test corresponding to this error indicates that the vector U has not the right size.
The size of the vector U should be the number of dof. It is the case ?

Yves.


Andres Peratta <address@hidden> a écrit :

Hi
I am solving a laplacian problem and bumped into troubles with the vtk_export
and the interpolation function. While trying to export the solution with
write_point_data(mf_u, U, "Potential") the following error on "dimensions
mismatch" pops out:


============================================
|      An error has been detected !!!      |
============================================
Error in /usr/local/include/getfem/getfem_interpolation.h, line 466 :
Dimensions mismatch

* The error appears when running an executable compiled with -O3 flag,
but everything works fine in the debug version of the code.

* The corresponding piece of code is:
getfem::vtk_export exp("output.vtk"); // runs okay
exp.exporting(mf_u);  // runs okay
exp.write_point_data(mf_u, U, "Potential"); // The problem seems to start
here; and appears when vtk_export::write_point_data attempts to use the
interpolation function from getfem_interpolation.h.


Below are more details of the problem.
Many thanks for your help/comments,

Andres


--------

The integration domain consists of a 2D surface in 3D space. (i.e. the surface
is arbitrarily warped in 3D space). The mesh, imported directly from GMSH,
consists of flat triangular elements and the line segments of the boundary.

I modified "laplacian.cc" in order to read the mesh from gmsh as follows:

getfem::import_mesh("gmshv2:input.msh",mesh);   // Import from gmsh
N = mesh.dim();    // dimensionality

The mesh represents a 2D surface warped in 3D space, however N becomes 3; I am
not sure if this is still okay; however I get good solutions when running the
debug version.

// I use the following parameters:

MESH_TYPE = "GT_PK(2,1)"
FEM_TYPE = "FEM_PK(2,2)"
INTEGRATION = "IM_TRIANGLE(6)"

// The postprocessing part of the code is as follows:

getfem::vtk_export exp("output.vtk");
exp.exporting(mf_u);
exp.write_point_data(mf_u, U, "Potential"); // This line triggers the error

// The compiler is gcc version 4.2.1; but most certainly it's me doing
// something wrong rather than a compiler issue.



_______________________________________________
Getfem-users mailing list
address@hidden
https://mail.gna.org/listinfo/getfem-users







reply via email to

[Prev in Thread] Current Thread [Next in Thread]