https://mooseframework.inl.gov
CutMeshByLevelSetGeneratorBase.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 #include "MeshGenerator.h"
12 
13 #include "FunctionParserUtils.h"
14 
21 {
22 public:
24 
26 
27  std::unique_ptr<MeshBase> generate() override;
28 
30  enum class PointLevelSetRelationIndex : short int
31  {
33  level_set_in_side = -1,
34  on_level_set = 0
35  };
36 
37 protected:
39  const MeshGeneratorName _input_name;
45  const BoundaryName _cut_face_name;
53  std::unique_ptr<MeshBase> & _input;
56 
63 
71  Point pointPairLevelSetInterception(const Point & point1, const Point & point2);
72 
83  void tet4ElemCutter(ReplicatedMesh & mesh,
84  const std::vector<libMesh::BoundaryInfo::BCTuple> & bdry_side_list,
85  const dof_id_type elem_id,
86  const subdomain_id_type & block_id_to_remove,
87  std::vector<const Node *> & new_on_plane_nodes);
88 
98  const Node * nonDuplicateNodeCreator(ReplicatedMesh & mesh,
99  std::vector<const Node *> & new_on_plane_nodes,
100  const Point & new_point) const;
101 
107  Real levelSetEvaluator(const Point & point);
108 };
std::unique_ptr< MeshBase > & _input
Reference to input mesh pointer.
const SubdomainName _converted_pyramid_element_subdomain_name_suffix
The suffix to be added to the original subdomain name for the subdomains containing the elements conv...
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
This CutMeshByLevelSetGeneratorBase object is designed to be the base class of mesh generator that cu...
SymFunctionPtr _func_level_set
function parser object describing the level set
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseBase.h:127
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
PointLevelSetRelationIndex pointLevelSetRelation(const Point &point)
Evaluate whether a point is on the level set, inside or outside the level set.
const bool _generate_transition_layer
Whether to generate a transition layer for the cut mesh.
const BoundaryName _cut_face_name
The boundary name of the surface generated by the cut.
Real levelSetEvaluator(const Point &point)
Evaluate the level set function at a given point.
const SubdomainName _converted_tet_element_subdomain_name_suffix
The suffix to be added to the original subdomain name for the subdomains containing the elements conv...
int8_t boundary_id_type
PointLevelSetRelationIndex
An enum class for style of input polygon size.
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
Point pointPairLevelSetInterception(const Point &point1, const Point &point2)
Calculate the intersection point of a level set and a line segment defined by two points separated by...
const Node * nonDuplicateNodeCreator(ReplicatedMesh &mesh, std::vector< const Node *> &new_on_plane_nodes, const Point &new_point) const
Check if a position on a plane has already been used as a node in the mesh.
CutMeshByLevelSetGeneratorBase(const InputParameters &parameters)
boundary_id_type _cut_face_id
The boundary id of the surface generated by the cut.
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
void tet4ElemCutter(ReplicatedMesh &mesh, const std::vector< libMesh::BoundaryInfo::BCTuple > &bdry_side_list, const dof_id_type elem_id, const subdomain_id_type &block_id_to_remove, std::vector< const Node *> &new_on_plane_nodes)
For a TET4 elements crossed by the level set, keep the part of the element on the retaining side of t...
MeshGenerators are objects that can modify or add to an existing mesh.
Definition: MeshGenerator.h:32
void ErrorVector unsigned int
const MeshGeneratorName _input_name
Name of the input mesh.
uint8_t dof_id_type