SG++-Doxygen-Documentation
Loading...
Searching...
No Matches
python.uq.operations.discretization Namespace Reference

Functions

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

Function Documentation

◆ computeCoefficients()

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

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

◆ computeErrors()

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

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

◆ discretize()

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

@param grid: Grid
@param alpha: surplus vector
@param f: function
@param epsilon: float, error tolerance
@param refnums: int, number of refinment steps
@param pointsNum: int, number of points to be refined per step
@param level: int, initial grid level
@param deg: int, degree of lagrange basis

References python.uq.operations.discretization.computeCoefficients(), python.uq.operations.discretization.computeErrors(), and python.uq.operations.discretization.estimateL2error().

◆ discretizeFunction()

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

◆ estimateDiscreteL2Error()

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

◆ estimateL2error()

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