diff --git a/Src/Base/AMReX_PODVector.H b/Src/Base/AMReX_PODVector.H index 7800fb145ed..0e7458fe5b0 100644 --- a/Src/Base/AMReX_PODVector.H +++ b/Src/Base/AMReX_PODVector.H @@ -512,6 +512,15 @@ namespace amrex (Allocator const&)(*this)); } + /** Set the same value to every element of the vector + * + * @param a_value the value to assign + */ + void assign (const T& a_value) + { + assign(m_size, a_value); + } + [[nodiscard]] allocator_type get_allocator () const noexcept { return *this; } void push_back (const T& a_value)