hexed 0.3.0
 
Loading...
Searching...
No Matches
hexed::Elem_nonsmooth Class Reference

compute the elementwise nonsmoothness indicator of the provided function More...

#include <Element_func.hpp>

Inheritance diagram for hexed::Elem_nonsmooth:
hexed::Element_func hexed::Qpoint_func hexed::Output_data

Public Member Functions

 Elem_nonsmooth (const Qpoint_func &func)
 
 Elem_nonsmooth (Qpoint_func &&)=delete
 
int n_var (int n_dim) const override
 number of output variables when called on n_dim-dimensional input
 
std::string variable_name (int n_dim, int i_var) const override
 name of i_varth variable (for plotting) when called on n_dim-dimensional input
 
std::vector< double > operator() (Element &elem, const Basis &, double time) const override
 
- Public Member Functions inherited from hexed::Element_func
std::vector< double > operator() (Element &, const Basis &, int i_qpoint, double time) const override
 

Detailed Description

compute the elementwise nonsmoothness indicator of the provided function

The elementwise nonsmoothness indicator (different from the nonsmoothness indicator in Solver::set_art_visc_smoothness) is essentially a measure of how much of the flow state resides in the highest-order polynomial components. If you want the nonsmoothness of the variable \(u\), it is given by

\[ \sqrt{\frac{1}{n_{dim}} \sum_{0 \le i_{dim} < n_{dim}} \| \langle u(\vec{x}), P_{r - 1}(x_{i_{dim}}) \rangle P_{r - 1}(x_{i_{dim}}) \|^2} \]

where \(P_j\) is the \(j\)th Legendre polynomial and \(r\) is the row size of the basis. In other words, you project the solution onto the highest-order univariate Legendre polynomial along each dimension, take the \(L_2\) norm of this in the other dimensions, and then take the RMS of that whole expression over all dimensions.

Constructor & Destructor Documentation

◆ Elem_nonsmooth()

hexed::Elem_nonsmooth::Elem_nonsmooth ( const Qpoint_func & func)
Parameters
functhe function you want to compute the nonsmoothness of ( \(u\) in the explanation above).

Member Function Documentation

◆ n_var()

int hexed::Elem_nonsmooth::n_var ( int n_dim) const
inlineoverridevirtual

number of output variables when called on n_dim-dimensional input

Implements hexed::Output_data.

◆ operator()()

std::vector< double > hexed::Elem_nonsmooth::operator() ( Element & elem,
const Basis & ,
double time ) const
overridevirtual

Implements hexed::Element_func.

◆ variable_name()

std::string hexed::Elem_nonsmooth::variable_name ( int n_dim,
int i_var ) const
inlineoverridevirtual

name of i_varth variable (for plotting) when called on n_dim-dimensional input

Reimplemented from hexed::Output_data.


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