Commit Graph

23366 Commits

Author SHA1 Message Date
3e76ef7b5b DOC: update repository links 2019-12-09 14:54:25 +01:00
b576f9dcc7 ENH: subModelBase - added localPath() helper function for file writing 2019-12-06 22:05:02 +00:00
07ff2a2828 ENH: Added new scalarFixedValue boundary condition
This condition applies a scalar multiplier to the value of another
boundary condition.

Usage
    Property     | Description             | Required    | Default value
    scale        | Time varing scale       | yes         |
    patch        | patchField providing the raw patch value | yes |

Example of the boundary condition specification to scale a reference
velocity of (15 0 0)  supplied as a fixedValue by a table of values
that ramps the scale from 0 to 1 over 1 second:

    <patchName>
    {
        type            scaledFixedValue;

        scale table
        (
            (    0   0)
            (  1.0 1.0)
            (100.0 1.0)
        );

        patch
        {
            type            fixedValue;
            value           uniform (15 0 0);
        }
    }
2019-12-06 21:15:56 +00:00
f8577a3423 ENH: applyBoundaryLayer - optionally write turbulence fields
- The previous option 'write-nut' controlled the writing of turbulence
  nut, but other turbulence fields were always written.
  These have been shown to be a source of instability for many cases.

  This commit replaces the 'write-nut' option by a 'writeTurbulenceFields'
  option that controls the writing of all turbulence fields.
  If not set, only the velocity field is written.

  For compatibility, the old 'write-nut' option is still recognized
  but is redirected to 'writeTurbulenceFields'.
2019-12-06 20:43:43 +00:00
5d7d24df94 GIT: Housekeeping 2019-12-06 17:43:08 +00:00
ae3a595b60 ENH: consistent and less ambiguous naming for fileStat 2019-12-06 17:43:04 +00:00
3a816006dc COMP: support m4 include directories for wrap-lemon
Set the m4 -I include accordingly to have the folllowing:
  - the directory of the parser.
  - include/ in the top-level source tree of the current target
    (eg, src/finiteVolume/include-m4/ when compiling libfiniteVolume)
  - include/ from OpenFOAM

Additional -dry-run option for makeParser, wrap-lemon for expanding m4
only.

Extend m4 wrapping support to include bison as well.
2019-12-06 16:15:07 +01:00
4030ed4543 ENH: strip C/C++ comments from expressions by default 2019-12-06 16:15:07 +01:00
ec2c014980 ENH: improve space handling for removeComments
- include the trailing newline for the "// comment" form, but also add
  in leading space removal. This ensure that we do not introduce odd
  indentation, while also eliminating lines that are solely C++
  comments.
2019-12-06 16:15:07 +01:00
7e8fb96d33 STYLE: output consistency for exprResult entry 2019-12-06 16:15:07 +01:00
68de05285a ENH: suppress keyword indentation when keyword is empty (List, Field)
- output the "uniform", "nonuniform" Field entry tags as words instead
  of raw character strings, which can help for direct tokenization or
  when sending/receiving via Pstreams.
2019-12-06 16:15:07 +01:00
dac0dd137e ENH: relocate/rename expression-related ops to exprOps 2019-12-06 16:15:07 +01:00
9a7adf3606 Merge branch 'master' into develop-v1906 2019-12-06 12:05:32 +00:00
d7aac83971 ENH: add general m4 lemon macros for expressions
- include some specialization for zip/unzip fields
2019-12-03 12:34:29 +01:00
38089b7ffb BUG: incorrect template parameter for FieldOps 2019-12-09 10:07:00 +01:00
1786974705 ENH: improve exprResult handling
- some support for "uniform" bool fields. Calculating an averaged
  value for a boolField does not work very well, but we simply define
  that the field average is 'true' when more than 1/2 of its values
  are true. Not exactly true, but allows templated definitions to work
  smoothly.

- additional output method writeValue().
  This outputs the single (uniform) value or the first value of the
  field.
