SG++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
python.uq.operations.discretization Namespace Reference

Functions

def computeCoefficients
 
def computeErrors
 
def discretize
 
def discretizeFunction
 
def estimateDiscreteL2Error
 
def estimateL2error
 

Function Documentation

def python.uq.operations.discretization.computeCoefficients (   jgrid,
  grid,
  alpha,
  f 
)
Interpolate function f, which depends on some sparse grid function
(grid, alpha) on jgrid
@param jgrid: Grid, new discretization
@param grid: Grid, old discretization
@param alpha: DataVector, surpluses for grid
@param f: function, to be interpolated
@return: DataVector, surpluses for jgrid

References python.uq.operations.sparse_grid.evalSGFunctionMulti(), f, and python.uq.operations.sparse_grid.hierarchize().

Referenced by python.uq.operations.discretization.discretize().

def python.uq.operations.discretization.computeErrors (   jgrid,
  jalpha,
  grid,
  alpha,
  f,
  n = 200 
)
Compute some errors to estimate the quality of the
interpolation.
@param jgrid: Grid, new discretization
@param jalpha: DataVector, new surpluses
@param grid: Grid, old discretization
@param alpha: DataVector, old surpluses
@param f: function, to be interpolated
@param n: int, number of Monte Carlo estimates for error estimation
@return: tuple(<float>, <float>), maxdrift, l2norm

References python.uq.operations.sparse_grid.evalSGFunctionMulti(), and f.

Referenced by python.uq.operations.discretization.discretize().

def python.uq.operations.discretization.discretizeFunction (   f,
  bounds,
  level = 2,
  hasBorder = False,
  args,
  kws 
)
def python.uq.operations.discretization.estimateDiscreteL2Error (   grid,
  alpha,
  f,
  n = 1000 
)
def python.uq.operations.discretization.estimateL2error (   grid1,
  grid2,
  alpha2 
)
find those grid points which are in grid2 but not in grid1. The L2
error of the new sparse grid function is then reduced with respect
to

|L2(g1) - L2(g2)|^2 ~ \sum_{i = 1}^N |v_i|

@param grid1: Grid, old grid
@param grid2: Grid, new grid
@param alpha2: DataVector, new surpluses

Referenced by python.uq.operations.discretization.discretize().