LCOV - code coverage report
Current view: top level - src/efa - EFANode.C (source / functions) Hit Total Coverage
Test: idaholab/moose xfem: #31405 (292dce) with base fef103 Lines: 25 27 92.6 %
Date: 2025-09-04 07:58:55 Functions: 7 7 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : //* This file is part of the MOOSE framework
       2             : //* https://mooseframework.inl.gov
       3             : //*
       4             : //* All rights reserved, see COPYRIGHT for full restrictions
       5             : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT
       6             : //*
       7             : //* Licensed under LGPL 2.1, please see LICENSE for details
       8             : //* https://www.gnu.org/licenses/lgpl-2.1.html
       9             : 
      10             : #include "EFANode.h"
      11             : 
      12             : #include <sstream>
      13             : 
      14      792039 : EFANode::EFANode(unsigned int nid, N_CATEGORY ncat, EFANode * nparent)
      15      792039 :   : _category(ncat), _id(nid), _parent(nparent)
      16             : {
      17      792039 : }
      18             : 
      19             : std::string
      20        4107 : EFANode::idCatString()
      21             : {
      22        4107 :   std::ostringstream s;
      23        4107 :   s << _id;
      24        4107 :   if (_category == N_CATEGORY_EMBEDDED)
      25         807 :     s << "e";
      26        3300 :   else if (_category == N_CATEGORY_TEMP)
      27           0 :     s << "t";
      28        3300 :   else if (_category == N_CATEGORY_EMBEDDED_PERMANENT)
      29           0 :     s << "ep";
      30             :   else
      31        3300 :     s << " ";
      32        4107 :   return s.str();
      33        4107 : }
      34             : 
      35             : unsigned int
      36    13239354 : EFANode::id() const
      37             : {
      38    13239354 :   return _id;
      39             : }
      40             : 
      41             : EFANode::N_CATEGORY
      42    56458807 : EFANode::category() const
      43             : {
      44    56458807 :   return _category;
      45             : }
      46             : 
      47             : EFANode *
      48     6915507 : EFANode::parent() const
      49             : {
      50     6915507 :   return _parent;
      51             : }
      52             : 
      53             : void
      54        1094 : EFANode::removeParent()
      55             : {
      56        1094 :   _parent = nullptr;
      57        1094 : }
      58             : 
      59             : void
      60          60 : EFANode::setCategory(EFANode::N_CATEGORY category)
      61             : {
      62          60 :   _category = category;
      63          60 : }

Generated by: LCOV version 1.14