Commit Graph

25 Commits

Author SHA1 Message Date
Mark Olesen
a81d757721 COMP: add missing include for SortList
- extend test to include partition + sort
2023-11-14 22:54:44 +01:00
Mark Olesen
a34357b1a6 ENH: additional IndirectList static methods
- uniq() : creates an IndirectList with duplicated entries
  filtered out

- subset() : creates an IndirectList with positions that satisfy
  a condition predicate.

- subset_if() : creates an IndirectList with values that satisfy a
  given predicate.

  An indirect subset will be cheaper than creating a subset copy
  of the original data, and also allows modification.

STYLE: combine UIndirectList.H into UIndirectList.H (reduce file clutter)
2022-05-10 10:47:01 +02:00
Mark Olesen
e2861cc200 ENH: return UList range slice as a SubList
- previously returned the range slice as a UList,
  but this prevents convenient assignment.
  Apply similar handling for Field/SubField

  Allows the following

     labelRange range(...);
     fullList.slice(range) = identity(range.size());

  and

     fullList.slice(range) = UIndirectList<T>(other, addr);

ENH: create SubList from full FixedList (simplifies interface)

- allow default constructed SubList. Use shallowCopy to 'reset' later
2021-10-29 17:04:51 +02:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
Mark Olesen
1d86fc4f6b ENH: add single-parameter sortedOrder() function 2019-07-17 11:08:40 +02:00
Mark Olesen
bf30779b64 ENH: add partial sorting to SortableList 2019-04-24 19:03:00 +02:00
Mark Olesen
e9323ecbbb STYLE: use finiteVolume in Make/options placeholder 2019-02-24 17:32:13 +01:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Mark Olesen
0a62fd2f87 ENH: allow passing of comparator to sortToc methods
- this increases the flexibility of the interface

- Add stringOps 'natural' string sorting comparison.
  Digits are sorted in their natural order, which means that
      (file10.txt file05.txt file2.txt)
  are sorted as
      (file2.txt file05.txt file10.txt)

STYLE: consistent naming of template parameters for comparators

  - Compare for normal binary predicates
  - ListComparePredicate for list compare binary predicates
2017-10-27 14:28:00 +02:00
Mark Olesen
049617d037 ENH: update List and DynamicList methods (issue #595)
- improve functional compatibility with DynList (remove methods)
  * eg, remove an element from any position in a DynamicList
  * reduce the number of template parameters
  * remove/subset regions of DynamicList

- propagate Swap template specializations for lists, hashtables

- move construct/assignment to various containers.

- add find/found methods for FixedList and UList for a more succinct
  (and clearer?) usage than the equivalent global findIndex() function.

- simplify List_FOR_ALL loops
2017-09-20 17:20:54 +02:00
laurence
259d030fed ENH: Update tests for PtrList and sort 2013-09-25 10:11:36 +01:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
andy
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
andy
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
graham
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
Mark Olesen
499d48cfdb STYLE: uniform 'Test-' prefix for all applications/test
- easier to clean, avoid confusion with 'real' applications, etc.
2010-11-23 16:26:04 +01:00
graham
012494fdb5 STYLE: Fixing code style requirements for all apps.
Exception: applyWallFunctionBoundaryConditions.C cannot split #include
directives.
2010-07-27 15:27:05 +01:00
Mark Olesen
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
Mark Olesen
28b200bcd9 update copyrights for 2009 2008-12-31 19:01:56 +01:00
Mark Olesen
7e2a940dfb SortableList + ListOps changes
- dropped setSize() in favour of List::setSize().
  The size of the indices is set in sort() anyhow and undefined before that.
- added reverseSort() method
- added ListOps uniqueOrder() and duplicateOrder()
2008-11-25 11:52:38 +01:00
Mark Olesen
a8550cd0ba List - adjusted transfer(DynamicList) and added transfer(SortableList) 2008-11-23 16:08:28 +01:00
Mark Olesen
4645e93f8b SortableList improvements
- now works as expected with transfer() and assignment from other Lists
  - shrink() method : clears indices and returns underlying List
2008-11-19 10:28:21 +01:00
Mark Olesen
02cabc3cf2 updated Copyright (C) \d+-2008 OpenCFD Ltd. 2008-06-25 15:01:46 +02:00
OpenFOAM-admin
3170c7c0c9 Creation of OpenFOAM-dev repository 15/04/2008 2008-04-15 18:56:58 +01:00