LCOV - code coverage report
Current view: top level - src/auxkernels - XFEMMarkerAux.C (source / functions) Hit Total Coverage
Test: idaholab/moose xfem: #31405 (292dce) with base fef103 Lines: 0 19 0.0 %
Date: 2025-09-04 07:58:55 Functions: 0 3 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             : #include "XFEMMarkerAux.h"
      11             : 
      12             : #include "XFEM.h"
      13             : 
      14             : registerMooseObject("XFEMApp", XFEMMarkerAux);
      15             : 
      16             : InputParameters
      17           0 : XFEMMarkerAux::validParams()
      18             : {
      19           0 :   InputParameters params = AuxKernel::validParams();
      20           0 :   params.addClassDescription("Identify the crack tip elements.");
      21           0 :   return params;
      22           0 : }
      23             : 
      24           0 : XFEMMarkerAux::XFEMMarkerAux(const InputParameters & parameters) : AuxKernel(parameters)
      25             : {
      26           0 :   FEProblemBase * fe_problem = dynamic_cast<FEProblemBase *>(&_subproblem);
      27           0 :   if (fe_problem == nullptr)
      28           0 :     mooseError("Problem casting _subproblem to FEProblemBase in XFEMMarkerAux");
      29           0 :   _xfem = MooseSharedNamespace::dynamic_pointer_cast<XFEM>(fe_problem->getXFEM());
      30           0 :   if (_xfem == nullptr)
      31           0 :     mooseError("Problem casting to XFEM in XFEMMarkerAux");
      32           0 :   if (isNodal())
      33           0 :     mooseError("XFEMMarkerAux can only be run on an element variable");
      34           0 : }
      35             : 
      36             : Real
      37           0 : XFEMMarkerAux::computeValue()
      38             : {
      39           0 :   bool isCTE = _xfem->isElemAtCrackTip(_current_elem);
      40             :   Real value = 0.0;
      41           0 :   if (isCTE)
      42             :   {
      43             :     value = 1.0;
      44             :   }
      45             : 
      46           0 :   return value;
      47             : }

Generated by: LCOV version 1.14