Commit Graph

49 Commits

Author SHA1 Message Date
945e3e41b1 ENH: more consistent use of good() or direct testing instead valid() 2023-07-27 16:52:03 +02:00
d597b3f959 STYLE: check iterator validity with good() instead of found()
- aligns better with other container checks
2023-02-10 17:12:48 +01:00
fc43ed9d68 GIT: adjust for rebase edit of feature-runTimeControl-recycle 2022-02-28 09:22:06 +01:00
3d134167dd ENH: Refactored valueAverage FO and average runTimeCondition 2022-02-25 16:08:47 +01:00
bb04f5759d ENH: runTimeControl - enable resetting the trigger to an earlier instant
The runTimeControl function object can activate further function objects using
triggers. Previously the trigger index could only advance; this change set
allows users to set smaller values to enable function object recycling, e.g.

Repeat for N cycles:
1. average the pressure at a point in space
2. when the average stabilises, run for a further 100 iterations
3. set a new patch inlet velocity
  - back to (1)

- Removes old default behaviour that only permitted an increase in the
  trigger level. This type of 'ratcheting' mechanism (if required) is
  now the responsibility of the derived function object.
2022-02-25 15:39:26 +01:00
53c2eae543 ENH: runTimeControl - added 'none' condition as a no-op 2022-02-25 15:39:22 +01:00
ba8d6bddcc ENH: use singleton method for accessing runtime selection
STYLE: use alias to mark partialFaceAreaWeightAMI deprecation after v2012
2021-11-05 17:21:27 +01:00
b3142ffb54 ENH: runTimeControl - added option to trigger a fatal error on exit (#2042)
- useful when used in a batch process to trap the exit signal,
  e.g. stop the run when the velocity magnitude exceeds a given
  threshold:

    runTimeControl
    {
        type            runTimeControl;
        libs            ("libutilityFunctionObjects.so");
        nWriteStep      1;

        // Optional end 'action'
        satisfiedAction abort; // end; // setTrigger

        conditions
        {
            maxU
            {
                type            minMax;
                functionObject  MinMax;
                fields          ("max(mag(U))");
                value           1e6;
                mode            maximum;
            }
        }
    }
2021-03-23 20:49:31 +00:00
3e43edf056 ENH: unify use of dictionary method names
- previously introduced `getOrDefault` as a dictionary _get_ method,
  now complete the transition and use it everywhere instead of
  `lookupOrDefault`. This avoids mixed usage of the two methods that
  are identical in behaviour, makes for shorter names, and promotes
  the distinction between "lookup" access (ie, return a token stream,
  locate and return an entry) and "get" access (ie, the above with
  conversion to concrete types such as scalar, label etc).
2020-06-02 17:26:03 +02:00
2416599ea9 STYLE: format consistency for copyright 2020-04-15 23:28:41 +02:00
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
f94be1bebb ENH: use FatalIOErrorInLookup instead of FatalErrorInLookup 2019-07-16 10:26:51 +02:00
fb09f56aba ENH: use FatalErrorInLookup macros (#1362) 2019-07-12 18:00:00 +02:00
5215aab719 ENH: averageCondition - result now 'false' if no fields were processed 2019-06-20 12:10:12 +01:00
c901f9bc7f ENH: runTimeControl - updated time for maxDuration and minTimeStep conditions 2019-06-19 09:57:11 +01:00
2413d4d898 STYLE: consistent brackets for Enum construction 2019-05-31 10:44:23 +02:00
24861f5158 ENH: for-range, forAllIters() ... in functionObjects/
- reduced clutter when iterating over containers
2019-01-07 09:20:51 +01:00
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
1910ebc0ad STYLE: used guarded read in runTimeControl 2019-01-24 10:03:33 +01:00
c604adc0d1 ENH: runTimeControl - deactivate for -postProcess operation 2019-01-21 13:52:34 +00:00
452a281a00 ENH: fieldSelection - added checks for when fields are not found 2019-01-21 12:16:13 +00:00
0abae185b7 STYLE: Updated output message 2019-01-15 15:05:56 +00:00
d11a5091a4 ENH: Extended equationInitialResidualCondition to use field components 2019-01-21 11:42:49 +00:00
93b5559c87 ENH: runTimeControl - execute function objects on end 2018-12-04 14:39:40 +00:00
74dc8b3ce1 ENH: runTimeControl FO - added action for case that conditions are satisfied 2018-08-21 13:08:58 +01:00
ef615ed17f ENH: runTimeControl valueAverage condition - added start-up iterations option 2018-08-21 12:58:19 +01:00
a3327b3761 STYLE: runTimeControl FO conditions - refactor to use the Log macro 2018-08-21 12:53:29 +01:00
bd79f1d5ab ENH: runTimeControl FO - added new maxDuration condition 2018-08-20 14:04:27 +01:00
e64a87cd8e ENH: runTimeControl FO - added exact window averaging to the averageCondition 2018-08-20 14:03:57 +01:00
8b387961d9 ENH: run-time control clean-up 2018-08-17 16:52:11 +01:00
21d2d7e6c3 ENH: Initial implementation for FO activation by trigger 2018-08-16 12:44:33 +01:00
3b74512231 ENH: cleanup of Enum class
- more dictionary-like methods, enforce keyType::LITERAL for all
  lookups to avoid any spurious keyword matching.

- new readEntry, readIfPresent methods

- The get() method replaces the now deprecate lookup() method.

- Deprecate lookupOrFailsafe()
  Failsafe behaviour is now an optional parameter for lookupOrDefault,
  which makes it easier to tailor behaviour at runtime.

- output of the names is now always flatted without line-breaks.
  Thus,

     os << flatOutput(someEnumNames.names()) << nl;
     os << someEnumNames << nl;

  both generate the same output.

- Constructor now uses C-string (const char*) directly instead of
  Foam::word in its initializer_list.

- Remove special enum + initializer_list constructor form since
  it can create unbounded lookup indices.

- Removd old hasEnum, hasName forms that were provided during initial
  transition from NamedEnum.

- Added static_assert on Enum contents to restrict to enum or
  integral values.  Should not likely be using this class to enumerate
  other things since it internally uses an 'int' for its values.

  Changed volumeType accordingly to enumerate on its type (enum),
  not the class itself.
2018-10-18 12:57:32 +02:00
1036cf9612 ENH: avoid raw dictionary lookup in functionObjects (issue #762)
Style changes:
    - use lookupObjectRef instead of using const_cast
    - use tmp::New factory
2018-08-04 00:23:18 +02:00
34a7ea5da7 STYLE: use auto + cfind for constructor tables 2018-07-19 15:55:08 +02:00
f9fe71815a STYLE: consistent use of '= delete' for removed constructors/assignments
- make the purpose more explicit, and reduces some work for the
  compiler as well.
2018-05-30 12:03:17 +02:00
a230e8d408 STYLE: Correcting typos 2018-03-28 17:14:16 +01:00
36719bf55b STYLE: consistent lookupOrDefault template parameters
- in many cases can just use lookupOrDefault("key", bool) instead of
  lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a
  bool from an Istream uses the Switch(Istream&) anyhow

STYLE: relocated Switch string names into file-local scope
2018-03-26 09:09:09 +02:00
bc1f2fa97e STYLE: use auto and cfind to simplify selector usage (issue #512) 2017-07-03 10:36:03 +02:00
f55c568f13 ENH: upgrade from NamedEnum to Enum (issue #515) 2017-07-03 21:43:33 +02:00
bb67ccd37d ENH: Cleaned up hash table item found checks 2017-05-19 11:15:35 +01:00
7848953b21 ENH: equationInitialResidualCondition - updated to support user-time, e.g. engineTime 2017-03-21 16:56:21 +00:00
1f826361c6 STYLE: Consistency updates to change input of <var>Name to <var>. Fixes #306 2016-11-22 14:50:33 +00:00
07bbb1852e STYLE: Updated Doxygen comment markers 2016-10-05 15:16:12 +01:00
58d16674a0 COMP: Corrected Clang-reported errors 2016-10-04 14:49:26 +01:00
54042b08df ENH: Function objects - first pass at updating read functionality
Note: should be using the result of the parent::read(dict) when
deciding whether to read local entries...
2016-09-30 13:24:58 +01:00
3dbd39146c STYLE: consistency updates 2016-09-27 15:17:55 +01:00
ad1e798293 ENH: Initial testing updates 2016-09-26 09:28:31 +01:00
b9940cbbb1 COMP: Multiple changes - first clean build after latest merge - UNTESTED 2016-09-23 15:36:53 +01:00