Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_KL_ExponentialRandomField.hpp
Go to the documentation of this file.
1 // @HEADER
2 // *****************************************************************************
3 // Stokhos Package
4 //
5 // Copyright 2009 NTESS and the Stokhos contributors.
6 // SPDX-License-Identifier: BSD-3-Clause
7 // *****************************************************************************
8 // @HEADER
9 
10 #ifndef STOKHOS_KL_EXPONENTIAL_RANDOM_FIELD_HPP
11 #define STOKHOS_KL_EXPONENTIAL_RANDOM_FIELD_HPP
12 
15 #include "Kokkos_Core.hpp"
16 
19 
20 namespace Stokhos {
21 
22  namespace KL {
23 
25 
74  template <typename value_type,
75  typename execution_space = Kokkos::DefaultExecutionSpace>
77  public:
78 
82  typedef Kokkos::View<one_d_eigen_func_type**,execution_space> eigen_func_array_type;
83  typedef Kokkos::View<value_type*,execution_space> eigen_value_array_type;
84 
87 
90 
92  KOKKOS_INLINE_FUNCTION
94 
96  KOKKOS_INLINE_FUNCTION
97  int spatialDimension() const { return dim; }
98 
100  KOKKOS_INLINE_FUNCTION
101  int stochasticDimension() const { return num_KL; }
102 
104  template <typename point_type, typename rv_type>
105  KOKKOS_INLINE_FUNCTION
107  value_type>::promote
108  evaluate(const point_type& point,
109  const rv_type& random_variables) const;
110 
112  template <typename point_type>
113  KOKKOS_INLINE_FUNCTION
114  value_type evaluate_mean(const point_type& point) const { return mean; }
115 
117  template <typename point_type>
118  KOKKOS_INLINE_FUNCTION
120  value_type>::promote
121  evaluate_standard_deviation(const point_type& point) const;
122 
124  template <typename point_type>
125  KOKKOS_INLINE_FUNCTION
127  evaluate_eigenfunction(const point_type& point, int i) const;
128 
130  value_type
131  KOKKOS_INLINE_FUNCTION
132  eigenvalue(int i) const { return product_eigen_values(i); }
133 
135  void print(std::ostream& os) const;
136 
137  protected:
138 
140  int num_KL;
141 
143  int dim;
144 
147 
150 
153 
156 
157  }; // class ExponentialRandomField
158 
159  } // namespace KL
160 
161 } // namespace Stokhos
162 
163 // Include template definitions
165 
166 #endif // STOKHOS_KL_EXPONENTIAL_RANDOM_FIELD_HPP
Container for multi-dimensional product of 1-D eigenfunctions/values.
Kokkos::DefaultExecutionSpace execution_space
eigen_func_array_type product_eigen_funcs
Product eigenfunctions.
ExponentialOneDEigenFunction< value_type > one_d_eigen_func_type
KOKKOS_INLINE_FUNCTION Teuchos::PromotionTraits< typename rv_type::value_type, value_type >::promote evaluate(const point_type &point, const rv_type &random_variables) const
Evaluate random field at a point.
KOKKOS_INLINE_FUNCTION value_type evaluate_mean(const point_type &point) const
Evaluate mean of random field at a point.
Kokkos::View< one_d_eigen_func_type **, execution_space > eigen_func_array_type
eigen_value_array_type product_eigen_values
Product eigenvalues.
Kokkos::View< value_type *, execution_space > eigen_value_array_type
void print(std::ostream &os) const
Print KL expansion.
Container for one-dimensional eigenfunction and eigenvalue.
KOKKOS_INLINE_FUNCTION Teuchos::PromotionTraits< typename point_type::value_type, value_type >::promote evaluate_eigenfunction(const point_type &point, int i) const
Evaluate given eigenfunction at a point.
KOKKOS_INLINE_FUNCTION Teuchos::PromotionTraits< typename point_type::value_type, value_type >::promote evaluate_standard_deviation(const point_type &point) const
Evaluate standard deviation of random field at a point.
value_type std_dev
Standard deviation of random field.
KOKKOS_INLINE_FUNCTION int stochasticDimension() const
Return stochastic dimension of the field.
Class representing a KL expansion of an exponential random field.
ProductEigenPair< one_d_eigen_func_type, execution_space > product_eigen_pair_type
KOKKOS_INLINE_FUNCTION ~ExponentialRandomField()
Destructor.
One-dimensional eigenfunction for exponential covariance function.
KOKKOS_INLINE_FUNCTION int spatialDimension() const
Return spatial dimension of the field.
OneDEigenPair< one_d_eigen_func_type > one_d_eigen_pair_type
value_type KOKKOS_INLINE_FUNCTION eigenvalue(int i) const
Return eigenvalue.