forked from idaholab/moose
/
VectorPostprocessorVisualizationAux.h
49 lines (39 loc) · 1.39 KB
/
VectorPostprocessorVisualizationAux.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//* This file is part of the MOOSE framework
//* https://www.mooseframework.org
//*
//* All rights reserved, see COPYRIGHT for full restrictions
//* https://github.com/idaholab/moose/blob/master/COPYRIGHT
//*
//* Licensed under LGPL 2.1, please see LICENSE for details
//* https://www.gnu.org/licenses/lgpl-2.1.html
#ifndef VECTORPOSTPROCESSORVISUALIZATIONAUX_H
#define VECTORPOSTPROCESSORVISUALIZATIONAUX_H
#include "AuxKernel.h"
// Forward Declarations
class VectorPostprocessorVisualizationAux;
template <>
InputParameters validParams<VectorPostprocessorVisualizationAux>();
/**
* Read values from a VectorPostprocessor that is producing vectors that are "number of processors"
* in length. Puts the value for each processor into an elemental auxiliary field.
*/
class VectorPostprocessorVisualizationAux : public AuxKernel
{
public:
VectorPostprocessorVisualizationAux(const InputParameters & parameters);
protected:
/**
* Note: this used for error checking. It's done very late because VPP's don't fill in their
* vectors until they are computed
*/
virtual void timestepSetup() override;
/**
* Get the value from the vector and assign it to the element
*/
virtual Real computeValue() override;
/// Holds the values we want to display
const VectorPostprocessorValue & _vpp_vector;
/// Optimization
processor_id_type _my_pid;
};
#endif // VECTORPOSTPROCESSORVISUALIZATIONAUX_H