Commit Graph

19619 Commits

Author SHA1 Message Date
c1c6243c3e ENH: pass through doc/Allwmake arguments, add -config, -dir options
- can run doxygen with an alternative Doxyfile, which is useful
  when verifying generated content for particular classes.
  Eg,
      PATH/doc/Allwmake -dir $PWD
2017-05-16 10:53:07 +02:00
acc048a2ce Merge branch 'consistency-updates' into 'develop'
Consistency updates

See merge request !111
2017-05-15 12:34:02 +01:00
1889ea83e3 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-15 10:17:57 +01:00
3cf7820160 ENH: surfaceMeshTriangulate: handle time selection; handle moving meshes. Fixes #470. 2017-05-15 10:17:24 +01:00
d4041e7d36 ENH: consistent access to IOobjectList names.
- Previously matched name against the object->name() method
  but saved with iter.key().  Now use iter.key() more consistently.

STYLE: consistent parameter names (doxygen)
2017-05-15 08:47:35 +02:00
6933bc3021 ENH: HashPtrTable remove/erase now include safeguard against end-iterator
- This makes the following safe:

      auto iter = ptrTable.find(unknownKey);
      ptrTable.erase(iter);

- Unmask HashPtrTable::erase(const Key& key) method
2017-05-15 09:57:25 +02:00
4b0d1632b6 BUG: hashtable key_iterator ++ operator returning incorrect type
ENH: ensure std::distance works with hashtable iterators
2017-05-14 16:58:47 +02:00
0c53a815ed ENH: avoid std::distance for std::initializer_list
- std::initializer_list has its own size() method, so no need to use
  std::distance.

STYLE/BUG: use separate iterator de-reference and increment in List

- avoids unnecessary copying of iterators, and avoids any potentially
  odd behaviour with the combination with incrementing.

ENH: support construct from iterator pair for DynamicList, SortableList
2017-05-14 16:28:21 +02:00
83669e284f ENH: improvements to labelRange const_iterator
- inherit from std::iterator to obtain the full STL typedefs, meaning
  that std::distance works and the following is now possible:

      labelRange range(100, 1500);
      scalarList list(range.begin(), range.end());

  --
  Note that this does not work (mismatched data-types):

      scalarList list = identity(12345);

  But this does, since the *iter promotes label to scalar:

      labelList ident = identity(12345);
      scalarList list(ident.begin(), ident.end());

  It is however more than slightly wasteful to create a labelList
  just for initializing a scalarList. An alternative could be a
  a labelRange for the same purpose.

      labelRange ident = labelRange::identity(12345);
      scalarList list(ident.begin(), ident.end());

  Or this
      scalarList list
      (
          labelRange::null.begin(),
          labelRange::identity(12345).end()
      );
2017-05-14 14:39:17 +02:00
0e7b135181 STYLE: adjust const access for linked-list iterators 'operator*'
- provides const/non-const access to the underlying list, but the
  iterator access itself is const.

- provide linked-list iterator 'found()' method for symmetry with
  hash-table iterators. Use nullptr for more clarity.
2017-05-12 12:26:28 +02:00
f73b5b629f ENH: added HashTable 'lookup' and 'retain' methods
- lookup(): with a default value (const access)
  For example,
      Map<label> something;
      value = something.lookup(key, -1);

    being equivalent to the following:

      Map<label> something;
      value = -1;  // bad value
      if (something.found(key))
      {
          value = something[key];
      }

    except that lookup also makes it convenient to handle const references.
    Eg,

      const labelList& ids = someHash.lookup(key, labelList());

- For consistency, provide a two parameter HashTable '()' operator.
  The lookup() method is, however, normally preferable when
  const-only access is to be ensured.

- retain(): the counterpart to erase(), it only retains entries
  corresponding to the listed keys.

  For example,
      HashTable<someType> largeCache;
      wordHashSet preserve = ...;

      largeCache.retain(preserve);

    being roughly equivalent to the following two-stage process,
    but with reduced overhead and typing, and fewer potential mistakes.

      HashTable<someType> largeCache;
      wordHashSet preserve = ...;

      {
          wordHashSet cull(largeCache.toc()); // all keys
          cull.erase(preserve);               // except those to preserve
          largeCache.erase(cull);             //
      }

  The HashSet &= operator and retain() are functionally equivalent,
  but retain() also works with dissimilar value types.
2017-05-11 12:25:35 +02:00
8728e8353f STYLE: avoid explicit use of 'word' as HashTable template parameter
- less clutter and typing to use the default template parameter when
  the key is 'word' anyhow.

- use EdgeMap instead of the longhand HashTable version where
  appropriate
2017-05-10 13:44:27 +02:00
4d126bfe2d ENH: add dictionary optionalSubDict() method as per .org change (20-Apr) 2017-05-10 12:51:21 +02:00
ede3a844e1 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-08 11:55:12 +01:00
91585fd32e STYLE: checkMesh: formatting help 2017-05-08 11:54:48 +01:00
cd8083eb95 Merge branch 'feature-consistency-face-access' into 'develop'
Feature consistency face access

See merge request !109
2017-05-08 10:58:42 +01:00
46a1fed97b Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-08 10:51:24 +01:00
134f7abd57 ENH: checkMesh: output vol fields of mesh quality. Fixes #466. 2017-05-08 10:50:59 +01:00
708c1b5c41 ENH: simplify ensightCells/ensightFaces with labelRange
- can avoid allocating/reallocating SubList

STYLE: don't need NamedEnum for ensightCells, ensightFaces lookup
2017-05-08 11:21:44 +02:00
b4f6484ddf ENH: use faceTraits for managing differences between face representations 2017-05-07 16:58:44 +02:00
0c4d2bcd76 ENH: improve consistency in access for face, triFace, edge.
- ensure that each have found() and which() methods

