Panzer Version of the Day
Loading...
Searching...
No Matches
Panzer_ScalarParameterEntry.hpp
Go to the documentation of this file.
1// @HEADER
2// *****************************************************************************
3// Panzer: A partial differential equation assembly
4// engine for strongly coupled complex multiphysics systems
5//
6// Copyright 2011 NTESS and the Panzer contributors.
7// SPDX-License-Identifier: BSD-3-Clause
8// *****************************************************************************
9// @HEADER
10
11#ifndef PANZER_SCALAR_PARAMETER_ENTRY_HPP
12#define PANZER_SCALAR_PARAMETER_ENTRY_HPP
13
14#include "Panzer_Traits.hpp"
15#include "Sacado_ScalarParameterEntry.hpp"
17
18namespace panzer {
19
28 template <typename EvalType>
29 class ScalarParameterEntry : public Sacado::ScalarParameterEntry<EvalType,panzer::EvaluationTraits> {
30
31 public:
32
33 typedef typename Sacado::ScalarParameterEntry<EvalType,panzer::EvaluationTraits>::ScalarT ScalarT;
34
36 void setRealValue(double value)
37 {
38 m_parameter = ScalarT(value);
39 }
40
42 void setValue(const ScalarT& value)
43 {
44 m_parameter = value;
45 }
46
48 const ScalarT& getValue() const
49 {
50 return m_parameter;
51 }
52
53 private:
54
56
57 };
58
59}
60
61#endif
void setRealValue(double value)
Sets the parameter's value from a plain double, converting to the evaluation type's scalar type.
const ScalarT & getValue() const
Returns the parameter's current value.
Sacado::ScalarParameterEntry< EvalType, panzer::EvaluationTraits >::ScalarT ScalarT
void setValue(const ScalarT &value)
Sets the parameter's value directly, in the evaluation type's scalar type.
ScalarT m_parameter