20#ifndef LIBMESH_PARAMETER_MULTIPOINTER_H
21#define LIBMESH_PARAMETER_MULTIPOINTER_H
25#include "libmesh/libmesh_common.h"
26#include "libmesh/parameter_accessor.h"
46template <
typename T=Number>
63 virtual void set (
const T & new_value)
override
68 const T & val = *
_ptrs.back();
70 for (
auto & ptr :
_ptrs)
74 libmesh_assert_equal_to(*ptr, val);
82 virtual const T &
get ()
const override
89 for (
auto ptr :
_ptrs)
90 libmesh_assert_equal_to(*ptr, val);
98 virtual std::unique_ptr<ParameterAccessor<T>>
clone()
const override
100 auto pmp = std::make_unique<ParameterMultiPointer<T>>();
Accessor object allowing reading and modification of the independent variables in a parameter sensiti...
Accessor object allowing reading and modification of the independent variables in a parameter sensiti...
ParameterMultiPointer(T *param_ptr)
Constructor: take the first raw pointer to the parameter.
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.
virtual const T & get() const override
Getter: get the value of the parameter we access.
ParameterMultiPointer()
Constructor: no parameters attached yet.
void push_back(T *new_ptr)
The libMesh namespace provides an interface to certain functionality in the library.