Stores multiple user-provided pointers. More...
#include <parameter_multipointer.h>
Public Member Functions | |
ParameterMultiPointer () | |
ParameterMultiPointer (T *param_ptr) | |
virtual ParameterAccessor< T > & | operator= (T *) override |
virtual void | set (const T &new_value) override |
virtual const T & | get () const override |
virtual std::unique_ptr< ParameterAccessor< T > > | clone () const override |
void | push_back (T *new_ptr) |
std::size_t | size () const |
ParameterProxy< T > | operator* () |
ConstParameterProxy< T > | operator* () const |
Private Attributes | |
std::vector< T * > | _ptrs |
Stores multiple user-provided pointers.
Accessor object allowing reading and modification of the independent variables in a parameter sensitivity calculation.
This is a slightly flexible ParameterAccessor subclass: it stores all user-provided pointers to copies of the parameter, and modifies the value at each location in memory.
Definition at line 47 of file parameter_multipointer.h.
|
inline |
Constructor: no parameters attached yet
Definition at line 53 of file parameter_multipointer.h.
|
inline |
Constructor: take the first raw pointer to the parameter
Definition at line 58 of file parameter_multipointer.h.
|
inlineoverridevirtual |
Implements libMesh::ParameterAccessor< T >.
Definition at line 110 of file parameter_multipointer.h.
References libMesh::ParameterMultiPointer< T >::_ptrs.
|
inlineoverridevirtual |
Getter: get the value of the parameter we access.
Implements libMesh::ParameterAccessor< T >.
Definition at line 94 of file parameter_multipointer.h.
References libMesh::ParameterMultiPointer< T >::_ptrs.
|
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 91 of file parameter_accessor.h.
|
inlineinherited |
Definition at line 93 of file parameter_accessor.h.
|
inlineoverridevirtual |
A simple reseater won't work with a multipointer
Reimplemented from libMesh::ParameterAccessor< T >.
Definition at line 65 of file parameter_multipointer.h.
|
inline |
Definition at line 118 of file parameter_multipointer.h.
References libMesh::ParameterMultiPointer< T >::_ptrs.
|
inlineoverridevirtual |
Setter: change the value of the parameter we access.
Implements libMesh::ParameterAccessor< T >.
Definition at line 75 of file parameter_multipointer.h.
References libMesh::ParameterMultiPointer< T >::_ptrs.
|
inline |
Definition at line 124 of file parameter_multipointer.h.
References libMesh::ParameterMultiPointer< T >::_ptrs.
|
private |
Definition at line 127 of file parameter_multipointer.h.
Referenced by libMesh::ParameterMultiPointer< T >::clone(), libMesh::ParameterMultiPointer< T >::get(), libMesh::ParameterMultiPointer< T >::push_back(), libMesh::ParameterMultiPointer< T >::set(), and libMesh::ParameterMultiPointer< T >::size().