1. 31 May, 2022 1 commit
    • Mark OLESEN's avatar
      ENH: support exprField specification for SemiImplicitSource · d2e10bca
      Mark OLESEN authored
      - this allows more flexibility when defining the location or intensity
        of sources.
      
        For example,
      
        {
            type            scalarSemiImplicitSource;
            volumeMode      specific;
            selectionMode   all;
      
            sources
            {
                tracer0
                {
                    explicit
                    {
                        type       exprField;
      
                        functions<scalar>
                        {
                            square
                            {
                                type square;
                                scale 0.0025;
                                level 0.0025;
                                frequency 10;
                            }
                        }
      
                        expression
                        #{
                            (hypot(pos().x() + 0.025, pos().y()) < 0.01)
                          ? fn:square(time())
                          : 0
                        #};
                    }
                }
            }
        }
      
      ENH: SemiImplicitSource: handle "sources" with explicit/implicit entries
      
      - essentially the same as injectionRateSuSp with Su/Sp,
        but potentially clearer in purpose.
      
      ENH: add Function1 good() method to define if function can be evaluated
      
      - for example, provides a programmatic means of avoiding the 'none'
        function
      d2e10bca
  2. 27 May, 2022 1 commit
  3. 17 May, 2022 1 commit
  4. 17 Jan, 2022 1 commit
  5. 13 Jan, 2022 1 commit
  6. 03 Dec, 2021 2 commits
    • Mark OLESEN's avatar
      ENH: add coded Function1 (#2282) · 9a512511
      Mark OLESEN authored
      - update coded templates with qualified names
      
      GIT: add in missing PatchFunction1 constant() method
      
      - was missed in a previous commit
      9a512511
    • Mark OLESEN's avatar
      ENH: add Function1 constant() member · f7c7fa94
      Mark OLESEN authored
      - marks if the value is considered to be independent of 'x'.
        Propagate into PatchFunction1 instead ad hoc checks there.
      
      - adjust method name in PatchFunction1 to 'whichDb()' to reflect
        final changes in Function1 method names.
      
      ENH: add a Function1 'none' placeholder function
      
      - This is principally useful for interfaces that expect a Function1
        but where it is not necessarily used by a particular submodel.
      
      TUT: update Function1 creation to use objectRegistry
      f7c7fa94
  7. 26 Nov, 2021 2 commits
  8. 09 Nov, 2021 1 commit
  9. 05 Nov, 2021 1 commit
  10. 28 Jul, 2021 1 commit
    • Mark OLESEN's avatar
      BUG: decomposing ConstantField loses information (#2101) · 8f1bad1c
      Mark OLESEN authored
      - previously had a patch-size check, which caused a zero-sized patch
        to be "sticky" as uniform Zero regardless of what the original input
        stated (eg, "constant 0.5")
      
        This was caused by short-circuiting logic that circumvented reading
        on zero-size patches.
      8f1bad1c
  11. 15 Jul, 2021 1 commit
  12. 09 Jun, 2021 1 commit
  13. 07 Jun, 2021 2 commits
    • Mark OLESEN's avatar
      ENH: provide dictionary access for coded BCs etc (#1922) · b59ae32d
      Mark OLESEN authored
      - in some cases, additional dictionary inputs are useful for extending
        the input parameters or functionality of dynamic coded conditions.
      
        Typically this can be used to provide a simple set of dictionary
        inputs that are used to drive specific code, but allows changing the
        inputs without causing a recompilation.
      
        Accessed with this type of code:
        ```
        const dictionary& dict = this->codeContext();
        ```
      
      boundary conditions and function objects:
      
      * specify an additional codeContext dictionary entry:
        ```
        codeContext
        {
            ...
        }
        ```
      
      PatchFunction1:
      
      * The code context dictionary is simply the dictionary used to specify
        the PatchFunction1 coefficients.
      
        To replicated persistant data, use local member static data.
        Eg,
        ```
        code
        #{
            // Persistent (Member) Data
            static autoPtr<Function1<scalar>> baseVel;
            static autoPtr<Function1<vector>> baseDir;
            ...
        #}
        ```
      
      fvOptions:
      
      * currently not applicable
      b59ae32d
    • Mark OLESEN's avatar
      ENH: improve codeTemplates · b0891824
      Mark OLESEN authored
      - meshTools include/library for many (most) coded items
      
      - add PatchFunction1 include for coded BCs to provide ready access
        to Function1 and PatchFunction1
      b0891824
  14. 26 Apr, 2021 1 commit
    • Mark OLESEN's avatar
      ENH: adjustments for Function1/PatchFunction1 · 399c21d7
      Mark OLESEN authored
      - additional debug information
      
      - improve support for dictionary specification of constant, polynomial
        and table entries. These previously only worked properly for
        primitiveEntry, which causes confusion.
      
      - extend table Function1 to include TableFile functionality.
        Simplifies switching and modifying content.
      399c21d7
  15. 19 Apr, 2021 1 commit
  16. 09 Mar, 2021 1 commit
    • Mark OLESEN's avatar
      ENH: improvements for token methods · 51cd7cee
      Mark OLESEN authored
      - direct check of punctuation.
        For example,
      
            while (!tok.isPunctuation(token::BEGIN_LIST)) ..
      
        instead of
      
        while (!(tok.isPunctuation() && tok.pToken() == token::BEGIN_LIST)) ..
      
        Using direct comparison (tok != token::BEGIN_LIST) can be fragile
        when comparing int values:
      
            int c = readChar(is);
            while (tok != c) ..  // Danger, uses LABEL comparison!
      
      - direct check of word.
        For example,
      
            if (tok.isWord("uniform")) ..
      
        instead of
      
            if (tok.isWord() && tok.wordToken() == "uniform") ..
      
      - make token lineNumber() a setter method
      
      ENH: adjust internal compound method empty() -> moved()
      
      - support named compound tokens
      
      STYLE: setter method for stream indentation
      51cd7cee
  17. 26 Nov, 2020 1 commit
  18. 19 Nov, 2020 2 commits
    • Mark OLESEN's avatar
      ENH: support frequency or period for Sine/Square Function1 (#1917) · 8d2d894a
      Mark OLESEN authored
      - For slow oscillations it can be more intuitive to specify the
        period.
      
      ENH: separate mark/space for Square
      
      - makes it easier to tailor the desired intervals.
      
      BUG: incorrect square wave fraction with negative phase shifts
      
      ENH: additional cosine Function1
      
      STYLE: avoid code duplication by inheriting Cosine/Square from Sine.
      8d2d894a
    • Mark OLESEN's avatar
      ENH: Function1 and PatchFunction1 improvements (#1917) · 2f2dcdcf
      Mark OLESEN authored
      - easier support for non-mandatory functions.
      
        In some boundary conditions it can be desirable to support
        additional functions, but not necessarily require them. Make this
        easier to support with a Function1, PatchFunction1 NewIfPresent()
        selector.
      
      - support for compatibility lookups
      
      - harmonize branching logic and error handling between Function1 and
        PatchFunction1.
      
      ENH: refactor a base class for Function1, PatchFunction1
      
      - includes base characteristics, patch or scalar information
      
      ENH: additional creation macros
      
      - makeConcreteFunction1, makeConcretePatchFunction1Type for adding a
        non-templated function into the correct templated selection table.
        makeScalarPatchFunction1 for similarity with makeScalarFunction1
      2f2dcdcf
  19. 15 Oct, 2020 1 commit
  20. 25 Sep, 2020 1 commit
  21. 14 Jul, 2020 1 commit
  22. 25 Jun, 2020 1 commit
  23. 11 Jun, 2020 1 commit
  24. 02 Jun, 2020 1 commit
    • Mark OLESEN's avatar
      ENH: unify use of dictionary method names · 3e43edf0
      Mark OLESEN authored
      - 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).
      3e43edf0
  25. 23 May, 2020 1 commit
  26. 20 May, 2020 1 commit
  27. 16 May, 2020 1 commit
  28. 18 Mar, 2020 1 commit
  29. 20 Feb, 2020 1 commit
  30. 18 Nov, 2019 1 commit
  31. 31 Oct, 2019 1 commit
  32. 09 Nov, 2019 1 commit
  33. 12 Jul, 2019 1 commit
  34. 06 Jun, 2019 1 commit
  35. 04 Apr, 2019 1 commit
  36. 07 Jan, 2019 1 commit