LCOV - code coverage report
Current view: top level - src/postprocessors - ScalePostprocessor.C (source / functions) Hit Total Coverage
Test: idaholab/moose framework: 419b9d Lines: 12 13 92.3 %
Date: 2025-08-08 20:01:16 Functions: 3 3 100.0 %
Legend: Lines: hit not hit

          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 "ScalePostprocessor.h"
      11             : 
      12             : registerMooseObject("MooseApp", ScalePostprocessor);
      13             : 
      14             : InputParameters
      15       15559 : ScalePostprocessor::validParams()
      16             : {
      17       15559 :   InputParameters params = GeneralPostprocessor::validParams();
      18       15559 :   params.addRequiredParam<PostprocessorName>("value", "The postprocessor to be scaled");
      19       15559 :   params.addParam<Real>("scaling_factor", 1.0, "The scaling factor");
      20             : 
      21       15559 :   params.addClassDescription("Scales a post-processor by a value");
      22             : 
      23       15559 :   return params;
      24           0 : }
      25             : 
      26         647 : ScalePostprocessor::ScalePostprocessor(const InputParameters & parameters)
      27             :   : GeneralPostprocessor(parameters),
      28         647 :     _value(getPostprocessorValue("value")),
      29        1294 :     _scaling_factor(getParam<Real>("scaling_factor"))
      30             : {
      31         647 : }
      32             : 
      33             : PostprocessorValue
      34        5622 : ScalePostprocessor::getValue() const
      35             : {
      36        5622 :   return _scaling_factor * _value;
      37             : }

Generated by: LCOV version 1.14