www.mooseframework.org
WorkBalance.h
Go to the documentation of this file.
1 //* This file is part of the MOOSE framework
2 //* https://www.mooseframework.org
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 
14 class WorkBalance;
15 
16 template <>
18 
25 {
26 public:
28 
30  {
31  // Ordered this way because NL is always system 0 and Aux is 1
32  ALL = -1,
33  NL,
34  AUX,
35  };
36 
37  virtual void initialize() override;
38  virtual void execute() override;
39  virtual void finalize() override;
40 
41 protected:
43  int _system;
44 
46  const RankMap & _rank_map;
47 
48  unsigned int _my_hardware_id;
49 
51 
52  dof_id_type _local_num_elems;
53  dof_id_type _local_num_nodes;
54  dof_id_type _local_num_dofs;
57 
58  // These are measuring the size of inter-nodal (compute nodes) communication
61 
70 };
71 
dof_id_type _local_num_elems
Definition: WorkBalance.h:52
dof_id_type _local_num_dofs
Definition: WorkBalance.h:54
VectorPostprocessorValue & _num_dofs
Definition: WorkBalance.h:65
VectorPostprocessorValue & _pid
Definition: WorkBalance.h:62
VectorPostprocessorValue & _num_nodes
Definition: WorkBalance.h:64
Real _local_partition_surface_area
Definition: WorkBalance.h:56
dof_id_type _local_num_nodes
Definition: WorkBalance.h:53
This class is here to combine the VectorPostprocessor interface and the base class VectorPostprocesso...
Builds lists and maps that help in knowing which physical hardware nodes each rank is on...
Definition: RankMap.h:23
VectorPostprocessorValue & _num_partition_sides
Definition: WorkBalance.h:66
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
VectorPostprocessorValue & _num_elems
Definition: WorkBalance.h:63
virtual void initialize() override
Called before execute() is ever called so that data can be cleared.
Definition: WorkBalance.C:72
const RankMap & _rank_map
Helpful in determining the physical layout of the ranks.
Definition: WorkBalance.h:46
virtual void finalize() override
Finalize.
Definition: WorkBalance.C:289
bool _sync_to_all_procs
Definition: WorkBalance.h:50
int _system
The system to count DoFs from.
Definition: WorkBalance.h:43
VectorPostprocessorValue & _partition_surface_area
Definition: WorkBalance.h:67
dof_id_type _local_num_partition_sides
Definition: WorkBalance.h:55
const InputParameters & parameters() const
Get the parameters of the object.
Definition: MooseObject.h:65
InputParameters validParams< WorkBalance >()
Definition: WorkBalance.C:25
VectorPostprocessorValue & _partition_hardware_id_surface_area
Definition: WorkBalance.h:69
virtual void execute() override
Execute method.
Definition: WorkBalance.C:263
dof_id_type _local_num_partition_hardware_id_sides
Definition: WorkBalance.h:59
std::vector< Real > VectorPostprocessorValue
Definition: MooseTypes.h:155
VectorPostprocessorValue & _num_partition_hardware_id_sides
Definition: WorkBalance.h:68
unsigned int _my_hardware_id
Definition: WorkBalance.h:48
WorkBalance(const InputParameters &parameters)
Definition: WorkBalance.C:47
Compute several metrics for each MPI process.
Definition: WorkBalance.h:24
Real _local_partition_hardware_id_surface_area
Definition: WorkBalance.h:60