Basis Evaluators#
-
enum mpart::BasisHomogeneity#
Flags for controlling how “homogeneous/heterogeneous” a real-valued multivariate basis function is.
Assuming you want create a function \(f_{\vec{\alpha}}:\mathbb{R}^{d+1}\to\mathbb{R}\) which has multi-index \(\vec{\alpha}\), there are a few possibilities:
All diagonal and offdiagonal univariate functions are identical, i.e. \(f(x_1,\ldots,x_d,y)=\psi_{\alpha_{d+1}}(y)\prod_{j=1}^d\psi_{\alpha_j}(x_j)\), which is
Homogeneous
All offdiagonal univariate functions are identical, i.e. \(f(x_1,\ldots,x_d,y)=\psi^{diag}_{\alpha_{d+1}}(y)\prod_{j=1}^d\psi^{offdiag}_{\alpha_j}(x_j)\), which is
OffdiagHomogeneous
.All univariate basis functions may be different, i.e. \(f(x_1,\ldots,x_d,y)=\psi^{d+1}_{\alpha_{d+1}}(y)\prod_{j=1}^d\psi^{j}_{\alpha_j}(x_j)\) which is
Heterogeneous
Values:
-
enumerator Homogeneous#
-
enumerator OffdiagHomogeneous#
-
enumerator Heterogeneous#
-
template<BasisHomogeneity HowHomogeneous, typename BasisEvaluatorType, typename RectifierType = Identity>
class BasisEvaluator# Class to represent all elements of a multivariate function basis.
See BasisHomogeneity for information on options for
HowHomogeneous
. The form of template parameterBasisEvaluatorType
will depend onHowHomogeneous
See the documentation of each implementation for details on what’s necessary. We give the option to “rectify” the function if it depends on y (i.e. make the part dependent on x positive)Any univariate basis function used here must have the following functions:
EvaluateAll
EvaluateDerivatives
EvaluateSecondDerivatives
See OrthogonalPolynomial as an example that implements the required functions
- Template Parameters:
HowHomogeneous – What level of homogeneity the basis has (see BasisHomogeneity for more info)
BasisEvaluatorType – The type we need to evaluate when evaluating the basis
RectifierType – The rectification operator for diag/offdiag cross-terms
Public Functions
-
inline BasisEvaluator(unsigned int dim, BasisEvaluatorType basis1d)#
Construct a new Basis Evaluator object.
- Parameters:
dim – input dimension of the multivariate basis
basis1d – object(s) used to evaluate the basis
-
inline void EvaluateAll(unsigned int dim, double *output_eval, int maxOrder, double point) const#
Evaluate the functions for the multivariate basis.
- Parameters:
dim – Which input dimension to evaluate
output_eval – Memory to store output (should be size maxOrder + 1)
maxOrder – Maximum basis order to evaluate
point – Input point to evaluate the
dim
th basis functions at
-
inline void EvaluateDerivatives(unsigned int dim, double *output_eval, double *output_diff, int maxOrder, double point) const#
Evaluate the functions for the multivariate basis.
- Parameters:
dim – Which input dimension to evaluate
output_eval – Memory to store eval output (size maxOrder + 1)
output_diff – Memory to store 1st deriv output (size maxOrder + 1)
maxOrder – Maximum basis order to evaluate
point – Input point to evaluate the
dim
th basis functions at
-
inline void EvaluateSecondDerivatives(unsigned int dim, double *output_eval, double *output_diff, double *output_diff_2, int maxOrder, double point) const#
Evaluate the functions for the multivariate basis.
- Parameters:
dim – Which input dimension to evaluate
output_eval – Memory to store eval output (size maxOrder + 1)
output_diff – Memory to store 1st deriv output (size maxOrder + 1)
output_diff_2 – Memory to store 2nd deriv output (size maxOrder + 1)
maxOrder – Maximum basis order to evaluate
point – Input point to evaluate the
dim
th basis functions at
-
template<typename BasisEvaluatorType>
class BasisEvaluator<BasisHomogeneity::Homogeneous, BasisEvaluatorType># Basis evaluator when all univariate basis fcns are identical.
See also
OrthogonalPolynomial is an example of a valid BasisEvaluatorType
- Template Parameters:
BasisEvaluatorType – Univariate type to evaluate
Public Functions
Public Members
-
BasisEvaluatorType basis1d_#
Object to evaluate 1d basis fcns.
Warning
doxygenclass: Cannot find class “mpart::BasisEvaluator< BasisHomogeneity::OffdiagHomogeneous, Kokkos::pair< OffdiagEvaluatorType, DiagEvaluatorType > >” in doxygen xml output for project “mpart” from directory: /home/runner/work/MParT/MParT/build/docs/doxygen/xml
Warning
doxygenclass: Cannot find class “mpart::BasisEvaluator< BasisHomogeneity::Heterogeneous, std::vector< std::shared_ptr< CommonBasisEvaluatorType > > >” in doxygen xml output for project “mpart” from directory: /home/runner/work/MParT/MParT/build/docs/doxygen/xml