Reference documentation for deal.II version 9.5.0
\(\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
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
NonMatching::internal::QuadratureGeneratorImplementation::RootFinder Class Reference

#include <deal.II/non_matching/quadrature_generator.h>

Classes

struct  AdditionalData
 

Public Member Functions

 RootFinder (const AdditionalData &data=AdditionalData())
 
void find_roots (const std::vector< std::reference_wrapper< const Function< 1 > > > &functions, const BoundingBox< 1 > &interval, std::vector< double > &roots)
 

Private Member Functions

void find_roots (const Function< 1 > &function, const BoundingBox< 1 > &interval, const unsigned int recursion_depth, std::vector< double > &roots)
 

Private Attributes

const AdditionalData additional_data
 

Detailed Description

A class that attempts to find multiple distinct roots of a function, \(f(x)\), over an interval, \([l, r]\). This is done as follows. If there is a sign change in function value between the interval end points, we solve for the root. If there is no sign change, we attempt to bound the function value away from zero on \([a, b]\), to conclude that no roots exist. If we can't exclude that there are roots, we split the interval in two: \([l, (r + l) / 2]\), \([(r + l) / 2, r]\), and use the same algorithm recursively on each interval. This means that we can typically find 2 distinct roots, but not 3.

The bounds on the functions values are estimated using the function taylor_estimate_function_bounds, which approximates the function as a second order Taylor-polynomial around the interval midpoint. When we have a sign change on an interval, this class uses boost::math::tools::toms748_solve for finding roots .

Definition at line 608 of file quadrature_generator.h.

Constructor & Destructor Documentation

◆ RootFinder()

NonMatching::internal::QuadratureGeneratorImplementation::RootFinder::RootFinder ( const AdditionalData data = AdditionalData())

Constructor.

Definition at line 525 of file quadrature_generator.cc.

Member Function Documentation

◆ find_roots() [1/2]

void NonMatching::internal::QuadratureGeneratorImplementation::RootFinder::find_roots ( const std::vector< std::reference_wrapper< const Function< 1 > > > &  functions,
const BoundingBox< 1 > &  interval,
std::vector< double > &  roots 
)

For each of the incoming functions, attempt to find the roots over the interval defined by interval and add these to roots. The returned roots will be sorted in ascending order: \(x_0 < x_1 <...\) and duplicate roots (with respect to the tolerance in AdditionalData) will be removed.

Definition at line 532 of file quadrature_generator.cc.

◆ find_roots() [2/2]

void NonMatching::internal::QuadratureGeneratorImplementation::RootFinder::find_roots ( const Function< 1 > &  function,
const BoundingBox< 1 > &  interval,
const unsigned int  recursion_depth,
std::vector< double > &  roots 
)
private

Attempt to find the roots of the function over the interval defined by interval and add these to roots. recursion_depth holds the number of times this function has been called recursively.

Definition at line 555 of file quadrature_generator.cc.

Member Data Documentation

◆ additional_data

const AdditionalData NonMatching::internal::QuadratureGeneratorImplementation::RootFinder::additional_data
private

Definition at line 673 of file quadrature_generator.h.


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