https://mooseframework.inl.gov
Loading...
Searching...
No Matches
PatchSidesetGenerator.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#include "libmesh/replicated_mesh.h"
14
15// Forward declarations
16
22{
23public:
25
27
28 std::unique_ptr<MeshBase> generate() override;
29
30 unsigned int nPatches() const { return _n_patches; }
31
32protected:
34 std::vector<BoundaryName> sidesetNameHelper(const std::string & base_name) const;
35
36 Elem * boundaryElementHelper(MeshBase & mesh, libMesh::ElemType type) const;
37
39 void partition(MeshBase & mesh);
40
45 void checkPartitionAndCompress(MeshBase & mesh);
46
47 std::unique_ptr<MeshBase> & _input;
48
50 unsigned int _dim;
51
53 unsigned int _n_patches;
54
56 const BoundaryName & _sideset_name;
57
60
63
66};
boundary_id_type BoundaryID
const InputParameters & parameters() const
const std::string & type() const
Subdivides a sidesets into smaller patches each of which is going to be a new patch.
MooseEnum _partitioner_name
the name of the partitioner being used
unsigned int _dim
dimensionality of the sidesets to partition
unsigned int _n_patches
the number of patches that this sideset generator divides _sideset into
void partition(MeshBase &mesh)
a function for implementing custom partitioning
const BoundaryName & _sideset_name
The sideset that will be subdivided.
static InputParameters validParams()
std::unique_ptr< MeshBase > generate() override
BoundaryID _sideset
The sideset that will be subdivided.
std::unique_ptr< MeshBase > & _input
Elem * boundaryElementHelper(MeshBase &mesh, libMesh::ElemType type) const
void checkPartitionAndCompress(MeshBase &mesh)
Checks partitions and makes sure every partition has at least one elem.
unsigned int nPatches() const
dof_id_type _n_boundary_mesh_elems
number of elements of the boundary mesh
std::vector< BoundaryName > sidesetNameHelper(const std::string &base_name) const
returns the name of the _n_patches subdivisions derived from _sideset