Commit Graph

19616 Commits

Author SHA1 Message Date
dd54aa3018 BUG: non-lazy PackedList (fixes #484)
- The unset() method never auto-vivifies, whereas the set() method
  always auto-vivifies. In the case where set() is called with a zero
  for its argument - eg, set(index, 0) - this should behave
  identically to an unset() and not auto-vivify out-of-range entries.
2017-05-26 21:02:28 +02:00
8f1a4f792d ENH: include region counting in triSurface writeStats 2017-05-26 15:00:48 +02:00
26fef427ed ENH: provide lookupOrDefault for NamedEnum - makes for easier use. 2017-05-26 16:59:20 +02:00
b83007594a ENH: HashTable cfind() method returning a const_iterator
- This follows the same idea as cbegin/cend and is helpful when using
  C++11 auto to ensure we have unambiguous const-safe access.

  Previously:
  ====
    typename someLongClass::const_iterator iter = someTable.find(key);

    ... later on:
    *iter = value; // Oops, but caught by compiler.

  We can save some typing with auto, but it is uncertain what we get:
  ====
    auto iter = someTable.find(key);
        // iterator or const_iterator?
        // depends on someTable having const or non-const access.

    ... later on:
    *iter = value;  // Oops, but not caught by compiler.

  Using cfind instead, auto will deduce const_iterator as the type:
  ====
    auto iter = someTable.cfind(key);  // definitely const_iterator

    ... later on:
    *iter = value; // Oops, but caught by compiler.
2017-05-26 12:42:30 +02:00
2af602c2f4 STYLE: for Istream/Ostream check() use FUNCTION_NAME in messages 2017-05-26 10:59:16 +02:00
0564efb9e1 ENH: add basic support for file extensions to word
- when a plain word is used as a directory-local name for file.
  We don't have a full blown fileName, but still want to check/remove
  extensions etc.
2017-05-26 10:48:01 +02:00
ccc1ce4a25 ENH: avoid calling fileName::components twice in Foam::cp 2017-05-26 10:39:56 +02:00
5efe22c2f0 ENH: align constructors of geometricSurfacePatch with surfZoneIdentifier
- both classes are nearly identical and should be merged in the future.
2017-05-26 09:10:48 +02:00
8d3e106166 STYLE: remove redundant size check 2017-05-26 08:15:49 +02:00
15d5fca144 BUG: argList: -decomposeParDict handling in combination with -case.
Related to #482 but this one is the handling inside argList.
2017-05-25 12:12:43 +01:00
757cc7a15d BUG: cshrc: account for lsof printing mount point after files
Some versions of lsof print the mount point (if remote) after the
script path:
    /hosts/mymachine/OpenFOAM/OpenFOAM-plus.develop/etc/cshrc (mymachine:/home)
This now gets filtered out.
2017-05-25 10:43:57 +01:00
4b20991841 ENH: argEdge: order of member initialisation. Fixes #481. 2017-05-25 09:16:49 +01:00
391a9c5fe2 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-24 16:11:33 +01:00
ce88aca9f7 Merge branch 'feature-oriented-fields' into 'develop'
Initial attempt to track oriented surface fields

See merge request !104
2017-05-24 14:30:51 +01:00
0215e330d5 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-24 14:30:46 +01:00
2838c4554c BUG: pointConstraints: resize all constraints arrays. Fixes #480. 2017-05-24 14:28:28 +01:00
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
9a864bdd85 GIT: Resolved merge conflict when merging develop branch 2017-05-24 12:30:09 +01:00
b5ed93a40a ENH: orientedFields - refectored and simplified usage 2017-05-24 12:26:12 +01:00
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
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
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
31d0f2c51c Merge branch 'integration-foundation' into 'develop'
Integration foundation

See merge request !99
2017-05-22 14:06:34 +01:00
5a528a7330 STYLE: additional cleanup of hashtable item found checks 2017-05-22 15:06:21 +02:00
9fef27cb7d ENH: relocate inplaceUniq (wordReList) into wordRes 2017-05-22 14:59:05 +02:00
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
bb67ccd37d ENH: Cleaned up hash table item found checks 2017-05-19 11:15:35 +01:00
8255005e19 ENH: mapDistributePolyMesh: new test app 2017-05-18 16:57:22 +01:00
e4d15d874c Merge branch 'HashTable-method-enhancements' into 'develop'
Hash table method enhancements

See merge request !112
2017-05-18 12:54:36 +01:00
c1cbfe7a46 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-18 12:41:07 +01:00
99f31a75f0 COMP: Removed override directives to remove compiler warnings 2017-05-18 12:40:48 +01:00
15d0a918c5 COMP: use VTK_OVERRIDE on paraview methods
COMP: avoid undefined-var-template warning in runTimePostProcessing
2017-05-18 13:21:48 +02:00
20fd33e37c TUT: Moved laminar case from RAS->laminar directories 2017-05-18 11:44:52 +01:00
b6dec5860b ENH: histogram: output raw count, auto-range. Fixes #467 2017-05-18 10:54:45 +01:00
667b885116 STYLE: remove ununsed foamToVTK template functions 2017-05-17 18:59:51 +02:00
009f1ec85c ENH: only update meshSubset on topo change 2017-05-19 15:17:29 +02:00
69efba7348 STYLE: typos in comments 2017-05-19 15:16:54 +02:00
8a3915eb67 STYLE: Corrected header text 2017-05-17 17:35:27 +01:00
d6e721a9bd ENH: simplify subsetMesh using new IOobjectList methods 2017-05-17 18:35:08 +02:00
aeae8e70de ENH: simplify sampling grouping using new IOobjectList methods 2017-05-17 16:25:20 +02:00
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
568570d2be Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-17 12:53:10 +01:00
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
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
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
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
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
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