Go to the documentation of this file.
20 #ifndef LIBMESH_PARAMETER_MULTIPOINTER_H
21 #define LIBMESH_PARAMETER_MULTIPOINTER_H
25 #include "libmesh/libmesh_common.h"
26 #include "libmesh/parameter_accessor.h"
46 template <
typename T=Number>
63 #ifdef LIBMESH_ENABLE_DEPRECATED
75 virtual void set (
const T & new_value)
override
80 const T & val = *
_ptrs.back();
82 for (
auto & ptr :
_ptrs)
86 libmesh_assert_equal_to(*ptr, val);
94 virtual const T &
get ()
const override
101 for (
auto ptr :
_ptrs)
102 libmesh_assert_equal_to(*ptr, val);
110 virtual std::unique_ptr<ParameterAccessor<T>>
clone()
const override
115 return std::unique_ptr<ParameterAccessor<T>>(pmp);
132 #endif // LIBMESH_PARAMETER_MULTIPOINTER_H
ParameterMultiPointer(T *param_ptr)
Constructor: take the first raw pointer to the parameter.
Accessor object allowing reading and modification of the independent variables in a parameter sensiti...
virtual ParameterAccessor< T > & operator=(T *) override
A simple reseater won't work with a multipointer.
The libMesh namespace provides an interface to certain functionality in the library.
void push_back(T *new_ptr)
Accessor object allowing reading and modification of the independent variables in a parameter sensiti...
virtual std::unique_ptr< ParameterAccessor< T > > clone() const override
virtual void set(const T &new_value) override
Setter: change the value of the parameter we access.
ParameterMultiPointer()
Constructor: no parameters attached yet.
virtual const T & get() const override
Getter: get the value of the parameter we access.