LCOV - code coverage report
Current view: top level - include/fe - h1_fe_transformation.h (source / functions) Hit Total Coverage
Test: libMesh/libmesh: #4229 (6a9aeb) with base 727f46 Lines: 3 3 100.0 %
Date: 2025-08-19 19:27:09 Functions: 6 6 100.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             : #ifndef LIBMESH_H1_FE_TRANSFORMATION_H
      19             : #define LIBMESH_H1_FE_TRANSFORMATION_H
      20             : 
      21             : #include "libmesh/fe_transformation_base.h"
      22             : #include "libmesh/compare_types.h"
      23             : 
      24             : namespace libMesh
      25             : {
      26             : 
      27             : // Forward declarations
      28             : class Elem;
      29             : 
      30             : /**
      31             :  * This class handles the computation of the shape functions in the
      32             :  * physical domain for H1 conforming elements. This class assumes the
      33             :  * \p FEGenericBase object has been initialized in the reference
      34             :  * domain (i.e. \p init_shape_functions has been called).
      35             :  *
      36             :  * \author Paul T. Bauman
      37             :  * \date 2012
      38             :  */
      39             : template<typename OutputShape>
      40             : class H1FETransformation : public FETransformationBase<OutputShape>
      41             : {
      42             : public:
      43             : 
      44    14752410 :   H1FETransformation()
      45    14752410 :     : FETransformationBase<OutputShape>() {}
      46             : 
      47    15577021 :   virtual ~H1FETransformation() = default;
      48             : 
      49             :   /**
      50             :    * Pre-requests any necessary data from FEMap
      51             :    */
      52             :   virtual void init_map_phi(const FEGenericBase<OutputShape> & fe) const override;
      53             : 
      54             :   /**
      55             :    * Pre-requests any necessary data from FEMap
      56             :    */
      57             :   virtual void init_map_dphi(const FEGenericBase<OutputShape> & fe) const override;
      58             : 
      59             :   /**
      60             :    * Pre-requests any necessary data from FEMap
      61             :    */
      62             :   virtual void init_map_d2phi(const FEGenericBase<OutputShape> & fe) const override;
      63             : 
      64             :   /**
      65             :    * Evaluates shape functions in physical coordinates for H1
      66             :    * conforming elements.  In this case \f$ \phi(x) = \phi(\xi) \f$
      67             :    */
      68             :   virtual void map_phi(const unsigned int,
      69             :                        const Elem * const,
      70             :                        const std::vector<Point> &,
      71             :                        const FEGenericBase<OutputShape> &,
      72             :                        std::vector<std::vector<OutputShape>> &,
      73             :                        bool add_p_level = true) const override;
      74             : 
      75             :   /**
      76             :    * Evaluates shape function gradients in physical coordinates for H1
      77             :    * conforming elements. dphi/dx = dphi/dxi * dxi/dx, etc.
      78             :    */
      79             :   virtual void map_dphi(const unsigned int dim,
      80             :                         const Elem * const elem,
      81             :                         const std::vector<Point> & qp,
      82             :                         const FEGenericBase<OutputShape> & fe,
      83             :                         std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputGradient>> & dphi,
      84             :                         std::vector<std::vector<OutputShape>> & dphidx,
      85             :                         std::vector<std::vector<OutputShape>> & dphidy,
      86             :                         std::vector<std::vector<OutputShape>> & dphidz) const override;
      87             : 
      88             : #ifdef LIBMESH_ENABLE_SECOND_DERIVATIVES
      89             :   /**
      90             :    * Evaluates shape function Hessians in physical coordinates based
      91             :    * on H1 conforming finite element transformation.
      92             :    */
      93             :   virtual void map_d2phi(const unsigned int dim,
      94             :                          const std::vector<Point> & qp,
      95             :                          const FEGenericBase<OutputShape> & fe,
      96             :                          std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputTensor>> & d2phi,
      97             :                          std::vector<std::vector<OutputShape>> & d2phidx2,
      98             :                          std::vector<std::vector<OutputShape>> & d2phidxdy,
      99             :                          std::vector<std::vector<OutputShape>> & d2phidxdz,
     100             :                          std::vector<std::vector<OutputShape>> & d2phidy2,
     101             :                          std::vector<std::vector<OutputShape>> & d2phidydz,
     102             :                          std::vector<std::vector<OutputShape>> & d2phidz2) const override;
     103             : #endif //LIBMESH_ENABLE_SECOND_DERIVATIVES
     104             : 
     105             :   /**
     106             :    * Evaluates the shape function curl in physical coordinates based
     107             :    * on H1 conforming finite element transformation.
     108             :    */
     109             :   virtual void map_curl(const unsigned int dim,
     110             :                         const Elem * const elem,
     111             :                         const std::vector<Point> & qp,
     112             :                         const FEGenericBase<OutputShape> & fe,
     113             :                         std::vector<std::vector<OutputShape>> & curl_phi) const override;
     114             : 
     115             :   /**
     116             :    * Evaluates the shape function divergence in physical coordinates
     117             :    * based on H1 conforming finite element transformation.
     118             :    */
     119             :   virtual void map_div(const unsigned int dim,
     120             :                        const Elem * const elem,
     121             :                        const std::vector<Point> & qp,
     122             :                        const FEGenericBase<OutputShape> & fe,
     123             :                        std::vector<std::vector<typename FEGenericBase<OutputShape>::OutputDivergence>> & div_phi) const override;
     124             : 
     125             : }; // class H1FETransformation
     126             : 
     127             : }
     128             : 
     129             : #endif // LIBMESH_H1_FE_TRANSFORMATION_H

Generated by: LCOV version 1.14