LCOV - code coverage report
Current view: top level - src/quadrature - quadrature_gm_2D.C (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4229 (6a9aeb) with base 727f46 Lines: 7 9 77.8 %
Date: 2025-08-19 19:27:09 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : // The libMesh Finite Element Library.
       2             : // Copyright (C) 2002-2025 Benjamin S. Kirk, John W. Peterson, Roy H. Stogner
       3             : 
       4             : // This library is free software; you can redistribute it and/or
       5             : // modify it under the terms of the GNU Lesser General Public
       6             : // License as published by the Free Software Foundation; either
       7             : // version 2.1 of the License, or (at your option) any later version.
       8             : 
       9             : // This library is distributed in the hope that it will be useful,
      10             : // but WITHOUT ANY WARRANTY; without even the implied warranty of
      11             : // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      12             : // Lesser General Public License for more details.
      13             : 
      14             : // You should have received a copy of the GNU Lesser General Public
      15             : // License along with this library; if not, write to the Free Software
      16             : // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      17             : 
      18             : 
      19             : 
      20             : // Local includes
      21             : #include "libmesh/quadrature_gm.h"
      22             : #include "libmesh/enum_to_string.h"
      23             : 
      24             : namespace libMesh
      25             : {
      26             : 
      27         710 : void QGrundmann_Moller::init_2D()
      28             : {
      29             :   // Nearly all GM rules contain negative weights, so if you are not
      30             :   // allowing rules with negative weights, we cannot continue!
      31         710 :   libmesh_error_msg_if(!allow_rules_with_negative_weights,
      32             :                        "You requested a Grundmann-Moller rule but\n"
      33             :                        << "are not allowing rules with negative weights!\n"
      34             :                        << "Either select a different quadrature class or\n"
      35             :                        << "set allow_rules_with_negative_weights==true.");
      36             : 
      37         710 :   switch (_type)
      38             :     {
      39         710 :     case TRI3:
      40             :     case TRISHELL3:
      41             :     case TRI3SUBDIVISION:
      42             :     case TRI6:
      43             :     case TRI7:
      44             :       {
      45          40 :         switch(get_order())
      46             :           {
      47             : 
      48             :           default:
      49             :             {
      50             :               // Untested above _order=23 but should work...
      51         710 :               gm_rule(get_order()/2, /*dim=*/2);
      52         710 :               return;
      53             :             }
      54             :           } // end switch (order)
      55             :       } // end case TRI
      56             : 
      57           0 :     default:
      58           0 :       libmesh_error_msg("ERROR: Unsupported element type: " << Utility::enum_to_string(_type));
      59             :     } // end switch (_type)
      60             : }
      61             : 
      62             : } // namespace libMesh

Generated by: LCOV version 1.14