ENH: expand VectorSpaceOps to include copy_n/fill_n methods

- similar to what std::copy_n and std::fill_n would do, except with
  templated loops. This allows compile-time transcribing with loop
  unrolling. For example,

     vector vec1 = ..., vec2 = ...;

     FixedList<scalar, 6> values;

     VectorSpaceOps<3>::copy_n(vec1.begin(), values.begin());
     VectorSpaceOps<3>::copy_n(vec2.begin(), values.begin(3))

     // do something with all of these values

STYLE: make start index of VectorSpaceOps optional

ENH: add clamped begin(int) versions to FixedList as per UList
This commit is contained in:
Mark Olesen
2025-03-04 13:30:20 +01:00
parent cf9fa16788
commit d64682a7af
9 changed files with 197 additions and 118 deletions

View File

@ -1,3 +1,3 @@
Test-vectorTools.C
Test-vectorTools.cxx
EXE = $(FOAM_USER_APPBIN)/Test-vectorTools