ENH: additional 'nocopy' methods for List resize/reserve methods

- the size of a List often requires adjustment prior to an operation,
  but old values (if any) are not of interest and will be overwritten.

  In these cases can use the _nocopy versions to avoid additional memory
  overhead of the intermediate list and the copy/move overhead of
  retaining the old values (that we will subsequently discard anyhow).

  No equivalent for PtrList/UPtrList - this would be too fragile.

- add swap DynamicField with DynamicList

BUG: fixed Dynamic{Field,List} setCapacity corner case

- for the case when the newly requested capacity coincides with the
  current addressable size, the resize of the underlying list would have
  been bypassed - ie, the real capacity was not actually changed.

- remove (unused) PtrDynList setCapacity method as too fragile
This commit is contained in:
Mark Olesen
2021-10-25 10:38:23 +02:00
parent e2861cc200
commit b8a4b7e80d
20 changed files with 820 additions and 249 deletions

View File

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