LCOV - code coverage report
Current view: top level - include/efa - ElementFragmentAlgorithm.h (source / functions) Hit Total Coverage
Test: idaholab/moose xfem: #31405 (292dce) with base fef103 Lines: 3 3 100.0 %
Date: 2025-09-04 07:58:55 Functions: 0 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             : #pragma once
      11             : 
      12             : #include <vector>
      13             : #include <map>
      14             : #include <set>
      15             : 
      16             : #include "EFANode.h"
      17             : #include "EFAElement.h"
      18             : 
      19             : class ElementFragmentAlgorithm
      20             : {
      21             : public:
      22             :   /**
      23             :    * Constructor
      24             :    **/
      25             :   ElementFragmentAlgorithm(std::ostream & os);
      26             : 
      27             :   ~ElementFragmentAlgorithm();
      28             : 
      29             : private:
      30             :   std::ostream & _ostream;
      31             :   // unsigned int MaxElemId;
      32             :   std::map<unsigned int, EFANode *> _permanent_nodes;
      33             :   std::map<unsigned int, EFANode *> _embedded_nodes;
      34             :   std::map<unsigned int, EFANode *> _temp_nodes;
      35             :   std::map<unsigned int, EFANode *> _embedded_permanent_nodes;
      36             :   std::map<unsigned int, EFAElement *> _elements;
      37             :   std::set<EFAElement *> _crack_tip_elements;
      38             :   std::vector<EFANode *> _new_nodes;
      39             :   std::vector<EFANode *> _deleted_nodes;
      40             :   std::vector<EFAElement *> _child_elements;
      41             :   std::vector<EFAElement *> _parent_elements;
      42             :   std::map<EFANode *, std::set<EFAElement *>> _inverse_connectivity;
      43             : 
      44             : public:
      45             :   unsigned int add2DElements(std::vector<std::vector<unsigned int>> & quads);
      46             :   EFAElement * add2DElement(const std::vector<unsigned int> & quad, unsigned int id);
      47             :   EFAElement * add3DElement(const std::vector<unsigned int> & quad, unsigned int id);
      48             : 
      49             :   void updateEdgeNeighbors();
      50             :   void initCrackTipTopology();
      51             :   void addElemEdgeIntersection(unsigned int elemid, unsigned int edgeid, double position);
      52             :   void addElemNodeIntersection(unsigned int elemid, unsigned int nodeid);
      53             :   bool addFragEdgeIntersection(unsigned int elemid, unsigned int frag_edge_id, double position);
      54             :   void addElemFaceIntersection(unsigned int elemid,
      55             :                                unsigned int faceid,
      56             :                                const std::vector<unsigned int> & edgeid,
      57             :                                const std::vector<double> & position);
      58             :   void addFragFaceIntersection(unsigned int ElemID,
      59             :                                unsigned int FragFaceID,
      60             :                                const std::vector<unsigned int> & FragFaceEdgeID,
      61             :                                const std::vector<double> & position);
      62             : 
      63             :   void updatePhysicalLinksAndFragments();
      64             : 
      65             :   void updateTopology(bool mergeUncutVirtualEdges = true);
      66             :   void reset();
      67             :   void clearAncestry();
      68             :   void restoreFragmentInfo(EFAElement * const elem, const EFAElement * const from_elem);
      69             : 
      70             :   void createChildElements();
      71             :   void connectFragments(bool mergeUncutVirtualEdges);
      72             : 
      73             :   void sanityCheck();
      74             :   void updateCrackTipElements();
      75             :   void printMesh();
      76             :   void error(const std::string & error_string);
      77             : 
      78        1636 :   const std::vector<EFAElement *> & getChildElements() { return _child_elements; };
      79        1636 :   const std::vector<EFAElement *> & getParentElements() { return _parent_elements; };
      80        1636 :   const std::vector<EFANode *> & getNewNodes() { return _new_nodes; };
      81             :   const std::set<EFAElement *> & getCrackTipElements() { return _crack_tip_elements; };
      82             :   const std::map<unsigned int, EFANode *> & getPermanentNodes() { return _permanent_nodes; }
      83             :   const std::map<unsigned int, EFANode *> & getTempNodes() { return _temp_nodes; }
      84             :   const std::map<unsigned int, EFANode *> & getEmbeddedNodes() { return _embedded_nodes; }
      85             :   EFAElement * getElemByID(unsigned int id);
      86             :   unsigned int getElemIdByNodes(unsigned int * node_id);
      87             :   void clearPotentialIsolatedNodes();
      88             : };

Generated by: LCOV version 1.14