https://mooseframework.inl.gov
Loading...
Searching...
No Matches
THMObject.h
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#pragma once
11
12#include "MooseObject.h"
13
17class THMObject : public MooseObject
18{
19public:
21
22protected:
31 template <typename T>
32 void passParameter(const std::string & name,
33 const std::string & new_name,
34 InputParameters & params) const;
35
45 template <typename T>
46 void passParameter(const std::string & name, InputParameters & params) const;
47
48public:
50};
51
52template <typename T>
53void
54THMObject::passParameter(const std::string & name,
55 const std::string & new_name,
56 InputParameters & params) const
57{
58 if (isParamValid(name))
59 params.set<T>(new_name) = _pars.get<T>(name);
60}
61
62template <typename T>
63void
64THMObject::passParameter(const std::string & name, InputParameters & params) const
65{
66 passParameter<T>(name, name, params);
67}
const double T
const std::string name
Definition Setup.h:21
std::vector< std::pair< R1, R2 > > get(const std::string &param1, const std::string &param2) const
T & set(const std::string &name, bool quiet_mode=false)
const InputParameters & parameters() const
const std::string & name() const
const InputParameters & _pars
bool isParamValid(const std::string &name) const
static InputParameters validParams()
Definition THMObject.C:13
void passParameter(const std::string &name, const std::string &new_name, InputParameters &params) const
Passes a parameter from this object's input parameters to another set of input parameters.
Definition THMObject.h:54