sparse_grid_hw
    
    
    
      sparse_grid_hw,
      an Octave code which 
      computes sparse grids for multidimensional integration,
      based on 1D rules for the unit interval with unit weight function,
      or for the real line with the Gauss-Hermite weight function.
      The original version of the code is by Florian Heiss and Viktor Winschel.
    
    
      Four built-in 1D families of quadrature rules are supplied, and the
      user can extend the package by supplying any family of 1D quadrature
      rules.
    
    
      The built-in families are identified by a 3-letter key which is also
      the name of the function that returns members of the family:
      
        - 
          gqu, standard Gauss-Legendre quadrature rules, for
          the unit interval [0,1], with weight function w(x) = 1.
        
 
        - 
          gqn, standard Gauss-Hermite quadrature rules, for
          the infinite interval (-oo,+oo), with weight function 
          w(x) = exp(-x*x/2)/sqrt(2*pi).
        
 
        - 
          kpu, Kronrod-Patterson quadrature rules, for
          the unit interval [0,1], with weight function w(x) = 1.
          These sacrifice some of the precision of gqu in
          order to provide a family of nested rules.
        
 
        - 
          kpn, Kronrod-Patterson quadrature rules, for
          the infinite interval (-oo,+oo), with weight function 
          w(x) = exp(-x*x/2)/sqrt(2*pi).
          These sacrifice some of the precision of gqn in
          order to provide a family of nested rules.
        
 
      
    
    
      The user can build new sparse grids by supplying a 1D quadrature family.
      Examples provided include:
      
        - 
          ccu, Clenshaw-Curtis quadrature rules, for
          the unit interval [0,1], with weight function w(x) = 1.
          The K-th call returns the rule of order 1
          if K is 1, and 2*(K-1)+1 otherwise.
        
 
        - 
          ccs, slow Clenshaw-Curtis quadrature rules, for
          the unit interval [0,1], with weight function w(x) = 1.
          The K-th call returns the rule of order 1
          if K is 1, and otherwise a rule whose order N has the
          form 2^E+1 and is the lowest such order with precision at least 2*K-1.
        
 
        - 
          glo, Gauss-Legendre odd quadrature rules, for
          the unit interval [0,1], with weight function w(x) = 1.
          The K-th call returns the rule of order 2*(K/2)+1.
        
 
      
    
    
      Licensing:
    
    
      The information on this web page is distributed under the MIT license.
    
    
      Languages:
    
    
      sparse_grid_hw is available in
      a C version and
      a C++ version and
      a Fortran90 version and
      a MATLAB version and
      an Octave version.
    
    
      Related Data and Programs:
    
    
      
      sparse_grid_hw_test
    
    
      
      grid_display,
      an Octave code which
      displays a 2d or 3d grid or sparse grid.
    
    
      
      nint_exactness_mixed,
      an Octave code which
      measures the polynomial exactness of a multidimensional quadrature rule
      based on a mixture of 1d quadrature rule factors.
    
    
      
      product_rule,
      an Octave code which
      constructs a product quadrature rule from identical 1d factor rules.
    
    
      
      quad_rule,
      an Octave code which
      defines quadrature rules for various intervals and weight functions.
    
    
      
      sparse_grid_cc, 
      an Octave code which
      defines a multidimensional sparse grid based on a 
      1d Clenshaw Curtis rule.
    
    
      
      sparse_grid_gl, 
      an Octave code which
      creates sparse grids based on Gauss-Legendre rules.
    
    
      
      sparse_grid_hermite, 
      an Octave code which
      creates sparse grids based on Gauss-Hermite rules.
    
    
      
      sparse_grid_laguerre, 
      an Octave code which
      creates sparse grids based on Gauss-Laguerre rules.
    
    
      
      spinterp,
      an Octave code which
      carries out piecewise multilinear hierarchical sparse grid interpolation;
      an earlier version of this software is ACM TOMS algorithm 847,
      by Andreas Klimke;
    
    
      
      spquad,
      an Octave code which
      computes the points and weights of a sparse grid quadrature rule
      for a multidimensional integral, based on the Clenshaw-Curtis quadrature rule,
      by Greg von Winckel.
    
    
      Author:
    
    
      Original MATLAB version by Florian Heiss and Viktor Winschel.
      This version by John Burkardt.
    
    
      Reference:
    
    
      
        - 
          Alan Genz, Bradley Keister,
          Fully symmetric interpolatory rules for multiple integrals
          over infinite regions with Gaussian weight,
          Journal of Computational and Applied Mathematics,
          Volume 71, 1996, pages 299-309.
         
        - 
          Florian Heiss, Viktor Winschel,
          Likelihood approximation by numerical integration on sparse grids,
          Journal of Econometrics,
          Volume 144, Number 1, May 2008, pages 62-80.
         
        - 
          Thomas Patterson,
          The optimal addition of points to quadrature formulae,
          Mathematics of Computation,
          Volume 22, Number 104, October 1968, pages 847-856.
         
        - 
          Knut Petras,
          Smolyak Cubature of Given Polynomial Degree with Few Nodes
          for Increasing Dimension,
          Numerische Mathematik,
          Volume 93, Number 4, February 2003, pages 729-753.
         
      
    
    
      Source Code:
    
    
      
        - 
          cc.m 
          returns one rule from the CCU family defined on [-1,+1] 
          with unit weight, indexed by order.
        
 
        - 
          cce.m 
          returns one rule from the CCU (Clenshaw-Curtis Exponential growth)
          family defined on [-1,+1] with unit weight,
          indexed by level.
        
 
        - 
          cce_order.m 
          computes the order of a Clenshaw-Curtis Exponential (CCE) 
          rule from the level.
        
 
        - 
          ccl.m 
          returns one rule from the CCL (Clenshaw-Curtis Linear growth) family 
          defined on [-1,+1] with unit weight, indexed by level.
        
 
        - 
          ccl_order.m 
          computes the order of a CCL (Clenshaw-Curtis Linear growth)
          rule from the level.
        
 
        - 
          ccs.m 
          returns one rule from the CCS (Clenshaw-Curtis Slow growth) family 
          defined on [-1,+1] with unit weight, indexed by level.
        
 
        - 
          ccs_order.m 
          computes the order of a CCS (Clenshaw Curtis Slow growth)
          rule from the level.
        
 
        - 
          get_seq.m 
          generates integer vectors that describe component tensor products.
        
 
        - 
          gqn.m 
          returns one rule from the GQN family.
        
 
        - 
          gqn_order.m 
          computes the order of a GQN rule from the level, N = L.
        
 
        - 
          gqn2_order.m 
          computes the order of a GQN rule from the level, N = 2*L-1.
        
 
        - 
          gqu.m 
          returns one rule from the GQU family.
        
 
        - 
          gqu_order.m 
          computes the order of a GQU rule from the level.
        
 
        - 
          i4_factorial2.m 
          computes the double factorial function.
        
 
        - 
          i4vec_print.m 
          prints an I4VEC.
        
 
        - 
          kpn.m 
          returns one rule from the KPN family.
        
 
        - 
          kpn_order.m 
          returns the order of a member of the KPN family given the level.
        
 
        - 
          kpu.m 
          returns one rule from the KPU family.
        
 
        - 
          kpu_order.m 
          returns the order of a member of the KPU family given the level.
        
 
        - 
          nwspgr.m 
          the main routine, which the user calls in order to compute
          a particular sparse grid.
        
 
        - 
          nwspgr_size.m 
          returns the size of a particular sparse grid.
        
 
        - 
          quad_rule_print.m 
          prints a multidimensional quadrature rule.
        
 
        - 
          rule_adjust.m 
          adjusts a 1D quadrature rule from [A,B] to [C,D].
        
 
        - 
          symmetric_sparse_size.m 
          sizes a symmetric sparse rule.
        
 
        - 
          tensor_product.m 
          computes a tensor product quadrature rule.
        
 
      
    
    
    
      Last revised on 20 June 2023.