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 "ElementUserObject.h" 13 : 14 : /** 15 : * Base class for crack front points provider 16 : */ 17 : class CrackFrontPointsProvider : public ElementUserObject 18 : { 19 : public: 20 : static InputParameters validParams(); 21 : 22 : CrackFrontPointsProvider(const InputParameters & parameters, const bool uses_mesh = false); 23 : 24 : /** Get the current number of crack front points 25 : * @return The current number of crack front points 26 : */ 27 : virtual unsigned int getNumberOfCrackFrontPoints() const = 0; 28 : 29 : /** get a set of points along a crack front from a XFEM GeometricCutUserObject 30 : * @return A vector which contains all crack front points 31 : */ 32 : virtual const std::vector<Point> 33 : getCrackFrontPoints(unsigned int /*num_crack_front_points*/) const = 0; 34 : 35 : /** get a set of normal vectors along a crack front from a XFEM GeometricCutUserObject 36 : * @return A vector which contains all crack front normals 37 : */ 38 : virtual const std::vector<RealVectorValue> 39 : getCrackPlaneNormals(unsigned int /*num_crack_front_points*/) const = 0; 40 : 41 : /** 42 : * Getter for if a cutter mesh is used in a derived class. 43 : * @return bool indicating if a cutter mesh is used in the derived class 44 : */ 45 0 : bool usesMesh() const { return _uses_mesh; } 46 : 47 : protected: 48 : /// bool to set if CrackFrontPointsProvider derived objects use a cutter mesh 49 : const bool _uses_mesh; 50 : };