Commit Graph

15257 Commits

Author SHA1 Message Date
97dc9f4029 EHN: make signal verbosity an optional calling argument. 2018-04-11 21:35:02 +02:00
297570de53 COMP: some low-level darwin-related patches
- a partial selection from https://github.com/mrklein/openfoam-os-x
  with adjustments. The primary purpose is to reduce header-level
  incompatibilities and to provide a common set of make rules to allow
  easier patching (or re-integration).
2018-04-09 12:48:55 +02:00
d2b1b1cdc0 ENH: paraFoam: catch read errors. Fixes #798. 2018-04-12 15:12:04 +01:00
cb14a2020b ENH: snappyHexMesh: exclude feature angle analysis. See #699. 2018-04-11 10:58:46 +01:00
a9741cea79 ENH: additional text expansion shortcuts (issue #792)
Support the following expansions when they occur at the start of a
string:

    Short-form       Equivalent
    =========       ===========
      <etc>/          ~OpenFOAM/   (as per foamEtcFile)
      <case>/         $FOAM_CASE/
      <constant>/     $FOAM_CASE/constant/
      <system>/       $FOAM_CASE/system/

These can be used in fileName expansions to improve clarity and reduce
some typing

     "<constant>/reactions"   vs  "$FOAM_CASE/constant/reactions"
2018-04-10 13:41:41 +02:00
b85d0b5cb7 ENH: provide Rand48 as generator in the expected C++11 form
- this removes an OS-specific dependency (eg, drand48_r is not POSIX)
  and allows easier use of other random number generators.

  The Rand48 generator has identical behaviour and period as the
  lrand48() library routine, but holds its own seed and state
  (which makes it re-entrant) and can be combined with other
  random distributions.

  However, when using the modified form to obtain scalar values
  they will not be identical to what drand48() yields.

  This is because drand48() uses the raw 48-bit values to directly
  set the mantissa of an IEEE double where as the newer distribution
  normalizes based on the 32-bit value.

STYLE: simplify code in Random::shuffle and use Swap
2018-04-09 11:08:34 +02:00
e4f5471edf ENH: improve robustness of fileStat class (issue #794)
- quick ignore of empty filenames.

- relocated some implementation details from POSIX.C to the
  fileStat class, where they make more sense.
2018-04-11 10:24:27 +02:00
a11b93bee1 Merge remote-tracking branch 'origin/master' into develop 2018-04-11 10:35:35 +02:00
1ac7f2e873 BUG: wrong nanoseconds in highResLastModified (closes #794)
- was using st_atim instead of st_mtim for the nanoseconds

- value of followLink was being ignored (it was always being followed).
2018-04-11 10:27:41 +02:00
1eb2458cf5 Merge branch 'master' of develop.openfoam.com:Development/OpenFOAM-plus 2018-04-06 08:52:23 -07:00
a65b189741 ENH: Adding thermo using polynomial transport, JANAF and ideal gas.
This thermo is used with multiComponentMixture in rhoThermo type
2018-04-06 08:46:17 -07:00
0e669fcb39 ENH: Editing header description 2018-04-05 08:39:03 -07:00
bf4125b248 ENH: New outletMachNumberPressure BC. It sets pressure at outlet
keeping chocked conditions of Mach number.
This BC can work in two modes, chocked or non-chocked. In the
chocked mode the Ma is an input. In the non-chocked mode
the Ma is calculated from model inputs.
2018-04-03 16:39:07 -07:00
c52ee82f79 COMP: missing bracket 2018-04-03 21:51:22 +02:00
1edb2f7dd0 BUG: mesh refinement crash with degenerate mesh distributions (closes #778)
- occurred when the initial mesh distribution was missing cells on
  some processors.
2018-03-21 21:54:40 +01:00
018124e3bf STYLE: use 'return nullptr' for empty autoPtr/tmp returns
- both autoPtr and tmp are defined with an implicit construct from
  nullptr (but with explicit construct from a pointer to null).
  Thus is it safe to use 'nullptr' when returning an empty autoPtr or tmp.
2018-03-21 09:31:09 +01:00
546fdb6207 BUG: corrected 'binned' distribution model 2018-03-20 10:17:33 +00:00
d7b9cea87c BUG: IsoAdvector - updated use of pos/neg as reported by Johan Roenby. See #775 2018-03-19 13:56:32 +00:00
2f86cdc712 STYLE: more consistent use of dimensioned Zero
- when constructing dimensioned fields that are to be zero-initialized,
  it is preferrable to use a form such as

      dimensionedScalar(dims, Zero)
      dimensionedVector(dims, Zero)

  rather than

      dimensionedScalar("0", dims, 0)
      dimensionedVector("zero", dims, vector::zero)

  This reduces clutter and also avoids any suggestion that the name of
  the dimensioned quantity has any influence on the field's name.

  An even shorter version is possible. Eg,

      dimensionedScalar(dims)

  but reduces the clarity of meaning.

- NB: UniformDimensionedField is an exception to these style changes
  since it does use the name of the dimensioned type (instead of the
  regIOobject).
2018-03-16 10:24:03 +01:00
c0498e731a ENH: consolidate some common methods for paraview + catalyst 2018-04-03 18:42:35 +02:00
3dbe6ef81f ENH: downgrade to warning and exit if MPI_Finalized is called twice.
- this can occur when OpenFOAM is run in serial mode, but connects to
  a program that starts/stops MPI on its own.
2018-04-03 16:35:03 +02:00
b85b261348 STYLE: string::assign instead of string::operator= in string sub-classes
- makes the meaning clearer
2018-04-03 08:31:59 +02:00
c2f0864f68 ENH: remove size limit when reading verbatim strings (issue #785) 2018-04-03 08:16:20 +02:00
795ece8bb7 ENH: writeFile: check for opening status. Fixes #783. 2018-03-28 11:45:28 +01:00
0c1163c182 Merge branch 'feature-profiling' into 'develop'
ENH: reduce profiling overhead (issue #764)

See merge request Development/OpenFOAM-plus!194
2018-03-27 16:39:02 +01:00
2c3befe090 STYLE: inconsistent field naming for hexRef8Data 2018-03-27 11:46:47 +02:00
d901b4f450 ENH: reduce profiling overhead (issue #764)
- avoid clockTime in favour of clockValue.

- avoid allocations when profiling is not active.

- replace hashing with manual pointer lists
2018-03-26 21:38:47 +02:00
5d008f7a18 ENH: improvements for PtrList, UPtrList and new PtrDynList container
- improve internal handling to permit deriving resizable containers
  (eg, PtrDynList).

- include '->' iterator dereferencing

- Only append/set non-const autoPtr references. This doesn't break
  existing code, but makes the intention more transparent.
2018-03-22 01:13:38 +01:00
36719bf55b STYLE: consistent lookupOrDefault template parameters
- in many cases can just use lookupOrDefault("key", bool) instead of
  lookupOrDefault<bool> or lookupOrDefault<Switch> since reading a
  bool from an Istream uses the Switch(Istream&) anyhow

STYLE: relocated Switch string names into file-local scope
2018-03-26 09:09:09 +02:00
568fbf727d STYLE: simplify VectorSpaceOps template looping
- this is a continuation of commit ba92e75215 with simpler
  template logic.
2018-03-22 14:03:31 +01:00
35d348c00d BUG: guard against potential wasted memory in DynamicField
- specialize transfer and swap to ensure allocated capacity isn't
  forgotten.
2018-03-21 15:30:14 +01:00
4cb763f9d2 STYLE: make null constructed lists constexpr, noexcept
- can assist the compiler in producing tighter code.
2018-03-19 13:53:28 +01:00
ca15b5779d Merge remote-tracking branch 'origin/master' into safe-develop 2018-03-22 23:47:20 +01:00
e53384362c ENH: added surfaceFieldValue uniformity operation 2018-03-22 22:38:34 +01:00
acfa0d3ed1 ENH: add bounding to surfMeshes variant of sampled planes (issue #714) 2018-03-22 14:47:53 +01:00
936d897768 ENH: ConeNozzleInjection - added ability for the injector to move
The set of injectionMethods has been extended to include a new option:

    injectionMethod movingPoint;

The position is then read as a TimeFunction1 entry, e.g. for a 'table'
type:

    position        table
    (
        (0 (-0.009 0.0995 0))
        (1e-3 (0.009 0.0995 0))
    );

where the list corresponds to the tuples (time (position)), and the time
is relative to the start of injection (SOI)
2018-03-21 16:08:52 +00:00
872ac6c6c0 Merge remote-tracking branch 'origin/master' into develop 2018-03-20 10:52:54 +00:00
f0435beb9c Merge remote-tracking branch 'origin/master' into develop 2018-03-16 23:38:29 +01:00
6a541ccc92 COMP: avoid attempted auto-vivify with PackedBoolList []
- also ensure fewer side-effects from inplaceReorder

- provide ListOps::reorder especially for PackedList and PackedBoolList
  since they behave differently from regular lists.
2018-03-15 15:20:00 +01:00
d17bc72585 ENH: consistency of HashSet setMany(), insertMany() with packed-list version
- this also provides a better separation of the intent
  (ie, inserting a single value, or inserting multiply values)
2018-03-14 21:08:29 +01:00
fae1ba0f63 BUG: Corrections to externalWallHeatFluxTemperature BC (ref EP624) 2018-03-14 15:34:53 +00:00
4df782615c BUG: surface proxy zone handling with dangling? reference (closes #757)
- using const reference to temporary was failing.  Remedy by using a
  direct copy, which is a reasonable solution since surfZone content
  is quite minimal.
2018-03-13 17:58:02 +01:00
40e7d389d8 ENH: DPMFoam - extended RAS model selection. See #743 2018-03-13 12:48:16 +00:00
73646bb15b BUG: removed incorrect code from cyclicFaPatch referring to cyclicPolyPatch. See #761 2018-03-13 08:54:39 +00:00
5d1fb23555 ENH: code reduction in PackedList, PackedBoolList (issue #751)
- eliminate iterators from PackedList since they were unused, had
  lower performance than direct access and added unneeded complexity.

- eliminate auto-vivify for the PackedList '[] operator.
  The set() method provides any required auto-vivification and
  removing this ability from the '[]' operator allows for a lower
  when accessing the values. Replaced the previous cascade of iterators
  with simpler reference class.

PackedBoolList:

- (temporarily) eliminate logic and addition operators since
  these contained partially unclear semantics.

- the new test() method tests the value of a single bit position and
  returns a bool without any ambiguity caused by the return type
  (like the get() method), nor the const/non-const access (like
  operator[] has). The name corresponds to what std::bitset uses.

- more consistent use of PackedBoolList test(), set(), unset() methods
  for fewer operation and clearer code. Eg,

      if (list.test(index)) ...    |  if (list[index]) ...
      if (!list.test(index)) ...   |  if (list[index] == 0u) ...
      list.set(index);             |  list[index] = 1u;
      list.unset(index);           |  list[index] = 0u;

- deleted the operator=(const labelUList&) and replaced with a setMany()
  method for more clarity about the intended operation and to avoid any
  potential inadvertent behaviour.
2018-03-13 08:32:40 +01:00
23b6ea4b85 ENH: provide iterators for IndirectList, UIndirectList
- consistency with other containers.
  Allows range-for, enables various std algorithms, and can be used
  with ListOp::create() with an iterator range.
2018-03-07 17:50:34 +01:00
77338c8bd0 ENH: reduce overhead for clockTime, cpuTime
- clockValue class for managing the clock values only, with a null
  constructor that does not query the system clock (can defer to later).
  Can also be used directly for +/- operations.

- refactor clockTime, cpuTime, clock to reduce storage.
2018-03-15 10:01:51 +01:00
fb4c99b698 STYLE: minor cleanup of contiguous (issue #769) 2018-03-14 21:01:44 +01:00
5542ff6351 STYLE: derive always/never predicates from std types
- make constexpr noexcept
2018-03-14 18:04:42 +01:00
11027b8df6 COMP: Correction for clang 2018-03-16 11:12:47 +00:00