Commit Graph

23524 Commits

Author SHA1 Message Date
d7622d1ef8 ENH: add virtual omega to turbulenceModels
STYLE: update dimensionSets in SpalartAllmaras
2020-03-11 16:31:42 +00:00
aa9be5b5cd ENH: nearWallFields - updated construction of sampled field. Fixes #1620 2020-03-11 15:26:46 +00:00
0eecec4811 ENH: Added GeometricField copy constructor with additional BC handling. See #1620
Often we want to copy a field and replace boundary conditions, e.g. change type
to calculated for some patches.  This has typically been achieved by creating a
word list of new patch types which are then fed through to the fvPatchField::New
factory method.  This is OK for types that require no additional input (usually
from dictionary) but leaves other more complex types partially
constructed/usable.

The new constructor clones all BCs except those with indices specified, for
which the fvPatchField::New method is called for the supplied patch field type.
2020-03-11 15:26:46 +00:00
149c1b66f3 COMP: mpi: missing cast in debug message 2020-03-11 15:19:44 +00:00
a47fc3ded8 STYLE: polyMesh: remove duplicated code. 2020-03-11 13:54:09 +00:00
6ae359f662 Merge branch 'feature-pipecg' into 'develop'
ENH: lduMatrix: new matrix solvers: PPCG,PPCR

