Line data Source code
1 : //* This file is part of the MOOSE framework 2 : //* https://mooseframework.inl.gov 3 : //* 4 : //* All rights reserved, see COPYRIGHT for full restrictions 5 : //* https://github.com/idaholab/moose/blob/master/COPYRIGHT 6 : //* 7 : //* Licensed under LGPL 2.1, please see LICENSE for details 8 : //* https://www.gnu.org/licenses/lgpl-2.1.html 9 : 10 : #pragma once 11 : 12 : #include "MeshCut2DNucleationBase.h" 13 : #include "RankTwoTensorForward.h" 14 : 15 : class MeshCut2DRankTwoTensorNucleation : public MeshCut2DNucleationBase 16 : { 17 : public: 18 : static InputParameters validParams(); 19 : 20 : MeshCut2DRankTwoTensorNucleation(const InputParameters & parameters); 21 32 : virtual ~MeshCut2DRankTwoTensorNucleation() {} 22 : 23 : protected: 24 : /// scaling factor to extend the nucleated crack beyond the element edges. 25 : const Real _edge_extension_factor; 26 : 27 : /// should element be cut if the nucleation_length is smaller than the element length. 28 : const bool _nucleate_across_full_element; 29 : 30 : /// is the nucleation length provided in the input file. 31 : const bool _is_nucleation_length_provided; 32 : 33 : /// Length of the nucleated cracks 34 : const Real _nucleation_length; 35 : 36 : /// The tensor from which the scalar quantity used as a nucleating criterion is extracted 37 : const MaterialProperty<RankTwoTensor> & _tensor; 38 : 39 : /// Threshold at which a crack is nucleated if exceeded 40 : const VariableValue & _nucleation_threshold; 41 : 42 : /// The type of scalar to be extracted from the tensor 43 : MooseEnum _scalar_type; 44 : 45 : /// Points used to define an axis of rotation for some scalar quantities 46 : const Point _point1; 47 : const Point _point2; 48 : 49 : /// Transformed Jacobian weights 50 : const MooseArray<Real> & _JxW; 51 : const MooseArray<Real> & _coord; 52 : 53 : virtual bool 54 : doesElementCrack(std::pair<RealVectorValue, RealVectorValue> & cutterElemNodes) override; 55 : 56 : // FIXME Lynn Copy from TraceRayTools.C in rayTracing module. Remove once this function migrates 57 : // to libmesh. 58 : bool lineLineIntersect2D(const Point & start, 59 : const Point & direction, 60 : const Real length, 61 : const Point & v0, 62 : const Point & v1, 63 : Point & intersection_point, 64 : Real & intersection_distance); 65 : };