46 #define QD_MAX 20000000
65 Quad(
char *grid_type,
char *fs_type,
int ndim,
int param,
double alpha=0.0,
double betta=1.0);
88 void SetAlpha(
double alpha){this->alpha_=alpha; }
90 void SetBeta(
double betta){this->beta_=betta; }
139 int GetNQ() {
return rule_.qdpts.XSize(); }
238 void getMultiIndexLevel(
Array2D<int>& multiIndexLevel,
int level,
int ndim);
1D Array class for any type T
2D Array class for any type T
Definition: Array1D.h:472
Definition: Array1D.h:262
Generates quadrature rules.
Definition: quad.h:54
Array1D< string > grid_types_
Vector of grid types: 'CC','CCO','NC','NCO','LU', 'HG', 'JB', 'LG', 'SW', 'pdf', or 'GP3'.
Definition: quad.h:248
string grid_type_
Grid type: 'CC','CCO','NC','NCO','LU', 'HG', 'JB', 'LG', 'SW', 'pdf', or 'GP3'.
Definition: quad.h:246
void SetRule(Array2D< double > &q, Array1D< double > &w, Array2D< int > &ind)
Set the rule externally (quadrature points, weights and indices) Dummy function for backward compatib...
Definition: quad.h:105
Array2D< int > npts_1_all
Definition: quad.h:194
Array1D< int > param_
Definition: quad.h:191
int ndim_
The dimensionality.
Definition: quad.h:183
Array1D< double > alphas_
The first parameter of the rule, if any.
Definition: quad.h:166
void SetQdpts(Array2D< double > &q)
Externally set quadrature points.
Definition: quad.h:119
double alpha_
The first parameter of the rule, if any.
Definition: quad.h:162
void SetBeta(double betta)
Set the parameter beta.
Definition: quad.h:90
~Quad()
Destructor.
Definition: quad.h:82
Array1D< double > bb_
the right endpoints of the domain
Definition: quad.h:155
int maxlevel_
The level for sparse rules, or the number of grid points per dim for full product rules.
Definition: quad.h:190
int GetNQ()
Get the number of quadrature points.
Definition: quad.h:139
int quadverbose_
Verbosity level.
Definition: quad.h:159
void GetDomain(Array1D< double > &aa, Array1D< double > &bb) const
Get the domain endpoints (for compact support domains)
Definition: quad.h:97
void GetQdpts(Array2D< double > &q)
Externally set the indices.
Definition: quad.h:126
void SetLevel(int param)
Get the indices.
Definition: quad.h:133
Quad(const Quad &)
Dummy copy constructor, which should not be used as it is currently not well defined.
Definition: quad.h:150
int nlevel_
The current level, working variable for hierarchical construction.
Definition: quad.h:186
void SetAlpha(double alpha)
Set the parameter alpha.
Definition: quad.h:88
int growth_rule_
Growth rule: exponential(0) or linear(1)
Definition: quad.h:241
Array1D< double > aa_
The left endpoints of the domain.
Definition: quad.h:150
Array2D< QuadRule > qr_1_all
Definition: quad.h:195
QuadRule rule_
The quadrature rule structure.
Definition: quad.h:180
void SetVerbosity(int verbosity)
Set the verbosity level.
Definition: quad.h:143
string fs_type_
Sparseness type (full or sparse)
Definition: quad.h:251
Array1D< double > betas_
The second parameter of the rule, if any.
Definition: quad.h:168
void GetRule(Array2D< double > &q, Array1D< double > &w, Array2D< int > &ind)
Get the quadrature rule with indexing Dummy function for backward compatibility.
Definition: quad.h:116
void GetDomain(Array1D< double > &aa) const
Get the domain endpoint (for semi-infinite domains)
Definition: quad.h:99
double beta_
The second parameter of the rule, if any.
Definition: quad.h:164
void GetWghts(Array1D< double > &w)
Get the weights.
Definition: quad.h:128
Quad()
Constructor: empty.
Definition: quad.h:80
Array1D< int > growth_rules_
Growth rules: exponential(0) or linear(1)
Definition: quad.h:243
void SetWghts(Array1D< double > &w)
Externally set the weights.
Definition: quad.h:121
Rule structure that stores quadrature points, weights and indices.
Definition: quad.h:172
Array2D< double > qdpts
Quadrature points.
Definition: quad.h:174
Array1D< double > wghts
Quadrature weights.
Definition: quad.h:176