function grid_point = hermite_abscissa ( dim_num, point_num, grid_index, ...
  grid_base )

%*****************************************************************************80
%
%% HERMITE_ABSCISSA sets abscissas for multidimensional Gauss-Hermite quadrature.
%
%  Discussion:
%
%    The "nesting" as it occurs for Gauss-Hermite sparse grids simply
%    involves the use of a specified set of permissible orders for the
%    rule.  
%
%    The X array lists the (complete) Gauss-Hermite abscissas for rules 
%    of order 1, 3, 7, 15, 31, 63 and 127, in order. 
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    08 October 2007
%
%  Author:
%
%    John Burkardt
%
%  Parameters:
%
%    Input, integer DIM_NUM, the spatial dimension.
%
%    Input, integer POINT_NUM, the number of points.
%
%    Input, integer GRID_INDEX(DIM_NUM,POINT_NUM), for each
%    point and dimension, the index of the abscissa.
%
%    Input, integer GRID_BASE(DIM_NUM), the order of the 
%    rule being used in each dimension.
%
%    Output, real GRID_POINT(DIM_NUM,POINT_NUM), the grid points of abscissas.
%
  skip = [ 0, 1, 4, 11, 26, 57, 120, 247 ];
  x = [ ...
    0.0E+00, ...
   -0.122474487139158904909864203735E+01, ...
    0.0E+00, ...
    0.122474487139158904909864203735E+01, ...
   -0.265196135683523349244708200652E+01, ...
   -0.167355162876747144503180139830E+01, ...
   -0.816287882858964663038710959027E+00, ...
    0.0E+00, ...
    0.816287882858964663038710959027E+00, ...
    0.167355162876747144503180139830E+01, ...
    0.265196135683523349244708200652E+01, ...
   -0.449999070730939155366438053053E+01, ...
   -0.366995037340445253472922383312E+01, ...
   -0.296716692790560324848896036355E+01, ...
   -0.232573248617385774545404479449E+01, ...
   -0.171999257518648893241583152515E+01, ...
   -0.113611558521092066631913490556E+01, ...
   -0.565069583255575748526020337198E+00, ...
    0.0E+00, ...
    0.565069583255575748526020337198E+00, ...
    0.113611558521092066631913490556E+01, ...
    0.171999257518648893241583152515E+01, ...
    0.232573248617385774545404479449E+01, ...
    0.296716692790560324848896036355E+01, ...
    0.366995037340445253472922383312E+01, ...
    0.449999070730939155366438053053E+01, ...
   -6.9956801237185402753248521473232E+00, ...
   -6.2750787049428601427036567812530E+00, ...
   -5.6739614446185883296332558789276E+00, ...
   -5.1335955771123807045862968913996E+00, ...
   -4.6315595063128599420667997654336E+00, ...
   -4.1562717558181451724831352315314E+00, ...
   -3.7007434032314694224497164589673E+00, ...
   -3.2603207323135408104645401509648E+00, ...
   -2.8316804533902054557015640151425E+00, ...
   -2.4123177054804201051740184582119E+00, ...
   -2.0002585489356389657975562598571E+00, ...
   -1.5938858604721398261388419455550E+00, ...
   -1.1918269983500464260821358649242E+00, ...
   -0.79287697691530893968593032998830E+00, ...
   -0.39594273647142311094670041663436E+00, ...
    0.0000000000000000000000000000000E+00, ...
    0.39594273647142311094670041663436E+00, ...
    0.79287697691530893968593032998830E+00, ...
    1.1918269983500464260821358649242E+00, ...
    1.5938858604721398261388419455550E+00, ...
    2.0002585489356389657975562598571E+00, ...
    2.4123177054804201051740184582119E+00, ...
    2.8316804533902054557015640151425E+00, ...
    3.2603207323135408104645401509648E+00, ...
    3.7007434032314694224497164589673E+00, ...
    4.1562717558181451724831352315314E+00, ...
    4.6315595063128599420667997654336E+00, ...
    5.1335955771123807045862968913996E+00, ...
    5.6739614446185883296332558789276E+00, ...
    6.2750787049428601427036567812530E+00, ...
    6.9956801237185402753248521473232E+00, ...
   -10.435499877854168053468115427285E+00, ...
   -9.8028759912974963635223935286507E+00, ...
   -9.2792019543050391319404745506496E+00, ...
   -8.8118581437284546442526628275570E+00, ...
   -8.3807683451863219343010651043788E+00, ...
   -7.9755950801420373181541806298501E+00, ...
   -7.5901395198641066762479783194468E+00, ...
   -7.2203167078889678461161324222529E+00, ...
   -6.8632544331795368527353285876066E+00, ...
   -6.5168348106821160605273395854042E+00, ...
   -6.1794379922705969862418461787263E+00, ...
   -5.8497884000810673462526582961482E+00, ...
   -5.5268572526403031425047575122840E+00, ...
   -5.2097979830408354861575136416263E+00, ...
   -4.8979018644975742350745099214868E+00, ...
   -4.5905665744435190229271294569091E+00, ...
   -4.2872733352824404031727616199454E+00, ...
   -3.9875699104197157485227052068068E+00, ...
   -3.6910577000963465117322810559754E+00, ...
   -3.3973817713303911852755941806287E+00, ...
   -3.1062230279282566329138616746036E+00, ...
   -2.8172919672837977750747135657355E+00, ...
   -2.5303236304712010926855221718499E+00, ...
   -2.2450734604812066298995918179330E+00, ...
   -1.9613138583081485293922008411321E+00, ...
   -1.6788312791720137520802800622638E+00, ...
   -1.3974237486049625107570752063702E+00, ...
   -1.1168987050996462690510970277840E+00, ...
   -0.83707109558947615977737795461293E+00, ...
   -0.55776166427908221668763665253822E+00, ...
   -0.27879538567115223986687628627202E+00, ...
    0.00000000000000000000000000000000E+00, ...
    0.27879538567115223986687628627202E+00, ...
    0.55776166427908221668763665253822E+00, ...
    0.83707109558947615977737795461293E+00, ...
    1.1168987050996462690510970277840E+00, ...
    1.3974237486049625107570752063702E+00, ...
    1.6788312791720137520802800622638E+00, ...
    1.9613138583081485293922008411321E+00, ...
    2.2450734604812066298995918179330E+00, ...
    2.5303236304712010926855221718499E+00, ...
    2.8172919672837977750747135657355E+00, ...
    3.1062230279282566329138616746036E+00, ...
    3.3973817713303911852755941806287E+00, ...
    3.6910577000963465117322810559754E+00, ...
    3.9875699104197157485227052068068E+00, ...
    4.2872733352824404031727616199454E+00, ...
    4.5905665744435190229271294569091E+00, ...
    4.8979018644975742350745099214868E+00, ...
    5.2097979830408354861575136416263E+00, ...
    5.5268572526403031425047575122840E+00, ...
    5.8497884000810673462526582961482E+00, ...
    6.1794379922705969862418461787263E+00, ...
    6.5168348106821160605273395854042E+00, ...
    6.8632544331795368527353285876066E+00, ...
    7.2203167078889678461161324222529E+00, ...
    7.5901395198641066762479783194468E+00, ...
    7.9755950801420373181541806298501E+00, ...
    8.3807683451863219343010651043788E+00, ...
    8.8118581437284546442526628275570E+00, ...
    9.2792019543050391319404745506496E+00, ...
    9.8028759912974963635223935286507E+00, ...
    10.435499877854168053468115427285E+00, ...
   -15.228338148167350978246954433464E+00, ...
   -14.669595158833972632746354112896E+00, ...
   -14.209085995284870755168244250887E+00, ...
   -13.799722290211676634645246746673E+00, ...
   -13.423518590070950062438258321855E+00, ...
   -13.071208660474601901583995439649E+00, ...
   -12.737235652415686338138003924072E+00, ...
   -12.417939378869715805445879624069E+00, ...
   -12.110749020947747600132123508132E+00, ...
   -11.813772198267727195134584136191E+00, ...
   -11.525565112572696599167888588564E+00, ...
   -11.244994583785543445194384194300E+00, ...
   -10.971150569840247423423040263881E+00, ...
   -10.703288201027481347670940744690E+00, ...
   -10.440787957772772867742591798027E+00, ...
   -10.183127473450343888624126450357E+00, ...
   -9.9298610495114250736847004273684E+00, ...
   -9.6806044412474728038150712732737E+00, ...
   -9.4350233389881650135019598506287E+00, ...
   -9.1928244988460305715774195052527E+00, ...
   -8.9537488108565404323807890169970E+00, ...
   -8.7175658087076307363833999548548E+00, ...
   -8.4840692689832473326097180339984E+00, ...
   -8.2530736454457156579694124243888E+00, ...
   -8.0244111514703375578594739796798E+00, ...
   -7.7979293513870105420829120455591E+00, ...
   -7.5734891556083454022834960763301E+00, ...
   -7.3509631392269052701961258043733E+00, ...
   -7.1302341220350710668064025713431E+00, ...
   -6.9111939615465713197465633109366E+00, ...
   -6.6937425208758294190074417381666E+00, ...
   -6.4777867811645365448144903821487E+00, ...
   -6.2632400742737354345609723857092E+00, ...
   -6.0500214161419845694465474482388E+00, ...
   -5.8380549248774187386601690807757E+00, ...
   -5.6272693105464816659423455794909E+00, ...
   -5.4175974259243240722848425872924E+00, ...
   -5.2089758693153983587570258372239E+00, ...
   -5.0013446320386360038520809107373E+00, ...
   -4.7946467843764925009748509930857E+00, ...
   -4.5888281947698372951606485031212E+00, ...
   -4.3838372778464736294253744407459E+00, ...
   -4.1796247675352031349421189892408E+00, ...
   -3.9761435120673355916035814195920E+00, ...
   -3.7733482881250526721004678400057E+00, ...
   -3.5711956317782180447199756485249E+00, ...
   -3.3696436841717397896643629240035E+00, ...
   -3.1686520501953630191857798261495E+00, ...
   -2.9681816685955910267761649521505E+00, ...
   -2.7681946921824058801226545958892E+00, ...
   -2.5686543769473501723144013022363E+00, ...
   -2.3695249790490401080012474645702E+00, ...
   -2.1707716587411506879498498083695E+00, ...
   -1.9723603904195020079324743227565E+00, ...
   -1.7742578780516791584676442103681E+00, ...
   -1.5764314753267801315519597621879E+00, ...
   -1.3788491099261778091441557053728E+00, ...
   -1.1814792113700685848678583598423E+00, ...
   -0.98429064194027277726568984213773E+00, ...
   -0.78725263021825034151596831878971E+00, ...
   -0.59033470680942102142230439346102E+00, ...
   -0.39350664185130136568037826200185E+00, ...
   -0.19673838392423251964272239737078E+00, ...
    0.0000000000000000000000000000000E+00, ...
    0.19673838392423251964272239737078E+00, ...
    0.39350664185130136568037826200185E+00, ...
    0.59033470680942102142230439346102E+00, ...
    0.78725263021825034151596831878971E+00, ...
    0.98429064194027277726568984213773E+00, ...
    1.1814792113700685848678583598423E+00, ...
    1.3788491099261778091441557053728E+00, ...
    1.5764314753267801315519597621879E+00, ...
    1.7742578780516791584676442103681E+00, ...
    1.9723603904195020079324743227565E+00, ...
    2.1707716587411506879498498083695E+00, ...
    2.3695249790490401080012474645702E+00, ...
    2.5686543769473501723144013022363E+00, ...
    2.7681946921824058801226545958892E+00, ...
    2.9681816685955910267761649521505E+00, ...
    3.1686520501953630191857798261495E+00, ...
    3.3696436841717397896643629240035E+00, ...
    3.5711956317782180447199756485249E+00, ...
    3.7733482881250526721004678400057E+00, ...
    3.9761435120673355916035814195920E+00, ...
    4.1796247675352031349421189892408E+00, ...
    4.3838372778464736294253744407459E+00, ...
    4.5888281947698372951606485031212E+00, ...
    4.7946467843764925009748509930857E+00, ...
    5.0013446320386360038520809107373E+00, ...
    5.2089758693153983587570258372239E+00, ...
    5.4175974259243240722848425872924E+00, ...
    5.6272693105464816659423455794909E+00, ...
    5.8380549248774187386601690807757E+00, ...
    6.0500214161419845694465474482388E+00, ...
    6.2632400742737354345609723857092E+00, ...
    6.4777867811645365448144903821487E+00, ...
    6.6937425208758294190074417381666E+00, ...
    6.9111939615465713197465633109366E+00, ...
    7.1302341220350710668064025713431E+00, ...
    7.3509631392269052701961258043733E+00, ...
    7.5734891556083454022834960763301E+00, ...
    7.7979293513870105420829120455591E+00, ...
    8.0244111514703375578594739796798E+00, ...
    8.2530736454457156579694124243888E+00, ...
    8.4840692689832473326097180339984E+00, ...
    8.7175658087076307363833999548548E+00, ...
    8.9537488108565404323807890169970E+00, ...
    9.1928244988460305715774195052527E+00, ...
    9.4350233389881650135019598506287E+00, ...
    9.6806044412474728038150712732737E+00, ...
    9.9298610495114250736847004273684E+00, ...
    10.183127473450343888624126450357E+00, ...
    10.440787957772772867742591798027E+00, ...
    10.703288201027481347670940744690E+00, ...
    10.971150569840247423423040263881E+00, ...
    11.244994583785543445194384194300E+00, ...
    11.525565112572696599167888588564E+00, ...
    11.813772198267727195134584136191E+00, ...
    12.110749020947747600132123508132E+00, ...
    12.417939378869715805445879624069E+00, ...
    12.737235652415686338138003924072E+00, ...
    13.071208660474601901583995439649E+00, ...
    13.423518590070950062438258321855E+00, ...
    13.799722290211676634645246746673E+00, ...
    14.209085995284870755168244250887E+00, ...
    14.669595158833972632746354112896E+00, ...
    15.228338148167350978246954433464E+00  ...
  ];

  if ( any ( grid_base(1:dim_num) < 0 ) )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'HERMITE_ABSCISSA - Fatal error!\n' );
    fprintf ( 1, '  Some base values are less than 0.\n' );
    error ( 'HERMITE_ABSCISSA - Fatal error!' );
  end

  if ( any ( 63 < grid_base(1:dim_num) ) )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'HERMITE_ABSCISSA - Fatal error!\n' );
    fprintf ( 1, '  Some base values are greater than 63.\n' );
    error ( 'HERMITE_ABSCISSA - Fatal error!' );
  end

  for point = 1 : point_num
    for dim = 1 : dim_num

      level = i4_log_2 ( grid_base(dim) + 1 );

      pointer = skip(level+1) + ( grid_index(dim,point) + grid_base(dim) + 1 );

      grid_point(dim,point) = x(pointer);

    end
  end

  return
end
