Line data Source code
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 : #include "HardwareIDAux.h" 11 : 12 : registerMooseObject("MooseApp", HardwareIDAux); 13 : 14 : InputParameters 15 14284 : HardwareIDAux::validParams() 16 : { 17 14284 : InputParameters params = AuxKernel::validParams(); 18 14284 : params.addClassDescription( 19 : "Creates a field showing the assignment of partitions to physical nodes in the cluster."); 20 14284 : return params; 21 0 : } 22 : 23 10 : HardwareIDAux::HardwareIDAux(const InputParameters & parameters) 24 10 : : AuxKernel(parameters), _rank_map(_app.rankMap()) 25 : { 26 10 : } 27 : 28 : Real 29 42000 : HardwareIDAux::computeValue() 30 : { 31 42000 : if (isNodal()) 32 0 : return _rank_map.hardwareID(_current_node->processor_id()); 33 : else 34 42000 : return _rank_map.hardwareID(_current_elem->processor_id()); 35 : }