https://mooseframework.inl.gov
Loading...
Searching...
No Matches
WorkBalance.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
20{
21public:
23
25
27 {
28 // Ordered this way because NL is always system 0 and Aux is 1
29 ALL = -1,
32 };
33
34 virtual void initialize() override;
35 virtual void execute() override;
36 virtual void finalize() override;
37 void gather(int balance_id, VectorPostprocessorValue & vppv);
38
39protected:
42
45
46 unsigned int _my_hardware_id;
47
49
50 dof_id_type _local_num_elems;
51 dof_id_type _local_num_nodes;
52 dof_id_type _local_num_dofs;
55
56 // These are measuring the size of inter-nodal (compute nodes) communication
59
61
64
66 std::map<std::string, VectorPostprocessorValue *> _balance_vectors;
67};
std::vector< Real > VectorPostprocessorValue
Definition MooseTypes.h:231
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
const InputParameters & parameters() const
Get the parameters of the object.
Definition MooseBase.h:131
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
Builds lists and maps that help in knowing which physical hardware nodes each rank is on.
Definition RankMap.h:24
Compute several metrics for each MPI process.
Definition WorkBalance.h:20
bool _sync_to_all_procs
Definition WorkBalance.h:48
void gather(int balance_id, VectorPostprocessorValue &vppv)
std::map< std::string, VectorPostprocessorValue * > _balance_vectors
The VPP vectors that will hold the balance metrics.
Definition WorkBalance.h:66
dof_id_type _local_num_nodes
Definition WorkBalance.h:51
const RankMap & _rank_map
Helpful in determining the physical layout of the ranks.
Definition WorkBalance.h:44
VectorPostprocessorValue & _pid
Definition WorkBalance.h:60
virtual void finalize() override
Finalize.
MultiMooseEnum _balances
The chosen balance metrics to compute.
Definition WorkBalance.h:63
dof_id_type _local_num_partition_hardware_id_sides
Definition WorkBalance.h:57
static InputParameters validParams()
Definition WorkBalance.C:27
int _system
The system to count DoFs from.
Definition WorkBalance.h:41
unsigned int _my_hardware_id
Definition WorkBalance.h:46
dof_id_type _local_num_elems
Definition WorkBalance.h:50
dof_id_type _local_num_dofs
Definition WorkBalance.h:52
virtual void execute() override
Execute method.
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition WorkBalance.C:78
Real _local_partition_hardware_id_surface_area
Definition WorkBalance.h:58
dof_id_type _local_num_partition_sides
Definition WorkBalance.h:53
Real _local_partition_surface_area
Definition WorkBalance.h:54