SG++-Doxygen-Documentation
|
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) |
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().
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().
def 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(), python.uq.operations.sparse_grid.copyGrid(), and python.uq.operations.discretization.estimateL2error().
Referenced by python.uq.quadrature.bilinearform.bilinear_form_admissible_set.computeBF(), python.uq.quadrature.bilinearform.bilinear_form.computeBilinearForm(), python.uq.quadrature.bilinearform.SparseGridQuadratureStrategy.SparseGridQuadratureStrategy.computeBilinearFormEntry(), python.uq.operations.discretization.discretizeFunction(), python.uq.estimators.PiecewiseConstantIntegralStrategy.PiecewiseConstantIntegralStrategy.estimate(), and python.uq.estimators.MarginalIntegralStrategy.MarginalIntegralStrategy.estimate().
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 |
|||
) |
References python.uq.operations.sparse_grid.evalSGFunctionMulti(), and python.statsfileInfo.f.
Referenced by python.uq.operations.discretization.discretizeFunction().
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().