20#ifndef LIBMESH_PARAMETER_ACCESSOR_H
21#define LIBMESH_PARAMETER_ACCESSOR_H
25#include "libmesh/libmesh_common.h"
26#include "libmesh/compare_types.h"
39class ConstParameterProxy;
54template <
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;
92template <
typename T=Number>
152#ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION
153 operator boost::multiprecision::backends::float128_backend ()
const {
return _accessor.get().backend(); }
161template <
typename T=Number>
181#ifdef LIBMESH_DEFAULT_QUADRUPLE_PRECISION
182 operator boost::multiprecision::backends::float128_backend ()
const {
return _accessor.get().backend(); }
const ParameterAccessor< T > & _accessor
ConstParameterProxy(const ParameterAccessor< T > &accessor)
Constructor: which parameter are we a proxy for?
T get() const
Getter: get the value of the parameter we access.
Accessor object allowing reading and modification of the independent variables in a parameter sensiti...
virtual const T & get() const =0
Getter: get the value of the parameter we access.
virtual void set(const T &new_value)=0
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...
virtual std::unique_ptr< ParameterAccessor< T > > clone() const =0
virtual ~ParameterAccessor()=default
Virtual destructor - we'll be deleting subclasses from pointers-to-ParameterAccessor.
ParameterProxy(const ParameterProxy< T > &accessor)=default
Default Copy Constructor works.
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.
ParameterProxy & operator-=(const T &value_decrement)
Setter: change the value of the parameter we access.
ParameterProxy & operator+=(const T &value_increment)
Setter: change the value of the parameter we access.
ParameterProxy & operator*=(const T &value_multiplier)
Setter: change the value of the parameter we access.
ParameterProxy(ParameterAccessor< T > &accessor)
Constructor: which parameter are we a proxy for?
ParameterAccessor< T > & _accessor
T get() const
Getter: get the value of the parameter we access.
The libMesh namespace provides an interface to certain functionality in the library.