https://mooseframework.inl.gov
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 
17 class THMObject : public MooseObject
18 {
19 public:
21 
22 protected:
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 
48 public:
50 };
51 
52 template <typename T>
53 void
54 THMObject::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 
62 template <typename T>
63 void
64 THMObject::passParameter(const std::string & name, InputParameters & params) const
65 {
66  passParameter<T>(name, name, params);
67 }
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)
void passParameter(const std::string &name, const std::string &new_name, InputParameters &params) const
Passes a parameter from this object&#39;s input parameters to another set of input parameters.
Definition: THMObject.h:54
virtual const std::string & name() const
bool isParamValid(const std::string &name) const
const std::string name
Definition: Setup.h:20
const InputParameters & _pars
const InputParameters & parameters() const
static InputParameters validParams()
Definition: THMObject.C:13
THMObject(const InputParameters &parameters)
Definition: THMObject.C:19