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/xfem_stokes.cc, 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.
Irene.