function order = rule_order ( p )

%*****************************************************************************80
%
%% rule_order() returns the order of a prism quadrature rule of given precision.
%
%  Discussion:
%
%    The "order" of a quadrature rule is the number of points involved.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    27 April 2023
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Freddie Witherden, Peter Vincent,
%    On the identification of symmetric quadrature rules for finite element methods,
%    Computers and Mathematics with Applications,
%    Volume 69, pages 1232-1241, 2015.
%
%  Input:
%
%    integer p: the precision, 0 <= p <= 10.
%
%  Output:
%
%    integer order: the order of the rule.
%
  if ( p < 0 ) 
    error ( 'rule_order(): Input p < 0.\n' );
  end

  if ( 10 < p )
    error ( 'rule_order(): Input 10 < p.\n' );
  end

  order_vec = [ ...
      1, ...
      1,   5,   8,  11,  16, ...
     28,  35,  46,  60,  85 ];

  order = order_vec(p+1);

  return
end