2019-12-06 14:02:35 +01:00
9fd696e1ae ENH: add ITstream append and seek methods.
- ITstream append() would previously have used the append from the
  underlying tokenList, which leaves the tokenIndex untouched and
  renders the freshly appended tokens effectively invisible if
  interspersed with primitiveEntry::read() that itself uses tokenIndex
  when building the list.

  The new append() method makes this hidden ITstream bi-directionality
  easier to manage. For efficiency, we only append lists
  (not individual tokens) and support a 'lazy' resizing that allows
  the final resizing to occur later when all tokens have been appended.

- The new ITstream seek() method provides a conveniently means to move
  to the end of the list or reposition to the middle.
  Using rewind() and using seek(0) are identical.

ENH: added OTstream to output directly to a list of tokens

---

BUG: List::newElem resized incorrectly

- had a simple doubling of the List size without checking that this
  would indeed be sufficient for the requested index.

  Bug was not triggered since primitiveEntry was the only class using
  this call, and it added the tokens sequentially.
2019-12-06 17:23:59 +01:00
6b5da70602 ENH: add scalarOps with divide-by-zero protection
- add functor versions of floor/ceil/round for scalar
2019-12-07 16:55:18 +01:00
cc16bc9338 STYLE: comments, spelling in token.H 2019-12-07 16:46:49 +01:00
b7c54bc00c ENH: snappyHexMesh: proximity check
This adds automatic deletion of cells inside small gaps. This is
generally used to avoid having excessive numbers of cells in irrelevant
areas of a geometry. It is nearly the opposite of automatic gap refinement
 - that refines cells to resolve the gap; this functionality removes cells
to not mesh the gap.

