Commit Graph

19715 Commits

Author SHA1 Message Date
mattijs
0215e330d5 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-24 14:30:46 +01:00
mattijs
2838c4554c BUG: pointConstraints: resize all constraints arrays. Fixes #480. 2017-05-24 14:28:28 +01:00
Andrew Heather
e0a5537d3f Merge branch 'feature-oriented-fields' of develop.openfoam.com:Development/OpenFOAM-plus into feature-oriented-fields 2017-05-24 14:22:54 +01:00
Andrew Heather
9a864bdd85 GIT: Resolved merge conflict when merging develop branch 2017-05-24 12:30:09 +01:00
Andrew Heather
b5ed93a40a ENH: orientedFields - refectored and simplified usage 2017-05-24 12:26:12 +01:00
Mark Olesen
51b4c38987 STYLE: explicitly use iterator object() in ListOps
STYLE: adjust parameter names and template types in invertManyToMany

- more explicit about the acceptable list types
2017-05-24 07:51:38 +02:00
Mark Olesen
c4caef3a1b ENH: nicer indentation of inGroups patch entry (issue #474)
- The inGroups is a wordList.
  It can be flattened on output to make files more readable.
2017-05-24 07:40:48 +02:00
sergio
9d7b0838ca Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-22 14:11:30 -07:00
Mark Olesen
f0fcfce6a3 ENH: avoid weird cast workarounds for edgeFaceCirculator
- holding a pointer instead of a reference for edgeFaceCirculator
  simplifies overall handling.
2017-05-22 18:12:25 +02:00
Andrew Heather
31d0f2c51c Merge branch 'integration-foundation' into 'develop'
Integration foundation

See merge request !99
2017-05-22 14:06:34 +01:00
Mark Olesen
5a528a7330 STYLE: additional cleanup of hashtable item found checks 2017-05-22 15:06:21 +02:00
Mark Olesen
9fef27cb7d ENH: relocate inplaceUniq (wordReList) into wordRes 2017-05-22 14:59:05 +02:00
Andrew Heather
6e72ceddd0 Merge branch 'enh-iter-cleanup' into 'develop'
Further hash table iter clean-up

See merge request !113
2017-05-19 12:44:05 +01:00
Andrew Heather
bb67ccd37d ENH: Cleaned up hash table item found checks 2017-05-19 11:15:35 +01:00
sergio
bd73ca26f2 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-18 12:45:12 -07:00
sergio
1f42c2a5ec Changing writing of thermal inerial flag 2017-05-18 12:44:25 -07:00
mattijs
8255005e19 ENH: mapDistributePolyMesh: new test app 2017-05-18 16:57:22 +01:00
Mark Olesen
e4d15d874c Merge branch 'HashTable-method-enhancements' into 'develop'
Hash table method enhancements

See merge request !112
2017-05-18 12:54:36 +01:00
Andrew Heather
c1cbfe7a46 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-18 12:41:07 +01:00
Andrew Heather
99f31a75f0 COMP: Removed override directives to remove compiler warnings 2017-05-18 12:40:48 +01:00
Mark Olesen
15d0a918c5 COMP: use VTK_OVERRIDE on paraview methods
COMP: avoid undefined-var-template warning in runTimePostProcessing
2017-05-18 13:21:48 +02:00
Andrew Heather
20fd33e37c TUT: Moved laminar case from RAS->laminar directories 2017-05-18 11:44:52 +01:00
mattijs
b6dec5860b ENH: histogram: output raw count, auto-range. Fixes #467 2017-05-18 10:54:45 +01:00
Mark Olesen
667b885116 STYLE: remove ununsed foamToVTK template functions 2017-05-17 18:59:51 +02:00
Mark Olesen
009f1ec85c ENH: only update meshSubset on topo change 2017-05-19 15:17:29 +02:00
Mark Olesen
69efba7348 STYLE: typos in comments 2017-05-19 15:16:54 +02:00
Andrew Heather
8a3915eb67 STYLE: Corrected header text 2017-05-17 17:35:27 +01:00
Mark Olesen
d6e721a9bd ENH: simplify subsetMesh using new IOobjectList methods 2017-05-17 18:35:08 +02:00
Henry Weller
39476bde1c GIT: Resolve conflict associated with cherry-pick of Foundation commit 79ff91350
79ff91350 - rhoPimpleFoam: Improved support for compressible liquids
(2017-05-17 17:05:43 +0100) <Henry Weller>
2017-05-17 17:05:43 +01:00
Mark Olesen
aeae8e70de ENH: simplify sampling grouping using new IOobjectList methods 2017-05-17 16:25:20 +02:00
Mark Olesen
b2edd73881 ENH: simplify foamToEnsight using new IOobjectList methods
BUG: foamToEnsight fails with missing field at time 0 (fixes #473)
2017-05-17 14:41:21 +02:00
mattijs
568570d2be Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-17 12:53:10 +01:00
mattijs
77865d22dd ENH: histogram: 1) if max is not provided use field max. 2) output count. Fixes #467. 2017-05-17 12:52:13 +01:00
Mark Olesen
9761e9d81e ENH: added classes() method to objectRegistry/IOobjectList
- provides a summary hash of classes used and their associated object names.

  The HashTable representation allows us to leverage various HashTable
  methods. This hashed summary view can be useful when querying
  particular aspects, but is most useful when reducing the objects in
  consideration to a particular subset. For example,

      const wordHashSet interestingTypes
      {
          volScalarField::typeName,
          volVectorField::typeName
      };

      IOobjectList objects(runTime, runTime.timeName());
      HashTable<wordHashSet> classes = objects.classes();

      classes.retain(interestingTypes);

      // Or do just the opposite:
      classes.erase(unsupportedTypes);

  Can also use the underlying HashTable filter methods

