function [ x, y, z, w ] = rule12 ( )

%*****************************************************************************80
%
%% rule12() returns the prism rule of precision 12.
%
%  Discussion:
%
%    We suppose we are given a triangular prism P with vertices
%    (1,0,0), (0,1,0), (0,0,0),
%    (1,0,1), (0,1,1), (0,0,1),
%    We call a rule with n points, returning coordinates
%    x, y, z, and weights w.  Then the integral I of f(x,y,z) over P is 
%    approximated by Q as follows:
%
%    Q = volume(P) * sum ( 1 <= i <= n ) w(i) * f(x(i),y(i),z(i)) 
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    02 May 2023
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Jan Jaskowiec, Natarajan Sukumar,
%    High order symmetric cubature rules for tetrahedra and pyramids,
%    International Journal of Numerical Methods in Engineering,
%    Volume 122, Number 1, pages 148-171, 24 August 2020.
%
%  Output:
%
%    real x(n), y(n), z(n): the coordinates of quadrature points.
%
%    real w(n): the quadrature weights, which sum to 1.
%
  x = [ ...
          0.3333333333333333, ...
          0.3333333333333333, ...
          0.3333333333333333, ...
          0.3333333333333333, ...
          0.0485337200788840, ...
          0.0485337200788840, ...
          0.9029325598422321, ...
          0.0003340541016131, ...
          0.0003340541016131, ...
          0.9993318917967738, ...
          0.4849074297077183, ...
          0.4849074297077183, ...
          0.0301851405845634, ...
          0.4849074297077183, ...
          0.4849074297077183, ...
          0.0301851405845634, ...
          0.1497566246841529, ...
          0.1497566246841529, ...
          0.7004867506316943, ...
          0.1497566246841529, ...
          0.1497566246841529, ...
          0.7004867506316943, ...
          0.2344536517846724, ...
          0.2344536517846724, ...
          0.5310926964306552, ...
          0.2344536517846724, ...
          0.2344536517846724, ...
          0.5310926964306552, ...
          0.4409030162469282, ...
          0.4409030162469282, ...
          0.1181939675061436, ...
          0.4409030162469282, ...
          0.4409030162469282, ...
          0.1181939675061436, ...
          0.4870412467653055, ...
          0.4870412467653055, ...
          0.0259175064693890, ...
          0.4870412467653055, ...
          0.4870412467653055, ...
          0.0259175064693890, ...
          0.0248638193002129, ...
          0.0248638193002129, ...
          0.9502723613995742, ...
          0.0248638193002129, ...
          0.0248638193002129, ...
          0.9502723613995742, ...
          0.1118542147928236, ...
          0.1118542147928236, ...
          0.7762915704143528, ...
          0.1118542147928236, ...
          0.1118542147928236, ...
          0.7762915704143528, ...
          0.1207867185816364, ...
          0.7097236881695401, ...
          0.1207867185816364, ...
          0.1694895932488235, ...
          0.7097236881695401, ...
          0.1694895932488235, ...
          0.6481099336610571, ...
          0.3419306029008594, ...
          0.6481099336610571, ...
          0.0099594634380836, ...
          0.3419306029008594, ...
          0.0099594634380836, ...
          0.0200903650277176, ...
          0.1335404714654308, ...
          0.0200903650277176, ...
          0.8463691635068515, ...
          0.1335404714654308, ...
          0.8463691635068515, ...
          0.0200903650277176, ...
          0.1335404714654308, ...
          0.0200903650277176, ...
          0.8463691635068515, ...
          0.1335404714654308, ...
          0.8463691635068515, ...
          0.3214917379706315, ...
          0.1648190492804087, ...
          0.3214917379706315, ...
          0.5136892127489598, ...
          0.1648190492804087, ...
          0.5136892127489598, ...
          0.3214917379706315, ...
          0.1648190492804087, ...
          0.3214917379706315, ...
          0.5136892127489598, ...
          0.1648190492804087, ...
          0.5136892127489598, ...
          0.0689956505491457, ...
          0.6636404691861656, ...
          0.0689956505491457, ...
          0.2673638802646887, ...
          0.6636404691861656, ...
          0.2673638802646887, ...
          0.0689956505491457, ...
          0.6636404691861656, ...
          0.0689956505491457, ...
          0.2673638802646887, ...
          0.6636404691861656, ...
          0.2673638802646887, ...
          0.0199626366433414, ...
          0.2615529990296567, ...
          0.0199626366433414, ...
          0.7184843643270019, ...
          0.2615529990296567, ...
          0.7184843643270019, ...
          0.0199626366433414, ...
          0.2615529990296567, ...
          0.0199626366433414, ...
          0.7184843643270019, ...
          0.2615529990296567, ...
          0.7184843643270019, ...
          0.0900297723891655, ...
          0.0155218563345725, ...
          0.0900297723891655, ...
          0.8944483712762620, ...
          0.0155218563345725, ...
          0.8944483712762620, ...
          0.0900297723891655, ...
          0.0155218563345725, ...
          0.0900297723891655, ...
          0.8944483712762620, ...
          0.0155218563345725, ...
          0.8944483712762620, ...
          0.1172214513692467, ...
          0.5641016399337317, ...
          0.1172214513692467, ...
          0.3186769086970216, ...
          0.5641016399337317, ...
          0.3186769086970216, ...
          0.1172214513692467, ...
          0.5641016399337317, ...
          0.1172214513692467, ...
          0.3186769086970216, ...
          0.5641016399337317, ...
          0.3186769086970216 ];

  y = [ ...
          0.3333333333333333, ...
          0.3333333333333333, ...
          0.3333333333333333, ...
          0.3333333333333333, ...
          0.0485337200788840, ...
          0.9029325598422321, ...
          0.0485337200788840, ...
          0.0003340541016131, ...
          0.9993318917967738, ...
          0.0003340541016131, ...
          0.4849074297077183, ...
          0.0301851405845634, ...
          0.4849074297077183, ...
          0.4849074297077183, ...
          0.0301851405845634, ...
          0.4849074297077183, ...
          0.1497566246841529, ...
          0.7004867506316943, ...
          0.1497566246841529, ...
          0.1497566246841529, ...
          0.7004867506316943, ...
          0.1497566246841529, ...
          0.2344536517846724, ...
          0.5310926964306552, ...
          0.2344536517846724, ...
          0.2344536517846724, ...
          0.5310926964306552, ...
          0.2344536517846724, ...
          0.4409030162469282, ...
          0.1181939675061436, ...
          0.4409030162469282, ...
          0.4409030162469282, ...
          0.1181939675061436, ...
          0.4409030162469282, ...
          0.4870412467653055, ...
          0.0259175064693890, ...
          0.4870412467653055, ...
          0.4870412467653055, ...
          0.0259175064693890, ...
          0.4870412467653055, ...
          0.0248638193002129, ...
          0.9502723613995742, ...
          0.0248638193002129, ...
          0.0248638193002129, ...
          0.9502723613995742, ...
          0.0248638193002129, ...
          0.1118542147928236, ...
          0.7762915704143528, ...
          0.1118542147928236, ...
          0.1118542147928236, ...
          0.7762915704143528, ...
          0.1118542147928236, ...
          0.7097236881695401, ...
          0.1207867185816364, ...
          0.1694895932488235, ...
          0.1207867185816364, ...
          0.1694895932488235, ...
          0.7097236881695401, ...
          0.3419306029008594, ...
          0.6481099336610571, ...
          0.0099594634380836, ...
          0.6481099336610571, ...
          0.0099594634380836, ...
          0.3419306029008594, ...
          0.1335404714654308, ...
          0.0200903650277176, ...
          0.8463691635068515, ...
          0.0200903650277176, ...
          0.8463691635068515, ...
          0.1335404714654308, ...
          0.1335404714654308, ...
          0.0200903650277176, ...
          0.8463691635068515, ...
          0.0200903650277176, ...
          0.8463691635068515, ...
          0.1335404714654308, ...
          0.1648190492804087, ...
          0.3214917379706315, ...
          0.5136892127489598, ...
          0.3214917379706315, ...
          0.5136892127489598, ...
          0.1648190492804087, ...
          0.1648190492804087, ...
          0.3214917379706315, ...
          0.5136892127489598, ...
          0.3214917379706315, ...
          0.5136892127489598, ...
          0.1648190492804087, ...
          0.6636404691861656, ...
          0.0689956505491457, ...
          0.2673638802646887, ...
          0.0689956505491457, ...
          0.2673638802646887, ...
          0.6636404691861656, ...
          0.6636404691861656, ...
          0.0689956505491457, ...
          0.2673638802646887, ...
          0.0689956505491457, ...
          0.2673638802646887, ...
          0.6636404691861656, ...
          0.2615529990296567, ...
          0.0199626366433414, ...
          0.7184843643270019, ...
          0.0199626366433414, ...
          0.7184843643270019, ...
          0.2615529990296567, ...
          0.2615529990296567, ...
          0.0199626366433414, ...
          0.7184843643270019, ...
          0.0199626366433414, ...
          0.7184843643270019, ...
          0.2615529990296567, ...
          0.0155218563345725, ...
          0.0900297723891655, ...
          0.8944483712762620, ...
          0.0900297723891655, ...
          0.8944483712762620, ...
          0.0155218563345725, ...
          0.0155218563345725, ...
          0.0900297723891655, ...
          0.8944483712762620, ...
          0.0900297723891655, ...
          0.8944483712762620, ...
          0.0155218563345725, ...
          0.5641016399337317, ...
          0.1172214513692467, ...
          0.3186769086970216, ...
          0.1172214513692467, ...
          0.3186769086970216, ...
          0.5641016399337317, ...
          0.5641016399337317, ...
          0.1172214513692467, ...
          0.3186769086970216, ...
          0.1172214513692467, ...
          0.3186769086970216, ...
          0.5641016399337317 ];

  z = [ ...
          0.9624802640887508, ...
          0.0375197359112492, ...
          0.6587282524060957, ...
          0.3412717475939043, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.7793516203235177, ...
          0.7793516203235177, ...
          0.7793516203235177, ...
          0.2206483796764823, ...
          0.2206483796764823, ...
          0.2206483796764823, ...
          0.0004872322680031, ...
          0.0004872322680031, ...
          0.0004872322680031, ...
          0.9995127677319969, ...
          0.9995127677319969, ...
          0.9995127677319969, ...
          0.6654124101220354, ...
          0.6654124101220354, ...
          0.6654124101220354, ...
          0.3345875898779646, ...
          0.3345875898779646, ...
          0.3345875898779646, ...
          0.4636840317697777, ...
          0.4636840317697777, ...
          0.4636840317697777, ...
          0.5363159682302223, ...
          0.5363159682302223, ...
          0.5363159682302223, ...
          0.9686710476965903, ...
          0.9686710476965903, ...
          0.9686710476965903, ...
          0.0313289523034098, ...
          0.0313289523034098, ...
          0.0313289523034098, ...
          0.8407183935395043, ...
          0.8407183935395043, ...
          0.8407183935395043, ...
          0.1592816064604957, ...
          0.1592816064604957, ...
          0.1592816064604957, ...
          0.8773254399543938, ...
          0.8773254399543938, ...
          0.8773254399543938, ...
          0.1226745600456062, ...
          0.1226745600456062, ...
          0.1226745600456062, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.5000000000000000, ...
          0.6944689221677809, ...
          0.6944689221677809, ...
          0.6944689221677809, ...
          0.6944689221677809, ...
          0.6944689221677809, ...
          0.6944689221677809, ...
          0.3055310778322191, ...
          0.3055310778322191, ...
          0.3055310778322191, ...
          0.3055310778322191, ...
          0.3055310778322191, ...
          0.3055310778322191, ...
          0.8559006310012134, ...
          0.8559006310012134, ...
          0.8559006310012134, ...
          0.8559006310012134, ...
          0.8559006310012134, ...
          0.8559006310012134, ...
          0.1440993689987866, ...
          0.1440993689987866, ...
          0.1440993689987866, ...
          0.1440993689987866, ...
          0.1440993689987866, ...
          0.1440993689987866, ...
          0.2888455393681256, ...
          0.2888455393681256, ...
          0.2888455393681256, ...
          0.2888455393681256, ...
          0.2888455393681256, ...
          0.2888455393681256, ...
          0.7111544606318744, ...
          0.7111544606318744, ...
          0.7111544606318744, ...
          0.7111544606318744, ...
          0.7111544606318744, ...
          0.7111544606318744, ...
          0.9221446748533075, ...
          0.9221446748533075, ...
          0.9221446748533075, ...
          0.9221446748533075, ...
          0.9221446748533075, ...
          0.9221446748533075, ...
          0.0778553251466925, ...
          0.0778553251466925, ...
          0.0778553251466925, ...
          0.0778553251466925, ...
          0.0778553251466925, ...
          0.0778553251466925, ...
          0.9762657414250897, ...
          0.9762657414250897, ...
          0.9762657414250897, ...
          0.9762657414250897, ...
          0.9762657414250897, ...
          0.9762657414250897, ...
          0.0237342585749103, ...
          0.0237342585749103, ...
          0.0237342585749103, ...
          0.0237342585749103, ...
          0.0237342585749103, ...
          0.0237342585749103, ...
          0.0278439909861404, ...
          0.0278439909861404, ...
          0.0278439909861404, ...
          0.0278439909861404, ...
          0.0278439909861404, ...
          0.0278439909861404, ...
          0.9721560090138596, ...
          0.9721560090138596, ...
          0.9721560090138596, ...
          0.9721560090138596, ...
          0.9721560090138596, ...
          0.9721560090138596 ];

  w = [ ...
          0.0112254009526498, ...
          0.0112254009526498, ...
          0.0225097870163436, ...
          0.0225097870163436, ...
          0.0054894240839370, ...
          0.0054894240839370, ...
          0.0054894240839370, ...
          0.0004964406537954, ...
          0.0004964406537954, ...
          0.0004964406537954, ...
          0.0102090400109948, ...
          0.0102090400109948, ...
          0.0102090400109948, ...
          0.0102090400109948, ...
          0.0102090400109948, ...
          0.0102090400109948, ...
          0.0021006495508094, ...
          0.0021006495508094, ...
          0.0021006495508094, ...
          0.0021006495508094, ...
          0.0021006495508094, ...
          0.0021006495508094, ...
          0.0152094206670507, ...
          0.0152094206670507, ...
          0.0152094206670507, ...
          0.0152094206670507, ...
          0.0152094206670507, ...
          0.0152094206670507, ...
          0.0136582892001806, ...
          0.0136582892001806, ...
          0.0136582892001806, ...
          0.0136582892001806, ...
          0.0136582892001806, ...
          0.0136582892001806, ...
          0.0027887393220490, ...
          0.0027887393220490, ...
          0.0027887393220490, ...
          0.0027887393220490, ...
          0.0027887393220490, ...
          0.0027887393220490, ...
          0.0022520950855930, ...
          0.0022520950855930, ...
          0.0022520950855930, ...
          0.0022520950855930, ...
          0.0022520950855930, ...
          0.0022520950855930, ...
          0.0099174482589678, ...
          0.0099174482589678, ...
          0.0099174482589678, ...
          0.0099174482589678, ...
          0.0099174482589678, ...
          0.0099174482589678, ...
          0.0095245941038326, ...
          0.0095245941038326, ...
          0.0095245941038326, ...
          0.0095245941038326, ...
          0.0095245941038326, ...
          0.0095245941038326, ...
          0.0066881354290901, ...
          0.0066881354290901, ...
          0.0066881354290901, ...
          0.0066881354290901, ...
          0.0066881354290901, ...
          0.0066881354290901, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0056673224713314, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0125866454585098, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0114370118000321, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0044955975561441, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0011897740209102, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230, ...
          0.0046637786995230 ];

  return
end
