Commit Graph

25 Commits

Author SHA1 Message Date
2b7b3700c2 ENH: replace keyType with wordRe for matching selectors.
- The keyType is primarily used within dictionary reading, whereas
  wordRe and wordRes are used for selectors in code.
  Unifying on wordRe and wordRes reduces the number matching options.
2021-04-19 16:33:42 +00:00
9a2a22a03a ENH: provide setter methods for IOobject read/write options etc.
- simplifies local toggling.

- centralize fileModification static variables into IOobject.
  They were previously scattered between IOobject and regIOobject
2021-03-17 15:10:00 +01:00
41d3e6f1d4 ENH: various dlLibraryTable improvements/refinements (#1737)
- libs() singleton method for global library handling

- explicit handling of empty filename for dlLibraryTable open/close.
  Largely worked before, but now be more explicit about its behaviour.

- add (key, dict) constructor and open() methods.
  More similarity to dimensionedType, Enum etc, and there is no
  ambiguity with the templated open().

- construct or open from initializer_list of names

- optional verbosity when opening with auxiliary table,
  avoid duplicate messages or spurious messages for these.

- basename and fullname methods (migrated from dynamicCode).

- centralise low-level load/unload hooks

- adjust close to also dlclose() aliased library names.
2020-07-14 11:19:05 +02:00
21456b8cdc BUG: verbatim token output strips type (#1497)
- use os::write(token) for verbatim string to preserve its type
2020-01-20 10:09:58 +01:00
12bd45673a BUG: coded: preserve VERBATIMSTRING. Fixes #1497. 2020-01-13 15:10:07 +00:00
1a3b50f635 GIT: stray line 2019-12-16 16:26:17 +01:00
eaa138443a STYLE: library functions using std::string 2019-12-16 16:16:53 +01:00
76de104daa ENH: fileModificationSkew: add polling. Fixes #1472. 2019-11-27 14:13:01 +00:00
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
a85c55bbb5 ENH: ensure that content changes in coded objects are noticed (#1293)
- for codedFunctionObject and CodedSource the main code snippets
  were not included in the SHA1 calculation, which meant that many
  changes would not be noticed and no new library would be compiled.

  As a workaround, a dummy 'code' entry could be used solely for the
  purposes of generating a SHA1, but this is easily forgotten.

  We now allow tracking of the dynamicCodeContext for the coded
  objects and append to the SHA1 hasher with specific entries.
  This should solve the previous misbehaviour.

  We additionally add information about the ordering of the code
  sections. Suppose we have a coded function object (all code
  segments are optional) with the following:

      codeExecute "";
      codeWrite   #{ Info<< "Called\n"; #};

  which we subsequently change to this:

      codeExecute #{ Info<< "Called\n"; #};
      codeWrite   "";

  If the code strings are simply concatenated together, the SHA1 hashes
  will be identical. We thus 'salt' with their semantic locations,
  choosing tags that are unlikely to occur within the code strings
  themselves.

- simplify the coded templates with constexpr for the SHA1sum
  information.

- Correct the CodedSource to use 'codeConstrain' instead of
  'codeSetValue' for consistency with the underlying functions.
2019-05-01 14:00:54 +02:00
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
a7a346b206 STYLE: indentation for FatalIOErrorInFunction calls 2018-11-06 09:49:22 +01:00
c6520033c9 ENH: rationalize dictionary access methods
- use keyType::option enum to consolidate searching options.
  These enumeration names should be more intuitive to use
  and improve code readability.

    Eg,   lookupEntry(key, keyType::REGEX);
    vs    lookupEntry(key, false, true);

  or

    Eg,   lookupEntry(key, keyType::LITERAL_RECURSIVE);
    vs    lookupEntry(key, true, false);

- new findEntry(), findDict(), findScoped() methods with consolidated
  search options for shorter naming and access names more closely
  aligned with other components. Behave simliarly to the
  methods lookupEntryPtr(), subDictPtr(), lookupScopedEntryPtr(),
  respectively. Default search parameters consistent with lookupEntry().

    Eg, const entry* e = dict.findEntry(key);
    vs  const entry* e = dict.lookupEntryPtr(key, false, true);

- added '*' and '->' dereference operators to dictionary searchers.
2018-10-15 16:16:12 +02:00
6390c18381 ENH: suppress Info output for some cases (issue #722, #893)
- add additional control via a Foam::infoDetailLevel flag, which is
  supported by a 'DetailLevel' macro.  Eg,

      DetailLevel << "some information" << nl

- When infoDetailLevel is zero, the stdout for all Foam::system() calls
  are also redirected to stderr to prevent child output from
  appearing on the parent.

- close stdin before exec in system call.
2018-06-22 12:26:33 +02:00
a3ef5cd137 Merge branch 'feature-chunkingComms' into 'develop'
Pstream: added maxCommsSize setting to do (unstructured) parallel transfers in blocks.

Tested:
- with maxCommsSize 0 produces exactly same result as plus.develop
- compiles with label64
- with maxCommsSize e.g. 3 produces exactly same result as plus.develop
- with maxCommsSize=0 exactly the same messages (with Pstream::debug = 1) as plus.develop

See merge request !85
2016-12-14 15:18:42 +00:00
e453f0bf02 ENH: Pstream: added maxCommsSize setting to do (unstructured) parallel transfers in blocks.
This is controlled by the setting maxCommsSize in etc/controlDict which
specifies the max number of bytes per exchange. If set to <= 0 it
is ignored. This max size of messages is important when doing e.g.
load balancing which can send over whole meshes.
2016-12-12 17:32:24 +00:00
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
f281f77e4a Updated member type comments
Resolves bug-report http://bugs.openfoam.org/view.php?id=2356
2016-11-28 21:23:00 +00:00
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
586b7ca30e STYLE: codedBase: indentation 2016-07-18 15:18:40 +01:00
aeb667e1f4 STYLE/ENH: reduce code duplication for coded boundary conditions (issue #184)
- relocate common dictionary output into codedBase class
2016-06-09 16:13:04 +01:00
83c7e97655 dynamicCode: Renamed 'redirectType' to 'name' to clarify the purpose
of the entry which is to provide the name of the generated class.

'redirectType' is supported for backward-compatibility.
2016-05-18 23:10:42 +01:00
dc43311e62 src/OpenFOAM: Update ...IOErrorIn -> ...IOErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-10 21:13:04 +00:00
d913e1c133 ENH: coded: allow for NFS skew 2014-01-14 17:34:06 +00:00
cd64f1762f ENH: codedFixedValue: refactor coded 2011-10-24 21:33:16 +01:00