UQTk: Uncertainty Quantification Toolkit 3.1.5
gkplib.h
Go to the documentation of this file.
1/* =====================================================================================
2
3 The UQ Toolkit (UQTk) version 3.1.5
4 Copyright (2024) NTESS
5 https://www.sandia.gov/UQToolkit/
6 https://github.com/sandialabs/UQTk
7
8 Copyright 2024 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 https://github.com/sandialabs/UQTk/discussions
26 Sandia National Laboratories, Livermore, CA, USA
27===================================================================================== */
28#ifndef GKPLIB
29#define GKPLIB
30
36void getCC ( int n, int *nq, double **x, double **w );
37
39int getOrderCC ( int lev ) ;
40
43void getGKPunif ( int n, int *nq, double **x, double **w );
44
47void getGKPnorm ( int n, int *nq, double **x, double **w );
48
50int getOrderGKPunif ( int lev ) ;
51
53int getOrderGKPnorm ( int lev ) ;
54
58void getCompNintoDim(int n, int dim, int *nelem, int **plist) ;
59
61int getSpgSize ( int getOrder ( int ), int dim, int lev );
62
64void sortSpg ( int dim, int spgSize, double *qpts, double *w );
65
67void getTensorProd(int dim, double *qpts, double *w, int *spgSize, int *n1D,
68 double **x1D, double **w1D, double qfac);
69
73void getSpgQW ( void get1DQW ( int , int *, double **, double** ), int getOrder ( int ),
74 int dim, int lev, int *nqpts, double **qpts, double
75 **w );
76
77void getSpgAnisQW ( void get1DQW ( int , int *, double **, double** ), int getOrder ( int ),
78 int dim, int *levList, int *nqpts, double **qpts, double **w ) ;
79
80void getCC ( int n, int *nq, double **x, double **w );
81int getOrderCC ( int lev );
82
88extern "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