LCOV - code coverage report
Current view: top level - src/geom - node_elem.C (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4229 (6a9aeb) with base 727f46 Lines: 11 15 73.3 %
Date: 2025-08-19 19:27:09 Functions: 4 7 57.1 %
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/node_elem.h"
      22             : #include "libmesh/enum_order.h"
      23             : 
      24             : namespace libMesh
      25             : {
      26             : 
      27             : 
      28             : // ------------------------------------------------------------
      29             : // NodeElem class static member initializations
      30             : const int NodeElem::num_nodes;
      31             : const int NodeElem::num_sides;
      32             : 
      33             : // ------------------------------------------------------------
      34             : // NodeElem class member functions
      35             : 
      36             : // If we're computing on a node, we only need CONSTANT approximation
      37             : // to get the full function space
      38      713725 : Order NodeElem::default_order() const
      39             : {
      40      713725 :   return CONSTANT;
      41             : }
      42             : 
      43             : // But we can "support" any order in 0D, really...
      44      315301 : Order NodeElem::supported_nodal_order() const
      45             : {
      46      315301 :   return MAXIMUM;
      47             : }
      48             : 
      49             : 
      50             : 
      51           0 : void NodeElem::connectivity(const unsigned int,
      52             :                             const IOPackage,
      53             :                             std::vector<dof_id_type> &) const
      54             : {
      55           0 :   libmesh_not_implemented();
      56             : }
      57             : 
      58     1020922 : bool NodeElem::contains_point(const Point & p, Real tol) const
      59             : {
      60     1067959 :   return (this->point(0) - p).norm() < tol;
      61             : }
      62             : 
      63           0 : bool NodeElem::close_to_point(const Point & p, Real tol) const
      64             : {
      65           0 :   return this->contains_point(p, tol);
      66             : }
      67             : 
      68             : 
      69        1070 : bool NodeElem::on_reference_element(const Point & p,
      70             :                                     const Real eps) const
      71             : {
      72             :   // Debatably `return true;` would make sense here; we shouldn't ever
      73             :   // pass p!=0 in.
      74        1070 :   return (std::abs(p(0)) < eps
      75             : #if LIBMESH_DIM > 1
      76        1070 :           && std::abs(p(1)) < eps
      77             : #endif
      78             : #if LIBMESH_DIM > 2
      79        2140 :           && std::abs(p(2)) < eps
      80             : #endif
      81        1070 :          );
      82             : }
      83             : 
      84             : 
      85             : #ifdef LIBMESH_ENABLE_AMR
      86             : 
      87             : const Real NodeElem::_embedding_matrix[1][1][1] =
      88             :   {
      89             :     // embedding matrix for child 0
      90             :     {
      91             :       // 0
      92             :       {1.0}, // 0
      93             :     }
      94             :   };
      95             : 
      96             : #endif
      97             : 
      98             : } // namespace libMesh

Generated by: LCOV version 1.14