UQTk: Uncertainty Quantification Toolkit  3.1.1
PCSet.h
Go to the documentation of this file.
1 /* =====================================================================================
2 
3  The UQ Toolkit (UQTk) version 3.1.1
4  Copyright (2021) NTESS
5  https://www.sandia.gov/UQToolkit/
6  https://github.com/sandialabs/UQTk
7 
8  Copyright 2021 National Technology & Engineering Solutions of Sandia, LLC (NTESS).
9  Under the terms of Contract DE-NA0003525 with NTESS, the U.S. Government
10  retains certain rights in this software.
11 
12  This file is part of The UQ Toolkit (UQTk)
13 
14  UQTk is open source software: you can redistribute it and/or modify
15  it under the terms of BSD 3-Clause License
16 
17  UQTk is distributed in the hope that it will be useful,
18  but WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  BSD 3 Clause License for more details.
21 
22  You should have received a copy of the BSD 3 Clause License
23  along with UQTk. If not, see https://choosealicense.com/licenses/bsd-3-clause/.
24 
25  Questions? Contact the UQTk Developers at <uqtk-developers@software.sandia.gov>
26  Sandia National Laboratories, Livermore, CA, USA
27 ===================================================================================== */
31 
32 #ifndef PCSET_H_SEEN
33 #define PCSET_H_SEEN
34 
35 #include <iostream>
36 #include <sstream>
37 #include <string.h>
38 #include <stdio.h>
39 #include <map>
40 #include "Array1D.h"
41 #include "Array2D.h"
42 #include "error_handlers.h"
43 #include "ftndefs.h"
44 #include "quad.h"
45 
46 /* CVODE headers */
47 #include <cvode/cvode.h> /* prototypes for CVODE fcts., consts. */
48 #include <cvode/cvode_direct.h> /* access to CVDls interface */
49 #include <nvector/nvector_serial.h> /* serial N_Vector types, fcts., macros */
50 #include <sunmatrix/sunmatrix_dense.h> /* access to dense SUNMatrix */
51 #include <sunlinsol/sunlinsol_dense.h> /* access to dense SUNLinearSolver */
52 // #include <cvode/cvode_dense.h> /* prototype for CVDense */
53 #include <sundials/sundials_dense.h> /* definitions DlsMat DENSE_ELEM */
54 #include <sundials/sundials_types.h> /* definition of type realtype */
55 
56 #include <iostream>
57 #include <string.h>
58 #include <stdio.h>
59 #include <sstream>
60 using namespace std; // needed for python string conversion
61 
62 class PCBasis;
63 class Quad;
64 
66 
70 
71 class PCSet {
72 public:
73 
80  PCSet(const string sp_type, const int order, const int n_dim, const string pc_type,
81  const double alpha=0.0, const double betta=1.0);
82 
83 
93  PCSet(const string sp_type, const int order, const int n_dim, const string pc_type, const string pc_seq,
94  const double alpha=0.0, const double betta=1.0);
95 
96 
103  PCSet(const string sp_type, const Array1D<int>& maxOrders, const int n_dim, const string pc_type,
104  const double alpha=0.0, const double betta=1.0);
105 
113  PCSet(const string sp_type, const Array2D<int>& customMultiIndex, const string pc_type,
114  const double alpha=0.0, const double betta=1.0);
115 
117  ~PCSet();
118 
122 
125  void dPhi_alpha(Array1D<double>& x, Array1D<int>& alpha, Array1D<double>& grad);
128  void dPhi(Array1D<double>& x, Array2D<int>& mindex, Array1D<double>& grad, Array1D<double>& ck);
131  void dPhi(Array2D<double>& x, Array2D<int>& mindex, Array2D<double>& grad, Array1D<double>& ck);
132 
135  void ddPhi_alpha(Array1D<double>& x, Array1D<int>& alpha, Array2D<double>& grad);
138  void ddPhi(Array1D<double>& x, Array2D<int>& mindex, Array2D<double>& grad, Array1D<double>& ck);
139 
143 
146  void SetQd1d(Array1D<double>& qdpts1d,Array1D<double>& wghts1d, int nqd);
147 
159  void SetQuadRule(const string grid_type,const string fs_type,int param);
160 
162  void SetQuadRule(Quad &quadRule);
163 
167 
169  void PrintMultiIndex() const;
170 
172  void PrintMultiIndexNormSquared() const;
173 
174 
178 
180  string GetPCType() const {return pcType_;}
181 
183  double GetAlpha() const {return alpha_;}
184 
186  double GetBeta() const {return beta_;}
187 
189  void GetMultiIndex(Array2D<int> &mindex) const {mindex=multiIndex_;}
190 
192  void GetMultiIndex(int *mindex) const;
193 
196  void GetNormSq(Array1D<double>& normsq) const {normsq=psiSq_;}
197 
199  int GetNumberPCTerms() const {return nPCTerms_;}
200 
202  int GetNDim() const {return nDim_;}
203 
205  int GetOrder() const {return order_;}
206 
208  int GetNQuadPoints() const {return nQuadPoints_;}
209 
211  void GetQuadPoints(Array2D<double>& quad) const {quad=quadPoints_;}
212 
214  void GetQuadPointsWeights(Array2D<double>& quad, Array1D<double>& wghts) const { quad=quadPoints_; wghts=quadWeights_;}
215 
217  void GetQuadPoints(double* quad) const {for(int i=0;i<nQuadPoints_;i++) for(int j=0;j<nDim_;j++) quad[i*nDim_+j]=quadPoints_(i,j);}
218 
220  void GetQuadWeights(Array1D<double>& wghts) const {wghts=quadWeights_;}
221 
223  void GetQuadWeights(double* wghts) const {for(int i=0;i<nQuadPoints_;i++) wghts[i]=quadWeights_(i);}
224 
227  void GetPsi(Array2D<double>& psi) const {psi=psi_;}
228 
231  void GetPsi(double* psi) const {for(int i=0;i<nQuadPoints_;i++) for(int j=0;j<nPCTerms_;j++) psi[i*nPCTerms_+j]=psi_(i,j);}
232 
234  void GetPsiSq(Array1D<double>& psisq) const {psisq=psiSq_;}
235 
237  void GetPsiSq(double* psisq) const {for(int i=0;i<nPCTerms_;i++) psisq[i]=psiSq_(i);}
238 
240  double GetTaylorTolerance() const {return rTolTaylor_;}
241 
243  void SetTaylorTolerance(const double& rTol) {rTolTaylor_ = rTol;}
244 
246  int GetTaylorTermsMax() const {return maxTermTaylor_;}
247 
249  void SetTaylorTermsMax(const int& maxTerm) {maxTermTaylor_ = maxTerm;}
250 
255  void SetLogCompMethod(const LogCompMethod& logMethod) {logMethod_ = logMethod;}
256 
258  double GetGMRESDivTolerance() const {return rTolGMRESDiv_;}
259 
261  void SetGMRESDivTolerance(const double& rTol) {rTolGMRESDiv_ = rTol;}
262 
263 
267 
274  void InitMeanStDv(const double& m, const double& s, double* p) const;
275 
282  void InitMeanStDv(const double& m, const double& s, Array1D<double>& p) const;
283 
287  void Copy(double* p1, const double* p2) const;
288 
293  void Copy(Array1D<double>& p1, const Array1D<double>& p2) const;
294 
297  void Add(const double* p1, const double* p2, double* p3) const;
298 
302  void Add(const Array1D<double>& p1, const Array1D<double>& p2, Array1D<double>& p3) const;
303 
306  void AddInPlace(double* p1, const double* p2) const;
307 
311  void AddInPlace(Array1D<double>& p1, const Array1D<double>& p2) const;
312 
315  void Multiply(const double* p1, const double& a, double* p2) const;
316 
320  void Multiply(const Array1D<double>& p1, const double& a, Array1D<double>& p2) const;
321 
324  void MultiplyInPlace(double* p1, const double& a) const;
325 
329  void MultiplyInPlace(Array1D<double>& p1, const double& a) const;
330 
333  void Subtract(const double* p1, const double* p2, double* p3) const;
334 
338  void Subtract(const Array1D<double>& p1, const Array1D<double>& p2, Array1D<double>& p3) const;
339 
342  void SubtractInPlace(double* p1, const double* p2) const;
343 
347  void SubtractInPlace(Array1D<double>& p1, const Array1D<double>& p2) const;
348 
351  void Prod(const double* p1, const double* p2, double* p3) const;
352 
356  void Prod(const Array1D<double>& p1, const Array1D<double>& p2, Array1D<double>& p3) const;
357 
360  void Prod3(const double* p1, const double* p2, const double* p3, double* p4) const;
361 
365  void Prod3(const Array1D<double>& p1, const Array1D<double>& p2, const Array1D<double>& p3,
366  Array1D<double>& p4) const;
367 
372  void Polyn(const double* polycf, int npoly, const double* p1, double* p2) const;
373 
378  void Polyn(const Array1D<double>& polycf, const Array1D<double>& p1, Array1D<double>& p2) const;
379 
390  void PolynMulti(const Array1D<double>& polycf, const Array2D<int>& mindex, const Array2D<double>& p1, Array1D<double>& p2) const;
391 
407  void Exp(const double* p1, double* p2) const;
408 
412  void Exp(const Array1D<double>& p1, Array1D<double>& p2) const;
413 
418  void Log(const double* p1, double* p2) const;
419 
423  void Log(const Array1D<double>& p1, Array1D<double>& p2) const;
424 
429  void Log10(const double* p1, double* p2) const;
430 
434  void Log10(const Array1D<double>& p1, Array1D<double>& p2) const;
435 
441  void RPow(const double* p1, double* p2, const double& a) const;
442 
446  void RPow(const Array1D<double>& p1, Array1D<double>& p2, const double& a) const;
447 
450  void IPow(const double* p1, double* p2, const int& ia) const;
451 
455  void IPow(const Array1D<double>& p1, Array1D<double>& p2, const int& ia) const;
456 
460  void Inv(const double* p1, double* p2) const;
461 
465  void Inv(const Array1D<double>& p1, Array1D<double>& p2) const;
466 
479  void Div(const double* p1, const double* p2, double* p3) const;
480 
484  void Div(const Array1D<double>& p1, const Array1D<double>& p2, Array1D<double>& p3) const;
485 
489  double StDv(const double* p) const;
490 
496  double StDv(const Array1D<double>& p) const;
497 
501  double GetModesRMS(const double* p) const;
502 
507  double GetModesRMS(const Array1D<double>& p) const;
508 
514  void Derivative(const double* p1, double* p2) const;
515 
521  void Derivative(const Array1D<double>& p1, Array1D<double>& p2) const;
522 
524  int GetNumTripleProd() const;
526  void GetTripleProd(int *nTriple, int *iProd, int *jProd, double *Cijk) const;
528  void GetTripleProd(Array1D<int>& nTriple, Array1D<int>& iProd, Array1D<int>& jProd, Array1D<double>& Cijk) const;
530  int GetNumQuadProd() const;
532  void GetQuadProd(int *nQuad, int *iProd, int *jProd, int *kProd, double *Cijkl) const;
534  void GetQuadProd(Array1D<int> &nQuad, Array1D<int> &iProd, Array1D<int> &jProd, Array1D<int> &kProd,
535  Array1D<double> &Cijkl) const;
536 
540 
543  void SeedBasisRandNumGen(const int& seed) const;
544 
550  void DrawSampleSet(const Array1D<double>& p, Array1D<double>& samples);
551 
555  void DrawSampleSet(const double* p, double* samples, const int& nSamples);
556 
559  void DrawSampleVar(Array2D<double>& samples) const;
560  void DrawSampleVar(double *samples, const int &nS, const int &nD) const;
561 
565 
573  double EvalPC(const Array1D<double>& p, Array1D<double>& randVarSamples);
574 
582  double EvalPC(const double* p, const double* randVarSamples);
583 
587  void EvalPCAtCustPoints(Array1D<double>& xch, Array2D<double>& custPoints,Array1D<double>& p);
588 
591  void EvalBasisAtCustPts(const Array2D<double>& custPoints,Array2D<double>& psi);
592 
593  void EvalBasisAtCustPts(const double* custPoints, const int npts, double* psi);
594  // void EvalBasisAtCustPts(const int npts, const int ndim, const int npc, const double *custPoints, double *psi);
595 
599 
606  void GalerkProjection(const Array1D<double>& fcn, Array1D<double>& ck);
607 
613  void GalerkProjectionMC(const Array2D<double>& x, const Array1D<double>& fcn, Array1D<double>& ck);
614 
618 
622  int ComputeOrders(Array1D<int>& orders);
623 
629  int ComputeEffDims(int *effdim);
630 
636  int ComputeEffDims(Array1D<int> &effdim);
637 
641  void EncodeMindex(Array1D< Array2D<int> >& sp_mindex);
642 
646 
649  double ComputeMean(const double *coef);
650 
652  double ComputeMean(Array1D<double>& coef);
653 
658  double ComputeVarFrac(const double *coef, double *varfrac);
659 
664  double ComputeVarFrac(Array1D<double>& coef, Array1D<double>& varfrac);
665 
668  void ComputeMainSens(Array1D<double>& coef, Array1D<double>& mainsens);
669 
672  void ComputeTotSens(Array1D<double>& coef, Array1D<double>& totsens);
673 
677  void ComputeJointSens(Array1D<double>& coef, Array2D<double>& jointsens);
678 
679 
683 
686  void SetVerbosity(int verbosity) { uqtkverbose_ = verbosity; }
687 
690  void EvalNormSq(Array1D<double>& normsq);
691  void EvalNormSq(double* normsq, const int npc);
692 
696  void EvalNormSqExact(Array1D<double>& normsq);
697 
699  bool IsInDomain(double x);
700 
701 
702 
703  private:
707  PCSet(): order_(0), nDim_(0) {};
708 
709 
715  PCSet(const PCSet &obj):order_(obj.order_), nDim_(obj.nDim_) {};
716 
718  void ComputeMaxOrdPerDim();
719 
723  void Initialize(const string ordertype);
724 
726  // void InitQuadrature();
727 
729  void InitISP();
731  void InitNISP();
732 
734  void EvalBasisProd3();
735 
737  void EvalBasisProd4();
738 
747  static void GMRESMatrixVectorProdWrapper(int* n, double* x, double* y, int* nelt,
748  int* ia, int* ja, double* a, int* obj) {
749  // Look up *obj in the map that relates integer indices to pointers to PCSet
750  OMap_t::iterator it = omap_->find(*obj);
751  if(it == omap_->end()) {
752  string err_message = (string) "GMRESMatrixVectorProdWrapper():"
753  + " the callback object is not a valid entry in the map";
754  throw Tantrum(err_message);
755  }
756  // Perform callback to the member function of the proper PCSet instance
757  it->second->GMRESMatrixVectorProd(x, a, y);
758 
759  return;
760  }
761 
770  static void GMRESPreCondWrapper(int* n, double* r, double* z, int* nelt,
771  int* ia, int* ja, double* a, int* obj,
772  double* rwork, int* iwork) { };
773 
779  void GMRESMatrixVectorProd(const double* x, const double*a, double* y) const;
780 
793  void LogTaylor(const double* p1, double* p2) const;
794 
797  void LogInt(const double* p1, double* p2) const;
798 
803  static int LogIntRhsWrapper(realtype t, N_Vector y, N_Vector ydot, void *f_data)
804  {
805  double indxobj = ((double*) f_data)[0] ;
806 
807  OMap_t::iterator it = omap_->find((int) indxobj);
808 
809  if (it == omap_->end())
810  {
811  string err_message = (string) "LogIntRhsWrapper():"
812  + " the callback object is not a valid entry in the map";
813  throw Tantrum(err_message);
814  }
815 
816  // Perform callback to the member function of the proper PCSet instance
817  it->second->LogIntRhs(t,y,ydot,f_data);
818 
819  return ( 0 ) ;
820 
821  }
822 
824  int LogIntRhs(realtype t, N_Vector y, N_Vector ydot, void *f_data) const;
825 
829 
831  string spType_;
832 
834  string pcType_;
835 
837  string pcSeq_;
838 
841 
843  int order_;
844 
847 
850 
853 
855  const int nDim_;
856 
859 
862 
864  double rTolTaylor_;
865 
868 
870  double SMALL_;
871 
874 
879 
883 
886 
889 
892 
897 
901 
905 
909 
913 
917 
921 
925 
928 
931 
934 
936  double CVinitstep_;
937 
939  double CVmaxstep_;
940 
942  double CVrelt_;
943 
945  double CVabst_ ;
946 
948  int Check_CVflag(void *flagvalue, const char *funcname, int opt) const;
949 
952 
954  int narg_;
955 
957  double alpha_;
959  double beta_;
960 
962  typedef std::map<int, PCSet*> OMap_t;
964  static int next_index_;
966  static OMap_t *omap_;
967 
968 };
969 
970 #endif /* !PCSET_H_SEEN */
1D Array class for any type T
2D Array class for any type T
LogCompMethod
Definition: PCSet.h:65
@ TaylorSeries
Definition: PCSet.h:65
@ Integration
Definition: PCSet.h:65
Definition: Array1D.h:472
Definition: Array1D.h:262
Stores data of any type T in a 1D array.
Definition: Array1D.h:61
Contains all basis type specific definitions and operations needed to generate a PCSet.
Definition: PCBasis.h:47
Defines and initializes PC basis function set and provides functions to manipulate PC expansions defi...
Definition: PCSet.h:71
Array2D< double > quadPoints_
Array to store quadrature points.
Definition: PCSet.h:885
Array1D< int > maxOrders_
Array of maximum orders requested if custom(HDMR) ordering is requested.
Definition: PCSet.h:849
void GetPsi(Array2D< double > &psi) const
Get the values of the basis polynomials evaluated at the quadrature points.
Definition: PCSet.h:227
int nQuadPoints_
Number of quadrature points used.
Definition: PCSet.h:858
Array2D< double > psi_
Array to store basis functions evaluated at quadrature points for each order: psi_(iqp,...
Definition: PCSet.h:878
Array1D< Array1D< double > > psiIJKProd2_
<\Psi_i \Psi_j \Psi_k> terms that are not zero, for all k
Definition: PCSet.h:908
void SetGMRESDivTolerance(const double &rTol)
Set the relative tolerance for GMRES in Div routine.
Definition: PCSet.h:261
double rTolGMRESDiv_
GMRES tolerance in Div()
Definition: PCSet.h:873
string GetPCType() const
Get and set variables/arrays inline.
Definition: PCSet.h:180
void GetQuadWeights(Array1D< double > &wghts) const
Get the quadrature weights.
Definition: PCSet.h:220
void GetNormSq(Array1D< double > &normsq) const
Get the norm-squared.
Definition: PCSet.h:196
double GetGMRESDivTolerance() const
Get relative tolerance for GMRES in Div routine.
Definition: PCSet.h:258
void GetPsiSq(double *psisq) const
Get the basis polynomial norms-squared in a double* array psisq.
Definition: PCSet.h:237
PCSet()
Dummy default constructor, which should not be used as it is not well defined Therefore we make it pr...
Definition: PCSet.h:707
double SMALL_
Tolerance to avoid floating-point errors.
Definition: PCSet.h:870
double rTolTaylor_
Relative tolerance for Taylor series approximations.
Definition: PCSet.h:864
double GetBeta() const
Get the value of the parameter beta.
Definition: PCSet.h:186
void GetMultiIndex(Array2D< int > &mindex) const
Get the multiindex (return Array2D)
Definition: PCSet.h:189
int narg_
Number of free parameters to specify the basis.
Definition: PCSet.h:954
double CVinitstep_
CVODE parameter: initial step size.
Definition: PCSet.h:936
Array1D< Array1D< int > > iProd2_
i-indices of <\Psi_i \Psi_j \Psi_k> terms that are not zero, for all k
Definition: PCSet.h:900
Array1D< Array1D< int > > jProd3_
j-indices of <\Psi_i \Psi_j \Psi_k \Psi_l> terms that are not zero, for all l
Definition: PCSet.h:916
void GetQuadWeights(double *wghts) const
Get the quadrature weights folded into a one-dimensional array wghts.
Definition: PCSet.h:223
void GetPsi(double *psi) const
Get the polynomials evaluated at the quadrature points folded into a one-dimensional array psi.
Definition: PCSet.h:231
static OMap_t * omap_
Map to connect integer indexes with pointers to this class.
Definition: PCSet.h:966
Array1D< Array1D< int > > jProd2_
j-indices of <\Psi_i \Psi_j \Psi_k> terms that are not zero, for all k
Definition: PCSet.h:904
Array1D< Array1D< int > > iProd3_
i-indices of <\Psi_i \Psi_j \Psi_k \Psi_l> terms that are not zero, for all l
Definition: PCSet.h:912
int order_
Order of the PC representation.
Definition: PCSet.h:843
int GetNQuadPoints() const
Get the number of quadrature points.
Definition: PCSet.h:208
double beta_
Parameter beta for PCs that require two parameters (SW,JB)
Definition: PCSet.h:959
Array1D< int > maxOrdPerDim_
Array of maximum orders per dimension.
Definition: PCSet.h:852
Array1D< double > psiSq_
Array with the norms squared of the basis functions, corresponding to each term in the PC expansion.
Definition: PCSet.h:882
void SetVerbosity(int verbosity)
Other.
Definition: PCSet.h:686
Array2D< int > quadIndices_
Array to store quadrature point indexing; useful for nested rules.
Definition: PCSet.h:891
double CVmaxstep_
CVODE parameter: maximal step size.
Definition: PCSet.h:939
int GetOrder() const
Get the PC order.
Definition: PCSet.h:205
void GetPsiSq(Array1D< double > &psisq) const
Get the basis polynomial norms-squared in an array class object psisq.
Definition: PCSet.h:234
int nPCTerms_
Total number of terms in the PC expansions.
Definition: PCSet.h:861
string pcType_
String indicator of PC type.
Definition: PCSet.h:834
double GetTaylorTolerance() const
Get relative tolerance for Taylor series approximations.
Definition: PCSet.h:240
std::map< int, PCSet * > OMap_t
Definition of a map to connect integer indexes with pointers to this class.
Definition: PCSet.h:962
Array1D< Array1D< int > > kProd3_
k-indices of <\Psi_i \Psi_j \Psi_k \Psi_l> terms that are not zero, for all l
Definition: PCSet.h:920
int uqtkverbose_
Verbosity level.
Definition: PCSet.h:828
int my_index_
Index of this class.
Definition: PCSet.h:951
PCSet(const PCSet &obj)
Dummy copy constructor, which should not be used as it is currently not well defined....
Definition: PCSet.h:715
void GetQuadPointsWeights(Array2D< double > &quad, Array1D< double > &wghts) const
Get the quadrature points and weights.
Definition: PCSet.h:214
int CVmaxnumsteps_
CVODE parameter: maximal number of steps.
Definition: PCSet.h:933
PCBasis * p_basis_
Pointer to the class that defines the basis type and functions.
Definition: PCSet.h:840
Array1D< double > quadWeights_
Array to store quadrature weights.
Definition: PCSet.h:888
int maxTermTaylor_
Max number of terms in Taylor series approximations.
Definition: PCSet.h:867
int GetTaylorTermsMax() const
Get maximum number of terms in Taylor series approximations.
Definition: PCSet.h:246
double GetAlpha() const
Get the value of the parameter alpha.
Definition: PCSet.h:183
string pcSeq_
String indicator of multiindex ordering.
Definition: PCSet.h:837
Array1D< Array1D< double > > psiIJKLProd3_
<\Psi_i \Psi_j \Psi_k \Psi_l> terms that are not zero, for all l
Definition: PCSet.h:924
LogCompMethod logMethod_
Flag for method to compute log: TaylorSeries or Integration.
Definition: PCSet.h:927
const int nDim_
Number of stochastic dimensions (degrees of freedom) in the PC representation.
Definition: PCSet.h:855
static void GMRESPreCondWrapper(int *n, double *r, double *z, int *nelt, int *ia, int *ja, double *a, int *obj, double *rwork, int *iwork)
Wrapper for preconditioner routine to be called by GMRES.
Definition: PCSet.h:770
double CVrelt_
CVODE parameter: relative tolerance.
Definition: PCSet.h:942
void SetLogCompMethod(const LogCompMethod &logMethod)
Set method of computing the log function.
Definition: PCSet.h:255
static void GMRESMatrixVectorProdWrapper(int *n, double *x, double *y, int *nelt, int *ia, int *ja, double *a, int *obj)
Wrapper for Matrix-vector multiplication routine to be called by GMRES.
Definition: PCSet.h:747
static int LogIntRhsWrapper(realtype t, N_Vector y, N_Vector ydot, void *f_data)
Wrapper for LogIntRhs. The first component of f_data pointer carries an integer handle identifying th...
Definition: PCSet.h:803
void SetTaylorTolerance(const double &rTol)
Set relative tolerance for Taylor series approximations.
Definition: PCSet.h:243
double alpha_
Parameter alpha for PCs that require a parameter (LG,SW,JB)
Definition: PCSet.h:957
double CVabst_
CVODE parameter: absolute tolerance.
Definition: PCSet.h:945
int CVmaxord_
CVODE parameter: maximal order.
Definition: PCSet.h:930
void SetTaylorTermsMax(const int &maxTerm)
Set maximum number of terms in Taylor series approximations.
Definition: PCSet.h:249
string spType_
String indicator of ISP or NISP implementation type.
Definition: PCSet.h:831
int GetNumberPCTerms() const
Get the number of terms in a PC expansion of this order and dimension.
Definition: PCSet.h:199
static int next_index_
index of next object in map
Definition: PCSet.h:964
void GetQuadPoints(double *quad) const
Get the quadrature points folded into a one-dimensional array quad.
Definition: PCSet.h:217
int GetNDim() const
Get the PC dimensionality.
Definition: PCSet.h:202
int maxorddim_
Maximal order within all dimensions.
Definition: PCSet.h:846
Array2D< int > multiIndex_
Array to store multi-index: multiIndex_(ipc,idim) contains the order of the basis function associated...
Definition: PCSet.h:896
void GetQuadPoints(Array2D< double > &quad) const
Get the quadrature points.
Definition: PCSet.h:211
Generates quadrature rules.
Definition: quad.h:54
Header file for the quadrature class.