Commit Graph

20944 Commits

Author SHA1 Message Date
db76bbbac0 TUT: clean out old tutorial build directories 2018-03-26 15:54:31 +02: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
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
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
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
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
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
2db4b0867e CONFIG: consolidate C++ flags per compiler type
- easier to ensure that flags are consistent
2018-03-21 11:50:57 +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
a0a039ad57 ENH: armclang: new compiler type. Fixes #779. 2018-03-21 12:08:44 +00:00
710117fe2b ENH: checkMesh: output cellRegion field. Fixes #763. 2018-03-21 11:41:57 +00:00
46aac34956 ENH: snappyHexMeshDict: improved comment 2018-03-21 11:01:30 +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
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
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
b0c5608b62 TUT: Corrected turbulence Ck value - see #753 2018-03-13 12:32: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
63f60cef59 BUG: Reinstated regex functionality for particle local interaction 2018-03-16 11:01:04 +00:00
bac943e6fc ENH: new bitSet class and improved PackedList class (closes #751)
- The bitSet class replaces the old PackedBoolList class.
  The redesign provides better block-wise access and reduced method
  calls. This helps both in cases where the bitSet may be relatively
  sparse, and in cases where advantage of contiguous operations can be
  made. This makes it easier to work with a bitSet as top-level object.

  In addition to the previously available count() method to determine
  if a bitSet is being used, now have simpler queries:

    - all()  - true if all bits in the addressable range are empty
    - any()  - true if any bits are set at all.
    - none() - true if no bits are set.

  These are faster than count() and allow early termination.

  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.

  The new find_first(), find_last(), find_next() methods provide a faster
  means of searching for bits that are set.

  This can be especially useful when using a bitSet to control an
  conditional:

  OLD (with macro):

      forAll(selected, celli)
      {
          if (selected[celli])
          {
              sumVol += mesh_.cellVolumes()[celli];
          }
      }

  NEW (with const_iterator):

      for (const label celli : selected)
      {
          sumVol += mesh_.cellVolumes()[celli];
      }

      or manually

      for
      (
          label celli = selected.find_first();
          celli != -1;
          celli = selected.find_next()
      )
      {
          sumVol += mesh_.cellVolumes()[celli];
      }

- When marking up contiguous parts of a bitset, an interval can be
  represented more efficiently as a labelRange of start/size.
  For example,

  OLD:

      if (isA<processorPolyPatch>(pp))
      {
          forAll(pp, i)
          {
              ignoreFaces.set(i);
          }
      }

  NEW:

      if (isA<processorPolyPatch>(pp))
      {
          ignoreFaces.set(pp.range());
      }
2018-03-07 11:21:48 +01:00
e78548352e TUT: Removed misleading comment in tutorial - see #746 2018-03-06 11:12:39 +00:00
7f7f9336c8 COMP: add -fpermissive to c++LESSWARN flags (closes #744)
- downgrades some diagnostics about nonconformant code from errors to
  warnings. Oddly enough, the errors actually arise from STL library
  elements shipped with gcc itself. Affects kahip compilation with
  gcc-6, gcc-7
2018-02-28 14:31:48 +01:00
628f0860c3 BUG: faceOnlySet sampling does not stop at 'end' (closes #745) 2018-02-28 11:23:59 +01:00
9f03511ffb GIT: merge artifact duplicate call to update mesh moving 2018-02-28 10:59:53 +01:00
4f880ba8ea ENH: timeVaryingMappedFixedValue - added option to use an alternate points file name 2018-02-23 14:41:01 +00:00
65fd9b8b4b ENH: turbulenceFields FO - added nuTilda and turbulence length scale 2018-02-23 14:39:51 +00:00
6a024a7b71 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2018-03-15 08:13:56 -07:00
949a047f27 BUG: Correcting dictionary constructor for swirlFanVelocity 2018-03-15 08:09:07 -07:00
bf74bf32fd Merge branch 'feature-shortestPathSet' into 'develop'
Feature shortest path set

See merge request Development/OpenFOAM-plus!151
2018-03-15 10:18:38 +00:00
2386de9bf4 Merge remote-tracking branch 'origin/develop' into feature-shortestPathSet 2018-03-15 10:03:22 +00:00
e10575ee31 COMP: Allwmake: link order. Fixes #765. 2018-03-15 08:51:33 +00:00
e92aa8fce4 ENH: reduced amount seeding in regionSplit
- now only seed boundary faces and an internal face of cell that itself
  has a blocked face.
2018-03-14 16:21:58 +01:00
520c14c136 ENH: add meshTools polyFields
- provides a simple means of writing an internal dimensioned field
  when fvMesh is not available (eg, during mesh creation).
2018-03-14 13:04:22 +01:00
a6fb0436d5 BUG: fvMotionSolvers: fix dimensions. Fixes #765. 2018-03-14 11:07:56 +00:00