[Top][All Lists]

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

Re: [Getfem-users] level set function

From: Yves Renard
Subject: Re: [Getfem-users] level set function
Date: Tue, 08 Apr 2014 16:39:43 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0

Dear Irene,

The level-set function should be approximatively a signed distance to the hole boundary. So that you cannot just set the value of level set to 1 or 0.
If your function is not close to a signed distance. The standard way is to use a reinitilization of the level-set using a Hamilton-Jacobi equation to make it evolves toward a signed distance and preserving the 0 level-set. An exemple of such a reinitialization can be found in the example interface/tests/matlab/demo_structural_optimization.m



Le 08/04/2014 10:34, ing.ire a écrit :
Dear all,
I am using getfem to solve a stokes problem in a domain with a hole, set by a level set function.
Till now, I am setting the level set function as in contrib/xfem_contact/, that is defining an analytical function that returns the distance of a geometrical point from the border set by the level set function (eg: 2D circle of radius=Radius and centre=(0.5,0.5) ):

double ls_value (const base_node &P)
   double R=Radius;
   return (P[0]-0.5)*(P[0]+0.5)+(P[1]-0.5)*(P[1]-0.5)-R*R;

and then calling this function for every dof of the level set mesh FEM and assigning the value to the vector ls.values():

const getfem::mesh_fem &lsmf = ls.get_mesh_fem();
for (size_type i=0; i<lsmf.nb_dof();++i)
    ls.values()[i] = ls_value(lsmf.point_of_dof(i));

Is it possible to add the level set function by directly setting its value (0 or 1) in each dof of the level set mesh FEM?
I can write a function that returns 0 or 1 if the geometrical point P that takes as an argument belongs to one region or the other, but then how can I set the object getfem::level_set ls in getfem?

Thanks in advance.

Getfem-users mailing list


  Yves Renard (address@hidden)       tel : (33)
  Pole de Mathematiques, INSA-Lyon             fax : (33)
  20, rue Albert Einstein
  69621 Villeurbanne Cedex, FRANCE


reply via email to

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