LCOV - code coverage report
Current view: top level - include/geom - face_tri3_subdivision.h (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4229 (6a9aeb) with base 727f46 Lines: 6 7 85.7 %
Date: 2025-08-19 19:27:09 Functions: 6 8 75.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             : #ifndef LIBMESH_FACE_TRI3_SUBDIVISION_H
      21             : #define LIBMESH_FACE_TRI3_SUBDIVISION_H
      22             : 
      23             : 
      24             : // Local includes
      25             : #include "libmesh/face_tri3.h"
      26             : 
      27             : namespace libMesh
      28             : {
      29             : 
      30             : /**
      31             :  * The \p Tri3Subdivision element is a three-noded subdivision surface
      32             :  * shell element used in mechanics calculations.  See also,
      33             :  * miscellaneous_ex11.
      34             :  *
      35             :  * \author Roman Vetter
      36             :  * \author Norbert Stoop
      37             :  * \date 2014
      38             :  * \brief A surface shell element used in mechanics calculations.
      39             :  */
      40             : class Tri3Subdivision final : public Tri3
      41             : {
      42             : public:
      43             : 
      44             :   /**
      45             :    * Constructor without parent specification.
      46             :    */
      47             :   Tri3Subdivision() :
      48             :     Tri3(), _subdivision_updated(false), _is_ghost(false) {}
      49             : 
      50             :   /**
      51             :    * Constructor with parent specification.
      52             :    */
      53             :   Tri3Subdivision(Elem * p);
      54             : 
      55             :   Tri3Subdivision (Tri3Subdivision &&) = delete;
      56             :   Tri3Subdivision (const Tri3Subdivision &) = delete;
      57             :   Tri3Subdivision & operator= (const Tri3Subdivision &) = delete;
      58             :   Tri3Subdivision & operator= (Tri3Subdivision &&) = delete;
      59       62585 :   virtual ~Tri3Subdivision() = default;
      60             : 
      61             :   /**
      62             :    * \returns \p TRI3SUBDIVISION.
      63             :    */
      64      381161 :   virtual ElemType type () const override { return TRI3SUBDIVISION; }
      65             : 
      66             :   /**
      67             :    * \returns \p true if the element map is definitely affine within
      68             :    * numerical tolerances.
      69             :    */
      70        3072 :   virtual bool has_affine_map () const override { return false; }
      71             : 
      72             :   /**
      73             :    * \returns \p true if the Lagrange shape functions on this element
      74             :    * are linear.
      75             :    */
      76           0 :   virtual bool is_linear () const override { return false; }
      77             : 
      78             :   /**
      79             :    * \returns FOURTH.
      80             :    */
      81             :   virtual Order default_order() const override;
      82             : 
      83             :   /**
      84             :    * Prepares the element for use by reordering the nodes such that
      85             :    * the irregular node (valence != 6), if there is one, is the first.
      86             :    * The nodes are ordered once in advance for efficiency.
      87             :    */
      88             :   void prepare_subdivision_properties();
      89             : 
      90             :   /**
      91             :    * \returns \p true if the subdivision element is ready for use,
      92             :    * i.e. the nodes have been reordered.
      93             :    */
      94        3360 :   bool is_subdivision_updated() const { return _subdivision_updated; }
      95             : 
      96             :   /**
      97             :    * \returns A pointer to the node whose ordered id is \p node_id.
      98             :    */
      99             :   Node * get_ordered_node(unsigned int node_id) const;
     100             : 
     101             :   /**
     102             :    * \returns The number of nodes connected to the ordered node
     103             :    * whose id is \p node_id.
     104             :    */
     105             :   unsigned int get_ordered_valence(unsigned int node_id) const;
     106             : 
     107             :   /**
     108             :    * \returns The order number of the node whose unordered id is
     109             :    * \p node_id. This is the inverse of an \p _ordered_nodes lookup.
     110             :    */
     111             :   unsigned int local_node_number(unsigned int node_id) const;
     112             : 
     113             :   /**
     114             :    * \returns \p true if the element is a ghost element.
     115             :    */
     116       64554 :   bool is_ghost() const { return _is_ghost; }
     117             : 
     118             :   /**
     119             :    * Sets the boolean flag identifying ghost elements.
     120             :    */
     121        4828 :   void set_ghost(bool ghosted) { _is_ghost = ghosted; }
     122             : 
     123             : private:
     124             : 
     125             :   /**
     126             :    * A list containing the ordered nodes such that the irregular
     127             :    * node (valence != 6), if there is one, is the first.
     128             :    */
     129             :   Node * _ordered_nodes[3];
     130             : 
     131             :   /**
     132             :    * \p true if the subdivision element is ready for use,
     133             :    * i.e. the nodes have been reordered.
     134             :    */
     135             :   bool _subdivision_updated;
     136             : 
     137             :   /**
     138             :    * \p true if the element is a ghost element
     139             :    * (e.g. for boundary conditions).
     140             :    */
     141             :   bool _is_ghost;
     142             : };
     143             : 
     144             : 
     145             : } // namespace libMesh
     146             : 
     147             : #endif // LIBMESH_FACE_TRI3_SUBDIVISION_H

Generated by: LCOV version 1.14