function w = padua_weights_set ( l )

%*****************************************************************************80
%
%% PADUA_WEIGHTS_SET sets quadrature weights for the Padua points.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    09 June 2014
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Marco Caliari, Stefano de Marchi, Marco Vianello,
%    Bivariate interpolation on the square at new nodal sets,
%    Applied Mathematics and Computation,
%    Volume 165, Number 2, 2005, pages 261-274.
%
%  Parameters:
%
%    Input, integer L, the level.
%    0 <= L <= 10.
%
%    Output, real W(N), the quadrature weights.
%
  n = ( ( l + 1 ) * ( l + 2 ) ) / 2;
  w = zeros ( n, 1 );

  if ( l == 0 )
    w( 1) =    4.000000000000000E+00;
  elseif ( l == 1 )
    w( 1) =    1.000000000000000E+00;
    w( 2) =    1.000000000000000E+00;
    w( 3) =    2.000000000000000E+00;
  elseif ( l == 2 )
    w( 1) =   0.0E+00;
    w( 2) =   0.6666666666666663E+00;
    w( 3) =    2.222222222222222E+00;
    w( 4) =   0.4444444444444444E+00;
    w( 5) =   0.0E+00;
    w( 6) =   0.6666666666666664E+00;
  elseif ( l == 3 )
    w( 1) =  -0.5555555555555480E-01;
    w( 2) =   0.3333333333333331E+00;
    w( 3) =  -0.5555555555555580E-01;
    w( 4) =   0.8888888888888886E+00;
    w( 5) =   0.8888888888888893E+00;
    w( 6) =   0.2222222222222224E+00;
    w( 7) =    1.333333333333333E+00;
    w( 8) =   0.2222222222222220E+00;
    w( 9) =   0.1111111111111109E+00;
    w(10) =   0.1111111111111112E+00;
  elseif ( l == 4 )
    w( 1) =  -0.8888888888888932E-02;
    w( 2) =   0.8104919101110961E-01;
    w( 3) =   0.6117303121111219E-01;
    w( 4) =   0.3874097078666789E+00;
    w( 5) =   0.6259236254666545E+00;
    w( 6) =   0.5333333333333362E-01;
    w( 7) =   0.7111111111111067E-01;
    w( 8) =   0.9830822022444241E+00;
    w( 9) =   0.5458066866444642E+00;
    w(10) =   0.3874097078666780E+00;
    w(11) =   0.6259236254666568E+00;
    w(12) =   0.5333333333333383E-01;
    w(13) =  -0.8888888888888703E-02;
    w(14) =   0.8104919101110968E-01;
    w(15) =   0.6117303121111135E-01;
  elseif ( l == 5 )
    w( 1) =  -0.1037037037037093E-01;
    w( 2) =   0.5037037037036911E-01;
    w( 3) =   0.5037037037037081E-01;
    w( 4) =  -0.1037037037036947E-01;
    w( 5) =   0.1876963678740801E+00;
    w( 6) =   0.3460933466518654E+00;
    w( 7) =   0.1876963678740763E+00;
    w( 8) =   0.4514390511851724E-01;
    w( 9) =   0.5541130536814713E+00;
    w(10) =   0.5541130536814728E+00;
    w(11) =   0.4514390511851834E-01;
    w(12) =   0.2804517802740705E+00;
    w(13) =   0.6376103570518378E+00;
    w(14) =   0.2804517802740683E+00;
    w(15) =   0.3189313191851883E-01;
    w(16) =   0.3288499092814910E+00;
    w(17) =   0.3288499092814925E+00;
    w(18) =   0.3189313191851956E-01;
    w(19) =   0.2074074074074123E-01;
    w(20) =   0.3851851851851849E-01;
    w(21) =   0.2074074074074051E-01;
  elseif ( l == 6 )
    w( 1) =  -0.3023431594858565E-02;
    w( 2) =   0.1957267632451884E-01;
    w( 3) =   0.2633929313290840E-01;
    w( 4) =   0.1425431928029237E-01;
    w( 5) =   0.1006383046329639E+00;
    w( 6) =   0.2208900184526934E+00;
    w( 7) =   0.1743144584714012E+00;
    w( 8) =   0.1209372637943976E-01;
    w( 9) =   0.1934996220710680E-01;
    w(10) =   0.3245064820875231E+00;
    w(11) =   0.4027058473592984E+00;
    w(12) =   0.1677234226317961E+00;
    w(13) =   0.1953319357827178E+00;
    w(14) =   0.4489633053035124E+00;
    w(15) =   0.3721824611057551E+00;
    w(16) =   0.2479213907785274E-01;
    w(17) =   0.1934996220710561E-01;
    w(18) =   0.3245064820875153E+00;
    w(19) =   0.4027058473592959E+00;
    w(20) =   0.1677234226317944E+00;
    w(21) =   0.1006383046329745E+00;
    w(22) =   0.2208900184526933E+00;
    w(23) =   0.1743144584714027E+00;
    w(24) =   0.1209372637944051E-01;
    w(25) =  -0.3023431594861990E-02;
    w(26) =   0.1957267632451757E-01;
    w(27) =   0.2633929313290797E-01;
    w(28) =   0.1425431928029198E-01;
  elseif ( l == 7 )
    w( 1) =  -0.3287981859413765E-02;
    w( 2) =   0.1337868480725671E-01;
    w( 3) =   0.2063492063491996E-01;
    w( 4) =   0.1337868480725546E-01;
    w( 5) =  -0.3287981859408898E-02;
    w( 6) =   0.5949324721885513E-01;
    w( 7) =   0.1306477599993571E+00;
    w( 8) =   0.1306477599993581E+00;
    w( 9) =   0.5949324721885061E-01;
    w(10) =   0.1263869091685831E-01;
    w(11) =   0.1979944935601103E+00;
    w(12) =   0.2832184784823740E+00;
    w(13) =   0.1979944935601143E+00;
    w(14) =   0.1263869091685747E-01;
    w(15) =   0.1221817987389771E+00;
    w(16) =   0.3150266070593529E+00;
    w(17) =   0.3150266070593440E+00;
    w(18) =   0.1221817987389802E+00;
    w(19) =   0.1771365352315134E-01;
    w(20) =   0.2490926964598258E+00;
    w(21) =   0.3408041116306980E+00;
    w(22) =   0.2490926964598291E+00;
    w(23) =   0.1771365352314976E-01;
    w(24) =   0.9646986307476696E-01;
    w(25) =   0.2557725606433917E+00;
    w(26) =   0.2557725606433927E+00;
    w(27) =   0.9646986307476431E-01;
    w(28) =   0.8649923133686802E-02;
    w(29) =   0.1062007918394705E+00;
    w(30) =   0.1505805844901012E+00;
    w(31) =   0.1062007918394705E+00;
    w(32) =   0.8649923133690016E-02;
    w(33) =   0.6355881462931014E-02;
    w(34) =   0.1405228180237514E-01;
    w(35) =   0.1405228180237651E-01;
    w(36) =   0.6355881462928496E-02;
  elseif ( l == 8 )
    w( 1) =  -0.1269841269835311E-02;
    w( 2) =   0.6706089639041270E-02;
    w( 3) =   0.1111455441352989E-01;
    w( 4) =   0.1026455026455282E-01;
    w( 5) =   0.4930678698742625E-02;
    w( 6) =   0.3633146869162523E-01;
    w( 7) =   0.8838322767333079E-01;
    w( 8) =   0.9965911758463214E-01;
    w( 9) =   0.6400185533755555E-01;
    w(10) =   0.4061629144893127E-02;
    w(11) =   0.6772486772485166E-02;
    w(12) =   0.1258344472781388E+00;
    w(13) =   0.1927501398511116E+00;
    w(14) =   0.1699470899470907E+00;
    w(15) =   0.6342599488133535E-01;
    w(16) =   0.8376332474107638E-01;
    w(17) =   0.2170841444607031E+00;
    w(18) =   0.2477307250801775E+00;
    w(19) =   0.1648098048612226E+00;
    w(20) =   0.1004771829779292E-01;
    w(21) =   0.1015873015872910E-01;
    w(22) =   0.1784328991205164E+00;
    w(23) =   0.2729409493576765E+00;
    w(24) =   0.2364021164021134E+00;
    w(25) =   0.8936689226256009E-01;
    w(26) =   0.8376332474107701E-01;
    w(27) =   0.2170841444607054E+00;
    w(28) =   0.2477307250801761E+00;
    w(29) =   0.1648098048612200E+00;
    w(30) =   0.1004771829779330E-01;
    w(31) =   0.6772486772485237E-02;
    w(32) =   0.1258344472781358E+00;
    w(33) =   0.1927501398511135E+00;
    w(34) =   0.1699470899470926E+00;
    w(35) =   0.6342599488133838E-01;
    w(36) =   0.3633146869162453E-01;
    w(37) =   0.8838322767332588E-01;
    w(38) =   0.9965911758463601E-01;
    w(39) =   0.6400185533755502E-01;
    w(40) =   0.4061629144888279E-02;
    w(41) =  -0.1269841269836355E-02;
    w(42) =   0.6706089639046927E-02;
    w(43) =   0.1111455441352761E-01;
    w(44) =   0.1026455026454956E-01;
    w(45) =   0.4930678698747173E-02;
  elseif ( l == 9 )
    w( 1) =  -0.1368606701945113E-02;
    w( 2) =   0.4837977417140975E-02;
    w( 3) =   0.8876308297144902E-02;
    w( 4) =   0.8876308297143068E-02;
    w( 5) =   0.4837977417150492E-02;
    w( 6) =  -0.1368606701935084E-02;
    w( 7) =   0.2425285860992349E-01;
    w( 8) =   0.5727330842923516E-01;
    w( 9) =   0.7008257906578071E-01;
    w(10) =   0.5727330842922034E-01;
    w(11) =   0.2425285860989794E-01;
    w(12) =   0.4659404339099723E-02;
    w(13) =   0.8354521980498550E-01;
    w(14) =   0.1370796991940044E+00;
    w(15) =   0.1370796991940248E+00;
    w(16) =   0.8354521980500107E-01;
    w(17) =   0.4659404339109654E-02;
    w(18) =   0.5564545640233619E-01;
    w(19) =   0.1524391996823315E+00;
    w(20) =   0.1877107583774149E+00;
    w(21) =   0.1524391996823176E+00;
    w(22) =   0.5564545640232402E-01;
    w(23) =   0.8186176158691754E-02;
    w(24) =   0.1295355639606716E+00;
    w(25) =   0.2061407656847711E+00;
    w(26) =   0.2061407656847630E+00;
    w(27) =   0.1295355639606894E+00;
    w(28) =   0.8186176158692687E-02;
    w(29) =   0.6234969028097752E-01;
    w(30) =   0.1730419031522391E+00;
    w(31) =   0.2169418247419051E+00;
    w(32) =   0.1730419031522361E+00;
    w(33) =   0.6234969028097048E-01;
    w(34) =   0.7506172839505762E-02;
    w(35) =   0.1142161960569350E+00;
    w(36) =   0.1802176663769002E+00;
    w(37) =   0.1802176663769038E+00;
    w(38) =   0.1142161960569279E+00;
    w(39) =   0.7506172839512260E-02;
    w(40) =   0.4031900987631698E-01;
    w(41) =   0.1142976211857364E+00;
    w(42) =   0.1413353845521477E+00;
    w(43) =   0.1142976211857414E+00;
    w(44) =   0.4031900987631700E-01;
    w(45) =   0.3239075586856897E-02;
    w(46) =   0.4317587564913915E-01;
    w(47) =   0.7015250533601934E-01;
    w(48) =   0.7015250533601930E-01;
    w(49) =   0.4317587564913908E-01;
    w(50) =   0.3239075586852207E-02;
    w(51) =   0.2550690557469151E-02;
    w(52) =   0.6084230077461027E-02;
    w(53) =   0.7421516754852508E-02;
    w(54) =   0.6084230077458821E-02;
    w(55) =   0.2550690557473353E-02;
  elseif ( l == 10 )
    w( 1) =  -0.6240762604463766E-03;
    w( 2) =   0.2843227149025789E-02;
    w( 3) =   0.5250031948150784E-02;
    w( 4) =   0.5891746241568810E-02;
    w( 5) =   0.4705736485964679E-02;
    w( 6) =   0.2135354637732944E-02;
    w( 7) =   0.1610939653924566E-01;
    w( 8) =   0.4099595211758227E-01;
    w( 9) =   0.5326500934654063E-01;
    w(10) =   0.4863338516658277E-01;
    w(11) =   0.2843474741781434E-01;
    w(12) =   0.1719619179693151E-02;
    w(13) =   0.2883769745121509E-02;
    w(14) =   0.5724711668876453E-01;
    w(15) =   0.9659872841640438E-01;
    w(16) =   0.1053210323353631E+00;
    w(17) =   0.8066212502628711E-01;
    w(18) =   0.2855765663647366E-01;
    w(19) =   0.3981286043310814E-01;
    w(20) =   0.1090390674981577E+00;
    w(21) =   0.1430169021081585E+00;
    w(22) =   0.1313686303763064E+00;
    w(23) =   0.7932850918298831E-01;
    w(24) =   0.4610696968783255E-02;
    w(25) =   0.5086495679684716E-02;
    w(26) =   0.9311356395361167E-01;
    w(27) =   0.1562320334111262E+00;
    w(28) =   0.1696057154254139E+00;
    w(29) =   0.1283581371975154E+00;
    w(30) =   0.4603059518094556E-01;
    w(31) =   0.4894888812994630E-01;
    w(32) =   0.1347281473526573E+00;
    w(33) =   0.1764193542601264E+00;
    w(34) =   0.1635037456303485E+00;
    w(35) =   0.9822749154565460E-01;
    w(36) =   0.5704840613923174E-02;
    w(37) =   0.5086495679679268E-02;
    w(38) =   0.9311356395362781E-01;
    w(39) =   0.1562320334111511E+00;
    w(40) =   0.1696057154253968E+00;
    w(41) =   0.1283581371975113E+00;
    w(42) =   0.4603059518094044E-01;
    w(43) =   0.3981286043311782E-01;
    w(44) =   0.1090390674981293E+00;
    w(45) =   0.1430169021081508E+00;
    w(46) =   0.1313686303763217E+00;
    w(47) =   0.7932850918299997E-01;
    w(48) =   0.4610696968790496E-02;
    w(49) =   0.2883769745110260E-02;
    w(50) =   0.5724711668875122E-01;
    w(51) =   0.9659872841642343E-01;
    w(52) =   0.1053210323353932E+00;
    w(53) =   0.8066212502626474E-01;
    w(54) =   0.2855765663644533E-01;
    w(55) =   0.1610939653928420E-01;
    w(56) =   0.4099595211758404E-01;
    w(57) =   0.5326500934649123E-01;
    w(58) =   0.4863338516656233E-01;
    w(59) =   0.2843474741784810E-01;
    w(60) =   0.1719619179720036E-02;
    w(61) =  -0.6240762604606350E-03;
    w(62) =   0.2843227149011163E-02;
    w(63) =   0.5250031948172295E-02;
    w(64) =   0.5891746241587802E-02;
    w(65) =   0.4705736485965663E-02;
    w(66) =   0.2135354637703863E-02;
  else
    fprintf ( 1, '\n' );
    fprintf ( 1, 'PADUA_WEIGHTS_SET - Fatal error!\n' );
    fprintf ( 1, '  Illegal value of L = %d\n', l );
    fprintf ( 1, '  Legal values are 0 through 10.\n' );
    error ( 'PADUA_WEIGHTS_SET - Fatal error!' );
  end
%
%  Reverse the indexing to match the published data.
%
  n = ( ( l + 1 ) * ( l + 2 ) ) / 2;
  w = r8vec_reverse ( n, w );

  return
end
