Reference documentation for deal.II version Git 1dc1051882 2021-04-22 23:57:03 +0200
\(\newcommand{\dealvcentcolon}{\mathrel{\mathop{:}}}\) \(\newcommand{\dealcoloneq}{\dealvcentcolon\mathrel{\mkern-1.2mu}=}\) \(\newcommand{\jump}[1]{\left[\!\left[ #1 \right]\!\right]}\) \(\newcommand{\average}[1]{\left\{\!\left\{ #1 \right\}\!\right\}}\)
Public Member Functions | List of all members
DoFTools::internal::ComparisonHelper< dim, Number > Struct Template Reference

Public Member Functions

bool operator() (const Point< dim, Number > &lhs, const Point< dim, Number > &rhs) const

Detailed Description

template<int dim, typename Number = double>
struct DoFTools::internal::ComparisonHelper< dim, Number >

Comparison functor struct to compare two Points and return if one is "less" than the other one. This can be used to use Point<dim> as a key in std::map.

Comparison is done through an artificial downstream direction that tells directions apart through a factor of 1e-5. Once we got the direction, we check for its value. In case the distance is exactly zero (without an epsilon), we might still have the case that two points combine in a particular way, e.g. the points (1.0, 1.0) and (1.0+1e-5, 0.0). Thus, compare the points component by component in the second step. Thus, points need to have identical floating point components to be considered equal.

Definition at line 77 of file

Member Function Documentation

◆ operator()()

template<int dim, typename Number = double>
bool DoFTools::internal::ComparisonHelper< dim, Number >::operator() ( const Point< dim, Number > &  lhs,
const Point< dim, Number > &  rhs 
) const

Comparison operator.

Return true if lhs is considered less than rhs.

Definition at line 85 of file

The documentation for this struct was generated from the following file: