compute the elementwise nonsmoothness indicator of the provided function More...
#include <Element_func.hpp>
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_var th variable (for plotting) when called on n_dim -dimensional input | |
std::vector< double > | operator() (Element &elem, const Basis &, double time) const override |
![]() | |
std::vector< double > | operator() (Element &, const Basis &, int i_qpoint, double time) const override |
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.
hexed::Elem_nonsmooth::Elem_nonsmooth | ( | const Qpoint_func & | func | ) |
func | the function you want to compute the nonsmoothness of ( \(u\) in the explanation above). |
|
inlineoverridevirtual |
number of output variables when called on n_dim
-dimensional input
Implements hexed::Output_data.
|
overridevirtual |
–
Implements hexed::Element_func.
|
inlineoverridevirtual |
name of i_var
th variable (for plotting) when called on n_dim
-dimensional input
Reimplemented from hexed::Output_data.