https://mooseframework.inl.gov
Loading...
Searching...
No Matches
XFEMMarkerAux.C
Go to the documentation of this file.
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
15
18{
20 params.addClassDescription("Identify the crack tip elements.");
21 return params;
22}
23
25{
26 FEProblemBase * fe_problem = dynamic_cast<FEProblemBase *>(&_subproblem);
27 if (fe_problem == nullptr)
28 mooseError("Problem casting _subproblem to FEProblemBase in XFEMMarkerAux");
29 _xfem = MooseSharedNamespace::dynamic_pointer_cast<XFEM>(fe_problem->getXFEM());
30 if (_xfem == nullptr)
31 mooseError("Problem casting to XFEM in XFEMMarkerAux");
32 if (isNodal())
33 mooseError("XFEMMarkerAux can only be run on an element variable");
34}
35
36Real
38{
39 bool isCTE = _xfem->isElemAtCrackTip(_current_elem);
40 Real value = 0.0;
41 if (isCTE)
42 {
43 value = 1.0;
44 }
45
46 return value;
47}
registerMooseObject("XFEMApp", XFEMMarkerAux)
SubProblem & _subproblem
const Elem *const & _current_elem
static InputParameters validParams()
std::shared_ptr< XFEMInterface > getXFEM()
void addClassDescription(const std::string &doc_string)
void mooseError(Args &&... args) const
virtual const OutputTools< ComputeValueType >::VariableValue & value()
static InputParameters validParams()
XFEMMarkerAux(const InputParameters &parameters)
virtual Real computeValue()
std::shared_ptr< XFEM > _xfem