https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
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{
31public:
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
69protected:
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};
const Real p
unsigned int CutSubdomainID
std::unique_ptr< EquationSystems > _equation_systems
Local equation system for exodus output.
std::unordered_map< dof_id_type, Point > _initial_nodes_location
initial nodes location
std::unordered_map< dof_id_type, std::vector< dof_id_type > > _node_to_elem_map
node to element map of cut mesh
std::shared_ptr< MeshBase > getCutterMesh() const
Get the cutter mesh pointer.
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
const CutSubdomainID _positive_id
The CutSubdomainID for the positive side of the cut.
MooseMesh & _mesh
The computation domain mesh.
virtual void calculateNormals()=0
calculate the element normal values for all of the elements.
const CutSubdomainID _negative_id
The CutSubdomainID for the negative side of the cut.
const bool _output_exodus
Output exodus file.
virtual Real calculateSignedDistance(Point p) const =0
Calculate the signed distance for a given point relative to the surface.
ExplicitSystem * _explicit_system
Local explicit system for exodus output.
std::shared_ptr< MeshBase > _cutter_mesh
The cutter mesh.
std::unique_ptr< ExodusII_IO > _exodus_io
Exodus for outputing points and values.
const Function * _func
Velocity function.
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_x
Local variable number for displacement x.
virtual CutSubdomainID getCutSubdomainID(const Node *node) const override
unsigned int _var_num_disp_y
Local variable number for displacement y.
const XFEMMovingInterfaceVelocityBase * _interface_velocity
Pointer to XFEMMovingInterfaceVelocityBase object.
unsigned int _var_num_disp_z
Local variable number for displacement z.
virtual Point nodeNormal(const unsigned int &node_id)=0
return the normal at a node in the cutting mesh
std::unique_ptr< PointLocatorBase > _pl
Pointer to PointLocatorBase object.
const InputParameters & parameters() const