LCOV - code coverage report
Current view: top level - src/geom - edge_inf_edge2.C (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4229 (6a9aeb) with base 727f46 Lines: 6 37 16.2 %
Date: 2025-08-19 19:27:09 Functions: 2 8 25.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             : #include "libmesh/libmesh_config.h"
      21             : 
      22             : #ifdef LIBMESH_ENABLE_INFINITE_ELEMENTS
      23             : 
      24             : // Local includes
      25             : #include "libmesh/edge_inf_edge2.h"
      26             : #include "libmesh/enum_io_package.h"
      27             : #include "libmesh/enum_order.h"
      28             : 
      29             : namespace libMesh
      30             : {
      31             : 
      32             : // ------------------------------------------------------------
      33             : // InfEdge2 class static member initializations
      34             : const int InfEdge2::num_nodes;
      35             : 
      36             : // ------------------------------------------------------------
      37             : // InfEdge2 class member functions
      38             : 
      39           0 : bool InfEdge2::is_vertex(const unsigned int i) const
      40             : {
      41           0 :   if (i)
      42           0 :     return false;
      43           0 :   return true;
      44             : }
      45             : 
      46           0 : bool InfEdge2::is_edge(const unsigned int i) const
      47             : {
      48           0 :   if (i)
      49           0 :     return true;
      50           0 :   return false;
      51             : }
      52             : 
      53           0 : bool InfEdge2::is_face(const unsigned int) const
      54             : {
      55           0 :   return false;
      56             : }
      57             : 
      58          10 : bool InfEdge2::is_node_on_side(const unsigned int n,
      59             :                                const unsigned int s) const
      60             : {
      61           4 :   libmesh_assert_less (s, 1);
      62          10 :   return (s == n);
      63             : }
      64             : 
      65             : std::vector<unsigned>
      66           5 : InfEdge2::nodes_on_side(const unsigned int s) const
      67             : {
      68           2 :   libmesh_assert_less(s, 1);
      69           5 :   return {s};
      70             : }
      71             : 
      72           0 : bool InfEdge2::is_node_on_edge(const unsigned int,
      73             :                                const unsigned int libmesh_dbg_var(e)) const
      74             : {
      75           0 :   libmesh_assert_equal_to (e, 0);
      76           0 :   return true;
      77             : }
      78             : 
      79           0 : Order InfEdge2::default_order() const
      80             : {
      81           0 :   return FIRST;
      82             : }
      83             : 
      84           0 : void InfEdge2::connectivity(const unsigned int libmesh_dbg_var(se),
      85             :                             const IOPackage iop,
      86             :                             std::vector<dof_id_type> & conn) const
      87             : {
      88           0 :   libmesh_assert_equal_to (se, 0);
      89           0 :   libmesh_assert_less (se, this->n_sub_elem());
      90           0 :   libmesh_assert_not_equal_to (iop, INVALID_IO_PACKAGE);
      91             : 
      92           0 :   conn.resize(2);
      93             : 
      94           0 :   switch (iop)
      95             :     {
      96           0 :     case TECPLOT:
      97             :       {
      98           0 :         conn[0] = this->node_id(0)+1;
      99           0 :         conn[1] = this->node_id(1)+1;
     100           0 :         return;
     101             :       }
     102             : 
     103           0 :     case VTK:
     104             :       {
     105           0 :         conn[0] = this->node_id(0);
     106           0 :         conn[1] = this->node_id(1);
     107           0 :         return;
     108             :       }
     109             : 
     110           0 :     default:
     111           0 :       libmesh_error_msg("Unsupported IO package " << iop);
     112             :     }
     113             : }
     114             : 
     115             : } // namespace libMesh
     116             : 
     117             : 
     118             : #endif

Generated by: LCOV version 1.14