Commit Graph

22631 Commits

Author SHA1 Message Date
b24b7e2dab STYLE: writeDictionary - updated output messages 2019-05-31 15:04:15 +01:00
a3c8de7543 ENH: Added new hydrostatic pressure function object
Calculates and outputs the pressure fields p_rgh and ph_rgh based on the
option that was previously hard-coded in the fireFoam solver

Usage
    Example of function object specification to calculate hydrostatic pressure:
    \verbatim
    hydrostaticPressure1
    {
        type        hydrostaticPressure;
        libs        ("libinitialisationFunctionObjects.so");
        ...
    }
    \endverbatim

    Where the entries comprise:
    \table
        Property     | Description             | Required    | Default value
        log          | Log to standard output  | no          | yes
        p_rgh        | Name of p_rgh field     | no          | p_rgh
        ph_rgh       | Name of ph_rgh field    | no          | ph_rgh
        pRef         | Name of pressure ref field | no       | pRef
        rho          | Name of density field   | no          | rho
        U            | Name of velocity field  | no          | U
        gh           | Name of gravity*height volume field  | no | gh
        ghf          | Name of gravity*height surface field | no | ghf
        nCorrectors  | Number of correctors when solving ph_rgh | no | 5
    \endtable

Note
    Calculates the hydrostatic pressure on construction/re-initialisation;
    the execute and write functions are not used.
