44template <
typename ordinal_type,
typename value_type>
47 value_type alphaIndex,
49 RecurrenceBasis<ordinal_type, value_type>(
"Jacobi", p, normalize, growth),
50 alphaIndex_(alphaIndex),
55#ifdef HAVE_STOKHOS_DAKOTA
60template <
typename ordinal_type,
typename value_type>
64 alphaIndex_(basis.alphaIndex_),
65 betaIndex_(basis.betaIndex_)
75template <
typename ordinal_type,
typename value_type>
81template <
typename ordinal_type,
typename value_type>
85 Teuchos::Array<value_type>& alpha,
86 Teuchos::Array<value_type>& beta,
87 Teuchos::Array<value_type>& delta,
88 Teuchos::Array<value_type>& gamma)
const
90 value_type a = alphaIndex_;
91 value_type b = betaIndex_;
102 alpha[0] = getB(0)/getA(0);
104 delta[0] = getC(0)/getA(0);
107 for (ordinal_type i=1; i<n; i++)
109 alpha[i] = getB(i)/getA(i);
110 beta[i] = getD(i)/getA(i);
111 delta[i] = getC(i)/getA(i);
119template <
typename ordinal_type,
typename value_type>
122 return 2*(n+1)*(n+alphaIndex_+betaIndex_+1)*(2*n+alphaIndex_+betaIndex_);
125template <
typename ordinal_type,
typename value_type>
128 value_type a = alphaIndex_;
129 value_type b = betaIndex_;
130 return -(2*n+a+b+1)*(a*a-b*b);
133template <
typename ordinal_type,
typename value_type>
136 value_type a = alphaIndex_;
137 value_type b = betaIndex_;
138 return poch3(2*n+a+b);
141template <
typename ordinal_type,
typename value_type>
144 value_type a = alphaIndex_;
145 value_type b = betaIndex_;
146 return 2*(n+a)*(n+b)*(2*n + a + b + 2);
149template <
typename ordinal_type,
typename value_type>
152 return (m+2)*(m+1)*m;
155template <
typename ordinal_type,
typename value_type>
156Teuchos::RCP<Stokhos::OneDOrthogPolyBasis<ordinal_type,value_type> >
value_type poch3(value_type x) const
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.
value_type getC(int n) const
value_type getD(int n) const
value_type getA(int n) const
~JacobiBasis()
Destructor.
JacobiBasis(ordinal_type p, value_type alphaIndex, value_type betaIndex, bool normalize=false, GrowthPolicy growth=SLOW_GROWTH)
Constructor.
value_type getB(int n) const
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.
Implementation of OneDOrthogPolyBasis based on the general three-term recurrence relationship:
Teuchos::Array< value_type > alpha
Recurrence coefficients.
Teuchos::Array< value_type > beta
Recurrence coefficients.
ordinal_type p
Order of basis.
Teuchos::Array< value_type > gamma
Recurrence coefficients.
Teuchos::Array< value_type > delta
Recurrence coefficients.
virtual void setSparseGridGrowthRule(LevelToOrderFnPtr ptr)
Set sparse grid rule.
virtual void setup()
Setup basis after computing recurrence coefficients.
GrowthPolicy
Enumerated type for determining Smolyak growth policies.