Commit Graph

12 Commits

Author SHA1 Message Date
d4ac96cdf3 ENH: support use of 'vector' in #calc directive (fixes #2039) 2021-03-29 16:00:11 +02: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
2b249e1ad3 STYLE: avoid default copyright assignment when generating from code templates 2017-07-11 08:58:52 +02:00
ea257737df codeTemplates: The copyright year is now set automatically 2017-04-18 11:01:41 +01:00
0143ef82ea ENH: dynamicCode: include unitConversion by default 2011-11-14 15:11:30 +00:00
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
e8a3587df4 ENH: support file-scope 'localCode' in dynamicCode 2011-03-08 11:08:42 +01:00
3d34c5146c BUG: codedFixedValueFvPatchScalarField oldLibPath_ not copied
- prevented the reloading from working properly (thanks Mattijs!)
2011-03-08 08:48:27 +01:00
97cd3af1ff ENH: cleanup codeStream - use dynamicCode, dynamicCodeContext encapsulation
Problems remain with codedFixedValueFvPatchScalarField:

- readIfModified() notices change on system/codeDict, but the
  codeProperties::setUnmodified() means that only a single entry will
  get processed

- it appears that while dlclose() may (or may not) be actually closing
  the library, there are probably still references about. This means
  that a subsequent reloading still points to the original functions
  and the lookup is not updated correctly.
2011-03-01 14:19:24 +01:00
51399bbbd1 STYLE: use dynamicCode/ instead of codeStream/ for dynamically generated code 2011-02-24 13:21:39 +01:00