https://mooseframework.inl.gov
Loading...
Searching...
No Matches
MeshCut2DNucleationBase.h
Go to the documentation of this file.
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
14class XFEM;
15
17{
18public:
20
22
23 virtual void initialize() override;
24 virtual void execute() override;
25 virtual void threadJoin(const UserObject & y) override;
26 virtual void finalize() override;
32 std::map<unsigned int, std::pair<RealVectorValue, RealVectorValue>> getNucleatedElemsMap() const
33 {
34 return _nucleated_elems;
35 }
40 Real getNucleationRadius() const { return _nucleation_radius; }
41
42protected:
48 virtual bool doesElementCrack(std::pair<RealVectorValue, RealVectorValue> & cutterElemNodes) = 0;
49
50private:
53 // New cracks can only be nucleated if they are at least this far from another crack
56 std::shared_ptr<XFEM> _xfem;
57 // Boundaries where cracks can nucleate
58 std::vector<BoundaryID> _initiation_boundary_ids;
59 // map with key for element id and value is a pair containing the node points for creating a
60 // nucleated element on the xfem cutter mesh.
61 std::map<unsigned int, std::pair<RealVectorValue, RealVectorValue>> _nucleated_elems;
62};
const std::vector< double > y
MooseMesh & _mesh
The FE solution mesh.
virtual void execute() override
static InputParameters validParams()
virtual void finalize() override
virtual bool doesElementCrack(std::pair< RealVectorValue, RealVectorValue > &cutterElemNodes)=0
Determine whether the current element should be cut by a new crack.
virtual void initialize() override
std::map< unsigned int, std::pair< RealVectorValue, RealVectorValue > > _nucleated_elems
std::map< unsigned int, std::pair< RealVectorValue, RealVectorValue > > getNucleatedElemsMap() const
Provide getter to MeshCut2DUserObjectBase for a map of nucleated cracks.
virtual void threadJoin(const UserObject &y) override
std::shared_ptr< XFEM > _xfem
shared pointer to XFEM
Real getNucleationRadius() const
Provide getter to MeshCut2DUserObjectBase for member data set in input.
std::vector< BoundaryID > _initiation_boundary_ids
const InputParameters & parameters() const
This is the XFEM class.
Definition XFEM.h:108