Commit Graph

23034 Commits

Author SHA1 Message Date
Mark Olesen
bd35981feb ENH: stringOps::toScalar improvements
- add floor/ceil/round methods
- support evaluation of sub-strings

STYLE: add blockMeshDict1.calc, blockMeshDict1.eval test dictionaries

- useful for testing and simple demonstration of equivalence
2019-10-04 17:50:55 +02:00
Mark Olesen
61e95b8471 ENH: improvements to SubList and SubField
- SubField and SubList assign from zero
- SubField +=, -=, *=, /= operators

- SubList construct from UList (as per SubField)

  Note: constructing an anonymous SubField or SubList with a single
  parameter should use '{} instead of '()' to avoid compiler
  ambiguities.
2019-10-04 14:21:18 +02:00
Mark Olesen
f75e01c8c2 CONFIG: adjustments for CMake files
- drop plugin support for Qt4 (old paraview)

- handle upcoming changes in VTK version naming in CMake files
  * VTK_MAJOR_VERSION becomes VTK_VERSION_MAJOR etc.
2019-10-04 11:48:03 +02:00
Mark Olesen
c816ab7e03 CONFIG: update 3rd party versions (adios2=2.5.0 scotch=6.0.7) 2019-10-02 16:58:42 +02:00
Mark Olesen
2c2034f9ba COMP: add placeholder header files 2019-10-02 10:15:31 +02:00
Kutalmis Bercin
5cbfe44d6b TUT: add Allclean script into bump2D 2019-10-02 18:32:13 +01:00
Kutalmis Bercin
458738f095 ENH: Subtle renovations in wall function documentation and input
- Improves header file documentations
  - Adds const specifier to various objects
  - Allows various model constants to be user-defined
  - Changes from lookupOrDefault() to getOrDefault()
  - Consistent namespace usage:
    - If the WF belongs to only Foam:: namespace, use Foam:: explicitly
    - If the WF belongs to more than one namespaces, put the WF in namespace
      parentheses
  - Adds the missing dashes in comments required by Doxygen
  - Corrects capitalisation in comments
  - The terminology 'viscous sublayer' was preferred over 'laminar sublayer'
    due to the fact that the sublayer is not laminar.
  - The order of initialisation of fields is changed to be the same across all.
2019-10-02 12:58:20 +01:00
Kutalmis Bercin
ce9ea1ca08 ENH: Integrated OpenFOAM.org developments for wall functions
OpenFOAM.org commits for
  src/TurbulenceModels/turbulenceModels/derivedFvPatchFields/wallFunctions
were reviewed.

The parts of the commits made by OpenFOAM.org removing various code
duplications across wall functions were picked up by keeping the remaining
functionalities the same.

The duplications were mainly due to:
  - wall function model coefficients
  - yPlusLam(), checkPatch(), write() methods

The duplications were united under the base nutWallFunction.
2019-10-02 11:39:55 +01:00
sergio
6532f27547 ENH: add support for alpha field in temperatureCoupledBase 2019-10-01 19:16:43 +02:00
sergio
9b1b024f02 DEFEATURE: remove explicit regionCoupled methods
- did not perform as well as desired. Slated for replacement with a
  different approach.
2019-09-30 18:35:37 +02:00
Mark Olesen
cd503cdb98 SUBMODULES: upgrade from deprecated dictionary lookupEntry 2019-10-02 11:48:19 +02:00
OpenFOAM bot
f5a5830779 STYLE: update license text in a few files (were still GPL-2) 2019-10-02 10:28:59 +02:00
Mark Olesen
51099548ed COMP: remove ignored qualifiers 2019-10-02 09:42:29 +02:00
Mark Olesen
e9f96b25c9 STYLE: mark FixedList data(), first(), last() as noexcept
- since a zero-sized FixedList is disallowed, the accessors to the
  first/last elements are always known.

  This allows Pair second() to be noexcept as well (as per Tuple2)
2019-10-02 09:34:07 +02:00
Mark Olesen
de11575e1e STYLE: mark containers empty() and size() as noexcept 2019-10-02 09:04:20 +02:00
Mark Olesen
2c11d875ad CONFIG: bump API to 1909 to reflect #eval directive 2019-10-01 14:27:16 +02:00
Mark Olesen
e2d3d0125b STYLE: fix merge artifacts 2019-10-01 14:25:35 +02:00
Mark Olesen
518fb0858d CONFIG: support -prefix for openfoam wrapper 2019-10-01 13:42:58 +02:00
Mark Olesen
8f1844fff0 TUT: remove cr-nl endings
- use git show --ignore-space-change when examining
2019-10-01 12:39:10 +02:00
Mark Olesen
93422f1a72 TUT: use simpler syntax for motionSolverLibs entries 2019-10-01 10:58:53 +02:00
Mark Olesen
e7f380dcd5 TUT: use #eval instead of #calc where possible 2019-10-01 10:14:55 +02:00
Mark Olesen
02914539f7 TUT: consistent use of scale in blockMeshDict 2019-10-01 09:33:38 +02:00
Mark Olesen
3625d0ecd1 TUT: remove duplicate ;; in dictionaries 2019-10-01 10:39:40 +02:00
Mark Olesen
336b9ebd0b STYLE: only report use of #eval in FULLDEBUG mode (less clutter) 2019-10-01 10:43:37 +02:00
Mark Olesen
7ce2bdfce7 ENH: report the age of blockMesh 'convertToMeters' keyword
- was superseded by 'scale' in OCT-2008
2019-10-01 09:32:18 +02:00
Mark Olesen
f8539f8b46 ENH: use default zero (opaque) "transmissivity" in radiation lookup
- improves input compatibility with existing setups
2019-10-01 08:54:15 +02:00
Mark Olesen
836d3a849f ENH: add stringOps::toScalar and dictionary #eval directive
- the #eval directive is similar to the #calc directive, but for evaluating
  string expressions into scalar values. It uses an internal parser for
  the evaluation instead of dynamic code compilation. This can make it
  more suitable for 'quick' evaluations.

  The evaluation supports the following:
    - operations:  - + * /
    - functions:  exp, log, log10, pow, sqrt, cbrt, sqr, mag, magSqr
    - trigonometric:  sin, cos, tan, asin, acos, atan, atan2, hypot
    - hyperbolic:  sinh, cosh, tanh
    - conversions:  degToRad, radToDeg
    - constants:  pi()
    - misc: rand(), rand(seed)
