/
SideSetsFromBoundingBoxGenerator.h
55 lines (41 loc) · 1.45 KB
/
SideSetsFromBoundingBoxGenerator.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html
#ifndef SIDESETSFROMBOUNDINGBOXGENERATOR_H
#define SIDESETSFROMBOUNDINGBOXGENERATOR_H
#include "MeshGenerator.h"
#include "MooseEnum.h"
#include "libmesh/bounding_box.h"
// Forward declarations
class SideSetsFromBoundingBoxGenerator;
template <>
InputParameters validParams<SideSetsFromBoundingBoxGenerator>();
/**
* MeshGenerator for defining a Subdomain inside or outside of a bounding box
*/
class SideSetsFromBoundingBoxGenerator : public MeshGenerator
{
public:
SideSetsFromBoundingBoxGenerator(const InputParameters & parameters);
std::unique_ptr<MeshBase> generate() override;
protected:
std::unique_ptr<MeshBase> & _input;
/// ID location (inside of outside of box)
MooseEnum _location;
/// Block ID to assign to the region
subdomain_id_type _block_id;
/// boundary ID to select
std::vector<BoundaryName> _boundary_id_old;
/// boundary ID to assign
boundary_id_type _boundary_id_new;
/// Bounding box for testing element centroids against
BoundingBox _bounding_box;
/// Flag to determine if the provided boundaries need to overlap
const bool _boundary_id_overlap;
};
#endif // SIDESETSFROMBOUNDINGBOXGENERATOR_H