UQTk: Uncertainty Quantification Toolkit 3.1.5
pce_quad.cpp File Reference

Command-line utility for PC construction given samples. More...

#include "PCSet.h"
#include "tools.h"
#include "arraytools.h"
#include "arrayio.h"
#include <unistd.h>

Macros

#define ORD   1
 default PC order
 
#define BWDTH   0.01
 default bandwidth for Rosenblatt transformation
 
#define FILEIN   "data_in.dat"
 default input filename
 
#define CHAOS   "LU"
 default chaos type
 
#define ALPHA   0.0
 default PC parameter #1
 
#define BETA   1.0
 default PC parameter #2
 
#define DIAG_GP   1000
 diagnostic: frequency of showing progress of Galerkin projection
 

Functions

int usage ()
 Displays information about this program.
 
int main (int argc, char *argv[])
 Program to find PC coefficient of a random variable given a set of data samples.
 

Detailed Description

Command-line utility for PC construction given samples.

Author
K. Sargsyan 2012 -

Macro Definition Documentation

◆ ALPHA

#define ALPHA   0.0

default PC parameter #1

◆ BETA

#define BETA   1.0

default PC parameter #2

◆ BWDTH

#define BWDTH   0.01

default bandwidth for Rosenblatt transformation

◆ CHAOS

#define CHAOS   "LU"

default chaos type

◆ DIAG_GP

#define DIAG_GP   1000

diagnostic: frequency of showing progress of Galerkin projection

◆ FILEIN

#define FILEIN   "data_in.dat"

default input filename

◆ ORD

#define ORD   1

default PC order

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Program to find PC coefficient of a random variable given a set of data samples.

Set the defaults and parse the input arguments

Print the input information

Read the input datafile and get its size

For the projection based PC (unlike the inference), the data dimensionality has to coincide with the stochastic dimension

Set the chaos

Get the default quadrature points

Transpose the data array to prepare for invRos()

Array to contain inverse-Rosenblatt transformed points

Frequency of showing Galerkin projection progress

Begin Loop over all quadrature points

Map quadrature points to uniform[0,1]

Map uniform[0,1] to the distribution given by the original samples via inverse Rosenblatt

Get PC coefficients by Galerkin Projection (xxik(ip,idim)=<xi_idim * psi_ip>)

Write PC coefficients to the output file

Write multi-indices to the output file

◆ usage()

int usage ( )

Displays information about this program.