https://mooseframework.inl.gov
InterfaceMeshCutUserObjectBase.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 "GeometricCutUserObject.h"
13 #include "libmesh/exodusII_io.h"
14 #include "libmesh/explicit_system.h"
15 #include "libmesh/equation_systems.h"
16 #include "Function.h"
17 #include "libmesh/enum_to_string.h"
18 #include "XFEMFuncs.h"
19 
28 
30 {
31 public:
33 
35 
36  virtual void initialSetup() override;
37 
38  virtual void initialize() override;
39 
40  virtual const std::vector<Point>
41  getCrackFrontPoints(unsigned int num_crack_front_points) const override;
42 
43  virtual const std::vector<RealVectorValue>
44  getCrackPlaneNormals(unsigned int num_crack_front_points) const override;
45 
47  std::shared_ptr<MeshBase> getCutterMesh() const { return _cutter_mesh; };
48 
57  virtual Real calculateSignedDistance(Point p) const = 0;
58 
60  virtual Point nodeNormal(const unsigned int & node_id) = 0;
61 
65  virtual void calculateNormals() = 0;
66 
67  virtual CutSubdomainID getCutSubdomainID(const Node * node) const override;
68 
69 protected:
71  std::shared_ptr<MeshBase> _cutter_mesh;
73  std::unordered_map<dof_id_type, std::vector<dof_id_type>> _node_to_elem_map;
75  std::unordered_map<dof_id_type, Point> _initial_nodes_location;
79  const Function * _func;
83  std::unique_ptr<PointLocatorBase> _pl;
85  std::unique_ptr<ExodusII_IO> _exodus_io;
87  ExplicitSystem * _explicit_system;
89  std::unique_ptr<EquationSystems> _equation_systems;
91  const bool _output_exodus;
97  unsigned int _var_num_disp_x;
99  unsigned int _var_num_disp_y;
101  unsigned int _var_num_disp_z;
102 };
std::unique_ptr< ExodusII_IO > _exodus_io
Exodus for outputing points and values.
virtual void calculateNormals()=0
calculate the element normal values for all of the elements.
InterfaceMeshCutUserObjectBase(const InputParameters &parameters)
const XFEMMovingInterfaceVelocityBase * _interface_velocity
Pointer to XFEMMovingInterfaceVelocityBase object.
std::unordered_map< dof_id_type, Point > _initial_nodes_location
initial nodes location
const CutSubdomainID _negative_id
The CutSubdomainID for the negative side of the cut.
std::shared_ptr< MeshBase > getCutterMesh() const
Get the cutter mesh pointer.
unsigned int CutSubdomainID
Definition: XFEMAppTypes.h:18
const Function * _func
Velocity function.
virtual Point nodeNormal(const unsigned int &node_id)=0
return the normal at a node in the cutting mesh
unsigned int _var_num_disp_x
Local variable number for displacement x.
virtual const std::vector< RealVectorValue > getCrackPlaneNormals(unsigned int num_crack_front_points) const override
get a set of normal vectors along a crack front from a XFEM GeometricCutUserObject ...
unsigned int _var_num_disp_y
Local variable number for displacement y.
virtual Real calculateSignedDistance(Point p) const =0
Calculate the signed distance for a given point relative to the surface.
MooseMesh & _mesh
The computation domain mesh.
std::shared_ptr< MeshBase > _cutter_mesh
The cutter mesh.
unsigned int _var_num_disp_z
Local variable number for displacement z.
const bool _output_exodus
Output exodus file.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
std::unique_ptr< EquationSystems > _equation_systems
Local equation system for exodus output.
const InputParameters & parameters() const
ExplicitSystem * _explicit_system
Local explicit system for exodus output.
virtual const std::vector< Point > getCrackFrontPoints(unsigned int num_crack_front_points) const override
get a set of points along a crack front from a XFEM GeometricCutUserObject
virtual CutSubdomainID getCutSubdomainID(const Node *node) const override
std::unordered_map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
node to element map of cut mesh
std::unique_ptr< PointLocatorBase > _pl
Pointer to PointLocatorBase object.
const CutSubdomainID _positive_id
The CutSubdomainID for the positive side of the cut.