Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Stokhos_DiscretizedStieltjesBasis.hpp
Go to the documentation of this file.
1 // @HEADER
2 // ***********************************************************************
3 //
4 // Stokhos Package
5 // Copyright (2009) Sandia Corporation
6 //
7 // Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive
8 // license for use of this work by or on behalf of the U.S. Government.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are
12 // met:
13 //
14 // 1. Redistributions of source code must retain the above copyright
15 // notice, this list of conditions and the following disclaimer.
16 //
17 // 2. Redistributions in binary form must reproduce the above copyright
18 // notice, this list of conditions and the following disclaimer in the
19 // documentation and/or other materials provided with the distribution.
20 //
21 // 3. Neither the name of the Corporation nor the names of the
22 // contributors may be used to endorse or promote products derived from
23 // this software without specific prior written permission.
24 //
25 // THIS SOFTWARE IS PROVIDED BY SANDIA CORPORATION "AS IS" AND ANY
26 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
27 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28 // PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SANDIA CORPORATION OR THE
29 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36 //
37 // Questions? Contact Eric T. Phipps (etphipp@sandia.gov).
38 //
39 // ***********************************************************************
40 // @HEADER
41 
42 #ifndef STOKHOS_DISCRETIZEDSTIELTJESBASIS_HPP
43 #define STOKHOS_DISCRETIZEDSTIELTJESBASIS_HPP
44 
46 
47 namespace Stokhos {
48 
50 
62  template <typename ordinal_type, typename value_type>
64  public RecurrenceBasis<ordinal_type, value_type> {
65  public:
66 
68 
77  const std::string& name, const ordinal_type& p,
78  value_type (*weightFn)(const value_type&),
79  const value_type& leftEndPt,
80  const value_type& rightEndPt,
81  bool normalize,
83 
86 
89  const ordinal_type& order2) const;
90 
102 
103  protected:
104 
106 
107 
109  virtual bool
115 
117 
121  const Teuchos::Array<value_type>& alpha,
122  const Teuchos::Array<value_type>& beta) const;
123 
125  value_type evaluateWeight(const value_type& x) const;
126 
128  value_type
130  const Teuchos::Array<value_type>& alpha,
131  const Teuchos::Array<value_type>& beta) const;
132 
134  value_type
136  const Teuchos::Array<value_type>& alpha,
137  const Teuchos::Array<value_type>& beta) const;
138 
139  protected:
140 
143  const DiscretizedStieltjesBasis& basis);
144 
145  private:
146 
147  // Prohibit copying
149 
150  // Prohibit Assignment
152 
153  protected:
154 
157 
160 
163 
166 
169 
172 
175 
176  }; // class DiscretizedStieltjesBasis
177 
178 } // Namespace Stokhos
179 
180 // Include template definitions
181 
183 #endif
Teuchos::Array< value_type > delta
Recurrence coefficients.
value_type evaluateWeight(const value_type &x) const
Evaluates the scaled weight function.
virtual bool computeRecurrenceCoefficients(ordinal_type n, Teuchos::Array< value_type > &alpha, Teuchos::Array< value_type > &beta, Teuchos::Array< value_type > &delta, Teuchos::Array< value_type > &gamma) const
Compute recurrence coefficients.
Implementation of OneDOrthogPolyBasis based on the general three-term recurrence relationship: for ...
Generates three-term recurrence using the Discretized Stieltjes procedure.
std::string name
Name of basis.
value_type eval_inner_product(const ordinal_type &order1, const ordinal_type &order2) const
Evaluate inner product of two basis functions to test orthogonality.
Teuchos::Array< value_type > beta
Recurrence coefficients.
GrowthPolicy
Enumerated type for determining Smolyak growth policies.
Teuchos::Array< value_type > quad_weights
Quadrature points for discretized stieltjes procedure.
Teuchos::Array< value_type > alpha
Recurrence coefficients.
const value_type leftEndPt_
Left end point of domain.
Teuchos::Array< Teuchos::Array< value_type > > quad_values
Quadrature values for discretized stieltjes procedure.
value_type expectedValue_tJ_nsquared(const ordinal_type &order, const Teuchos::Array< value_type > &alpha, const Teuchos::Array< value_type > &beta) const
Approximates where = order.
value_type expectedValue_J_nsquared(const ordinal_type &order, const Teuchos::Array< value_type > &alpha, const Teuchos::Array< value_type > &beta) const
Approximates where = order.
value_type evaluateRecurrence(const value_type &point, ordinal_type order, const Teuchos::Array< value_type > &alpha, const Teuchos::Array< value_type > &beta) const
Evaluate 3-term recurrence formula using supplied coefficients.
Teuchos::Array< value_type > quad_points
Quadrature points for discretized stieltjes procedure.
const value_type rightEndPt_
Right end point of domain.
virtual ordinal_type order() const
Return order of basis (largest monomial degree ).
virtual Teuchos::RCP< OneDOrthogPolyBasis< ordinal_type, value_type > > cloneWithOrder(ordinal_type p) const
Clone this object with the option of building a higher order basis.
ordinal_type p
Order of basis.
DiscretizedStieltjesBasis & operator=(const DiscretizedStieltjesBasis &b)
Teuchos::Array< value_type > gamma
Recurrence coefficients.
value_type(* weightFn_)(const value_type &)
Weight function.
DiscretizedStieltjesBasis(const std::string &name, const ordinal_type &p, value_type(*weightFn)(const value_type &), const value_type &leftEndPt, const value_type &rightEndPt, bool normalize, GrowthPolicy growth=SLOW_GROWTH)
Constructor.
GrowthPolicy growth
Smolyak growth policy.
int n