16 #ifndef __NODAL_BASIS__
17 #define __NODAL_BASIS__
24 ROL::Ptr<Teuchos::LAPACK<int,Real> >
lapack_;
32 NodalBasis(ROL::Ptr<Teuchos::LAPACK<int,Real> > lapack,
const int ni,
const int nq);
36 std::vector<Real>
xi_;
39 std::vector<Real>
xq_;
42 std::vector<Real>
wq_;
46 std::vector<Real>
Lp_;
58 lapack_(lapack), ni_(ni), nq_(nq), xi_(ni_,0), xq_(nq_,0), wq_(nq_,0), L_(ni_*nq_,0), Lp_(ni_*nq_,0)
62 std::vector<Real> ai(
ni_,0);
63 std::vector<Real> bi(
ni_,0);
64 std::vector<Real> wi(
ni_,0);
70 std::vector<Real> aq(
nq_,0);
71 std::vector<Real> bq(
nq_,0);
75 std::vector<Real> e(
ni_,0);
76 std::vector<Real> ell(nq,0);
81 for(
int i=0;i<
ni_;++i) {
85 std::copy(ell.begin(),ell.end(),
L_.begin()+i*
nq_);
89 std::copy(ell.begin(),ell.end(),
Lp_.begin()+i*
nq_);
92 std::fill(e.begin(),e.end(),0);
void rec_lobatto(ROL::Ptr< Teuchos::LAPACK< int, Real > > const lapack, const double xl1, const double xl2, std::vector< Real > &a, std::vector< Real > &b)
Modify the given recurrence coefficients so that the set of zeros of the maximal order polynomial inc...
ROL::Ptr< Teuchos::LAPACK< int, Real > > lapack_
NodalBasis(ROL::Ptr< Teuchos::LAPACK< int, Real > > lapack, const int ni, const int nq)
Set up quantities we will need repeatedly.
ROL::Ptr< Lagrange< Real > > lagrange_
Object for working with Lagrange polynomials and their derivatives.
void gauss(ROL::Ptr< Teuchos::LAPACK< int, Real > > lapack, const std::vector< Real > &a, const std::vector< Real > &b, std::vector< Real > &x, std::vector< Real > &w)
Compute the Gauss quadrature nodes and weights for the polynomials generated by the recurrence coeffi...
void rec_jacobi(ROL::Ptr< Teuchos::LAPACK< int, Real > > lapack, const double alpha, const double beta, std::vector< Real > &a, std::vector< Real > &b)
Generate the Jacobi polynomial recursion coeffcients .