20 #ifndef LIBMESH_PARAMETER_VECTOR_H 21 #define LIBMESH_PARAMETER_VECTOR_H 25 #include "libmesh/libmesh_common.h" 26 #include "libmesh/parameter_accessor.h" 97 void resize(std::size_t s);
142 std::vector<std::unique_ptr<ParameterAccessor<Number>>>
_params;
179 _params.push_back(std::move(new_accessor));
187 libmesh_assert_greater (
_params.size(), i);
197 libmesh_assert_greater (
_params.size(), i);
204 #endif // LIBMESH_PARAMETER_VECTOR_H
const ParameterAccessor< Number > & operator[](std::size_t i) const
void resize(std::size_t s)
Sets the number of parameters to be used.
void deep_copy(ParameterVector &target) const
Deep copy constructor: the target will now own new copies of all the parameter values I'm pointing to...
void deep_resize(std::size_t s)
Sets the number of parameters to be used.
Data structure for specifying which Parameters should be independent variables in a parameter sensiti...
~ParameterVector()=default
Destructor - deletes ParameterAccessor objects.
The libMesh namespace provides an interface to certain functionality in the library.
ParameterVector & operator*=(const Number a)
Multiplication operator; acts individually on each parameter.
bool _is_shallow_copy
Am I a shallow copy? If so then resizing me would be a bug.
void clear()
Resets to "no parameters".
void push_back(std::unique_ptr< ParameterAccessor< Number >> new_accessor)
Adds an additional parameter accessor to the end of the vector.
ParameterVector()=default
Default constructor: "no parameters".
std::vector< std::unique_ptr< ParameterAccessor< Number > > > _params
Pointers to parameters which may exist elsewhere.
std::vector< Number > _my_data
Parameters which I own; e.g.
ParameterVector & operator+=(const ParameterVector &a)
Addition operator.
void value_copy(ParameterVector &target) const
Value copy method: the target, which should already have as many parameters as I do, will now have those parameters set to my values.
void shallow_copy(ParameterVector &target) const
Shallow copy constructor: the target will now point to all the parameter values I'm pointing to...
Accessor object allowing reading and modification of the independent variables in a parameter sensiti...