Stokhos Package Browser (Single Doxygen Collection)  Version of the Day
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Typedefs | Enumerations | Functions | Variables
gram_schmidt_example3.cpp File Reference
#include <iostream>
#include <iomanip>
#include "Stokhos.hpp"
#include "Stokhos_Sacado.hpp"
#include "Stokhos_ReducedBasisFactory.hpp"
#include "Teuchos_CommandLineProcessor.hpp"
#include "Teuchos_TabularOutputter.hpp"
Include dependency graph for gram_schmidt_example3.cpp:

Go to the source code of this file.

Classes

struct  MyOptions
 
class  MyResults
 

Typedefs

typedef Stokhos::LegendreBasis
< int, double
basis_type
 
typedef
Sacado::ETPCE::OrthogPoly
< double,
Stokhos::StandardStorage< int,
double > > 
pce_type
 

Enumerations

enum  Quadrature_Method { TENSOR, SPARSE }
 
enum  Reduced_Basis_Method {
  LANCZOS, MONOMIAL_PROJ_GS, MONOMIAL_PROJ_GS2, MONOMIAL_GS,
  LANCZOS_GS
}
 
enum  Orthogonalization_Method {
  HOUSEHOLDER, HOUSEHOLDER_NP, CGS, MGS,
  MGSRO, MGSNP, MGSNPRO, SVD
}
 
enum  Quadrature_Reduction_Method { NONE, QSQUARED, QSQUARED2, Q2 }
 
enum  Solver_Method {
  TRSM, GLPK, CLP, CLP_IP,
  QPOASES, BASIS_PURSUIT, ORTHOGONAL_MATCHING_PURSUIT
}
 

Functions

template<class ScalarType >
ScalarType f (const Teuchos::Array< ScalarType > &x, double a, double b)
 
template<class ScalarType >
ScalarType g (const Teuchos::Array< ScalarType > &x, const ScalarType &y)
 
double coeff_error (const pce_type &z, const pce_type &z2)
 
double disc_orthog_error (const Stokhos::OrthogPolyBasis< int, double > &basis, const Stokhos::Quadrature< int, double > &quad)
 
void compute_pces (bool compute_z_red, int p, const MyOptions &options, MyResults &results)
 
int main (int argc, char **argv)
 

Variables

static const int num_quadrature_method = 2
 
static const Quadrature_Method quadrature_method_values []
 
static const char * quadrature_method_names []
 
static const int num_reduced_basis_method = 5
 
static const Reduced_Basis_Method reduced_basis_method_values []
 
static const char * reduced_basis_method_names []
 
static const int num_orthogonalization_method = 8
 
static const
Orthogonalization_Method 
orthogonalization_method_values []
 
static const char * orthogonalization_method_names []
 
static const int num_quad_reduction_method = 4
 
static const
Quadrature_Reduction_Method 
quad_reduction_method_values []
 
static const char * quad_reduction_method_names []
 
static const int num_solver_method = 7
 
static const Solver_Method solver_method_values []
 
static const char * solver_method_names []
 

Typedef Documentation

Definition at line 60 of file gram_schmidt_example3.cpp.

Definition at line 61 of file gram_schmidt_example3.cpp.

Enumeration Type Documentation

Enumerator
TENSOR 
SPARSE 

Definition at line 21 of file gram_schmidt_example3.cpp.

Enumerator
LANCZOS 
MONOMIAL_PROJ_GS 
MONOMIAL_PROJ_GS2 
MONOMIAL_GS 
LANCZOS_GS 

Definition at line 29 of file gram_schmidt_example3.cpp.

Enumerator
HOUSEHOLDER 
HOUSEHOLDER_NP 
CGS 
MGS 
MGSRO 
MGSNP 
MGSNPRO 
SVD 

Definition at line 37 of file gram_schmidt_example3.cpp.

Enumerator
NONE 
QSQUARED 
QSQUARED2 
Q2 

Definition at line 45 of file gram_schmidt_example3.cpp.

Enumerator
TRSM 
GLPK 
CLP 
CLP_IP 
QPOASES 
BASIS_PURSUIT 
ORTHOGONAL_MATCHING_PURSUIT 

Definition at line 53 of file gram_schmidt_example3.cpp.

Function Documentation

template<class ScalarType >
ScalarType f ( const Teuchos::Array< ScalarType > &  x,
double  a,
double  b 
)
inline

Definition at line 64 of file gram_schmidt_example3.cpp.

template<class ScalarType >
ScalarType g ( const Teuchos::Array< ScalarType > &  x,
const ScalarType &  y 
)
inline

Definition at line 75 of file gram_schmidt_example3.cpp.

double coeff_error ( const pce_type z,
const pce_type z2 
)

Definition at line 87 of file gram_schmidt_example3.cpp.

double disc_orthog_error ( const Stokhos::OrthogPolyBasis< int, double > &  basis,
const Stokhos::Quadrature< int, double > &  quad 
)

Definition at line 97 of file gram_schmidt_example3.cpp.

void compute_pces ( bool  compute_z_red,
int  p,
const MyOptions options,
MyResults results 
)

Definition at line 171 of file gram_schmidt_example3.cpp.

int main ( int  argc,
char **  argv 
)

Definition at line 324 of file gram_schmidt_example3.cpp.

Variable Documentation

const int num_quadrature_method = 2
static

Definition at line 22 of file gram_schmidt_example3.cpp.

const Quadrature_Method quadrature_method_values[]
static
Initial value:

Definition at line 23 of file gram_schmidt_example3.cpp.

const char* quadrature_method_names[]
static
Initial value:
= {
"Tensor", "Sparse" }

Definition at line 25 of file gram_schmidt_example3.cpp.

const int num_reduced_basis_method = 5
static

Definition at line 30 of file gram_schmidt_example3.cpp.

const Reduced_Basis_Method reduced_basis_method_values[]
static
const char* reduced_basis_method_names[]
static
Initial value:
= {
"Lanczos", "Monomial-Proj-GS", "Monomial-Proj-GS2", "Monomial-GS", "Lanczos-GS" }

Definition at line 33 of file gram_schmidt_example3.cpp.

const int num_orthogonalization_method = 8
static

Definition at line 38 of file gram_schmidt_example3.cpp.

const Orthogonalization_Method orthogonalization_method_values[]
static
const char* orthogonalization_method_names[]
static
Initial value:
= {
"Householder", "Householder without Pivoting", "Classical Gram-Schmidt", "Modified Gram-Schmidt", "Modified Gram-Schmidt with Reorthogonalization", "Modified Gram-Schmidt without Pivoting", "Modified Gram-Schmidt without Pivoting with Reorthogonalization", "SVD" }

Definition at line 41 of file gram_schmidt_example3.cpp.

const int num_quad_reduction_method = 4
static

Definition at line 46 of file gram_schmidt_example3.cpp.

const Quadrature_Reduction_Method quad_reduction_method_values[]
static
const char* quad_reduction_method_names[]
static
Initial value:
= {
"None", "Q Squared", "Q Squared2", "Q2" }

Definition at line 49 of file gram_schmidt_example3.cpp.

const int num_solver_method = 7
static

Definition at line 54 of file gram_schmidt_example3.cpp.

const Solver_Method solver_method_values[]
static
const char* solver_method_names[]
static
Initial value:
= {
"TRSM", "GLPK", "Clp", "Clp-IP", "qpOASES", "Basis Pursuit", "Orthogonal Matching Pursuit" }

Definition at line 57 of file gram_schmidt_example3.cpp.