STYLE: use templated internals to avoid findString() when matching subsets
2017-05-17 10:43:24 +02:00
Mark Olesen
cf889306d0 ENH: added HashTable count, filter and generalized toc methods
- Generalized means over filtering table entries based on their keys,
  values, or both.  Either filter (retain), or optionally prune elements
  that satisfy the specified predicate.

  filterKeys and filterValues:
  - Take a unary predicate with the signature

        bool operator()(const Key& k);

  - filterEntries:
    Takes a binary predicate with the signature

        bool operator()(const Key& k, const T& v);

==

  The predicates can be normal class methods, or provide on-the-fly
  using a C++ lambda. For example,

      wordRes goodFields = ...;
      allFieldNames.filterKeys
      (
          [&goodFields](const word& k){ return goodFields.match(k); }
      );

  Note that all classes that can match a string (eg, regExp, keyType,
  wordRe, wordRes) or that are derived from a Foam::string (eg, fileName,
  word) are provided with a corresponding

      bool operator()(const std::string&)

  that either performs a regular expression or a literal match.
  This allows such objects to be used directly as a unary predicate
  when filtering any string hash keys.

  Note that HashSet and hashedWordList both have the proper
  operator() methods that also allow them to be used as a unary
  predicate.

- Similar predicate selection with the following:
    * tocKeys, tocValues, tocEntries
    * countKeys, countValues, countEntries

  except that instead of pruning, there is a simple logic inversion.
2017-05-17 10:18:14 +02:00
Mark Olesen
8d018e7950 ENH: added constant predicates
- predicates::always and predicates::never returning true and false,
  respectively. These simple classes make it easier when writing
  templated code.

  As well as unary and binary predicate forms, they also contain a
  match(std::string) method for compatibility with regex-based classes.

STYLE: write bool and direction as primitive 'int' not as 'label'.
2017-05-17 10:18:14 +02:00
Mark Olesen
a8d2ebf298 ENH: cleanup wordRe interfaces etc.
- ensure that the string-related classes have consistently similar
  matching methods. Use operator()(const std::string) as an entry
  point for the match() method, which makes it easier to use for
  filters and predicates. In some cases this will also permit using
  a HashSet as a match predicate.

regExp
====
- the set method now returns a bool to signal that the requested
  pattern was compiled.

wordRe
====
- have separate constructors with the compilation option (was previously
  a default parameter). This leaves the single parameter constructor
  explicit, but the two parameter version is now non-explicit, which
  makes it easier to use when building lists.

- renamed compile-option from REGEX (to REGEXP) for consistency with
  with the <regex.h>, <regex> header names etc.

wordRes
====
- renamed from wordReListMatcher -> wordRes. For reduced typing and
  since it behaves as an entity only slightly related to its underlying
  list nature.

- Provide old name as typedef and include for code transition.

- pass through some list methods into wordRes

hashedWordList
====
- hashedWordList[const word& name] now returns a -1 if the name is is
  not found in the list of indices. That has been a pending change
  ever since hashedWordList was generalized out of speciesTable
  (Oct-2010).

- add operator()(const word& name) for easy use as a predicate

STYLE: adjust parameter names in stringListOps

- reflect if the parameter is being used as a primary matcher, or the
  matcher will be derived from the parameter.
  For example,
      (const char* re), which first creates a regExp
      versus (const regExp& matcher) which is used directly.
2017-05-16 23:54:43 +02:00
Mark Olesen
cb4bf9e6b7 BUG: foamToEnsight fails with missing field at time 0 (fixes #473) 2017-05-16 17:28:09 +02:00
Mark Olesen
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
Mark Olesen
acc048a2ce Merge branch 'consistency-updates' into 'develop'
Consistency updates

See merge request !111
2017-05-15 12:34:02 +01:00
mattijs
1889ea83e3 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-15 10:17:57 +01:00
mattijs
3cf7820160 ENH: surfaceMeshTriangulate: handle time selection; handle moving meshes. Fixes #470. 2017-05-15 10:17:24 +01:00
Mark Olesen
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
Mark Olesen
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
Mark Olesen
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
Mark Olesen
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
Mark Olesen
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
Henry Weller
b83af3b085 rhoPimpleDyMFoam: Updated transonic formulation for consistency with sonicFoam 2017-05-12 18:34:00 +01:00
Mark Olesen
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
Henry Weller
7b825d0817 rhoPimpleFoam: Updated transonic option to be consistent with sonicFoam
Improves stability on start-up and allows running at slightly larger time-steps.
2017-05-12 11:04:38 +01:00