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
 

Detailed Description

Definition at line 24 of file CrackFrontData.h.

Constructor & Destructor Documentation

CrackFrontData::CrackFrontData ( const InputParameters &  parameters)

Definition at line 33 of file CrackFrontData.C.

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

Member Function Documentation

virtual void CrackFrontData::execute ( )
inlinevirtual

Definition at line 30 of file CrackFrontData.h.

30 {}
Real CrackFrontData::getValue ( )
virtual

This will return the degrees of freedom in the system.

Definition at line 63 of file CrackFrontData.C.

Referenced by execute().

64 {
65  Real value = 0;
66 
67  if (_crack_front_node->processor_id() == processor_id())
68  value = _subproblem.getVariable(_tid, _var_name).getNodalValue(*_crack_front_node);
69 
70  gatherSum(value);
71 
72  return _scale_factor * value;
73 }
const Real _scale_factor
std::string _var_name
const Node * _crack_front_node
void CrackFrontData::initialize ( )
virtual

Definition at line 51 of file CrackFrontData.C.

52 {
53  if (!(_crack_front_point_index < _crack_front_definition->getNumCrackFrontPoints()))
54  mooseError("crack_front_point_index out of range in CrackFrontData");
56  mooseError("CrackFrontData not currently supported if crack front is defined with points "
57  "rather than nodes");
58 
60 }
const CrackFrontDefinition *const _crack_front_definition
const unsigned int _crack_front_point_index
bool hasCrackFrontNodes() const
const Node * _crack_front_node
const Node * getCrackFrontNodePtr(const unsigned int node_index) const

Member Data Documentation

const CrackFrontDefinition* const CrackFrontData::_crack_front_definition
protected

Definition at line 38 of file CrackFrontData.h.

Referenced by initialize().

const Node* CrackFrontData::_crack_front_node
protected

Definition at line 40 of file CrackFrontData.h.

Referenced by getValue(), and initialize().

const unsigned int CrackFrontData::_crack_front_point_index
protected

Definition at line 39 of file CrackFrontData.h.

Referenced by initialize().

MooseMesh& CrackFrontData::_mesh
protected

Definition at line 41 of file CrackFrontData.h.

const Real CrackFrontData::_scale_factor
protected

Definition at line 43 of file CrackFrontData.h.

Referenced by getValue().

std::string CrackFrontData::_var_name
protected

Definition at line 42 of file CrackFrontData.h.

Referenced by CrackFrontData(), and getValue().


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