- add faceTraits for handling compile-time differences between
  'normal' and tri-faces

- provide line::unitVec method (complimentary to edge::unitVec)
2017-05-07 15:49:52 +02:00
c872b0f13f Merge remote-tracking branch '1612/master' into develop 2017-05-05 10:20:02 +02:00
f895c934e7 COMP: skip compilation of plugins if include files are missing (fixes #464) 2017-05-05 10:14:48 +02:00
8006d64d74 COMP: skip compilation of plugins if include files are missing (fixes #464) 2017-05-05 10:02:34 +02:00
cd6221664f Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-04 17:50:33 +01:00
4b7c74f8eb BUG: sampledPlane: fix parallel running on subset. Fixes #463. 2017-05-04 17:50:07 +01:00
97b6475877 Merge branch 'feature-improved-container-classes' into 'develop'
improved container classes

See merge request !108
2017-05-04 16:48:57 +01:00
ff132ff5f6 ENH: orientedFields - updated mapping and parallel utils 2017-05-04 15:32:51 +01:00
6747d14dfa BUG: odd table size after shrink (issue #460)
- remove this unused method
2017-05-04 13:11:46 +02:00
7edd801c72 BUG: wall/patch distance and inverseDistanceDiffusivity - updated dimensions and use meshWave as a default method for backwards compatibility. Fixes #462 2017-05-04 11:33:00 +01:00
8dae01913c ENH: regex matching on std::string, not Foam::string
- avoids unneeded promotion of types.
  Easier to switch regex engines in the future.
2017-05-04 12:31:49 +02:00
3b2cd0b107 DPMDyMFoam, DPMDyMFoam: Corrected support for closed-domain simulations
Also added support for extrapolated pressure boundary conditions.
2017-05-04 09:39:23 +01:00
b39b90a9b5 CrankNicolsonDdtScheme: Corrected input of off-centering coefficient of 1 2017-05-11 19:33:01 +01:00
03d180724b ENH: improve HashTable iterator access and management
- provide key_iterator/const_key_iterator for all hashes,
  reuse directly for HashSet as iterator/const_iterator, respectively.

- additional keys() method for HashTable that returns a wrapped to
  a pair of begin/end const_iterators with additional size/empty
  information that allows these to be used directly by anything else
  expecting things with begin/end/size. Unfortunately does not yet
  work with std::distance().

  Example,
     for (auto& k : labelHashTable.keys())
     {
        ...
     }
2017-05-04 10:17:18 +02:00
759306a3e2 STYLE: more consistent typedefs in Map, PtrMap, HashPtrTable 2017-05-04 02:47:32 +02:00
e105e30bfb STYLE: add edge(labelPair) constructor, debug info etc. 2017-05-04 02:42:50 +02:00
f7e502d459 STYLE: relocate some friend operations to be global ones 2017-05-04 02:39:57 +02:00
5d541defe6 ENH: simplify and extend labelRange
- add increment/decrement, repositioning. Simplify const_iterator.

- this makes is much easier to use labelRange for constructing ranges of
  sub-lists. For symmetry with setSize() it has a setStart() instead of
  simply assigning to start() directly. This would also provide the
  future possibility to imbue the labelRange with a particular policy
  (eg, no negative starts, max size etc) and ensure that they are
  enforced.

  A simple use case:

    // initialize each to zero...
    List<labelRange> subListRanges = ...;

    // scan and categorize
    if (condition)
       subListRanges[categoryI]++;  // increment size for that category

    // finally, set the starting points
    start = 0;
    for (labelRange& range : subListRanges)
    {
        range.setStart(start);
        start += range.size();
    }
2017-05-04 02:19:01 +02:00
bdc48f6f54 thermophysicalModels: Corrected alphah to be enthalpy based
in

solidSpecie/transport/const/constAnIsoSolidTransport
solidSpecie/transport/const/constIsoSolidTransport
solidSpecie/transport/exponential/exponentialSolidTransport
solidSpecie/transport/polynomial/polynomialSolidTransport
specie/transport/logPolynomial/logPolynomialTransport
specie/transport/polynomial/polynomialTransport
specie/transport/sutherland/sutherlandTransport

Resolves bug-report https://bugs.openfoam.org/view.php?id=2532
2017-05-03 14:59:07 +01:00
5db1694633 surfaceTensionModels: Resolved warning from Clang concerning virtual function overload 2017-05-03 19:17:43 +01:00
009f8df176 TUT: minor update 2017-05-22 13:37:51 +01:00
db5348880e MRG: resolved merge conflicts from merge from develop branch 2017-05-19 16:29:54 +01:00
79bfd7d7d9 TUT: Corrected execute permissions on run scripts 2017-05-19 11:46:58 +01:00
62ff00f860 COMP: specie - ensure if block is evaluated 2017-05-18 22:12:48 +01:00
0a4733acab ENH: Tutorial updates 2017-05-18 14:47:00 +01:00
28868f8d4d ENH: Updated reading of dimensioned types from transportProperties dictionary to avoid the need to provide the dimension set 2017-05-18 14:44:52 +01:00
9a6f0fdd37 COMP: Updated kOmegaSSTSato model to suppress compiler warning 2017-05-18 14:43:05 +01:00
9efd9ce061 BUG: TDACChemistryModel - corrected construction of tabulationResults_ field 2017-05-18 14:42:37 +01:00
776d87836b STYLE: corrected header comment 2017-05-18 12:49:09 +01:00
d71a7857bf Merge remote-tracking branch 'origin/develop' into integration-foundation 2017-05-18 12:43:15 +01:00