https://mooseframework.inl.gov
Loading...
Searching...
No Matches
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
12#include "MeshGenerator.h"
13
14#include "FunctionParserUtils.h"
15
22{
23public:
25
27
28 std::unique_ptr<MeshBase> generate() override;
29
31 enum class PointLevelSetRelationIndex : short int
32 {
35 on_level_set = 0
36 };
37
38protected:
40 const MeshGeneratorName _input_name;
44 boundary_id_type _cut_face_id;
46 const BoundaryName _cut_face_name;
54 std::unique_ptr<MeshBase> & _input;
57
64
72 Point pointPairLevelSetInterception(const Point & point1, const Point & point2);
73
84 void tet4ElemCutter(ReplicatedMesh & mesh,
85 const std::vector<libMesh::BoundaryInfo::BCTuple> & bdry_side_list,
86 const dof_id_type elem_id,
87 const subdomain_id_type & block_id_to_remove,
88 std::vector<const Node *> & new_on_plane_nodes);
89
99 const Node * nonDuplicateNodeCreator(ReplicatedMesh & mesh,
100 std::vector<const Node *> & new_on_plane_nodes,
101 const Point & new_point) const;
102
108 Real levelSetEvaluator(const Point & point);
109};
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
Real levelSetEvaluator(const Point &point)
Evaluate the level set function at a given point.
const BoundaryName _cut_face_name
The boundary name of the surface generated by the cut.
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...
std::unique_ptr< MeshBase > & _input
Reference to input mesh pointer.
std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
const bool _generate_transition_layer
Whether to generate a transition layer for the cut mesh.
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...
boundary_id_type _cut_face_id
The boundary id of the surface generated by the cut.
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...
PointLevelSetRelationIndex pointLevelSetRelation(const Point &point)
Evaluate whether a point is on the level set, inside or outside the level set.
const MeshGeneratorName _input_name
Name of the input mesh.
PointLevelSetRelationIndex
An enum class for style of input polygon size.
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...
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.
std::shared_ptr< SymFunction > SymFunctionPtr
Shorthand for an smart pointer to an autodiff function parser object.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
MeshGenerators are objects that can modify or add to an existing mesh.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131