forked from idaholab/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RefineSidesetGenerator.h
49 lines (38 loc) · 1.8 KB
/
RefineSidesetGenerator.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
//* 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
#pragma once
#include "MeshGenerator.h"
/**
* MeshGenerator for refining one or more sidesets
*/
class RefineSidesetGenerator : public MeshGenerator
{
public:
static InputParameters validParams();
RefineSidesetGenerator(const InputParameters & parameters);
protected:
virtual std::unique_ptr<MeshBase> generate() override;
private:
/// Input mesh to refine
std::unique_ptr<MeshBase> & _input;
/// List of boundarie(s) to refine
const std::vector<BoundaryName> _boundaries;
/// The amount of times to refine each boundary, corresponding to their index in 'boundaries'
const std::vector<int> _refinement;
/// Toggles whether neighboring level one elements should be refined or not. Defaults to true.
const bool _enable_neighbor_refinement;
/// Side(s) of the boundary/boundaries to be refined. Can be either "primary"(just the boundary elements), "secondary"(just the neighboring elements), or "both."
const MultiMooseEnum _boundary_side;
/// The actual function refining the boundaries. This is done recursively in order to minimize the number of refinement iterations.
virtual std::unique_ptr<MeshBase> recursive_refine(const std::vector<boundary_id_type> boundary_ids,
std::unique_ptr<MeshBase> & mesh,
const std::vector<int> refinement,
const int max,
int ref_step = 0);
};