Commit Graph

33 Commits

Author SHA1 Message Date
6c68c4fe13 STYLE: reduced nesting on return branching 2019-02-13 08:06:36 +01:00
4f6bea3264 BOT: Added OpenCFD copyright prior to transfer - same file locations 2019-02-06 12:49:44 +00:00
b921ae298e BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
4d6f0498d6 ENH: use vector::normalise and VectorSpace::normalised for clarity 2018-08-10 15:18:29 +02:00
6b6b36afd3 STYLE: revert bitSet/HashSet setMany() to set() method (issue #837)
- improves backward compatibility and more naming consistency.
  Retain setMany(iter1, iter2) to avoid ambiguity with the
  PackedList::set(index, value) method.
2018-05-29 17:38:02 +02:00
5d1fb23555 ENH: code reduction in PackedList, PackedBoolList (issue #751)
- eliminate iterators from PackedList since they were unused, had
  lower performance than direct access and added unneeded complexity.

- eliminate auto-vivify for the PackedList '[] operator.
  The set() method provides any required auto-vivification and
  removing this ability from the '[]' operator allows for a lower
  when accessing the values. Replaced the previous cascade of iterators
  with simpler reference class.

PackedBoolList:

- (temporarily) eliminate logic and addition operators since
  these contained partially unclear semantics.

- 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.

- more consistent use of PackedBoolList test(), set(), unset() methods
  for fewer operation and clearer code. Eg,

      if (list.test(index)) ...    |  if (list[index]) ...
      if (!list.test(index)) ...   |  if (list[index] == 0u) ...
      list.set(index);             |  list[index] = 1u;
      list.unset(index);           |  list[index] = 0u;

- deleted the operator=(const labelUList&) and replaced with a setMany()
  method for more clarity about the intended operation and to avoid any
  potential inadvertent behaviour.
2018-03-13 08:32:40 +01:00
3d608bf06a ENH: remove reliance on the Xfer class (issue #639)
This class is largely a pre-C++11 holdover. It is now possible to
simply use move construct/assignment directly.

In a few rare cases (eg, polyMesh::resetPrimitives) it has been
replaced by an autoPtr.
2018-03-05 13:28:53 +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
722d23f59c ENH: additional methods/operators for boundBox (related to #196)
- Constructor for bounding box of a single point.

- add(boundBox), add(point) ...
  -> Extend box to enclose the second box or point(s).

  Eg,
      bb.add(pt);
  vs.
      bb.min() = Foam::min(bb.min(), pt);
      bb.max() = Foam::max(bb.max(), pt);

Also works with other bounding boxes.
  Eg,
      bb.add(bb2);
      // OR
      bb += bb2;
  vs.
      bb.min() = Foam::min(bb.min(), bb2.min());
      bb.max() = Foam::max(bb.max(), bb2.max());

'+=' operator allows the reduction to be used in parallel
gather/scatter operations.

A global '+' operator is not currently needed.

Note: may be useful in the future to have a 'clear()' method
that resets to a zero-sized (inverted) box.

STYLE: make many bounding box constructors explicit
2017-01-25 19:26:50 +01:00
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
8c6fa81eba vector::zero -> Zero 2016-04-16 18:34:41 +01:00
7ba41e0095 Removed duplicate, inconsistent and spurious comments in .C files 2016-02-29 18:33:54 +00:00
c4d5f65a10 Completed update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-11 09:03:39 +00:00
42fb1b9e8e Updated notImplemented -> NotImplemented
The new NotImplemented macro uses __PRETTY_FUNCTION__ for GNU compatible
compilers otherwise __func__ to provide the function name string.
2015-11-01 10:26:37 +00:00
c2d3bab08e ENH: Merge searchableSurface and indexedOctree volumeType 2013-04-11 19:52:03 +01:00
8ed95d4750 ENH: Add extra octree functionality
+ Make intersection and nearest functions functors. This makes adding
  different intersection and nearest routines easier.
+ treeDataPrimitivePatch takes its tolerance as a constructor argument
+ Make treeDataTriSurface a typedef of treeDataPrimitivePatch

Conflicts:
	src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C
	src/meshTools/AMIInterpolation/AMIInterpolation/AMIInterpolation.C
	src/meshTools/indexedOctree/treeDataTriSurface.C
2013-03-15 12:38:57 +00:00
100a25ee25 STYLE: defineDebug: move into Foam namespace 2012-12-17 17:35:42 +00:00
5682987dc7 Updated headers 2012-04-17 16:49:03 +01:00
cd51a5eea3 Consistency: Changed exponent FORTRAN style 'E' to C style 'e' 2012-04-17 16:48:27 +01:00
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
31cea7cb8f STYLE: treeData*: renamed points() to shapePoints() to avoid confusion 2011-03-30 16:47:03 +01:00
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
e72d32028c ENH: use boundBox contains(), containsAny() methods 2010-12-06 11:35:36 +01:00
d5acd22a63 STYLE: use labelUList typedef instead of UList<label> or unallocLabelList 2010-11-02 09:32:32 +01:00
991d856017 ENH: add Xfer<> construction for indexedOctree components
- in preparation for using PackedBoolList
2010-08-04 11:18:22 +02:00
d79237597e STYLE: Fixing code style requirements for all src. 2010-07-28 13:31:46 +01:00
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
28b200bcd9 update copyrights for 2009 2008-12-31 19:01:56 +01:00
212a70a17b boundbox intersect renaming 2008-08-28 15:50:11 +01:00
02cabc3cf2 updated Copyright (C) \d+-2008 OpenCFD Ltd. 2008-06-25 15:01:46 +02:00
7faf688709 Initial mattijsLib merge 2008-04-23 12:20:12 +01:00