deal.II version GIT relicensing-2289-g1e5549a87a 2024-12-21 21:30:00+00:00
\(\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\}}\)
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | List of all members
QSorted< dim > Class Template Reference

#include <deal.II/base/quadrature_lib.h>

Inheritance diagram for QSorted< dim >:
Inheritance graph
[legend]

Public Member Functions

 QSorted (const Quadrature< dim > &quad)
 

Private Member Functions

bool compare_weights (const unsigned int a, const unsigned int b) const
 

Detailed Description

template<int dim>
class QSorted< dim >

Sorted Quadrature. Given an arbitrary quadrature formula, this class generates a quadrature formula where the quadrature points are ordered according the weights, from those with smaller corresponding weight, to those with higher corresponding weights. This might be necessary, for example, when integrating high order polynomials, since in these cases you might sum very big numbers with very small numbers, and summation is not stable if the numbers to sum are not close to each other.

Definition at line 454 of file quadrature_lib.h.

Constructor & Destructor Documentation

◆ QSorted()

template<int dim>
QSorted< dim >::QSorted ( const Quadrature< dim > &  quad)

The constructor takes an arbitrary quadrature formula quad and sorts its points and weights according to ascending weights.

Definition at line 1006 of file quadrature_lib.cc.

Member Function Documentation

◆ compare_weights()

template<int dim>
bool QSorted< dim >::compare_weights ( const unsigned int  a,
const unsigned int  b 
) const
private

A rule for std::sort to reorder pairs of points and weights. a and b are indices into the weights array and the result will be determined by comparing the weights.

Definition at line 1038 of file quadrature_lib.cc.


The documentation for this class was generated from the following files: