LCOV - code coverage report
Current view: top level - src/postprocessors - StateSimTester.C (source / functions) Hit Total Coverage
Test: stochastic_tools Test Coverage Lines: 15 15 100.0 %
Date: 2017-11-18 13:35:36 Functions: 5 5 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /****************************************************************/
       2             : /* MOOSE - Multiphysics Object Oriented Simulation Environment  */
       3             : /*                                                              */
       4             : /*          All contents are licensed under LGPL V2.1           */
       5             : /*             See LICENSE for full restrictions                */
       6             : /****************************************************************/
       7             : 
       8             : #include "StateSimTester.h"
       9             : #include "StateSimTester.h"
      10             : 
      11             : #include "libmesh/system.h"
      12             : #include "StateSimRunner.h"
      13             : 
      14             : template <>
      15             : InputParameters
      16           1 : validParams<StateSimTester>()
      17             : {
      18           1 :   InputParameters params = validParams<GeneralPostprocessor>();
      19           3 :   params.addRequiredParam<UserObjectName>("state_sim_runner", "The StateSimRunner to test.");
      20           3 :   MooseEnum system_enum("SYNCTIMES", "SYNCTIMES");
      21           3 :   params.addParam<MooseEnum>(
      22           1 :       "test_type", system_enum, "The value for testing (SYNCTIMES). Default == SYNCTIMES");
      23           1 :   return params;
      24             : }
      25             : 
      26           1 : StateSimTester::StateSimTester(const InputParameters & parameters)
      27             :   : GeneralPostprocessor(parameters),
      28           2 :     _state_sim_runner_ptr(getUserObject<StateSimRunner>("state_sim_runner")),
      29           5 :     _test_val_enum(parameters.get<MooseEnum>("test_type").getEnum<SystemEnum>())
      30             : {
      31           1 : }
      32             : 
      33             : Real
      34         100 : StateSimTester::getValue()
      35             : {
      36         100 :   switch (_test_val_enum)
      37             :   {
      38             :     case SYNCTIMES:
      39         100 :       return _state_sim_runner_ptr.getValue();
      40             :     default:
      41             :       return -1;
      42             :   }
      43        1812 : }

Generated by: LCOV version 1.11