https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BlockWeightedPartitioner.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
13
21{
22public:
24
26
27 virtual std::unique_ptr<Partitioner> clone() const override;
28
29 virtual dof_id_type computeElementWeight(Elem & elm) override;
30
34 void initialize(MeshBase & mesh) override;
35
36private:
38 const std::vector<SubdomainName> & _blocks;
39 // Block weights
40 const std::vector<dof_id_type> & _weights;
41
43 std::unordered_map<SubdomainID, dof_id_type> _blocks_to_weights;
44};
Partition a mesh by weighting blocks.
void initialize(MeshBase &mesh) override
Fills _blocks_to_weights before performing the partition.
virtual std::unique_ptr< Partitioner > clone() const override
const std::vector< dof_id_type > & _weights
static InputParameters validParams()
const std::vector< SubdomainName > & _blocks
Vector the block names supplied by the user via the input file.
virtual dof_id_type computeElementWeight(Elem &elm) override
std::unordered_map< SubdomainID, dof_id_type > _blocks_to_weights
A map from subdomain to weight.
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Partitions a mesh using external petsc partitioners such as parmetis, ptscotch, chaco,...
MeshBase & mesh