derivatives of a function only defined on a (possibly curved) surface.
In order to define the above operator, we start by introducing some notations.
-Let $\mathbf x_S:\hat S \rightarrow S$ be a parametrization of
+Let $\mathbf x_S:\hat S \rightarrow S$ be a parameterization of
a surface $S$ from a reference element $\hat S \subset \mathbb R^2$,
i.e. each point $\hat{\mathbf x}\in\hat S$ induces a point ${\mathbf
x}_S(\hat{\mathbf x}) \in S$. Then let
template <int spacedim>
void LaplaceBeltrami<spacedim>::make_grid_and_dofs ()
{
- static SphericalManifold<dim,spacedim> surface_description;
- triangulation.set_manifold (0, surface_description);
+ triangulation.set_manifold (0, SphericalManifold<dim,spacedim>());
{
- SphericalManifold<spacedim> boundary_description;
Triangulation<spacedim> volume_mesh;
GridGenerator::half_hyper_ball(volume_mesh);
- volume_mesh.set_manifold (0, boundary_description);
+ volume_mesh.set_manifold (0, SphericalManifold<spacedim>);
volume_mesh.refine_global (4);
std::set<types::boundary_id> boundary_ids;
}
std::cout << "Surface mesh has " << triangulation.n_active_cells()
- << " cells."
- << std::endl;
+ << " cells."
+ << std::endl;
...
@endcode
// polygon) but not when, as here, the manifold has curvature. So for things
// to work properly, we need to attach a manifold object to our (surface)
// triangulation, in much the same way as we've already done in 1d for the
- // boundary. We create such an object (with indefinite, <code>static</code>,
- // lifetime) at the top of the function and attach it to the triangulation
- // for all cells with boundary indicator zero that will be created
- // henceforth.
+ // boundary. We create such an object and attach it to the triangulation.
//
// The final step in creating the mesh is to refine it a number of
// times. The rest of the function is the same as in previous tutorial
template <int spacedim>
void LaplaceBeltramiProblem<spacedim>::make_grid_and_dofs ()
{
- static SphericalManifold<dim,spacedim> surface_description;
-
{
Triangulation<spacedim> volume_mesh;
GridGenerator::half_hyper_ball(volume_mesh);
boundary_ids);
}
triangulation.set_all_manifold_ids(0);
- triangulation.set_manifold (0, surface_description);
+ triangulation.set_manifold (0, SphericalManifold<dim,spacedim>());
triangulation.refine_global(4);