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 "GeneralReporter.h" 13 : 14 : /** 15 : * Base class for subcritical crack growth reporters 16 : */ 17 : class CrackMeshCut3DUserObject; 18 : class CrackGrowthReporterBase : public GeneralReporter 19 : { 20 : public: 21 : static InputParameters validParams(); 22 : CrackGrowthReporterBase(const InputParameters & parameters); 23 : virtual void execute() override final; 24 60 : virtual void initialize() override final {} 25 60 : virtual void finalize() override final {} 26 : 27 : protected: 28 : /** 29 : * Compute crack growth increment at the specified crack front point and store increments 30 : * in an internal data structure. 31 : * @param index Vector of crack front point indices from the cutter mesh. 32 : */ 33 : virtual void computeGrowth(std::vector<int> & index) = 0; 34 : 35 : /// cutter mesh object name 36 : const UserObjectName & _cutter_name; 37 : /// 3D mesh cutter object that provides active nodes 38 : CrackMeshCut3DUserObject * _3Dcutter; 39 : /// Maximum crack growth increment allowed for any of the crack front points 40 : const Real _max_growth_increment; 41 : 42 : /// The name of the reporter with K_I fracture integral values 43 : const std::vector<Real> & _ki_vpp; 44 : 45 : ///@{ 46 : /// Crack front point locations where fracture integrals are computed, stored as the 47 : /// x, y, and z coordinates and position along the crack front (id) 48 : const std::vector<Real> & _ki_x; 49 : const std::vector<Real> & _ki_y; 50 : const std::vector<Real> & _ki_z; 51 : const std::vector<Real> & _ki_id; 52 : ///@} 53 : 54 : ///@{ 55 : /// Crack front point locations for output, stored as x, y, and z coordinates and position 56 : /// along the crack front (id) 57 : std::vector<Real> & _x; 58 : std::vector<Real> & _y; 59 : std::vector<Real> & _z; 60 : std::vector<Real> & _id; 61 : ///@} 62 : 63 : private: 64 : /** 65 : * get indexing from the cutter mesh 66 : * @return the cutter mesh index vector 67 : */ 68 : std::vector<int> getCutterMeshIndices() const; 69 : /// copy data into coordinate reporters 70 : void copyCoordinates() const; 71 : };