libMesh
|
Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation. More...
#include <parsed_function_parameter.h>
Public Member Functions | |
ParsedFunctionParameter (ParsedFunction< T > &func_ref, std::string param_name) | |
Constructor: take the function to be modified and the name of the inline variable within it which represents our parameter. More... | |
virtual ParameterAccessor< T > & | operator= (T *) |
A simple reseater won't work with a parsed function. More... | |
virtual void | set (const T &new_value) override |
Setter: change the value of the parameter we access. More... | |
virtual const T & | get () const override |
Getter: get the value of the parameter we access. More... | |
virtual std::unique_ptr< ParameterAccessor< T > > | clone () const override |
ParameterProxy< T > | operator* () |
Proxy: for backward compatibility, we allow codes to treat a ParameterAccessor as if it were a simple pointer-to-value. More... | |
ConstParameterProxy< T > | operator* () const |
Private Attributes | |
ParsedFunction< T > & | _func |
std::string | _name |
libMesh::Number | _current_val |
Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation.
This ParameterAccessor subclass is specific to ParsedFunction objects: it stores a pointer to the ParsedFunction and a string describing the parameter (an inline variable) name to be accessed.
Definition at line 48 of file parsed_function_parameter.h.
|
inline |
Constructor: take the function to be modified and the name of the inline variable within it which represents our parameter.
The restrictions of get_inline_value() and set_inline_value() in ParsedFunction apply to this interface as well.
Definition at line 62 of file parsed_function_parameter.h.
|
inlineoverridevirtual |
Implements libMesh::ParameterAccessor< T >.
Definition at line 90 of file parsed_function_parameter.h.
References libMesh::ParsedFunctionParameter< T >::_func, and libMesh::ParsedFunctionParameter< T >::_name.
|
inlineoverridevirtual |
Getter: get the value of the parameter we access.
Implements libMesh::ParameterAccessor< T >.
Definition at line 82 of file parsed_function_parameter.h.
References libMesh::ParsedFunctionParameter< T >::_current_val, libMesh::ParsedFunctionParameter< T >::_func, libMesh::ParsedFunctionParameter< T >::_name, and libMesh::ParsedFunction< Output, OutputGradient >::get_inline_value().
|
inlineinherited |
Proxy: for backward compatibility, we allow codes to treat a ParameterAccessor as if it were a simple pointer-to-value.
We can't safely allow "Number * n = parameter_vector[p]" to compile, but we can allow "*parameter_vector[p] += deltap" to work.
Definition at line 80 of file parameter_accessor.h.
|
inlineinherited |
Definition at line 82 of file parameter_accessor.h.
|
inlinevirtual |
A simple reseater won't work with a parsed function.
Definition at line 70 of file parsed_function_parameter.h.
|
inlineoverridevirtual |
Setter: change the value of the parameter we access.
Implements libMesh::ParameterAccessor< T >.
Definition at line 75 of file parsed_function_parameter.h.
References libMesh::ParsedFunctionParameter< T >::_func, libMesh::ParsedFunctionParameter< T >::_name, and libMesh::ParsedFunction< Output, OutputGradient >::set_inline_value().
|
mutableprivate |
Definition at line 101 of file parsed_function_parameter.h.
Referenced by libMesh::ParsedFunctionParameter< T >::get().
|
private |
Definition at line 95 of file parsed_function_parameter.h.
Referenced by libMesh::ParsedFunctionParameter< T >::clone(), libMesh::ParsedFunctionParameter< T >::get(), and libMesh::ParsedFunctionParameter< T >::set().
|
private |
Definition at line 96 of file parsed_function_parameter.h.
Referenced by libMesh::ParsedFunctionParameter< T >::clone(), libMesh::ParsedFunctionParameter< T >::get(), and libMesh::ParsedFunctionParameter< T >::set().