13#include "libmesh/string_to_enum.h"
16#include "libmesh/edge_edge2.h"
17#include "libmesh/serial_mesh.h"
18#include "libmesh/mesh_tools.h"
27 params.
addClassDescription(
"Creates a UserObject for a mesh cutter in 2D problems where crack "
28 "growth is specified by functions.");
30 "Function defining x-component of crack growth direction.");
32 "Function defining y-component of crack growth direction.");
33 params.
addRequiredParam<FunctionName>(
"growth_rate",
"Function defining crack growth rate.");
39 _func_x(&getFunction(
"growth_direction_x")),
40 _func_y(&getFunction(
"growth_direction_y")),
41 _growth_function(&getFunction(
"growth_rate")),
42 _time_of_previous_call_to_UO(
std::numeric_limits<Real>::lowest())
73 mooseAssert(this_node,
"Node is NULL");
74 Point & this_point = *this_node;
77 dir = dir / dir.norm();
82 nodal_offset = dir * velo *
_dt;
84 if (!nodal_offset.absolute_fuzzy_equals(zero))
registerMooseObject("XFEMApp", MeshCut2DFunctionUserObject)
void isCutterModified(const bool is_cutter_modified)
Set the value of _is_cutter_modified.
virtual Real value(Real t, const Point &p) const
MeshCut2DFunctionUserObject: (1) reads in a mesh describing the crack surface, (2) uses the mesh to d...
const Function * _func_x
Parsed functions of front growth.
static InputParameters validParams()
const Function * _growth_function
MeshCut2DFunctionUserObject(const InputParameters ¶meters)
Real _time_of_previous_call_to_UO
Gets the time of the previous call to this user object.
virtual void findActiveBoundaryGrowth() override
Find growth direction at each active node.
virtual void initialize() override
MeshCut2DUserObjectBase: (1) reads in a mesh describing the crack surface, (2) Fills xfem cut element...
void addNucleatedCracksToMesh()
Calls into MeshCutNucleation UO to add cracks.
void growFront()
grow the cutter mesh
static InputParameters validParams()
std::vector< std::pair< dof_id_type, dof_id_type > > _original_and_current_front_node_ids
This vector of pairs orders crack tips to make the order used in this class the same as those for the...
std::vector< std::pair< dof_id_type, Point > > _active_front_node_growth_vectors
contains the active node ids and their growth vectors
bool _is_mesh_modified
Indicator that shows if the cutting mesh is modified or not in this calculation step.
CrackFrontDefinition * _crack_front_definition
user object for communicating between solid_mechanics interaction integrals and xfem cutter mesh
std::unique_ptr< MeshBase > _cutter_mesh
The xfem cutter mesh.