Let \Omega is cubical the domain [-1,1]^3 and \Omega^1 is the spherical domain of radius 0.5. Let \Omega^2 is \Omega\setminus\Omega^1 is the cube with a spherical hole. Write a freefem code to build two different 3d meshes Sh1 for \Omega^1 and Sh2 for \Omega^2. Level the boundaries of both meshes.
load “msh3”
load “tetgen”
include “MeshSurface.idp”
// Parameters
real hs = 0.1; //mesh size on sphere
// Mesh
meshS ThS = Sphere(0.5, hs, 7, 1);
Sphere takes 4 arguments
meshS ThS = Sphere(R, hs, L, 1);
where R is the radius, h is the mesh size of the sphere, L is the label of the sphere and the last one is the global orientation of the surface (1 for extern and -1 for intern)