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

#include <CrackFrontData.h>

Inheritance diagram for CrackFrontData:
[legend]

Public Member Functions

 CrackFrontData (const InputParameters &parameters)
 
virtual void initialize ()
 
virtual void execute ()
 
virtual Real getValue ()
 This will return the degrees of freedom in the system. More...
 

Protected Attributes

const CrackFrontDefinition *const _crack_front_definition
 
const unsigned int _crack_front_point_index
 
const Node * _crack_front_node
 
MooseMesh & _mesh
 
std::string _var_name
 
const Real _scale_factor
 
MooseVariableFEBase & _field_var
 

Detailed Description

Definition at line 26 of file CrackFrontData.h.

Constructor & Destructor Documentation

◆ CrackFrontData()

CrackFrontData::CrackFrontData ( const InputParameters &  parameters)

Definition at line 37 of file CrackFrontData.C.

38  : GeneralPostprocessor(parameters),
39  _crack_front_definition(&getUserObject<CrackFrontDefinition>("crack_front_definition")),
40  _crack_front_point_index(isParamValid("crack_front_point_index")
41  ? getParam<unsigned int>("crack_front_point_index")
42  : 0),
43  _crack_front_node(NULL),
44  _mesh(_subproblem.mesh()),
45  _var_name(parameters.get<VariableName>("variable")),
46  _scale_factor(getParam<Real>("scale_factor")),
47  _field_var(_subproblem.getVariable(
48  _tid, _var_name, Moose::VarKindType::VAR_ANY, Moose::VarFieldType::VAR_FIELD_ANY))
49 {
50  if (!_field_var.isNodal())
51  mooseError("CrackFrontData can be output only for nodal variables, variable '",
52  _var_name,
53  "' is not nodal");
54 }
const CrackFrontDefinition *const _crack_front_definition
const Real _scale_factor
const unsigned int _crack_front_point_index
std::string _var_name
MooseMesh & _mesh
MooseVariableFEBase & _field_var
const Node * _crack_front_node

Member Function Documentation

◆ execute()

virtual void CrackFrontData::execute ( )
inlinevirtual

Definition at line 32 of file CrackFrontData.h.

32 {}

◆ getValue()

Real CrackFrontData::getValue ( )
virtual

This will return the degrees of freedom in the system.

Definition at line 69 of file CrackFrontData.C.

70 {
71  Real value = 0;
72 
73  if (_crack_front_node->processor_id() == processor_id())
74  value = _field_var.getNodalValue(*_crack_front_node);
75 
76  gatherSum(value);
77 
78  return _scale_factor * value;
79 }
const Real _scale_factor
MooseVariableFEBase & _field_var
const Node * _crack_front_node

◆ initialize()

void CrackFrontData::initialize ( )
virtual

Definition at line 57 of file CrackFrontData.C.

58 {
59  if (!(_crack_front_point_index < _crack_front_definition->getNumCrackFrontPoints()))
60  mooseError("crack_front_point_index out of range in CrackFrontData");
62  mooseError("CrackFrontData not currently supported if crack front is defined with points "
63  "rather than nodes");
64 
66 }
const CrackFrontDefinition *const _crack_front_definition
const unsigned int _crack_front_point_index
const Node * _crack_front_node
const Node * getCrackFrontNodePtr(const unsigned int node_index) const

Member Data Documentation

◆ _crack_front_definition

const CrackFrontDefinition* const CrackFrontData::_crack_front_definition
protected

Definition at line 40 of file CrackFrontData.h.

Referenced by initialize().

◆ _crack_front_node

const Node* CrackFrontData::_crack_front_node
protected

Definition at line 42 of file CrackFrontData.h.

Referenced by getValue(), and initialize().

◆ _crack_front_point_index

const unsigned int CrackFrontData::_crack_front_point_index
protected

Definition at line 41 of file CrackFrontData.h.

Referenced by initialize().

◆ _field_var

MooseVariableFEBase& CrackFrontData::_field_var
protected

Definition at line 46 of file CrackFrontData.h.

Referenced by CrackFrontData(), and getValue().

◆ _mesh

MooseMesh& CrackFrontData::_mesh
protected

Definition at line 43 of file CrackFrontData.h.

◆ _scale_factor

const Real CrackFrontData::_scale_factor
protected

Definition at line 45 of file CrackFrontData.h.

Referenced by getValue().

◆ _var_name

std::string CrackFrontData::_var_name
protected

Definition at line 44 of file CrackFrontData.h.

Referenced by CrackFrontData().


The documentation for this class was generated from the following files: