Reference documentation for deal.II version GIT relicensing-437-g81ec864850 2024-04-19 07:30:02+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
Classes | Functions
FESeries Namespace Reference

Classes

class  Fourier
 
class  Legendre
 

Functions

template<int dim, typename CoefficientType >
std::pair< std::vector< unsigned int >, std::vector< double > > process_coefficients (const Table< dim, CoefficientType > &coefficients, const std::function< std::pair< bool, unsigned int >(const TableIndices< dim > &)> &predicate, const VectorTools::NormType norm_type, const double smallest_abs_coefficient=1e-10)
 
std::pair< double, double > linear_regression (const std::vector< double > &x, const std::vector< double > &y)
 

Detailed Description

This namespace offers functions to calculate expansion series of the solution on the reference element. Coefficients of expansion are often used to estimate local smoothness of the underlying FiniteElement field to decide on h- or p-adaptive refinement strategy.

Function Documentation

◆ process_coefficients()

template<int dim, typename CoefficientType >
std::pair< std::vector< unsigned int >, std::vector< double > > FESeries::process_coefficients ( const Table< dim, CoefficientType > &  coefficients,
const std::function< std::pair< bool, unsigned int >(const TableIndices< dim > &)> &  predicate,
const VectorTools::NormType  norm_type,
const double  smallest_abs_coefficient = 1e-10 
)

Calculate the norm of subsets of coefficients defined by predicate being constant. Return the pair of vectors of predicate values and the vector of calculated subset norms.

predicate should return a pair of bool and unsigned int. The former is a flag whether a given TableIndices should be used in calculation, whereas the latter is the unrolled value of indices according to which the subsets of coefficients will be formed.

Only those coefficients will be considered which are larger than smallest_abs_coefficient.

Note
Only the following values of norm_type are implemented and make sense in this case: mean, L1_norm, L2_norm, Linfty_norm. The mean norm ca only be applied to real valued coefficients.

◆ linear_regression()

std::pair< double, double > FESeries::linear_regression ( const std::vector< double > &  x,
const std::vector< double > &  y 
)

Linear regression least-square fit of \(y = k \, x + b\). The size of the input vectors should be equal and more than 1. The returned pair will contain \(k\) (first) and \(b\) (second).

Definition at line 29 of file fe_series.cc.