Stokhos Package Browser (Single Doxygen Collection) Version of the Day
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
Stokhos::KL::ExponentialRandomField< value_type, execution_space > Class Template Reference

Class representing a KL expansion of an exponential random field. More...

#include <Stokhos_KL_ExponentialRandomField.hpp>

Inheritance diagram for Stokhos::KL::ExponentialRandomField< value_type, execution_space >:
Inheritance graph
[legend]

Public Types

typedef ExponentialOneDEigenFunction< value_type > one_d_eigen_func_type
 
typedef OneDEigenPair< one_d_eigen_func_typeone_d_eigen_pair_type
 
typedef ProductEigenPair< one_d_eigen_func_type, execution_spaceproduct_eigen_pair_type
 
typedef Kokkos::View< one_d_eigen_func_type **, execution_spaceeigen_func_array_type
 
typedef Kokkos::View< value_type *, execution_spaceeigen_value_array_type
 

Public Member Functions

 ExponentialRandomField ()
 Default constructor.
 
 ExponentialRandomField (Teuchos::ParameterList &solverParams)
 Constructor.
 
KOKKOS_INLINE_FUNCTION ~ExponentialRandomField ()
 Destructor.
 
KOKKOS_INLINE_FUNCTION int spatialDimension () const
 Return spatial dimension of the field.
 
KOKKOS_INLINE_FUNCTION int stochasticDimension () const
 Return stochastic dimension of the field.
 
template<typename point_type , typename rv_type >
KOKKOS_INLINE_FUNCTION Teuchos::PromotionTraits< typenamerv_type::value_type, value_type >::promote evaluate (const point_type &point, const rv_type &random_variables) const
 Evaluate random field at a point.
 
template<typename point_type >
KOKKOS_INLINE_FUNCTION value_type evaluate_mean (const point_type &point) const
 Evaluate mean of random field at a point.
 
template<typename point_type >
KOKKOS_INLINE_FUNCTION Teuchos::PromotionTraits< typenamepoint_type::value_type, value_type >::promote evaluate_standard_deviation (const point_type &point) const
 Evaluate standard deviation of random field at a point.
 
template<typename point_type >
KOKKOS_INLINE_FUNCTION Teuchos::PromotionTraits< typenamepoint_type::value_type, value_type >::promote evaluate_eigenfunction (const point_type &point, int i) const
 Evaluate given eigenfunction at a point.
 
value_type KOKKOS_INLINE_FUNCTION eigenvalue (int i) const
 Return eigenvalue.
 
void print (std::ostream &os) const
 Print KL expansion.
 

Protected Attributes

int num_KL
 Number of KL terms.
 
int dim
 Dimension of expansion.
 
value_type mean
 Mean of random field.
 
value_type std_dev
 Standard deviation of random field.
 
eigen_func_array_type product_eigen_funcs
 Product eigenfunctions.
 
eigen_value_array_type product_eigen_values
 Product eigenvalues.
 

Detailed Description

template<typename value_type, typename execution_space = Kokkos::DefaultExecutionSpace>
class Stokhos::KL::ExponentialRandomField< value_type, execution_space >

Class representing a KL expansion of an exponential random field.

This class provides a means for evaluating a random field $a(x,\theta)$, $x\in D$, $\theta\in\Omega$ through the KL expansion

\[
    a(x,\theta) \approx a_0 +
      \sigma\sum_{k=1}^M \sqrt{\lambda_k}b_k(x)\xi_k(\theta)
\]

where $D$ is a $d$-dimensional hyper-rectangle, for the case when the covariance function of $a$ is exponential:

