Reference documentation for deal.II version 8.5.1
Functions
Manifolds Namespace Reference

Functions

template<typename MeshIteratorType >
Quadrature< MeshIteratorType::AccessorType::space_dimension > get_default_quadrature (const MeshIteratorType &iterator, const bool with_laplace=false) 1
 
template<typename MeshIteratorType >
std::pair< std::vector< Point< MeshIteratorType::AccessorType::space_dimension > >, std::vector< double > > get_default_points_and_weights (const MeshIteratorType &iterator, const bool with_laplace=false)
 

Detailed Description

We collect here some helper functions used in the Manifold<dim,spacedim> classes.

Function Documentation

◆ get_default_quadrature()

template<typename MeshIteratorType >
Quadrature<MeshIteratorType::AccessorType::space_dimension> Manifolds::get_default_quadrature ( const MeshIteratorType &  iterator,
const bool  with_laplace = false 
)

Given a general mesh iterator, construct a quadrature object that contains the following points:

  • If the iterator points to a line, then the quadrature points are the two vertices of the line. This results in a quadrature object with two points.
  • If the iterator points to a quad, then the quadrature points are the vertices and line mid-points. This results in a quadrature object with eight (4+4) points.
  • If the iterator points to a hex, then the quadrature points are the vertices, the line mid-points, and the face mid-points. This results in a quadrature object with 26 (8+12+6) points.

The quadrature weights for these points are either chosen identically and equal to one over the number of quadrature points (if with_laplace is false), or in a way that gives points closer to the cell center (measured on the reference cell) a higher weight. These weights correspond to solving a Laplace equation and evaluating the solution at the quadrature points (if with_laplace is true).

The function is primarily used to construct the input argument for the Manifold::get_new_point() function, which computes a new point on a manifold based on a weighted average of "surrounding" points represented by the quadrature points and weights stored in a Quadrature object. This function creates such an object based on the points that "surround" a cell, face, or edge, and weights are chosen in a way appropriate for computing the new "mid-point" of the object pointed to. An example of where this is necessary is for mesh refinement, where (using the 2d situation as an example) we need to first create new edge mid-points, and then a new cell-point.

Parameters
[in]iteratorA mesh iterator that points to either a line, quad, or hex.
[in]with_laplaceWhether or not to compute the quadrature weights by solving a Laplace equation, as discussed above.
Template Parameters
MeshIteratorTypeAn iterator type that corresponds to either Triangulation::cell_iterator (or variants such as Triangulation::active_cell_iterator or DoFHandler::cell_iterator) or that is the result of statements such as cell->face(f) or cell->line(l).

◆ get_default_points_and_weights()

template<typename MeshIteratorType >
std::pair<std::vector<Point<MeshIteratorType::AccessorType::space_dimension> >, std::vector<double> > Manifolds::get_default_points_and_weights ( const MeshIteratorType &  iterator,
const bool  with_laplace = false 
)

Given a general mesh iterator, construct vectors of quadrature points and weights that contain the following points:

  • If the iterator points to a line, then the quadrature points are the two vertices of the line. This results in a point vector with two points.
  • If the iterator points to a quad, then the quadrature points are the vertices and line mid-points. This results in a point vector with eight (4+4) points.
  • If the iterator points to a hex, then the quadrature points are the vertices, the line mid-points, and the face mid-points. This results in a points vector with 26 (8+12+6) points.

The quadrature weights for these points are either chosen identically and equal to one over the number of quadrature points (if with_laplace is false), or in a way that gives points closer to the cell center (measured on the reference cell) a higher weight. These weights correspond to solving a Laplace equation and evaluating the solution at the quadrature points (if with_laplace is true).

The function is primarily used to construct the input argument for the Manifold::get_new_point() function, which computes a new point on a manifold based on a weighted average of "surrounding" points represented by the quadrature points and weights stored in the returned pair of vectors. This function creates such an object based on the points that "surround" a cell, face, or edge, and weights are chosen in a way appropriate for computing the new "mid-point" of the object pointed to. An example of where this is necessary is for mesh refinement, where (using the 2d situation as an example) we need to first create new edge mid-points, and then a new cell-point.

Parameters
[in]iteratorA mesh iterator that points to either a line, quad, or hex.
[in]with_laplaceWhether or not to compute the quadrature weights by solving a Laplace equation, as discussed above.
Template Parameters
MeshIteratorTypeAn iterator type that corresponds to either Triangulation::cell_iterator (or variants such as Triangulation::active_cell_iterator or DoFHandler::cell_iterator) or that is the result of statements such as cell->face(f) or cell->line(l).