Commit Graph

14 Commits

Author SHA1 Message Date
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
b76d6b5cb5 STYLE: adjust tests for some updates in methods (issue #876) 2018-06-14 17:17:17 +02:00
3b6027d1be ENH: test: make test apps compile. Fixes #876. 2018-06-14 15:14:14 +01:00
bac943e6fc ENH: new bitSet class and improved PackedList class (closes #751)
- The bitSet class replaces the old PackedBoolList class.
  The redesign provides better block-wise access and reduced method
  calls. This helps both in cases where the bitSet may be relatively
  sparse, and in cases where advantage of contiguous operations can be
  made. This makes it easier to work with a bitSet as top-level object.

  In addition to the previously available count() method to determine
  if a bitSet is being used, now have simpler queries:

    - all()  - true if all bits in the addressable range are empty
    - any()  - true if any bits are set at all.
    - none() - true if no bits are set.

  These are faster than count() and allow early termination.

  The new test() method tests the value of a single bit position and
  returns a bool without any ambiguity caused by the return type
  (like the get() method), nor the const/non-const access (like
  operator[] has). The name corresponds to what std::bitset uses.

  The new find_first(), find_last(), find_next() methods provide a faster
  means of searching for bits that are set.

  This can be especially useful when using a bitSet to control an
  conditional:

  OLD (with macro):

      forAll(selected, celli)
      {
          if (selected[celli])
          {
              sumVol += mesh_.cellVolumes()[celli];
          }
      }

  NEW (with const_iterator):

      for (const label celli : selected)
      {
          sumVol += mesh_.cellVolumes()[celli];
      }

      or manually

      for
      (
          label celli = selected.find_first();
          celli != -1;
          celli = selected.find_next()
      )
      {
          sumVol += mesh_.cellVolumes()[celli];
      }

- When marking up contiguous parts of a bitset, an interval can be
  represented more efficiently as a labelRange of start/size.
  For example,

  OLD:

      if (isA<processorPolyPatch>(pp))
      {
          forAll(pp, i)
          {
              ignoreFaces.set(i);
          }
      }

  NEW:

      if (isA<processorPolyPatch>(pp))
      {
          ignoreFaces.set(pp.range());
      }
2018-03-07 11:21:48 +01:00
f959927910 ENH: improve consistency of ListOps and stringListOps
- subsetList, inplaceSubsetList with optional inverted logic.

- use moveable elements where possible.

- allow optional starting offset for the identity global function.
  Eg,  'identity(10, start)' vs 'identity(10) + start'
2018-02-21 12:58:00 +01:00
f2ba618c19 STYLE: consistency in using argList::addArgument, argList::addOption 2017-11-22 12:54:28 +01:00
67de20df25 Further standardization of loop index naming: pointI -> pointi, patchI -> patchi 2016-05-18 21:20:42 +01:00
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
2d5ff31649 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
8c6fa81eba vector::zero -> Zero 2016-04-16 18:34:41 +01:00
56fa7c0906 Update code to use the simpler C++11 template syntax removing spaces between closing ">"s 2016-01-10 22:41:16 +00:00
c778346c96 Formatting: Rationalized the indentation of #include 2015-02-10 20:35:50 +00:00
5b0d85c3ff ENH: PatchTools: test app 2013-01-21 11:43:49 +00:00