https://mooseframework.inl.gov
Loading...
Searching...
No Matches
BooleanValueTestAux.C
Go to the documentation of this file.
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 "BooleanValueTestAux.h"
11
12registerMooseObject("ThermalHydraulicsTestApp", BooleanValueTestAux);
13
16{
18 params.addRequiredParam<bool>("value", "Boolean value to convert into real.");
20 "Takes a boolean value and converts it into a Real value (0 for false, 1 for true)");
21 params.declareControllable("value");
22 return params;
23}
24
26 : AuxKernel(parameters), _value(getParam<bool>("value"))
27{
28}
29
30Real
32{
33 if (_value)
34 return 1.;
35 else
36 return 0.;
37}
registerMooseObject("ThermalHydraulicsTestApp", BooleanValueTestAux)
static InputParameters validParams()
Takes a boolean value and converts it into a Real value (0 for false, 1 for true)
BooleanValueTestAux(const InputParameters &parameters)
virtual Real computeValue() override
static InputParameters validParams()
void declareControllable(const std::string &name, std::set< ExecFlagType > execute_flags={})
void addRequiredParam(const std::string &name, const std::string &doc_string)
void addClassDescription(const std::string &doc_string)