2019-09-30 16:40:32 +02:00
Mark Olesen
bd9992d0d5 STYLE: reduce some file clutter for zero/one/nullObject
- more consistent location for oneField, oneFieldField inline definitions

- eliminate nullObjectI.H for more transparency
2019-09-30 12:42:22 +02:00
Mark Olesen
ba8f237b21 STYLE: use default destructor for ldu interfaces 2019-09-30 11:51:57 +02:00
Mark Olesen
dcff32ea65 STYLE: use move insert in featurePointConformer 2019-09-30 09:40:59 +02:00
Mark Olesen
a1727f4ba5 BUG: collated ensight writer dropping entries (#1451)
- regression as a result of changed time-handling from #1418.
  Now cache the fields information internally.
2019-09-29 18:06:59 +02:00
Mark Olesen
4a5569776e ENH: add cmptMagSqr for scalars, VectorSpace, Fields (#1449) 2019-09-29 16:53:42 +02:00
Mark Olesen
bc9295ee04 ENH: adjust HashTable iterator access
- previously allowed mapped value modification with a const iterator.
  However, this can lead to incorrect access patterns.

  Now tie the constness of the mapped value to that of the iterator.

- Remove deprecated iterator object() method.
  Was only used internally and was superseded by the val() method
  in an earlier version.

ENH: change isPointer to isPointerLike

- can distinguish between real pointers and wrapped pointers
2019-09-25 12:21:54 +02:00
Mark Olesen
b931e267fe SUBMODULES: updated HashTable iterator pointer derefencing 2019-09-29 18:11:47 +02:00
Mark Olesen
b6bf9129f6 DEFEATURE: pointer dereferencing for HashTable iterator
- this largely reverts 3f0f218d88 and 4ee65d12c4.

  Consistent addressing with support for wrapped pointer types (eg,
  autoPtr, std::unique_ptr) has proven to be less robust than desired.
  Thus rescind HashTable iterator '->' dereferencing (from APR-2019).
2019-09-27 19:45:54 +02:00
Mark Olesen
fc461a1cc6 TUT: use writeControl "adjustable" (alias for "adjustableRunTime") 2019-09-27 15:50:06 +02:00
Mark Olesen
4cc7bf1468 ENH: support writeControl 'none' (#1448)
- for special cases when normal writing is to be completely disabled
  and replaced with alternate means (eg, via a function object).

- support "adjustable" as "adjustableRunTime" alias to reduce typing
  for writeControl or outputControl
2019-09-27 15:46:26 +02:00
Mark Olesen
0840bfdcb8 STYLE: adjustments to HashSet, HashTable
- use HashTable emplace instead of insert to avoid unneeded argument
  (for HashSet).

- use emplace when generating zero-initialized values for
  HashTable::operator()

- drop unused parameter from Detail::HashTableSingle,
  adjust templates parameter names

- forward HashTable::operator[] to the semantically identical
  HashTable::at() to avoid code duplication
2019-09-27 14:52:52 +02:00
Mark Olesen
8a75bdb12f ENH: add dictionary method subDictOrAdd (related to #1442) 2019-09-25 17:25:16 +02:00
Mark Olesen
f1ed0a617b COMP: add lemon parser and skeleton code 2019-09-27 11:09:40 +02:00
Mark Olesen
4a6cd8f194 COMP: update make rules for lemon, add helper infrastructure for ragel 2019-09-27 11:05:35 +02:00
Mark Olesen
f7528a2ac5 COMP: fix inconsistent bison make rule
- generated C++ files, but didn't use C++ compiler
2019-09-26 10:41:16 +02:00
Mark Olesen
fb0057ea72 STYLE: accept lowercase -sp/-dp/-spdp for foamConfigurePaths 2019-09-25 18:20:32 +02:00
Mark Olesen
043d55e382 ENH: add wrapper for starting OpenFOAM as an interactive bash session
- call also be used non-interactively for simple 'one-shot' use of
  OpenFOAM utilities or solvers

STYLE: use dash instead of brackets for '- see www.OpenFOAM.com'

- less cluttered in combination with API information
2019-09-25 17:36:10 +02:00
Mark Olesen
fd7fe96e9f SUBMODULES: updated HashTable iterator names 2019-09-25 15:16:19 +02:00
Mark Olesen
2259fd845c STYLE: add const_cast when deleting pointers in objectRegistry
- makes the intention clearer, allows for future tightening of
  iterator access rules.
2019-09-25 13:30:25 +02:00
Mark Olesen
a1ee14690b STYLE: add source directory structure for lumpedPointMotion 2019-09-24 14:54:02 +02:00
OpenFOAM bot
38b53e5346 STYLE: use default destructor in header definitions 2019-09-24 12:14:36 +02:00
Mark Olesen
310c5d934e STYLE: spacing and punctuation 2019-09-24 11:04:17 +02:00
Mark Olesen
60a8f7b634 ENH: allow alternative delimiter for getLine. Default: '\n' 2019-09-24 09:31:28 +02:00