#include <XFEMRankTwoTensorMarkerUserObject.h>
|
virtual bool | doesElementCrack (RealVectorValue &direction) override |
| Determine whether the current element should be cut by a new crack. More...
|
|
|
const MaterialProperty< RankTwoTensor > & | _tensor |
| The tensor from which the scalar quantity used as a marking criterion is extracted. More...
|
|
MooseEnum | _scalar_type |
| The type of scalar to be extracted from the tensor. More...
|
|
const Point | _point1 |
| Points used to define an axis of rotation for some scalar quantities. More...
|
|
const Point | _point2 |
|
const VariableValue & | _threshold |
| Threshold value of the scalar. More...
|
|
bool | _average |
| Whether to average the value for all quadrature points in an element. More...
|
|
const MooseArray< Real > & | _JxW |
| Transformed Jacobian weights. More...
|
|
const MooseArray< Real > & | _coord |
|
◆ XFEMRankTwoTensorMarkerUserObject()
XFEMRankTwoTensorMarkerUserObject::XFEMRankTwoTensorMarkerUserObject |
( |
const InputParameters & |
parameters | ) |
|
◆ ~XFEMRankTwoTensorMarkerUserObject()
virtual XFEMRankTwoTensorMarkerUserObject::~XFEMRankTwoTensorMarkerUserObject |
( |
| ) |
|
|
inlinevirtual |
◆ doesElementCrack()
bool XFEMRankTwoTensorMarkerUserObject::doesElementCrack |
( |
RealVectorValue & |
direction | ) |
|
|
overrideprotectedvirtual |
Determine whether the current element should be cut by a new crack.
- Parameters
-
direction | Normal direction of crack if it is cracked |
- Returns
- bool true if element cracks
Reimplemented from XFEMMaterialStateMarkerBase.
Definition at line 61 of file XFEMRankTwoTensorMarkerUserObject.C.
63 bool does_it_crack =
false;
64 unsigned int numqp = _qrule->n_points();
69 Real average_threshold = 0.0;
72 for (
unsigned int qp = 0; qp < numqp; ++qp)
75 mooseError(
"Threshold must be strictly positive in XFEMRankTwoTensorMarkerUserObject");
78 average_point +=
_JxW[qp] *
_coord[qp] * _q_point[qp];
83 if (point_dir.absolute_fuzzy_equals(zero))
84 mooseError(
"Direction has zero length in XFEMRankTwoTensorMarkerUserObject");
85 direction = point_dir;
86 if (tensor_quantity > average_threshold)
91 unsigned int max_index = std::numeric_limits<unsigned int>::max();
93 std::vector<Point> directions(numqp);
94 for (
unsigned int qp = 0; qp < numqp; ++qp)
97 mooseError(
"Threshold must be strictly positive in XFEMRankTwoTensorMarkerUserObject");
100 if (directions[qp].absolute_fuzzy_equals(zero))
101 mooseError(
"Direction has zero length in XFEMRankTwoTensorMarkerUserObject");
102 Real ratio = tensor_quantity /
_threshold[qp];
103 if (ratio > max_ratio)
111 if (max_index == std::numeric_limits<unsigned int>::max())
112 mooseError(
"max_index out of bounds in XFEMRankTwoTensorMarkerUserObject");
113 does_it_crack =
true;
114 direction = directions[max_index];
118 return does_it_crack;
◆ execute()
void XFEMMaterialStateMarkerBase::execute |
( |
| ) |
|
|
overridevirtualinherited |
Definition at line 62 of file XFEMMaterialStateMarkerBase.C.
64 RealVectorValue direction;
65 bool isCut =
_xfem->isElemCut(_current_elem);
66 bool isCTE =
_xfem->isElemAtCrackTip(_current_elem);
67 bool isOnBoundary =
false;
68 unsigned int boundarySide = 99999;
69 unsigned int _current_eid = _current_elem->id();
70 std::map<unsigned int, RealVectorValue>::iterator mit;
86 mooseError(
"ERROR: element ", _current_eid,
" already marked for crack growth.");
94 mooseError(
"ERROR: element ", _current_eid,
" already marked for crack growth.");
103 mooseError(
"ERROR: element ", _current_eid,
" already marked for crack growth.");
◆ finalize()
void XFEMMaterialStateMarkerBase::finalize |
( |
| ) |
|
|
overridevirtualinherited |
Definition at line 138 of file XFEMMaterialStateMarkerBase.C.
144 _xfem->clearStateMarkedElems();
145 std::map<unsigned int, RealVectorValue>::iterator mit;
154 _xfem->addStateMarkedFrag(mit->first, mit->second);
158 _xfem->addStateMarkedElem(mit->first, mit->second);
◆ initialize()
void XFEMMaterialStateMarkerBase::initialize |
( |
| ) |
|
|
overridevirtualinherited |
◆ threadJoin()
void XFEMMaterialStateMarkerBase::threadJoin |
( |
const UserObject & |
y | ) |
|
|
overridevirtualinherited |
◆ _average
bool XFEMRankTwoTensorMarkerUserObject::_average |
|
protected |
◆ _coord
const MooseArray<Real>& XFEMRankTwoTensorMarkerUserObject::_coord |
|
protected |
◆ _initiation_boundary_ids
std::vector<BoundaryID> XFEMMaterialStateMarkerBase::_initiation_boundary_ids |
|
privateinherited |
◆ _JxW
const MooseArray<Real>& XFEMRankTwoTensorMarkerUserObject::_JxW |
|
protected |
◆ _marked_elem_sides
std::map<unsigned int, unsigned int> XFEMMaterialStateMarkerBase::_marked_elem_sides |
|
privateinherited |
◆ _marked_elems
std::map<unsigned int, RealVectorValue> XFEMMaterialStateMarkerBase::_marked_elems |
|
privateinherited |
◆ _marked_frags
std::set<unsigned int> XFEMMaterialStateMarkerBase::_marked_frags |
|
privateinherited |
◆ _mesh
MooseMesh& XFEMMaterialStateMarkerBase::_mesh |
|
privateinherited |
◆ _point1
const Point XFEMRankTwoTensorMarkerUserObject::_point1 |
|
protected |
◆ _point2
const Point XFEMRankTwoTensorMarkerUserObject::_point2 |
|
protected |
◆ _scalar_type
MooseEnum XFEMRankTwoTensorMarkerUserObject::_scalar_type |
|
protected |
◆ _secondary_cracks
bool XFEMMaterialStateMarkerBase::_secondary_cracks |
|
privateinherited |
◆ _tensor
const MaterialProperty<RankTwoTensor>& XFEMRankTwoTensorMarkerUserObject::_tensor |
|
protected |
◆ _threshold
const VariableValue& XFEMRankTwoTensorMarkerUserObject::_threshold |
|
protected |
◆ _xfem
std::shared_ptr<XFEM> XFEMMaterialStateMarkerBase::_xfem |
|
privateinherited |
The documentation for this class was generated from the following files: