![]() |
Reference documentation for deal.II version 9.4.2
|
Functions | |
| template<int dim, int spacedim, typename VectorType > | |
| void | coefficient_decay (FESeries::Fourier< dim, spacedim > &fe_fourier, const DoFHandler< dim, spacedim > &dof_handler, const VectorType &solution, Vector< float > &smoothness_indicators, const VectorTools::NormType regression_strategy=VectorTools::Linfty_norm, const double smallest_abs_coefficient=1e-10, const bool only_flagged_cells=false) |
| template<int dim, int spacedim, typename VectorType > | |
| void | coefficient_decay_per_direction (FESeries::Fourier< dim, spacedim > &fe_fourier, const DoFHandler< dim, spacedim > &dof_handler, const VectorType &solution, Vector< float > &smoothness_indicators, const ComponentMask &coefficients_predicate=ComponentMask(), const double smallest_abs_coefficient=1e-10, const bool only_flagged_cells=false) |
| template<int dim, int spacedim> | |
| FESeries::Fourier< dim, spacedim > | default_fe_series (const hp::FECollection< dim, spacedim > &fe_collection, const unsigned int component=numbers::invalid_unsigned_int) |
Smoothness estimation strategy based on the decay of Fourier expansion coefficients.
From the definition, we can write our Fourier series expansion 



with 







If the finite element approximation on cell 


The sum is finite only if the summands decay at least with order
![\[
|a_{\bf k}|^2 \|{\bf k}\|_2^{2s} \|{\bf k}\|_2^{d - 1} =
{\cal O}\left( \|{\bf k}\|_2^{-1-\epsilon} \right)
\]](form_2158.png)
for all 



![\[
|a_{\bf k}| = {\cal O}\left(\|{\bf k}\|_2^
{-\left(s + \frac d2 + \epsilon \right)} \right)
\]](form_2163.png)
The next step is to estimate how fast these coefficients decay with 
![\[
\min_{\alpha,\sigma}
\frac 12 \sum_{{\bf k}, \|{\bf k}\|_2 \le p}
\left( |a_{\bf k}| - \alpha \|{\bf k}\|_2^{-\sigma}\right)^2
\]](form_2165.png)
with regression coefficients 

![\[
\min_{\beta,\sigma}
Q(\beta,\sigma) =
\frac 12 \sum_{{\bf k}, \|{\bf k}\|_2 \le p}
\left( \ln |a_{\bf k}| - \beta + \sigma \ln \|{\bf k}\|_2
\right)^2,
\]](form_2166.png)
where 


![\[
\left(\begin{array}{cc}
\sum_{{\bf k}, \|{\bf k}\|_2 \le p} 1 &
\sum_{{\bf k}, \|{\bf k}\|_2 \le p} \ln \|{\bf k}\|_2
\\
\sum_{{\bf k}, \|{\bf k}\|_2 \le p} \ln \|{\bf k}\|_2 &
\sum_{{\bf k}, \|{\bf k}\|_2 \le p} (\ln \|{\bf k}\|_2)^2
\end{array}\right)
\left(\begin{array}{c}
\beta \\ -\sigma
\end{array}\right)
=
\left(\begin{array}{c}
\sum_{{\bf k}, \|{\bf k}\|_2\le p} \ln |a_{{\bf k}}|
\\
\sum_{{\bf k}, \|{\bf k}\|_2\le p} \ln |a_{{\bf k}}| \ln \|{\bf
k}\|_2 \end{array}\right)
\]](form_2170.png)
Solving for 

While we are not particularly interested in the actual value of 





| void SmoothnessEstimator::Fourier::coefficient_decay | ( | FESeries::Fourier< dim, spacedim > & | fe_fourier, |
| const DoFHandler< dim, spacedim > & | dof_handler, | ||
| const VectorType & | solution, | ||
| Vector< float > & | smoothness_indicators, | ||
| const VectorTools::NormType | regression_strategy = VectorTools::Linfty_norm, |
||
| const double | smallest_abs_coefficient = 1e-10, |
||
| const bool | only_flagged_cells = false |
||
| ) |
In this variant of the estimation strategy for higher dimensions, we will consider all mode vectors 


