LCOV - code coverage report
Current view: top level - src/efa - EFAFuncs.C (source / functions) Hit Total Coverage
Test: idaholab/moose xfem: #31405 (292dce) with base fef103 Lines: 10 21 47.6 %
Date: 2025-09-04 07:58:55 Functions: 2 4 50.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 "EFAFuncs.h"
      11             : 
      12             : namespace Efa
      13             : {
      14             : 
      15             : double
      16       12216 : linearQuadShape2D(unsigned int node_id, std::vector<double> & xi_2d)
      17             : {
      18       12216 :   double node_xi[4][2] = {{-1.0, -1.0}, {1.0, -1.0}, {1.0, 1.0}, {-1.0, 1.0}};
      19       12216 :   return 0.25 * (1.0 + node_xi[node_id][0] * xi_2d[0]) * (1.0 + node_xi[node_id][1] * xi_2d[1]);
      20             : }
      21             : 
      22             : double
      23        9504 : linearTriShape2D(unsigned int node_id, std::vector<double> & xi_2d)
      24             : {
      25        9504 :   std::vector<double> area_xi(3, 0.0);
      26        9504 :   area_xi[0] = xi_2d[0];
      27        9504 :   area_xi[1] = xi_2d[1];
      28        9504 :   area_xi[2] = 1.0 - xi_2d[0] - xi_2d[1];
      29       19008 :   return area_xi[node_id];
      30        9504 : }
      31             : 
      32             : double
      33           0 : linearHexShape3D(unsigned int node_id, std::vector<double> & xi_3d)
      34             : {
      35           0 :   double node_xi[8][3] = {{-1.0, -1.0, -1.0},
      36             :                           {1.0, -1.0, -1.0},
      37             :                           {1.0, 1.0, -1.0},
      38             :                           {-1.0, 1.0, -1.0},
      39             :                           {-1.0, -1.0, 1.0},
      40             :                           {1.0, -1.0, 1.0},
      41             :                           {1.0, 1.0, 1.0},
      42             :                           {-1.0, 1.0, 1.0}};
      43           0 :   return 0.125 * (1.0 + node_xi[node_id][0] * xi_3d[0]) * (1.0 + node_xi[node_id][1] * xi_3d[1]) *
      44           0 :          (1.0 + node_xi[node_id][2] * xi_3d[2]);
      45             : }
      46             : 
      47             : double
      48           0 : linearTetShape3D(unsigned int node_id, std::vector<double> & xi_3d)
      49             : {
      50           0 :   std::vector<double> vol_xi(4, 0.0);
      51           0 :   for (unsigned int i = 0; i < 3; ++i)
      52           0 :     vol_xi[i] = xi_3d[i];
      53           0 :   vol_xi[3] = 1.0 - xi_3d[0] - xi_3d[1] - xi_3d[2];
      54           0 :   return vol_xi[node_id];
      55           0 : }
      56             : 
      57             : } // namespace Efa

Generated by: LCOV version 1.14