getfem-users
[Top][All Lists]
Advanced

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

[Getfem-users] Normal definition for surfaces ?


From: Antoine Mazuyer
Subject: [Getfem-users] Normal definition for surfaces ?
Date: Sun, 23 Jul 2017 18:12:13 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

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 !     


reply via email to

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