SG++-Doxygen-Documentation
python.uq.operations.discretization Namespace Reference

Functions

def computeCoefficients (jgrid, grid, alpha, f)
 
def computeErrors (jgrid, jalpha, grid, alpha, f, n=200)
 
def discretize (grid, alpha, f, epsilon=0., refnums=0, pointsNum=10, level=0, deg=1, useDiscreteL2Error=True)
 
def discretizeFunction (f, bounds, level=2, hasBorder=False, args, kws)
 
def estimateDiscreteL2Error (grid, alpha, f, n=1000)
 
def estimateL2error (grid1, grid2, alpha2)
 

Function Documentation

◆ computeCoefficients()

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(), python.statsfileInfo.f, and python.uq.operations.sparse_grid.hierarchize().

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

◆ computeErrors()

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 python.statsfileInfo.f.

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

◆ discretize()

def python.uq.operations.discretization.discretize (   grid,
  alpha,
  f,
  epsilon = 0.,
  refnums = 0,
  pointsNum = 10,
  level = 0,
  deg = 1,
  useDiscreteL2Error = True 
)

◆ discretizeFunction()

def python.uq.operations.discretization.discretizeFunction (   f,
  bounds,
  level = 2,
  hasBorder = False,
  args,
  kws 
)

◆ estimateDiscreteL2Error()

def python.uq.operations.discretization.estimateDiscreteL2Error (   grid,
  alpha,
  f,
  n = 1000 
)

◆ estimateL2error()

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().