UQTk: Uncertainty Quantification Toolkit  3.1.1
gkplib.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 ===================================================================================== */
28 #ifndef GKPLIB
29 #define GKPLIB
30 
36 void getCC ( int n, int *nq, double **x, double **w );
37 
39 int getOrderCC ( int lev ) ;
40 
43 void getGKPunif ( int n, int *nq, double **x, double **w );
44 
47 void getGKPnorm ( int n, int *nq, double **x, double **w );
48 
50 int getOrderGKPunif ( int lev ) ;
51 
53 int getOrderGKPnorm ( int lev ) ;
54 
58 void getCompNintoDim(int n, int dim, int *nelem, int **plist) ;
59 
61 int getSpgSize ( int getOrder ( int ), int dim, int lev );
62 
64 void sortSpg ( int dim, int spgSize, double *qpts, double *w );
65 
67 void getTensorProd(int dim, double *qpts, double *w, int *spgSize, int *n1D,
68  double **x1D, double **w1D, double qfac);
69 
73 void getSpgQW ( void get1DQW ( int , int *, double **, double** ), int getOrder ( int ),
74  int dim, int lev, int *nqpts, double **qpts, double
75  **w );
76 
77 void getSpgAnisQW ( void get1DQW ( int , int *, double **, double** ), int getOrder ( int ),
78  int dim, int *levList, int *nqpts, double **qpts, double **w ) ;
79 
80 void getCC ( int n, int *nq, double **x, double **w );
81 int getOrderCC ( int lev );
82 
88 extern "C" void heap_ext_(const int *,const int *, int *, int *, int *);
89 
90 #endif
void sortSpg(int dim, int spgSize, double *qpts, double *w)
Sort sparse grid in lexicographical order.
Definition: gkpclib.cpp:612
void getTensorProd(int dim, double *qpts, double *w, int *spgSize, int *n1D, double **x1D, double **w1D, double qfac)
compute dim-dimensional tensor grid based a series of 1D rules
Definition: gkpclib.cpp:654
int getOrderGKPnorm(int lev)
get order of normal Gauss-Kronrod-Patterson rules based on level
Definition: gkpclib.cpp:318
int getOrderGKPunif(int lev)
get order of uniform Gauss-Kronrod-Patterson rules based on level
Definition: gkpclib.cpp:304
void getSpgQW(void get1DQW(int, int *, double **, double **), int getOrder(int), int dim, int lev, int *nqpts, double **qpts, double **w)
Main function that connects the user setup for pdftype, dimensionality, and quadrature level and vari...
Definition: gkpclib.cpp:392
int getOrderCC(int lev)
get order of Clenshaw-Curtis rules based on level
Definition: gkpclib.cpp:294
void getGKPunif(int n, int *nq, double **x, double **w)
retrieve pointers to 1D Gauss-Kronrod-Patterson rules for uniform pdf based on the quadrature level
Definition: gkpclib.cpp:235
void getCompNintoDim(int n, int dim, int *nelem, int **plist)
List of decompositions of 'n' into 'dim' parts. The implementation is based on Algorithm 5 of Combina...
Definition: gkpclib.cpp:331
int getSpgSize(int getOrder(int), int dim, int lev)
Initial estimate for sparse grid size.
Definition: gkpclib.cpp:361
void getGKPnorm(int n, int *nq, double **x, double **w)
retrieve pointers to 1D Kronrod-Patterson rules for normal pdf based on the quadrature level
Definition: gkpclib.cpp:267
void heap_ext_(const int *, const int *, int *, int *, int *)
void getCC(int n, int *nq, double **x, double **w)
retrieve pointers to 1D Clenshaw-Curtis rules
Definition: gkpclib.cpp:193
void getSpgAnisQW(void get1DQW(int, int *, double **, double **), int getOrder(int), int dim, int *levList, int *nqpts, double **qpts, double **w)
Definition: gkpclib.cpp:495