The proximity handling will remove those cells which are inside 'thin' gaps
where 'thin' is defined as a distance of 2*'blockLevel'
It will
- detect surfaces which have the new 'blockLevel' specification
- convert this to a minimum gap distance
- detect cells which are inside this gap
- remove these cells and add exposed faces to the nearest 'real' patch
2019-12-09 14:29:21 +00:00
a956926c37 GIT: update submodule references 2019-12-06 20:36:30 +01:00
c684b51152 Merge remote-tracking branch 'main-1906/master' into develop 2019-12-06 19:33:52 +01:00
ae1b77ee36 STYLE: force bool context for xorOp 2019-12-03 07:45:21 +01:00
f654b7fac6 BACKPORT: accept argList::get() methods as per 1912 2019-12-02 13:51:38 +01:00
1b017938c3 ENH: be more forgiving when reading ensight surface files (#1511)
- The case files may contain #... comment lines
- The geometry file may contain an optional "extents" entry
- Properly handle element id specifications (off|assign|ignore|given).

- Partially handle node id specifications (off|assign|ignore|given).
  Treat "given" like "ignore", since results in the lightest amount of
  coding and in many cases the "given" node ids are in fact 1-based
  contiguous values and thus no different than "ignore" for our
  purposes.
2019-12-02 09:42:52 +01:00
76de104daa ENH: fileModificationSkew: add polling. Fixes #1472. 2019-11-27 14:13:01 +00:00
1310e85225 ENH: support 'get()' for retrieving argList options
- previously only had 'opt<..>()' for options, but 'get<..>()'
  provides more similarity with dictionary methods.
  The 'opt<..>()' method is retained.
2019-11-26 21:07:11 +01:00
29ccc00c7d COMP: incorrect specialization namespace 2019-11-26 07:39:52 +01:00
925b9af20d CONFIG: csh syntax 2019-11-26 07:26:12 +01:00
f30b0895e8 CONFIG: prevent bash completions from examining the description notes 2019-11-25 18:38:39 +01:00
6dd3cd0e51 ENH: add clear/append method to Enum and std::ostream output
- allows use of Enum in more situations where a tiny Map/HashTable
  replacement is desirable. The new methods can be combined with
  null constructed for to have a simple low-weight caching system
  for words/integers instead of fitting in a HashTable.
2019-11-25 18:15:31 +01:00
29faf6da89 BUG: ensightReadFile ignores binary string limits (#1511)
ENH: downgrade error on type-mismatch to a warning

- Ensight data files generated by OpenFOAM will start with the name of
  the data type (Eg, "scalar", "vector" etc), but this convention may
  fail for data files that have been generated elsewhere.
2019-11-25 15:37:00 +01:00
efebc5db3f BUG: arrarySet: incorrect index->location. Fixes #1506 2019-11-20 13:57:57 +00:00
daac96f165 ENH: addition of expressions::exprResult
- polymorphic field/result
2019-11-18 11:29:53 +01:00
241dee29b2 ENH: add transformPoints -time option (issue #1510) 2019-11-25 10:55:05 +01:00
2e57f329f2 ENH: extend topoSetSource::sourceType to support bitmasks
- improves usability in other contexts

ENH: expose topoSet::findIOobject as public
2019-11-22 19:37:51 +01:00
492705b0cf COMP: provide dummy methods and operations for pointPatchField
- since pointPatchField is not derived from Field, methods such as
  negate() or a unary min(), max() are missing.

  These have apparently not been needed thus far, but are used
  indirectly via GeometricField.
2019-11-22 19:20:09 +01:00
7c3ec88bca ENH: additional GeometricField::New static constructors
STYLE: split off into separate file
2019-11-22 11:31:22 +01:00
73425eb119 ENH: add FieldOps with conditionals (assignment, ternary) 2019-11-20 20:35:55 +01:00
fae91edd85 ENH: basics for expression string handling 2019-11-20 16:32:32 +01:00
42a9a6ae5a ENH: add generator class for uniform/gaussian random numbers
- can be used in combination with std::generate, or as a substitute
  unary operator to supply random numbers for std::transform.
2019-11-21 09:40:00 +01:00
cc138b0d82 COMP: make Random constructor explicit 2019-11-21 12:01:23 +01:00
cd366b60cc ENH: add explicit flipBoolOp, tighten access on pass-through (noOp) version
- the noOp now returns const reference, noexcept
2019-11-20 19:48:09 +01:00
2d7bad2d2e COMP: add value_type to pointPatchField 2019-11-20 20:35:44 +01:00
f964bb301c ENH: isoSurfaceTopo: ignore ACMI polyPatch. Fixes #1508. 2019-11-21 09:37:56 +00:00
06361f3f05 STYLE: additional notes for IOobject, regIOobject 2019-11-20 11:55:47 +01:00
83d6aa424a ENH: add move reset and move assignment for tmp, tmpNrc
- improves similarity to autoPtr. Simplifies coding.

  Example,

    tmp<volScalarField> tfield;

    // sometime later...

    tfield.reset
    (
        volScalarField::New("myfield", mesh, dimensionedScalar(Zero))
    );

- as per tmp, disallow tmpNrc assignment from literal nullptr

- as per autoPtr, allow explicit test as bool (same as valid).
2019-11-19 20:21:42 +01:00
a3d399a550 DOC: adjust wording and version information 2019-11-19 16:15:01 +01:00
9e6683f7bc ENH: add conditionals to #eval (string to scalar)
Example,

     ($radius > 10) ? sin(degToRad(45)) : cos(degToRad(30))

- protect division and modulo against zero-divide.

- add scanner/parser debugging switches in the namespace,
  selectable as "stringToScalar". For example,

    debug parser:  foamDictionary -debug-switch stringToScalar=2
    debug scanner: foamDictionary -debug-switch stringToScalar=4
    debug both:    foamDictionary -debug-switch stringToScalar=6
2019-11-19 14:22:03 +01:00
a5a222f7cf ENH: support scalar tokens when testing #if, #ifeq
- this allows use of #eval results in the tests
2019-11-19 09:00:00 +01:00