20 #ifndef LIBMESH_PARSED_FEM_FUNCTION_PARAMETER_H
21 #define LIBMESH_PARSED_FEM_FUNCTION_PARAMETER_H
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/parameter_accessor.h"
35 template <
typename T>
class ParsedFEMFunction;
46 template <
typename T=Number>
61 std::string param_name) :
62 _func(func_ref),
_name(std::move(param_name)) {}
67 virtual ParameterAccessor<T> &
75 virtual void set (
const T & new_value)
override {
86 virtual const T &
get ()
const override {
98 virtual std::unique_ptr<ParameterAccessor<T>>
clone()
const override {
99 return std::make_unique<ParsedFEMFunctionParameter<T>>(
_func,
_name);
112 #endif // LIBMESH_PARSED_FEM_FUNCTION_PARAMETER_H
Output get_inline_value(std::string_view inline_var_name) const
获取内联变量的值。
virtual ParameterAccessor< T > & operator=(T *)
简单的重置器对解析函数无效。
ParsedFEMFunctionParameter(ParsedFEMFunction< T > &func_ref, std::string param_name)
构造函数:获取要修改的函数和表示我们的参数的内联变量的名称。
ParsedFEMFunction< T > & _func
virtual std::unique_ptr< ParameterAccessor< T > > clone() const override
返回访问器的新副本。
void set_inline_value(std::string_view inline_var_name, Output newval)
更改内联变量的值。
libMesh::Number _current_val
virtual void set(const T &new_value) override
设置:更改我们访问的参数的值。
访问器对象,允许读取和修改参数灵敏度计算中的独立变量。