www.mooseframework.org
ProcessorIDAux.C
Go to the documentation of this file.
1 /****************************************************************/
2 /* DO NOT MODIFY THIS HEADER */
3 /* MOOSE - Multiphysics Object Oriented Simulation Environment */
4 /* */
5 /* (c) 2010 Battelle Energy Alliance, LLC */
6 /* ALL RIGHTS RESERVED */
7 /* */
8 /* Prepared by Battelle Energy Alliance, LLC */
9 /* Under Contract No. DE-AC07-05ID14517 */
10 /* With the U. S. Department of Energy */
11 /* */
12 /* See COPYRIGHT for full restrictions */
13 /****************************************************************/
14 
15 #include "ProcessorIDAux.h"
16 
17 template <>
20 {
22  params.addClassDescription("Creates a field showing the processors and partitioning.");
23  return params;
24 }
25 
26 ProcessorIDAux::ProcessorIDAux(const InputParameters & parameters) : AuxKernel(parameters) {}
27 
28 Real
30 {
31  if (isNodal())
32  return _current_node->processor_id();
33  else
34  return _current_elem->processor_id();
35 }
ProcessorIDAux(const InputParameters &parameters)
const Elem *& _current_elem
Current element (valid only for elemental kernels)
Definition: AuxKernel.h:176
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system...
InputParameters validParams< ProcessorIDAux >()
InputParameters validParams< AuxKernel >()
Definition: AuxKernel.C:30
const Node *& _current_node
Current node (valid only for nodal kernels)
Definition: AuxKernel.h:186
bool isNodal()
Nodal or elemental kernel?
Definition: AuxKernel.h:89
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:51
virtual Real computeValue() override
void addClassDescription(const std::string &doc_string)
This method adds a description of the class that will be displayed in the input file syntax dump...