AMReX-Codes / amrex

AMReX: Software Framework for Block Structured AMR
https://amrex-codes.github.io/amrex
Other
506 stars 337 forks source link

Add `PODVector::assign(value)` #3866

Closed ax3l closed 3 months ago

ax3l commented 3 months ago

Summary

vector.assign(vector.size(), 42);

is a bit verbose for a standard operation, even if it mirrors https://en.cppreference.com/w/cpp/container/vector/assign

Add another overload similar to setVal(ue) used in other AMReX containers.

Additional background

https://github.com/AMReX-Codes/pyamrex/pull/222#discussion_r1384120148

Checklist

The proposed changes: