https://mooseframework.inl.gov
Loading...
Searching...
No Matches
CoarsenBlockGenerator.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
18{
19public:
21
23
24protected:
25 virtual std::unique_ptr<MeshBase> generate() override;
26
27private:
29 std::unique_ptr<MeshBase> & _input;
30
32 const std::vector<SubdomainName> _block;
33
35 const std::vector<unsigned int> _coarsening;
36
38 const Point _starting_point;
39
42 const Real _max_vol_ratio;
43
45 const bool _verbose;
46
49
60 virtual std::unique_ptr<MeshBase>
61 recursiveCoarsen(const std::vector<subdomain_id_type> & block_ids,
62 std::unique_ptr<MeshBase> & mesh,
63 const std::vector<unsigned int> & coarsening,
64 const unsigned int max,
65 unsigned int coarse_step);
66};
MeshGenerator for coarsening one or more blocks.
const bool _check_output_mesh_for_nonconformality
Whether to check the output mesh for non-conformality.
const Real _max_vol_ratio
Maximum volume ratio between a neighbor and an element to consider the neighbor as a candidate for co...
virtual std::unique_ptr< MeshBase > generate() override
Generate / modify the mesh.
static InputParameters validParams()
std::unique_ptr< MeshBase > & _input
Input mesh to coarsen.
const std::vector< SubdomainName > _block
List of block(s) to coarsen.
const std::vector< unsigned int > _coarsening
The amount of times to coarsen each block, corresponding to their index in 'block'.
const Point _starting_point
The location on the mesh to start the coarsening from.
virtual std::unique_ptr< MeshBase > recursiveCoarsen(const std::vector< subdomain_id_type > &block_ids, std::unique_ptr< MeshBase > &mesh, const std::vector< unsigned int > &coarsening, const unsigned int max, unsigned int coarse_step)
The actual function coarsening the blocks.
const bool _verbose
Whether the mesh generator should be verbose to the console.
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