![\[
\ln \left( \max\limits_{\|{\bf k}\|_2} |a_{\bf k}| \right) \sim
C - \sigma \ln \|{\bf k}\|_2
\]](form_2184.png)
for 



The regression_strategy parameter determines which norm will be used on the subset of coefficients 

For a provided solution vector solution defined on a DoFHandler dof_handler, this function returns a vector smoothness_indicators with as many elements as there are cells where each element contains the estimated regularity 
A series expansion object fe_fourier has to be supplied, which needs to be constructed with the same FECollection object as the dof_handler.
The parameter smallest_abs_coefficient allows to ignore small (in absolute value) coefficients within the linear regression fit. In case there are less than two nonzero coefficients for a coordinate direction, this direction will be skipped. If all coefficients are zero, the returned value for this cell will be 
Smoothness indicators are usually used to decide whether to perform h- or p-adaptation. So in most cases, we only need to calculate those indicators on cells flagged for refinement or coarsening. The parameter only_flagged_cells controls whether this particular subset or all cells will be considered. By default, all cells will be considered. When only flagged cells are supposed to be considered, smoothness indicators will only be set on those vector entries of flagged cells; the others will be set to a signaling NaN.
Definition at line 369 of file smoothness_estimator.cc.
| void SmoothnessEstimator::Fourier::coefficient_decay_per_direction | ( | FESeries::Fourier< dim, spacedim > & | fe_fourier, |
| const DoFHandler< dim, spacedim > & | dof_handler, | ||
| const VectorType & | solution, | ||
| Vector< float > & | smoothness_indicators, | ||
| const ComponentMask & | coefficients_predicate = ComponentMask(), |
||
| const double | smallest_abs_coefficient = 1e-10, |
||
| const bool | only_flagged_cells = false |
||
| ) |
In this variant of the estimation strategy for higher dimensions, we only consider modes in each coordinate direction, i.e., only mode vectors 

The coefficients_predicate parameter selects Fourier coefficients 

flags provided to this function. Note that its size is 

true.
For a provided solution vector solution defined on a DoFHandler dof_handler, this function returns a vector smoothness_indicators with as many elements as there are cells where each element contains the estimated regularity 
A series expansion object fe_fourier has to be supplied, which needs to be constructed with the same FECollection object as the dof_handler.
The parameter smallest_abs_coefficient allows to ignore small (in absolute value) coefficients within the linear regression fit. In case there are fewer than two nonzero coefficients for a coordinate direction, this direction will be skipped. If all coefficients are zero, the returned value for this cell will be 
Smoothness indicators are usually used to decide whether to perform h- or p-adaptation. So in most cases, we only need to calculate those indicators on cells flagged for refinement or coarsening. The parameter only_flagged_cells controls whether this particular subset or all cells will be considered. By default, all cells will be considered. When only flagged cells are supposed to be considered, smoothness indicators will only be set on those vector entries of flagged cells; the others will be set to a signaling NaN.
Definition at line 467 of file smoothness_estimator.cc.
| FESeries::Fourier< dim, spacedim > SmoothnessEstimator::Fourier::default_fe_series | ( | const hp::FECollection< dim, spacedim > & | fe_collection, |
| const unsigned int | component = numbers::invalid_unsigned_int |
||
| ) |
Returns a FESeries::Fourier object for Fourier series expansions with the default configuration for smoothness estimation purposes.
For each finite element of the provided fe_collection, we use as many modes as its polynomial degree plus two. Further for each element, we use a 5-point Gaussian quarature iterated in each dimension by the maximal wave number, which is the number of modes decreased by one since we start with 
As the Fourier expansion can only be performed on scalar fields, this class does not operate on vector-valued finite elements and will therefore throw an assertion. However, each component of a finite element field can be treated as a scalar field, respectively, on which Fourier expansions are again possible. For this purpose, the optional parameter component defines which component of each FiniteElement will be used. The default value of component only applies to scalar FEs, in which case it indicates that the sole component is to be decomposed. For vector-valued FEs, a non-default value must be explicitly provided.
Definition at line 576 of file smoothness_estimator.cc.