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 "DifferencePostprocessor.h" 11 : 12 : registerMooseObject("MooseApp", DifferencePostprocessor); 13 : 14 : InputParameters 15 14313 : DifferencePostprocessor::validParams() 16 : { 17 14313 : InputParameters params = GeneralPostprocessor::validParams(); 18 14313 : params.addRequiredParam<PostprocessorName>("value1", "First value"); 19 14313 : params.addRequiredParam<PostprocessorName>("value2", "Second value"); 20 14313 : params.addClassDescription("Computes the difference between two postprocessors"); 21 14313 : return params; 22 0 : } 23 : 24 24 : DifferencePostprocessor::DifferencePostprocessor(const InputParameters & parameters) 25 : : GeneralPostprocessor(parameters), 26 24 : _value1(getPostprocessorValue("value1")), 27 48 : _value2(getPostprocessorValue("value2")) 28 : { 29 24 : } 30 : 31 : void 32 44 : DifferencePostprocessor::initialize() 33 : { 34 44 : } 35 : 36 : void 37 44 : DifferencePostprocessor::execute() 38 : { 39 44 : } 40 : 41 : PostprocessorValue 42 44 : DifferencePostprocessor::getValue() const 43 : { 44 44 : return _value1 - _value2; 45 : }