LCOV - code coverage report
Current view: top level - src/controls - SamplerReceiver.C (source / functions) Hit Total Coverage
Test: stochastic_tools Test Coverage Lines: 15 15 100.0 %
Date: 2017-11-21 14:52:30 Functions: 7 7 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /****************************************************************/
       2             : /*               DO NOT MODIFY THIS HEADER                      */
       3             : /* MOOSE - Multiphysics Object Oriented Simulation Environment  */
       4             : /*                                                              */
       5             : /*           (c) 2010 Battelle Energy Alliance, LLC             */
       6             : /*                   ALL RIGHTS RESERVED                        */
       7             : /*                                                              */
       8             : /*          Prepared by Battelle Energy Alliance, LLC           */
       9             : /*            Under Contract No. DE-AC07-05ID14517              */
      10             : /*            With the U. S. Department of Energy               */
      11             : /*                                                              */
      12             : /*            See COPYRIGHT for full restrictions               */
      13             : /****************************************************************/
      14             : 
      15             : // MOOSE includes
      16             : #include "SamplerReceiver.h"
      17             : #include "Function.h"
      18             : 
      19             : template <>
      20             : InputParameters
      21          68 : validParams<SamplerReceiver>()
      22             : {
      23          68 :   InputParameters params = validParams<Control>();
      24         136 :   params.addClassDescription("Control for receiving data from a Sampler via SamplerTransfer.");
      25         204 :   params.set<MultiMooseEnum>("execute_on") = "timestep_begin";
      26          68 :   return params;
      27             : }
      28             : 
      29         136 : SamplerReceiver::SamplerReceiver(const InputParameters & parameters) : Control(parameters) {}
      30             : 
      31             : void
      32         230 : SamplerReceiver::execute()
      33             : {
      34         690 :   for (auto & param_pair : _parameters)
      35         460 :     setControllableValueByName<Real>(param_pair.first, param_pair.second);
      36         230 : }
      37             : 
      38             : void
      39          46 : SamplerReceiver::reset()
      40             : {
      41             :   _parameters.clear();
      42          46 : }
      43             : 
      44             : void
      45          92 : SamplerReceiver::addControlParameter(const std::string & name, const Real & value)
      46             : {
      47          92 :   _parameters[name] = value;
      48        1904 : }

Generated by: LCOV version 1.11