www.mooseframework.org
Public Member Functions | Protected Attributes | Private Attributes | List of all members
TestCrackCounter Class Reference

#include <TestCrackCounter.h>

Inheritance diagram for TestCrackCounter:
[legend]

Public Member Functions

 TestCrackCounter (const InputParameters &parameters)
 
virtual void initialize ()
 Initialize the number of Cracks. More...
 
virtual void execute ()
 Calculates the number of Cracks. More...
 
virtual Real getValue ()
 Get number of Cracks. More...
 

Protected Attributes

unsigned int _number_of_cracks
 Variable used to write out the number of Cracks. More...
 

Private Attributes

std::shared_ptr< XFEM_xfem
 

Detailed Description

Definition at line 21 of file TestCrackCounter.h.

Constructor & Destructor Documentation

◆ TestCrackCounter()

TestCrackCounter::TestCrackCounter ( const InputParameters &  parameters)

Definition at line 26 of file TestCrackCounter.C.

27  : GeneralPostprocessor(parameters), _number_of_cracks(0)
28 {
29  FEProblemBase * fe_problem = dynamic_cast<FEProblemBase *>(&_subproblem);
30  if (fe_problem == nullptr)
31  mooseError("Problem casting _subproblem to FEProblemBase in TestCrackCounter");
32  _xfem = MooseSharedNamespace::dynamic_pointer_cast<XFEM>(fe_problem->getXFEM());
33  if (_xfem == nullptr)
34  mooseError("Problem casting to XFEM in TestCrackCounter");
35 }

Member Function Documentation

◆ execute()

void TestCrackCounter::execute ( )
virtual

Calculates the number of Cracks.

Definition at line 44 of file TestCrackCounter.C.

45 {
46  const std::map<const Elem *, std::vector<Point>> & crack_origins_map =
47  _xfem->getCrackTipOriginMap();
48 
49  _number_of_cracks = crack_origins_map.size();
50 }

◆ getValue()

Real TestCrackCounter::getValue ( )
virtual

Get number of Cracks.

Definition at line 53 of file TestCrackCounter.C.

54 {
55  return _number_of_cracks;
56 }

◆ initialize()

void TestCrackCounter::initialize ( )
virtual

Initialize the number of Cracks.

Definition at line 38 of file TestCrackCounter.C.

39 {
41 }

Member Data Documentation

◆ _number_of_cracks

unsigned int TestCrackCounter::_number_of_cracks
protected

Variable used to write out the number of Cracks.

Definition at line 37 of file TestCrackCounter.h.

Referenced by execute(), getValue(), and initialize().

◆ _xfem

std::shared_ptr<XFEM> TestCrackCounter::_xfem
private

Definition at line 40 of file TestCrackCounter.h.

Referenced by execute(), and TestCrackCounter().


The documentation for this class was generated from the following files:
TestCrackCounter::_number_of_cracks
unsigned int _number_of_cracks
Variable used to write out the number of Cracks.
Definition: TestCrackCounter.h:37
TestCrackCounter::_xfem
std::shared_ptr< XFEM > _xfem
Definition: TestCrackCounter.h:40