www.mooseframework.org
XFEMMarkerAux.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
3 /* */
4 /* All contents are licensed under LGPL V2.1 */
5 /* See LICENSE for full restrictions */
6 /****************************************************************/
7 
8 #include "XFEMMarkerAux.h"
9 
10 #include "XFEM.h"
11 
12 template <>
13 InputParameters
15 {
16  InputParameters params = validParams<AuxKernel>();
17  return params;
18 }
19 
20 XFEMMarkerAux::XFEMMarkerAux(const InputParameters & parameters) : AuxKernel(parameters)
21 {
22  FEProblemBase * fe_problem = dynamic_cast<FEProblemBase *>(&_subproblem);
23  if (fe_problem == NULL)
24  mooseError("Problem casting _subproblem to FEProblemBase in XFEMMarkerAux");
25  _xfem = MooseSharedNamespace::dynamic_pointer_cast<XFEM>(fe_problem->getXFEM());
26  if (_xfem == NULL)
27  mooseError("Problem casting to XFEM in XFEMMarkerAux");
28  if (isNodal())
29  mooseError("XFEMMarkerAux can only be run on an element variable");
30 }
31 
32 Real
34 {
35  bool isCTE = _xfem->isElemAtCrackTip(_current_elem);
36  Real value = 0.0;
37  if (isCTE)
38  {
39  value = 1.0;
40  }
41 
42  return value;
43 }
XFEMMarkerAux(const InputParameters &parameters)
Definition: XFEMMarkerAux.C:20
This is the XFEM class.
Definition: XFEM.h:60
virtual Real computeValue()
Definition: XFEMMarkerAux.C:33
InputParameters validParams< XFEMMarkerAux >()
Definition: XFEMMarkerAux.C:14
MooseSharedPointer< XFEM > _xfem
Definition: XFEMMarkerAux.h:26