20 #ifndef LIBMESH_PARAMETER_ACCESSOR_H 21 #define LIBMESH_PARAMETER_ACCESSOR_H 25 #include "libmesh/libmesh_common.h" 26 #include "libmesh/compare_types.h" 54 template <
typename T=Number>
67 virtual void set (
const T & new_value) = 0;
72 virtual const T &
get ()
const = 0;
89 virtual std::unique_ptr<ParameterAccessor<T>>
clone()
const = 0;
92 template <
typename T=Number>
147 #ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION 148 operator boost::multiprecision::backends::float128_backend ()
const {
return _accessor.get().backend(); }
156 template <
typename T=Number>
176 #ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION 177 operator boost::multiprecision::backends::float128_backend ()
const {
return _accessor.get().backend(); }
187 #endif // LIBMESH_PARAMETER_ACCESSOR_H T get() const
Getter: get the value of the parameter we access.
ParameterProxy & operator*=(const T &value_multiplier)
Setter: change the value of the parameter we access.
ParameterProxy< T > operator*()
Proxy: for backward compatibility, we allow codes to treat a ParameterAccessor as if it were a simple...
ParameterProxy & operator+=(const T &value_increment)
Setter: change the value of the parameter we access.
virtual ~ParameterAccessor()=default
Virtual destructor - we'll be deleting subclasses from pointers-to-ParameterAccessor.
The libMesh namespace provides an interface to certain functionality in the library.
ConstParameterProxy(const ParameterAccessor< T > &accessor)
Constructor: which parameter are we a proxy for?
const ParameterAccessor< T > & _accessor
ParameterProxy & operator-=(const T &value_decrement)
Setter: change the value of the parameter we access.
ParameterAccessor< T > & _accessor
ParameterProxy & operator=(const T &new_value)
Setter: change the value of the parameter we access.
ParameterProxy & operator/=(const T &value_divisor)
Setter: change the value of the parameter we access.
virtual std::unique_ptr< ParameterAccessor< T > > clone() const =0
Accessor object allowing reading and modification of the independent variables in a parameter sensiti...
ParameterProxy(ParameterAccessor< T > &accessor)
Constructor: which parameter are we a proxy for?