Commit Graph

21663 Commits

Author SHA1 Message Date
b5162f91fc STYLE: use DynamicList instead of LIFO for managing tags in vtk::formatter 2018-08-09 08:57:48 +02:00
ca5d91239d STYLE: use edgeHashes include
STYLE: use initial hash size 128 instead of 100 in a few places
2018-08-08 23:54:27 +02:00
dd9ecd4988 ENH: add missing Hash function for List/UList (issue #966)
- there were previously no hashing mechanisms for lists so they
  would fall back to the definition for primitives and hash the
  memory location of the allocated List object.

- provide a UList::Hash<> sub-class for inheritance, and also a global
  specialization for UList<T>, List<T> such that the hash value for
  List<List<T>> cascades properly.

- provide similar function in triFace to ensure that it remains
  similar in behaviour to face.

- added SymmHash to Pair, for use when order is unimportant.

STYLE: use string::hash() more consistently

- no particular reason to use Hash<word>() which forwards to
  string::hash() anyhow
2018-08-08 23:54:27 +02:00
82bad81d79 STYLE: use readList mechanism for -funcs option
- allows single or multiple entries
2018-08-08 12:18:35 +02:00
e0f83938ee ENH: ignore -noFunctionObjects option when disabled
- With argList::noFunctionObjects() we use the logic added in
  4b93333292 (issue #352)

  By removing the '-noFunctionObjects' option, we automatically
  suppress the creation of function-objects via Time (with argList
  as a parameter).
  There is generally no need in these cases for an additional

      runTime.functionObjects().off()  statement

  Use the argList::noFunctionObjects() for more direct configuration
  and reduce unnecessary clutter in the -help information.

  In previous versions, the -noFunctionObjects would have been redundant
  anyhow, so we can also just ignore it now instead.
2018-08-08 09:44:28 +02:00
822acaf6ef ENH: make indices for boundBox::add() a templated parameter
- allows use with any container with begin(), end() and where the
  "*iterator" dereference returns a label, which is used for indexing
  into the list of points.
  This container could be labelUList, bitSet, labelHashSet, etc
2018-08-07 22:23:16 +02:00
7bb68b4dea ENH: new cuttingPlane cutting scheme
- takes a direct approach of determining which cells are cut and walks
  the cell faces directly to build the resulting surface.

- better handling of corner cases.
  * Avoids redundant points when the cut passes exactly through a
    mesh point.
  * Supresses generation of duplicates faces when the plane cut
    coincides exactly with a mesh face.

- for severely concave cells where the plane cuts a face multiple times
  there is currently no remedial action taken, except to note the
  failure and unwind the insertion of the corresponding points and
  faces.
2018-08-07 22:23:16 +02:00
544941b961 ENH: support zone and zones for sampled cutting planes, sampledIsoSurface
- rework to use bitSet for more flexibility
2018-08-06 18:45:10 +02:00
cf7bd82c25 STYLE: fix tools/lib-dir -help output 2018-08-07 11:19:10 +02:00
32a332f5f1 ENH: add HashTableOps::values() service function
- extract a list of the HashTable values, optionally sorted.
2018-08-07 20:17:38 +02:00
9160dad6ba COMP: silence compiler warning 2018-08-06 20:44:58 +02:00
881ca2a481 ENH: cyclicACMI: make sure non-overlap is before cyclicACMI 2018-08-06 13:45:02 +01:00
2290b0642e ENH: add list operation findMinMax to return label pair.
- when both min and max are required, this is more efficient than
  traversing the list twice.
2018-08-06 08:46:32 +02:00
bf56b06be2 ENH: add ZoneMesh findIndex with wordRes matcher 2018-08-06 07:00:44 +02:00
1036cf9612 ENH: avoid raw dictionary lookup in functionObjects (issue #762)
Style changes:
    - use lookupObjectRef instead of using const_cast
    - use tmp::New factory
2018-08-04 00:23:18 +02:00
1c354e0906 ENH: avoid raw dictionary lookup in transportModels (issue #762)
Style changes:
    - use lookupObjectRef instead of using const_cast
    - use tmp::New factory
2018-08-04 00:23:18 +02:00
e7c1d46904 ENH: avoid raw dictionary lookup in fvOptions (issue #762)
Style changes:
    - use lookupObjectRef instead of using const_cast
    - use tmp::New factory
2018-08-04 00:23:18 +02:00
de2eed3e7d ENH: additional methods and improvements to plane
- signedDistance() method is like distance() but retains
  the positive/negative sign for the side of the plane.

- the sign() method returns the sign as -1,0,+1 integer for
  classification purposes where it is important to distinguish between
  a zero value and a positive value (eg, for cutting). Optional
  tolerance can be supplied to round for zero.

- refactor and inlined simple and frequently used methods.

- add boundBox faceCentre() method, which can be useful for creating
  clipping planes from a bounding box.
  Relocated treeBoundBox faceNormals to boundBox since they apply
  equally there - the meaning of the faces (x-min, x-max, etc)
  is the same, even if the point addressing for the faces differs.
2018-08-03 23:17:49 +02:00
84e2df4994 ENH: added ZoneMesh indices(), selection() with wordRes matcher
- rationalized code dealing with extraction of name or indices from
  coordinateSystems, polyBoundaryMesh, faBoundaryMesh, fvBoundaryMesh,
  ZoneMesh to use internal implementations that allow direct
  searching/matching without building an intermediate list of names.

- simpler and more efficient handling of patch group matching.
2018-08-03 22:40:19 +02:00
c0c59b9abd ENH: force tetBasePtIs() into existence before isoSurfaceCell cutting loop
- ensures that things stay synchronized when the processor domains
  have unequal looping.
2018-08-03 19:34:26 +02:00
91e2fc4dc7 ENH: add isAOp, isTypeOp functors
- can be used in predicate matching

- getNameOp, getTypeOp for accessing the name() and type() of objects
2018-08-03 15:19:22 +02:00
319e09e32f ENH: avoid blockMesh removal of files for special cases (issue #963)
- do not remove if the dictionary failed to load.
- do not remove if -blockTopology was used.
2018-08-03 14:30:41 +02:00
88e5334a9f ENH: IOobject::selectIO helper method
- centralizes IOobject handling and treatment of alternative locations.
  If an alternative file location is specified, it will be used instead.

- provide decompositionMethod::canonicalName instead of using
  "decomposeParDict" in various places.
2018-08-02 17:39:17 +02:00
0e996431b7 STYLE: relocate STRING_QUOTE macro to macros.H 2018-08-02 16:26:25 +02:00
b056202ecf STYLE: simplify bitSet use in Foam::PatchTools::subsetMap 2018-08-02 09:54:59 +02:00
bafddd77c7 ENH: use binary search for polyBoundaryMesh::whichPatch() (issue #801) 2018-08-02 08:51:49 +02:00
32565b4b39 ENH: make findLower more flexible (issue #960)
- a second template parameter for the comparison value type instead of
  ListType::const_reference allows more generic comparison predicates.
2018-08-02 08:48:27 +02:00
a1345b7e83 ENH: improve syncTools handling of PackedList and bitSet
- create a subset copy for sending on the processor patches instead of
  a List of unsigned ints. Reduces memory overhead and data transfer
  amount.
2018-08-01 21:55:45 +02:00
d8c0167ea8 STYLE: ensure that emptyLabelList is known from List.H
- treat as a List constant without requiring inclusion of ListOps.H

- replace use of emptyList<label>() with emptyLabelList directly.
  The emptyList<T>() casting is disallowed with many modern compilers
  and now marked as deprecated (expect early removal).

- relocate labelList typedef to List.H for more general access.
  Similar reasoning to having labelUList defined in UList.H
2018-08-01 21:27:46 +02:00
edb0d1dd97 ENH: add range method to polyBoundaryMesh
- makes for easier extraction of boundary values since it encapsulates
  start/size directly.

Eg,
    SubList<T>(allValues, patches.range());
or
    bitSet(blocked, patches.range(patchi));
2018-08-01 19:22:06 +02:00
9be9f02a12 ENH: bitSet, PackedList copy construct a subset
Eg,
    processorPolyPatch pp = ...;

    UOPstream toNbr(pp.neighbProcNo(), pBufs);
    toNbr << PackedList<Width>(faceValues, pp.range());
2018-08-01 17:54:53 +02:00
51c32360cd ENH: use bitSet operations in syncTools
- concise and more efficient
2018-08-01 15:22:19 +02:00
49d9589d26 STYLE: update iterator access and looping in syncTools 2018-08-01 14:34:34 +02:00
640aac95bd STYLE: remove dead code from syncTools (unused since 2014 or earlier) 2018-08-01 13:38:37 +02:00
80f4ff87dd ENH: allow use of FixedList<label,N> for bitSet construct/set/unset
- allows direct 'hashing' of fixed lists. Eg, triFace
2018-08-01 13:01:43 +02:00
35facb8208 ENH: add PackedList::unpack() method
- allows for simpler unpacking of a full list, or list range into any
  sufficiently large integral type.

  For example,
    processorPolyPatch pp = ...;

    UOPstream toNbr(pp.neighbProcNo(), pBufs);
    toNbr << faceValues.unpack<char>(pp.range());
2018-08-01 12:48:35 +02:00
8917b94444 ENH: add labelRange labels() method (for a labelList source)
- add range support in globalIndex and SubField, SubDimensionedField
2018-08-01 10:36:05 +02:00
dd67b3386a ENH: add fileName /= operator (similar to std::filesystem::path) 2018-07-27 07:15:08 +02:00
0b70301136 ENH: overset: disallow hole donors. See #810. 2018-08-02 12:22:39 +01:00
70801d7f48 ENH: checkMesh: output mask field. Fixes #958. 2018-08-01 13:02:07 +01:00
51eac273aa STYLE: remove unused variable 2018-07-31 15:38:27 +02:00
cb919a6c41 ENH: tag some options as 'advanced' (only shown with -help-full)
General:
    * -roots, -hostRoots, -fileHandler

Specific:
    * -to <coordinateSystem> -from <coordinateSystem>

- Display -help-compat when compatibility or ignored options are available

STYLE: capitalization of options text
2018-07-31 11:54:15 +02:00
d40103a86f CONFIG: extend wmake detection scripts 2018-07-31 11:25:53 +02:00
f00c7a655c COMP: rename dictionary::read<T> to dictionary::readEntry<T>
- avoids compiler ambiguity when virtual methods such as
  IOdictionary::read() exist.

- the method was introduced in 1806, and was thus not yet widely used
2018-07-30 15:52:40 +02:00
215570915e ENH: explicit convert to bool operator for autoPtr
- behaves the same as the valid() method, but can be queried directly
  like a normal raw pointer and as per std::unique_ptr.
  Eg,

      autoPtr<T> ptr = ...

      if (ptr) ...
2018-07-30 14:33:22 +02:00
ff26b96a80 STYLE: use 'cloudObjects' instead of 'sprayObjects' 2018-07-30 13:15:38 +02:00
dd775c6e68 CONFIG: add trapping-math for darwin 2018-07-30 12:18:40 +02:00
ef52e11d2c COMP: include Constant.H for clang-5 2018-07-30 12:17:08 +02:00
b5f093076b STYLE: add sigFpe test 2018-07-30 12:13:42 +02:00
a5e5ba3179 ENH: add bitSet-type of methods for boolList
- test(), get(), set(), unset() with behaviour as per bitSet,
  to allow easier swapping out of boolList <-> bitSet.
2018-07-27 15:51:19 +02:00