\[
    \mbox{cov}(x,x') = \sigma\exp(-|x_1-x_1'|/L_1-...-|x_d-x_d'|/L_d).
\]

In this case, the covariance function and domain factor into a product 1-dimensional covariance functions over 1-dimensional domains, and thus the eigenfunctions $b_k$ and eigenvalues $\lambda_k$ factor into a product of corresponding 1-dimensional eigenfunctions and values. These are computed by the OneDExponentialCovarianceFunction class For a given value of $M$, the code works by computing the $M$ eigenfunctions for each direction using this class. Then all possible tensor products of these one-dimensional eigenfunctions are formed, with corresponding eigenvalue given by the product of the one-dimensional eigenvalues. These eigenvalues are then sorted in increasing order, and the first $M$ are chosen as the $M$ KL eigenpairs. Then given values for the random variables $\xi_k$, the class provides a routine for evaluating a realization of the random field.

The idea for this approach was provided by Chris Miller.

All data is passed into this class through a Teuchos::ParameterList, which accepts the following parameters:

Additionally parameters for the OneDExponentialCovarianceFunction are also accepted.

Definition at line 108 of file Stokhos_KL_ExponentialRandomField.hpp.

Member Typedef Documentation

◆ one_d_eigen_func_type

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
typedef ExponentialOneDEigenFunction<value_type> Stokhos::KL::ExponentialRandomField< value_type, execution_space >::one_d_eigen_func_type

Definition at line 111 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ one_d_eigen_pair_type

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
typedef OneDEigenPair<one_d_eigen_func_type> Stokhos::KL::ExponentialRandomField< value_type, execution_space >::one_d_eigen_pair_type

Definition at line 112 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ product_eigen_pair_type

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
typedef ProductEigenPair<one_d_eigen_func_type,execution_space> Stokhos::KL::ExponentialRandomField< value_type, execution_space >::product_eigen_pair_type

Definition at line 113 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ eigen_func_array_type

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
typedef Kokkos::View<one_d_eigen_func_type**,execution_space> Stokhos::KL::ExponentialRandomField< value_type, execution_space >::eigen_func_array_type

Definition at line 114 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ eigen_value_array_type

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
typedef Kokkos::View<value_type*,execution_space> Stokhos::KL::ExponentialRandomField< value_type, execution_space >::eigen_value_array_type

Definition at line 115 of file Stokhos_KL_ExponentialRandomField.hpp.

Constructor & Destructor Documentation

◆ ExponentialRandomField() [1/2]

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
Stokhos::KL::ExponentialRandomField< value_type, execution_space >::ExponentialRandomField ( )
inline

Default constructor.

Definition at line 118 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ ExponentialRandomField() [2/2]

template<typename value_type , typename execution_space >
Stokhos::KL::ExponentialRandomField< value_type, execution_space >::ExponentialRandomField ( Teuchos::ParameterList & solverParams)

Constructor.

Definition at line 49 of file Stokhos_KL_ExponentialRandomFieldImp.hpp.

◆ ~ExponentialRandomField()

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
KOKKOS_INLINE_FUNCTION Stokhos::KL::ExponentialRandomField< value_type, execution_space >::~ExponentialRandomField ( )
inline

Destructor.

Definition at line 125 of file Stokhos_KL_ExponentialRandomField.hpp.

Member Function Documentation

◆ spatialDimension()

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
KOKKOS_INLINE_FUNCTION int Stokhos::KL::ExponentialRandomField< value_type, execution_space >::spatialDimension ( ) const
inline

Return spatial dimension of the field.

Definition at line 129 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ stochasticDimension()

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
KOKKOS_INLINE_FUNCTION int Stokhos::KL::ExponentialRandomField< value_type, execution_space >::stochasticDimension ( ) const
inline

Return stochastic dimension of the field.

Definition at line 133 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ evaluate()

template<typename value_type , typename execution_space >
template<typename point_type , typename rv_type >
KOKKOS_INLINE_FUNCTION Teuchos::PromotionTraits< typenamerv_type::value_type, value_type >::promote Stokhos::KL::ExponentialRandomField< value_type, execution_space >::evaluate ( const point_type & point,
const rv_type & random_variables ) const

Evaluate random field at a point.

Definition at line 166 of file Stokhos_KL_ExponentialRandomFieldImp.hpp.

◆ evaluate_mean()

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
template<typename point_type >
KOKKOS_INLINE_FUNCTION value_type Stokhos::KL::ExponentialRandomField< value_type, execution_space >::evaluate_mean ( const point_type & point) const
inline

Evaluate mean of random field at a point.

Definition at line 146 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ evaluate_standard_deviation()

template<typename value_type , typename execution_space >
template<typename point_type >
KOKKOS_INLINE_FUNCTION Teuchos::PromotionTraits< typenamepoint_type::value_type, value_type >::promote Stokhos::KL::ExponentialRandomField< value_type, execution_space >::evaluate_standard_deviation ( const point_type & point) const

Evaluate standard deviation of random field at a point.

Definition at line 184 of file Stokhos_KL_ExponentialRandomFieldImp.hpp.

◆ evaluate_eigenfunction()

template<typename value_type , typename execution_space >
template<typename point_type >
KOKKOS_INLINE_FUNCTION Teuchos::PromotionTraits< typenamepoint_type::value_type, value_type >::promote Stokhos::KL::ExponentialRandomField< value_type, execution_space >::evaluate_eigenfunction ( const point_type & point,
int i ) const

Evaluate given eigenfunction at a point.

Definition at line 202 of file Stokhos_KL_ExponentialRandomFieldImp.hpp.

◆ eigenvalue()

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
value_type KOKKOS_INLINE_FUNCTION Stokhos::KL::ExponentialRandomField< value_type, execution_space >::eigenvalue ( int i) const
inline

Return eigenvalue.

Definition at line 164 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ print()

template<typename value_type , typename execution_space >
void Stokhos::KL::ExponentialRandomField< value_type, execution_space >::print ( std::ostream & os) const

Print KL expansion.

Definition at line 214 of file Stokhos_KL_ExponentialRandomFieldImp.hpp.

Member Data Documentation

◆ num_KL

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
int Stokhos::KL::ExponentialRandomField< value_type, execution_space >::num_KL
protected

Number of KL terms.

Definition at line 172 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ dim

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
int Stokhos::KL::ExponentialRandomField< value_type, execution_space >::dim
protected

Dimension of expansion.

Definition at line 175 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ mean

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
value_type Stokhos::KL::ExponentialRandomField< value_type, execution_space >::mean
protected

Mean of random field.

Definition at line 178 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ std_dev

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
value_type Stokhos::KL::ExponentialRandomField< value_type, execution_space >::std_dev
protected

Standard deviation of random field.

Definition at line 181 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ product_eigen_funcs

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
eigen_func_array_type Stokhos::KL::ExponentialRandomField< value_type, execution_space >::product_eigen_funcs
protected

Product eigenfunctions.

Definition at line 184 of file Stokhos_KL_ExponentialRandomField.hpp.

◆ product_eigen_values

template<typename value_type , typename execution_space = Kokkos::DefaultExecutionSpace>
eigen_value_array_type Stokhos::KL::ExponentialRandomField< value_type, execution_space >::product_eigen_values
protected

Product eigenvalues.

Definition at line 187 of file Stokhos_KL_ExponentialRandomField.hpp.


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