Commit Graph

21162 Commits

Author SHA1 Message Date
68e7533847 STYLE: include <utility> in stdFoam, formatting of list loop macros 2017-09-20 17:01:56 +02:00
8b63772882 ENH: simplify parsing logic in ISstream 2017-08-09 13:45:30 +02:00
5da321b6e6 TUT: various blockMeshDict with convertToMeters instead of scale 2017-08-07 20:57:05 +02:00
49a5af48d6 Merge branch 'feature-robuster-ioobjectlist-construction' into 'develop'
Feature robuster IOobjectList construction

See merge request !134
2017-08-09 10:58:19 +01:00
dafb232e54 Merge branch 'feature-bash-completion' into 'develop'
Feature bash completion

See merge request !137
2017-08-09 10:57:14 +01:00
ce0868106a ENH: use bash associative array for on-the-fly completion (issue #551)
- this reduces the number of functions and allows lazy loading of
  completion options, which makes it easy to quickly add any other
  OpenFOAM application in completion.

  The generic '_of_complete_' function handles (bash) completion for
  any OpenFOAM application. On the first call for any particular
  application, it retrieves the available options from the application
  help output and adds this information to its environmental cache for
  subsequent use.

- Tcsh completion uses the same function via a bash wrapper.
  But since its wrapper is transient, the on-the-fly generation would
  be less efficient. For this case, a pre-generated completion_cache
  can be used, which is generated with

      bin/tools/foamCreateCompletionCache
2017-08-08 13:17:36 +02:00
5f538909fb Merge branch 'style-noiseDict-syntax' into 'develop'
STYLE: New syntax compatible with v1706 (Fixes #548)

See merge request !131
2017-08-08 09:53:28 +01:00
e0ebc8e973 Merge branch 'master' into develop 2017-08-07 11:54:44 +01:00
20267c68b4 BUG: Corrected false integer divisions. Fixes #557 2017-08-07 11:53:54 +01:00
e03ca4c466 CONFIG: add Cray compiler, cray mpich settings, wmake rules (fixes #558)
- the cray C/C++ compilers appear to be option-compatible with gcc.

- no wmake rules for 32bit builds (deemed to be unnecessary)
2017-08-04 11:09:32 +02:00
8682e04765 ENH: add forwards file for various hash table types 2017-08-03 17:24:32 +02:00
b7317e0916 CONFIG: unset tcsh completions when cleaninp up (issue #551) 2017-08-03 13:49:14 +02:00
78da7dbd7a CONFIG: additional filenames completion for bash_completion
- handles the case where we are currently completing something that
  does not appear to be an option. For example,

      foamDictionary -expanded someD[TAB]

  should complete the filename, not present more options.
2017-08-03 10:47:42 +02:00
41c103b769 STYLE: return const char* in CStringList::data()
- and other code style adjustments
2017-08-03 09:16:09 +02:00
5148e4f860 STYLE: manage dictionary inputMode directly within entry class
- The logic for switching input-mode was previously completely
  encapsulated within the #inputMode directive, but without any
  programming equivalent. Furthermore, the encapsulation in inputMode
  made the logic less clear in other places.

  Exposing the inputMode as an enum with direct access from entry
  simplifies things a fair bit.

- eliminate one level of else/if nesting in entryIO.C for clearer logic

- for dictionary function entries, simply use
  addNamedToMemberFunctionSelectionTable() and avoid defining a type()
  as a static. For most function entries the information is only used
  to get a name for the selection table lookup anyhow.
2017-08-03 07:14:17 +02:00
c2a0663cc7 TUT: use general 'scale' instead of 'convertToMeters' in blockMeshDict
- although this has been supported for many years, the tutorials
  continued to use "convertToMeters" entry, which is specific to blockMesh.
  The "scale" is more consistent with other dictionaries.

ENH:
- ignore "scale 0;" (treat as no scaling) for blockMeshDict,
  consistent with use elsewhere.
2017-08-03 06:38:30 +02:00
8e4f015253 Merge branch 'style-string-methods' into 'develop'
Style string methods

See merge request !136
2017-08-02 16:28:42 +01:00
5ca19c2934 ENH: add tcsh completion functionality (issue #551)
- currently no cleanup of completions when deactivating an OpenFOAM
  tcsh environment

- tab completion with directories adds a space after the slash, which
  makes navigation a bit annoying.
2017-08-02 16:54:47 +02:00
46a2a73611 ENH: static versions of fileName clean(), path(), name()
- useful operations for other string representations of fileName types.

  The return type is in general a std::string with any narrowing
  being done by the caller on the return value.
2017-08-02 13:44:37 +02:00
e70fc61660 ENH: consolidate, cleanup some string methods
- consolidate word::validated() into word::validate() and also allow
  as short form for string::validate<word>(). Also less confusing than
  having similarly named methods that essentially do the same thing.

- more consistent const access when iterating over strings

- add valid(char) for keyType and wordRe
2017-08-02 12:33:35 +02:00
3f6e130c91 STYLE: flatten PVReaders directory structure 2017-08-02 11:19:57 +02:00
cfcfd53b84 Merge remote-tracking branch 'origin/master' into develop 2017-07-31 16:45:32 +02:00
d581b7d7b8 ENH: ignore lone dash on the command-line (issue #553)
- can inadvertently arise from TAB-completion, but an option without a
  name doesn't make sense, we trap this and emit a warning.
2017-07-31 16:34:43 +02:00
c614110d46 ENH: improve bash completion functionality (issue #551)
- use complete -o filenames, dropped -o nospace to make it more responsive.

- restructure completion code to use a unified backend, which makes it easier
  understand, maintain and re-use.

- foamCreateBashCompletions now simply outputs to a stdout, and allows
  quick generation of completion of single applications.

- add -fileHandler completion in anticipation of future changes there.

- relocated as etc/config.s/bash_completion to prevent inadvertently
  having two versions (.com, .org) installed at the same time.
2017-07-31 15:35:40 +02:00
4e48beffd4 ENH: support "one-shot" changes to the dictionary inputMode (issue #429)
- Instead of relying on #inputMode to effect a global change it is now
  possible (and recommended) to a temporary change in the inputMode
  for the following entry.

     #default   : provide default value if entry is not already defined
     #overwrite : silently remove a previously existing entry
     #warn      : warn about duplicate entries
     #error     : error if any duplicate entries occur
     #merge     : merge sub-dictionaries when possible (the default mode)

  This is generally less cumbersome than the switching the global
  inputMode. For example to provide a set of fallback values.

      #includeIfPresent "user-files"
      ...
      #default value uniform 10;

  vs.

      #includeIfPresent "user-files"
      #inputMode protect
      ...
      value uniform 10;
      #inputMode merge    // _Assuming_ we actually had this before

  These directives can also be used to suppress the normal dictionary
  merge semantics:

     #overwrite dict { entry val; ... }
2017-07-29 17:44:22 +02:00
9923ec969b ENH: more graceful handling of invalid IOobject headers (issue #539)
- With special-purpose templating it is possible to have file contents
  that almost look like an OpenFOAM file, but which are not.
  The contents do not need to be deliberately tricky, even the simplest
  README:

      FoamFile is the first word parsed in OpenFOAM files

  will trigger problems.
  We now trap any IOerror on these and reject this type of file as invalid.
2017-07-29 13:22:24 +02:00
797155f862 ENH: additional method for switching error throwing on/off (issue #552)
- error::throwExceptions(bool) returning the previous state makes it
  easier to set and restore states.

- throwing() method to query the current handling (if required).

- the normal error::throwExceptions() and error::dontThrowExceptions()
  also return the previous state, to make it easier to restore later.
2017-07-29 12:25:30 +02:00
41eafeb020 Merge branch 'fix-motorbike-visc' into 'develop'
BUG: Correct viscosity in simpleFoam motorBike tutorial (fixes #550)

See merge request !132
2017-07-28 10:34:17 +01:00
9b05e43626 BUG: Fix viscosity in simpleFoam motorBike tutorial (fixes #550) 2017-07-27 19:55:12 -04:00
8f11aeabaf BUG: Fix viscosity in simpleFoam motorBike tutorial (fixes #550) 2017-07-27 19:55:12 -04:00
96edef9d5e STYLE: New syntax compatible with v1706 2017-07-26 11:28:26 +05:30
efff02bbb7 BUG: incorrect range check in foamHelp (closes #547) 2017-07-22 23:54:08 +02:00
fce9545781 BUG: incorrect range check in foamHelp (closes #547) 2017-07-22 23:54:08 +02:00
41b40c6c2a COMP: typo in entry.H causing regression - fixes #546 2017-07-22 23:25:03 +02:00
a1742e7ad6 Merge branch 'style-string-access' into 'develop'
Consistent use of string methods

See merge request !128
2017-07-21 16:04:35 +01:00
7b4226ac4b Merge branch 'regression-icc' into 'develop'
Regression icc

See merge request !129
2017-07-21 16:04:17 +01:00
b0b4c1aae5 COMP: intel compiler issues with operator ""_deg (fixes #544)
- this represents a partial revert for commit 6a0a8b99b3
2017-07-21 16:40:31 +02:00
c0c7c39031 ENH: provide direct pointer access to dictionaryEntry 2017-07-21 12:05:32 +02:00
2c69b7d7c4 STYLE: adjust some line lengths, doxygen comments 2017-07-20 13:50:35 +02:00
01292a9a76 BUG: failed check for scotch headers on ubuntu (closes #543)
- installed under /usr/include/scotch/scotch.h

ENH: obtain fallback value for SCOTCH_VERSION from the header

COMP: add support for metis, scotch static libraries (eg, EasyBuild)
2017-07-20 12:15:08 +02:00
2fdc6b161a ENH: support full-scoping for keywords as lvalue (issue #429)
- patterns only supported for the final element.

  To create an element as a pattern instead of a word, an embedded
  string quote (single or double) is used for that element.
  Any of the following examples:

      "/top/sub/dict/'(p|U).*"     100;
      "/top/sub/dict/'(p|U).*'"    100;
      "/top/sub/dict/\"(p|U).*"    100;
      "/top/sub/dict/\"(p|U).*\""  100;

  are equivalent to the longer form:

      top
      {
          sub
          {
              dict
              {
                  "(p|U).*"     100;
              }
          }
      }

  It is not currently possible to auto-vivify intermediate
  dictionaries with patterns.

    NOK   "/nonexistent.*/value"   100;
    OK    "/existing.*/value"      100;

- full scoping also works for the #remove directive

        #remove "/dict1/subdict2/entry1"
2017-07-20 10:58:05 +02:00
f304c7e830 ENH: no dictionary variable and function expansion when discarding entry
- the 'protect' inputMode is used to supply defaults.
  If an entry already exists, it should act as a no-op without any
  side-effects whatsoever.
2017-07-20 10:27:35 +02:00
6a62c6bd63 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-07-19 20:04:31 +01:00
5711061624 COMP: foamList: missing fallback library. Fixes #541. 2017-07-19 20:03:59 +01:00
922ea5667e BUG: IOobject interpretation of ./ in construct-from-fileName (closes #482)
- Resolve ambiguity by using the following rules:

  1) starts with '/'  =>  absolute file-system path
  2) starts with './' or '../'  =>  file-system path relative to CWD
  3) otherwise treat as relative to the case

STYLE: allow write access to headerClassName
2017-07-19 12:09:43 +02:00
cc290b7c02 ENH: improve dictionary parsing behaviour for ill-formed entries (closes #510)
- mostly associated with forgotten quotes around "(abd|def)" ...

- Address different potential problems:

      (key) { key1   entry1; }
      (key) { key1   entry1; };    // <- Note trailing ';'
      (key) entry2;
2017-07-19 11:00:44 +02:00
b85457fc35 STYLE: Updated directory names for interCondensatingEvaporatingFoam solver. Fixes #533 2017-07-19 08:24:17 +01:00
efe9b04adc Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-07-19 08:19:15 +01:00
67e6f54808 Merge branch 'feature-streams-cleanup' into 'develop'
Feature streams cleanup

See merge request !127
2017-07-18 12:48:31 +01:00
263d7efae2 Merge branch 'stylefix-checkMesh' into 'develop'
STYLE: checkMesh: remove duplicate writeSets entry from header (resolves #293)

See merge request !125
2017-07-18 12:17:01 +01:00