www.mooseframework.org
ProcessorIDAux.C
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 #include "ProcessorIDAux.h"
11 
13 
15 
18 {
20  params.addClassDescription("Creates a field showing the processors and partitioning.");
21  return params;
22 }
23 
24 ProcessorIDAux::ProcessorIDAux(const InputParameters & parameters) : AuxKernel(parameters) {}
25 
26 Real
28 {
29  if (isNodal())
30  return _current_node->processor_id();
31  else
32  return _current_elem->processor_id();
33 }
defineLegacyParams
defineLegacyParams(ProcessorIDAux)
ProcessorIDAux::ProcessorIDAux
ProcessorIDAux(const InputParameters &parameters)
Definition: ProcessorIDAux.C:24
ProcessorIDAux::computeValue
virtual Real computeValue() override
Compute and return the value of the aux variable.
Definition: ProcessorIDAux.C:27
registerMooseObject
registerMooseObject("MooseApp", ProcessorIDAux)
AuxKernelTempl
Base class for creating new auxiliary kernels and auxiliary boundary conditions.
Definition: AuxKernel.h:35
InputParameters
The main MOOSE class responsible for handling user-defined parameters in almost every MOOSE system.
Definition: InputParameters.h:53
ProcessorIDAux::validParams
static InputParameters validParams()
Definition: ProcessorIDAux.C:17
AuxKernelTempl::_current_elem
const Elem *const & _current_elem
Current element (valid only for elemental kernels)
Definition: AuxKernel.h:208
InputParameters::addClassDescription
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.
Definition: InputParameters.C:70
AuxKernelTempl::validParams
static InputParameters validParams()
Definition: AuxKernel.C:28
AuxKernelTempl::isNodal
bool isNodal() const
Nodal or elemental kernel?
Definition: AuxKernel.h:89
AuxKernelTempl::_current_node
const Node *const & _current_node
Current node (valid only for nodal kernels)
Definition: AuxKernel.h:218
ProcessorIDAux.h
ProcessorIDAux
Definition: ProcessorIDAux.h:20