2019-05-23 16:08:06 +01:00
1bc69bb2c5 TUT: incorrect regex escaping in fvSchemes
- error trapped by C++11 regex
2019-05-30 14:26:15 +02:00
7246ad8038 BUG: scalarBar range ignored in runTimePostProcessing
- was missing range setting for the colour lookup table
2019-05-30 12:02:56 +02:00
67d2702c81 ENH: support LLTMatrix, QRMatrix solve of indirect lists (#1220) 2019-05-29 11:49:08 +02:00
6ece3e2c48 ENH: harmonize matrix constructors (#1220)
- generalize identity matrix constructors for non-scalar types

- add constructors using labelPair for the row/column sizing information.
  For a SquareMatrix, this provides an unambiguous parameter resolution.

- reuse assignment operators

STYLE: adjust matrix comments
2019-05-29 09:50:46 +02:00
b14b9f9204 STYLE: prefix indexing, loop spacing in Matrix types 2019-05-23 12:47:54 +01:00
c2b81fb0cf ENH: add primitives support for mixed precision (#1086)
- add vsmall pTraits for scalars
- report the solve scalar in buildArch information
2019-02-03 16:54:25 +00:00
41d47e6313 STYLE: provide labelPair typedef (a common type) within Pair.H itself 2019-05-28 14:49:53 +02:00
788ba5f49e ENH: FieldFunctions reduce on returnType, not input type (#1327)
- for most functions the input type and return type are identical,
  but MinMax, sumMag are not.
2019-05-28 14:48:18 +02:00
8fd809633a ENH: correct sumProd return type (#1086)
- previously returned scalar, but now return pTraits cmptType
  which is the same as scalarProduct / outerProduct type.
2019-02-10 14:31:35 +00:00
3f0c0ecebb STYLE: eliminate complex constants that are duplications of pTraits
- eg pTraits<complex>::zero, pTraits<complex>::one instead.
  This is consistent with other primitives such as scalar, label etc.
2019-05-27 18:09:43 +02:00
6a1b5e12e0 STYLE: rename dense matrix multiply methods
- make names consistent with lduMatrix
    A*x  => Matrix::Amul
    AT*x => Matrix::Tmul  (same as x*A)
2019-05-27 17:13:05 +02:00
a0c0b64d48 ENH: foamGetDict avoids overwrite of existing files (-force to override) 2019-05-27 11:39:00 +02:00
010b5e45d7 STYLE: relocated darwin, mingw information to wiki content 2019-05-27 11:13:06 +02:00
b45c8e05b1 STYLE: relocate deprecation scripts and coding guide to wiki content
- reduces installation clutter, allows easier cross-referencing

- remove older deprecated scripts (foamDebugSwitches, foamGraph*)
2019-05-27 10:33:08 +02:00
3c6effc975 COMP: force dlOpen for windows application binaries (#1238)
- when windows portable executables (.exe or .dll) files are loaded,
  their dependent libraries not fully loaded. For OpenFOAM this means
  that the static constructors which are responsible for populating
  run-time selection tables are not triggered, and most of the run-time
  selectable models will simply not be available.

Possible Solution
=================

  Avoid this problem by defining an additional library symbol such as
  the following:

      extern "C" void libName_Load() {}

  in the respective library, and tag this symbol as 'unresolved' for
  the linker so that it will attempt to resolve it at run-time by
  loading the known libraries until it finds it. The link line would
  resemble the following:

      -L/some/path -llibName -ulibName_Load

  Pros:
    - Allows precise control of forced library loading

  Cons:
    - Moderately verbose adjustment of some source files (even with macro
      wrapping for the declaration).
    - Adjustment of numerous Make/options files and somewhat ad hoc
      in nature.
    - Requires additional care when implementing future libraries and/or
      applications.

  - This is the solution taken by the symscape patches (Richard Smith)

Possible Solution
=================

  Avoid this problem by simply force loading all linked libraries.
  This is done by "scraping" the information out of the respective
  Make/options file (after pre-processing) and using that to define
  the library list that will be passed to Foam::dlOpen() at run-time.

  Pros:
    - One-time (very) minimal adjustment of the sources and wmake toolchain
    - Automatically applies to future applications

  Cons:
    - Possibly larger memory footprint of application (since all dependent
      libraries are loaded).
    - Possible impact on startup time (while loading libraries)
    - More sensitive to build failures. Since the options files are
      read and modified based on the existence of the dependent
      libraries as a preprocessor step, if the libraries are initially
      unavailable for the first attempt at building the application,
      the dependencies will be inaccurate for later (successful) builds.

  - This is solution taken by the bluecape patches (Bruno Santos)

Adopted Solution
================

  The approach taken by Bruno was adopted in a modified form since
  this appears to be the most easily maintained.

Additional Notes
================

  It is always possible to solve this problem by defining a corresponding
  'libs (...)' entry in the case system/controlDict, which forces a dlOpen
  of the listed libraries. This is obviously less than ideal for large-scale
  changes, but can work to resolve an individual problem.

  The peldd utility (https://github.com/gsauthof/pe-util), which is
  also packaged as part of MXE could provide yet another alternative.
  Like ldd it can be used to determine the library dependencies of
  binaries or libraries. This information could be used to define an
  additional load layer for Windows.
2019-05-25 19:10:14 +02:00
987fe3fbf2 ENH: silently add "lib" prefix and ".so" suffix for dlOpen'ed libraries
- reduces some dictionary clutter and probably looks less confusing
  than having an ending that may not correspond to the current OS.

  Eg, "fvOptions" instead of "libfvOptions.so", "libfvOptions.dylib" ...

- convenience dlOpen method for multiple files
2019-05-23 17:30:54 +01:00
2d3c9ca0b7 STYLE: writeDictionary - updated output format 2019-05-23 12:55:32 +01:00
2e49c97979 ENH: overset: change tag for communication 2019-05-23 11:28:08 +01:00
09c1621afb BUG: incorrect IOobject instance for absolute windows path (#1238)
STYLE: remove unused local variables in edgeMeshFormat
2019-05-23 10:27:06 +01:00
c9d0fefd85 COMP: place libz linkage at the end (#1238) 2019-05-22 15:31:10 +01:00
25fecd7588 STYLE: avoid deprecated lookup methods 2019-05-22 15:06:12 +01:00
5b5824fb74 ENH: add matrix-vector, vector-matrix multiplication (#1220)
- the vector-matrix multiplication is treated as a row vector
2019-05-20 15:58:32 +01:00
931d050724 ENH: improvements, modernization of matrix containers (#1220)
- add iterators, begin/end, empty() methods for STL behaviour.
  Use standard algorithms where possible
     * std::fill, std::copy
     * std::min_element, std::max_element

- access methods consistent with other OpenFOAM containers:
     * data(), cdata(), uniform()

- Use ListPolicy to impose output line breaks

- Can recover matrix storage for re-use elsewhere.
  For example, to populate values with 2D i-j addressing and later
  release it as flat linear storage.

- construct/assign moveable

- added minMax() function for Matrix

- additional inplace +=, -=, *=, /= operations

- add named methods at() and rowData() to Matrix.
  Allows a better distinction between linear and row-based addressing

- low-level matrix solve on List/UList instead of Field
2019-05-22 12:18:31 +01:00
c93efc0eda ENH: add sign(), csign() methods for complex
- use std::hypot for complex mag() instead of long-hand version

- Detail::conj() function for complex or non-complex
2019-05-21 11:18:12 +01:00
cd51444057 ENH: surfaceFieldValue - update selection on mesh changes 2019-05-22 08:15:19 +01:00
d249e7f8be ENH: Removed misleading PSD13 output 2019-05-20 13:37:11 +01:00
b29596d5b5 ENH: Compatibility updates for finiteArea 2019-05-15 08:35:07 +01:00
ad718b7388 Merge branch 'feature-dictionary-checking' into 'develop'
Feature dictionary checking

See merge request Development/OpenFOAM-plus!259
2019-05-22 10:29:41 +01:00
d85bf36965 ENH: dictionary checking methods with predicates on the input values
- can be used to check the validity of input values.

Example:

    dict.getCheck<label>("nIters", greaterOp1<label>(0));
    dict.getCheck<scalar>("relax", scalarMinMax::zero_one());

- use 'get' prefix for more regular dictionary methods.
  Eg, getOrDefault() as alternative to lookupOrDefault()

- additional ops for convenient construction of predicates

ENH: make dictionary writeOptionalEntries integer

- allow triggering of Fatal if default values are used

ENH: additional scalarRange static methods: ge0, gt0, zero_one

- use GREAT instead of VGREAT for internal placeholders

- additional MinMax static methods: gt, le
2019-05-21 19:10:14 +01:00
f2002a753f ENH: uniformFixedValue: add library 2019-05-21 13:36:36 +01:00
ba01298b3e ENH: overset: GAMG normalisation of hole cells 2019-05-21 13:21:27 +01:00
46647fcaf9 ENH: GAMG: supress debug msg 2019-05-21 09:42:34 +01:00
dea152929c BUG: off-by-one in Windows env and cwd sizing (#1238) 2019-05-20 17:41:27 +01:00
e02eed160d STYLE: additional constructor for randomDecomp 2019-05-20 08:58:35 +01:00
e81f87ea89 STYLE: adjust fluxSummary documentation 2019-05-17 11:46:51 +01:00
dd990fe50a STYLE: update of 'mode' to 'type' keyword for radiation properties 2019-05-17 09:53:25 +01:00
4eeadb73d3 STYLE: add notices for deprecated dictionary methods 2019-05-17 09:02:51 +01:00
0d7a84ff66 CONFIG: use C++11 regex instead of POSIX for newer compilers
BUG: The ok_ flag was not being updated in the regExpCxx::set() method
2019-05-21 12:29:52 +01:00
58602f1c40 STYLE: add namespace qualifiers to interpolationWeights 2019-05-16 14:06:40 +01:00
b992b862c0 ENH: overset: allow use in non-dynamicMesh applications
This is to avoid overset interpolation in the calculation of the stencil
itself since this triggers a loop.
2019-05-16 10:30:55 +01:00
11ad82f84a ENH: timeInfo function object (#1320)
- records execution and wallclock times to postProcessing/
  which can be more convenient than parsing a log file.
2019-05-15 09:21:45 +01:00
ab991e57fe BUG: overset: out-of-range indexing. Fixes #1321 2019-05-15 11:43:34 +01:00
5cf46aa63f STYLE: parProfiling: no tabs 2019-05-15 10:01:54 +01:00
b0f298fe05 ENH: parProfiling: do not print on exit. Fixes #1298. 2019-05-15 08:30:06 +01:00
8b48340d75 ENH: decomposition: added 'random' method for testing.
This will use a random-number generator to select for
each cell the processor. Useful for testing parallel/non-parallel
consistent behaviour.
2019-05-08 12:27:24 +01:00
c8c6af5b6c ENH: add -excludePatches option for surfaceMeshExtract (#1315)
- simplify faceZone selection in surfaceMeshExtract
2019-05-10 17:11:47 +02:00
d90ec8567b TUT: add "libfvMotionSolvers.so" to lumpedPointMotion tutorial
- uniformFixedValue was relocated from lib OpenFOAM
2019-05-10 13:12:33 +02:00
d9d5a87259 ENH: support all 12 Euler rotation orders (#1292)
- adjust naming of quaternion 'rotationSequence' to be 'eulerOrder'
  to reflect its purpose.

- provide rotation matrices directly for these rotation orders in
  coordinateRotations::euler for case in which the rotation tensor
  is required but not a quaternion.
2019-05-10 11:20:21 +02:00