Dear Yves,
Thank your for you answer.
You understand well ! I will proceed as you have described. Indeed, I had 2D elements in 3D inside the mesh...
Best regards;
Antoine
----- Le 24 Juil 17, à 8:39, Yves Renard <address@hidden> a écrit :
Dear Antoine,
If I understand well, you store some n-1 dimensional elements (i.e. two-dimensional elements in 3D here) in order to describe a boundary. This is not the strategy used in GetFEM meshes.
A boundary region in GetFEM is just a list of volumic elements with the face number. So, in order to define a boundary mesh region, you have to select the concerned volumic elements and detect which face is concerned. GetFEM supports n-1 dimensional elements, but more in the aim to define some weak formulation term on them, for instance to define plate or shell elements.
Best regards,
Yves.
----- Original Message -----
From: "Antoine Mazuyer" <address@hidden>
To: address@hidden
Sent: Sunday, July 23, 2017 6:12:13 PM
Subject: [Getfem-users] Normal definition for surfaces ?
Hello getfem users,
I use getfem in my homemade software to solve Elasticity problems on
geological models, on which I already have a mesh in my own data structure
To do such things, I loop on the vertices, on the cells, and on the
facets of my original mesh and I
use the getfem API to create the getfem::mesh. Each facets and each
cells belongs to a region.
I have no problem to use the getfem solver with only dirichlet
conditions, but when it comes to Neumann Conditions, following
http://getfem.org/userdoc/model_source_term.html?highlight=neumann, I
have an exception:
| o-[Exception ] Error: Error in getfem_generic_assembly.cc, line
2890 :
| Invalid outward unit normal vector. Possible
reasons: not on boundary or transformation failed.
\__________________________________________________________________________________________________________
I think the problem comes from my mesh definition, it seems that getfem
could not get the normal vector of my facets...
Here is a sample code of how I create the surfaces of my model
virtual void add_boundary_elements()
{
const RINGMesh::GeoModelMeshPolygons& geomodel_mesh_polygons =
geomodel_.mesh.polygons;
for( int triangle_id = 0; triangle_id <
geomodel_mesh_polygons.nb();
triangle_id++ ) {
getfem::size_type getfem_triangle_id = add_triangle(
geomodel_mesh_polygons.vertex( triangle_id, 0 ),
geomodel_mesh_polygons.vertex( triangle_id, 1 ),
geomodel_mesh_polygons.vertex( triangle_id, 2 ) );
region(
geomodel_mesh_polygons.surface( triangle_id )
+ geomodel_.nb_regions() ).add(
getfem_triangle_id );
}
}
I don't think it is a problem coming from my region definitions, because
I use it to easily solve dirichlet problems....
Thank you in advance for you answers !