See merge request Development/openfoam!334
2020-03-11 13:53:04 +00:00
ab4bfaeee3 ENH: lduMatrix: new matrix solvers: PPCG,PPCR
PPCG is pipelined version of PCG, PPCR is conjugate
residual version.
2020-03-11 13:53:03 +00:00
2c4b639e1f ENH: 'mag' postOperation for surfaceFieldValue (#1622)
- support postOperation for volFieldValue as well
2020-03-11 11:59:04 +01:00
18e53c3c06 BUG: Fixes issue #1606
Proper counting of regime on faces of the patch
2020-02-28 11:56:06 -08:00
7e8a215506 Merge branch 'feature-analytic-eigen-small-offdiag' into 'develop'
ENH: improve analytic eigen for small off-diagonals

See merge request Development/openfoam!342
2020-02-28 10:50:50 +00:00
6576397e81 ENH: improve analytic eigen for small off-diagonals 2020-02-28 10:49:58 +00:00
b476dd92e6 ENH: improvements for nastran surface writer (#1571)
- avoid face copying.
  Maintain separate offsets/list for non tri/quad face decomposition,
  which eliminates copying for tri/quad types that represent the bulk
  of geometries

- report inappropriate use of PLOAD2 for higher-ranks only once per
  field instead of per face.  For this case, write its magnitude
  instead of 0.

- perform field output scaling prior to calling the write face
  function. This will make it easier to handle different per-field
  scaling in the future (#1612)

BUG: nastran quad written as "CTRIA3" instead of "CQUAD4"
2020-02-27 13:16:40 +01:00
fc26fb758d ENH: add stringListOps with whitelist/blacklist matching
- refactored from ensightMesh, foamToVTK, surfaceMeshExtract

STYLE: use wordRes matching() method instead of findString() function
2020-02-26 21:40:09 +01:00
a456e9ae92 STYLE: relocate nonCoupledBoundaryTree into meshSearcher
- use point::uniform in more places
2020-02-24 18:41:02 +01:00
3835734f6a DEFEATURE: remove further remnants of surfMesh samplers
- continuation of commit 57d2eabc6f (2019-02-22)
2020-02-24 18:17:56 +01:00
5ba2cbc54f CONFIG: improve prefix matching for system libraries (#1607)
- missed detection of system libraries when installed with multiarch
  paths like /usr/lib/x86_64-linux-gnu

CONFIG: improve handling of group/user config files (#928)

- changed bashrc handling of FOAM_CONFIG_NOUSER to use
  FOAM_CONFIG_MODE instead. Propagate into foamEtcFile to make this
  a stickier control.

  This change allows better control, but also enables cluster
  installations to define their own value within the OpenFOAM prefs.sh
  file to prevent users accidentally mis-configuring things if
  necessary.

- remove undocumented handling of an (a)ll mode in foamEtcFile to
  avoid potential pitfalls.

- add support for FOAM_CONFIG_ETC handling.
  This allows injection of an extra search layer when finding
  project etc files

ENH: improvements to foamConfigurePaths (#928)

- handle FOAM_CONFIG_ETC implicitly, or explicitly with the new
  -etc option.

STYLE: more explicit wording in foamConfigurePaths usage (#1602)

- document that an absolute path (eg, -scotch-path) overrides/ignores
  the equivalent ThirdParty setting (eg, -scotch)

- longer options -system-compiler and -third-compiler for -system
  and -third, respectively. Clearer as to their purpose.

- adjust the location sanity check to look for META-INFO directory.
2020-02-24 16:00:16 +01:00
083181cac4 ENH: handle entry alternatives outside of string expansion
- string expansions have supported "${var:-default}" syntax for
  several versions, but this did not apply plain dictionary expansions.

  Eg, the following did not parse

     massFlow  ${entry1:-100};

ENH: remove content and length restriction on '${..}' quoted variables

- allows this type of content:

     velocity2  ${velocity1:- ( 0 -100 10) };

- accept empty parameter strings for entries. This allows the
  following expansion to work as expected:

      hex (n1 n2..)  ${inletBlock:-} (10 10 10) simpleGrading (1 1 1)

  ie, optionally define the cellZone name for a given block

ENH: add single parameter dictionary writeEntry method.

- the dictionary knows its own name (dictName), which can be used
  when writing content
2020-02-21 14:37:11 +01:00
3c9c39e92a STYLE: use data/cdata instead of begin when accessing raw content 2020-02-21 12:32:12 +01:00
a054f31857 STYLE: remove dubious bool list initialization 2020-02-21 11:56:43 +01:00
4e6caf8d61 STYLE: return Switch by value, not const-reference 2020-02-21 11:44:29 +01:00
86fe2b7bc9 STYLE: remove dead code, refactor constructors in extrudePatchMesh 2020-02-21 11:13:22 +01:00
585ee0fe89 COMP: fix construct assignment from tmp (clang) 2020-02-21 10:08:47 +01:00
40e00fab01 STY: Updating multiphase tutorial settings 2020-02-20 09:04:11 -08:00
2892b78d72 CONFIG: support FOAM_EXTRA_CXXFLAGS (#1256)
- allows custom tuning of compilation parameters
2020-02-20 12:18:12 +01:00
fbbf9064b9 STYLE: remove trailing space, shell quoting
- emit "constant " and "uniform " as separate word/space combination
2020-02-20 10:11:23 +01:00
2d416a68a0 CONFIG: bump API to 2002
- changes in IOstreamOption, Switch, writeObject
2020-02-19 23:36:47 +01:00
5f93f20652 ENH: add stringOps::inplaceRemoveSpace()
Style changes:
  - use std algorithm for some stringOps internals
  - pass SubStrings iterators by const reference

ENH: special nullptr handling for ISstream getLine
  - pass through to istream::ignore to support read and discard
2020-02-19 23:36:46 +01:00
6b3b6bb99f ENH: add stream format options for surface writers (#1595)
- additional boundaryData options (header, binary, compression)

- remove vtkSurfaceWriter "writePrecision" keyword (1806 compatibilty)
  and use "precision" in format option sub-dictionary.
2020-02-19 21:30:55 +01:00
514751dcf7 STY: General clean up 2020-02-19 10:40:56 -08:00
83c06f1ace Merge branch 'feature.interPCFoam' into 'develop'
Feature.interPCFoam

See merge request Development/openfoam!338
2020-02-19 15:33:39 +00:00
1319144a72 STYLE: stefanProblem: cleanup. 2020-02-19 14:18:25 +00:00
31eb7c61b5 ENH: interfaceHeight: avoid tracking to corner point 2020-02-19 14:18:25 +00:00
4abb2153a1 STY: Updating headers for tutorial 2020-02-19 14:18:25 +00:00
499933dbab ENH: Adding features for phase change solvers
1) Adding interfaceHeight FO
2) Adding interfaceHeatResistance mass transfer model to
   interCondensatingEvaporatingFoam with spread source approach
3) Reworking framework for icoReactingMultiphaseInterFoam
2020-02-19 14:18:25 +00:00
2ee9315532 Merge branch 'feature-writeObject' into 'develop'
Feature write object

See merge request Development/openfoam!341
2020-02-19 09:26:35 +00:00
8498e3f516 ENH: reduce some overhead in fileOperations
- more consistent handling of file format (#1587)
2020-02-19 09:25:33 +00:00
42299dca22 ENH: use IOstreamOption for writeObject() calls.
- reduces the number of parameters that are being passed around
  and allows future additions into the IOstreamOption with mininal
  effort.
2020-02-19 09:25:33 +00:00
9be1772e0c BUG: surfaceInertia analytic eigendecomposition (fixes #1599)
- was missing cast to symmTensor
2020-02-19 10:14:57 +01:00
e3f681fa59 ENH: support use of IOstreamOption for IFstream/OFstream
- can be convenient to bundle IO options as a single parameter
2020-02-18 21:51:36 +01:00
f3106ec146 STYLE: use unique_ptr for Fstream resource management
STYLE: change return type of NewOFstream from Ostream to OSstream
2020-02-18 21:51:35 +01:00
3135dcf2a9 ENH: support IOstreamOption in abstract stream types
- expose the write IOstreamOption in Time
2020-02-18 21:51:35 +01:00
33f9ae5080 ENH: improvements to IOstreamOption
* Support default values for format/compress enum lookups.

  - Avoids situations where the preferred default format is not ASCII.
    For example, with dictionary input:

        format binar;

    The typing mistake would previously have caused formatEnum to
    default to ASCII. We can now properly control its behaviour.

        IOstream::formatEnum
        (
            dict.get<word>("format"), IOstream::BINARY
        );

    Allowing us to switch ascii/binary, using BINARY by default even in
    the case of spelling mistakes. The mistakes are flagged, but the
    return value can be non-ASCII.

* The format/compression lookup behave as pass-through if the lookup
  string is empty.

  - Allows the following to work without complaint

      IOstream::formatEnum
      (
          dict.getOrDefault("format", word::null), IOstream::BINARY
      );

  - Or use constructor-like failsafe method

      IOstream::formatEnum("format", dict, IOstream::BINARY);

  - Apply the same behaviour with setting stream format/compression
    from a word.

       is.format("binar");

    will emit a warning, but leave the stream format UNCHANGED

* Rationalize versionNumber construction

  - constexpr constructors where possible.
    Default construct is the "currentVersion"

  - Construct from token to shift the burden to versionNumber.
    Support token as argument to version().

    Now:

        is.version(headerDict.get<token>("version"));

    or failsafe constructor method

        is.version
        (
            IOstreamOption::versionNumber("version", headerDict)
        );

    Before (controlled input):

        is.version
        (
            IOstreamOption::versionNumber
            (
                headerDict.get<float>("version")
            )
        );

    Old, uncontrolled input - has been removed:

        is.version(headerDict.lookup("version"));

* improve consistency, default behaviour for IOstreamOption construct

  - constexpr constructors where possible

  - add copy construct with change of format.

  - construct IOstreamOption from streamFormat is now non-explicit.
    This is a commonly expected result with no ill-effects
2020-02-18 21:51:35 +01:00
bb53e8adb3 ENH: adjustments to Switch
- align Switch more with Enum.
  Now have find(), found() static methods.
  Constructors with failsafe option.

  The find() method makes for clearer coding:

  OLD

     Switch sw(some_string, true); // NB: true = allowBad

     if (sw.valid()) ...

  NOW

     Switch sw = Switch::find(some_string);

     if (sw.good()) ...

  or

     if (Switch::found(some_string)) ...

- improve construct from dictionary to handle all valid token types.
  Previously just read in a word.

- Remove asText() method - replaced by c_str() and str() several
  versions ago.
2020-02-18 21:51:35 +01:00
ed4bd54846 STYLE: provide return value for IOstream::fatalCheck()
- allows reuse as base implementation for IOstream::check()
2020-02-18 17:02:45 +01:00
ac709da3ac STYLE: FatalError instead of warning for handling deprecated field format
- The warning in Field.C has been emitted since 2005.
- The warning in mappedPatchBase.C has been emitted since 2012.
2020-02-18 17:02:45 +01:00
2834193c27 STYLE: remove "originalVersion" face handling
- an old pre-OpenFOAM transitional feature (prior to 2004)
  for named faces.
2020-02-18 17:02:44 +01:00
9ee870e09c ENH: impose type-narrowing for Ensight output 2020-02-18 17:02:44 +01:00
fedcbff6f4 ENH: provide narrowFloat, narrowInt32 definitions
- underflow/overflow handling for type narrowing.
  Eg, double -> float, int64 -> int32
2020-02-18 17:02:44 +01:00
4e1bc2d2f1 COMP: incorrect placement of compiler attributes 2020-02-18 13:51:20 +01:00
d7969b1ba4 ENH: preserve tokenized directive and variable types 2020-02-18 13:51:20 +01:00