Commit Graph

20852 Commits

Author SHA1 Message Date
Mark Olesen
0ea44eda59 ENH: bitSet::find_first_not() method (issue #751)
- find the position of the first bit off - symmetrical with find_first()
2018-05-02 08:33:49 +02:00
Mark Olesen
4653beaa49 ENH: report illegal cellId for getRefCellValue (FULLDEBUG)
-  this should normally not be triggered, provided that setRefCell was
   used. However, if getRefCellValue() was called without any previous
   checking on refCelli, it is possible to provoke errors.
2018-04-30 14:25:37 +02:00
Mark Olesen
b4a2876c56 ENH: use move construct for cellZone/faceZone 2018-03-07 11:28:05 +01:00
Mark Olesen
4fe8ed8245 STYLE: use direct iteration for HashSet
- The iterator for a HashSet dereferences directly to its key.

- Eg,

      for (const label patchi : patchSet)
      {
          ...
      }
  vs.
      forAllConstIter(labelHashSet, patchSet, iter)
      {
          const label patchi = iter.key();
          ...
      }
2018-03-06 00:29:03 +01:00
mattijs
2a6ac7edce BUG: nearWallFields: correct exit condition for particles. Fixes #812. 2018-04-30 13:08:58 +01:00
Mark Olesen
e2361b102f COMP: inplaceMapValue relocated to ListOps 2018-04-30 14:05:54 +02:00
Mattijs Janssens
153323e1f6 Merge branch 'feature-regionsplit' into 'develop'
Feature regionsplit

See merge request Development/OpenFOAM-plus!201
2018-04-30 11:21:45 +01:00
Mark Olesen
f3d1e41d76 COMP: label-size 64 compilation of fft (issue #813) 2018-04-30 08:24:38 +02:00
Mark Olesen
f86c129fd5 STYLE: additional comment when completion not found (issue #719)
No completion added for XXX
    ... incorrect platform, or not yet compiled?
2018-04-30 07:50:48 +02:00
Mark Olesen
ed2722745d ENH: revert regionSplit to older algorithm (issue #805)
- the algorithm was last used in OpenFOAM-2.4, after which it was
  replaced with a FaceCellWave version.

  Whereas the original (2.4.x) version exhibited performance
  degradation on very large meshes (with explicit constraints), the
  FaceCellWave version exhibited performance issues with large numbers
  of blocked faces.

  With large numbers of blocked faces, the FaceCellWave regionSplit
  could take between 10 to 100 times longer due to the slow
  propagation speed through blocked faces.

  The 2.4 regionSplit has been revamped to avoid local memory
  allocations, which appears to have been the source of the original
  performance issues on large meshes.

  For additional performance, intermediate renumbering is also avoided
  during the consolidation of regions over processor domains.
2018-04-27 15:51:33 +02:00
Mark Olesen
dd8341f659 ENH: make format of ExecutionTime = ... output configurable (issue #788)
- controlled by the the 'printExecutionFormat' InfoSwitch in
  etc/controlDict

      // Style for "ExecutionTime = " output
      // - 0 = seconds (with trailing 's')
      // - 1 = day-hh:mm:ss

   ExecutionTime = 112135.2 s  ClockTime = 113017 s

   ExecutionTime = 1-07:08:55.20  ClockTime = 1-07:23:37

- Callable via the new Time::printExecutionTime() method,
  which also helps to reduce clutter in the applications.
  Eg,

     runTime.printExecutionTime(Info);

  vs

     Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
         << "  ClockTime = " << runTime.elapsedClockTime() << " s"
         << nl << endl;

--

ENH: return elapsedClockTime() and clockTimeIncrement as double

- previously returned as time_t, which is less portable.
2018-04-27 15:00:34 +02:00
Mark Olesen
0743b61a3c STYLE: minor cleanup in decompositionMethod
- reduce cell looping. Avoid initial looping over blockFace.

- make early return (no processor sets, connections, or blocked faces)
  more apparent.
2018-04-26 12:36:24 +02:00
Mark Olesen
4dcd052ffc STYLE: remove old/dead decompositionMethod::calcCellCells code
- alternative calcCellCells that handled explicitConnections was
  deactivated (2014 or earlier) and finally removed APR-2018.
2018-04-27 11:16:18 +02:00
Mark Olesen
10b69fa2b4 ENH: ListOp::inplaceMapValue using a Map<label> for the mapping.
For example, with some HashTable or Map container of models

    { model0 => 1, model1 => 4, model2 => 5, model3 => 12, model4 => 15, }

specify the remapping

    Map<label> mapper({{1, 3}, {2, 6}, {3, 12}, {5, 8}});

inplaceMapValue(mapper, models) then yields

    { model0 => 3, model1 => 4, model2 => 8, model3 => 12, model4 => 15, }

--

ENH: extend bitSet::count() to optionally count unset bits instead.

--

ENH: BitOps compatibility methods for boolList.

- These ease coding that uses a boolList instead of bitSet and use
  short-circuit logic when possible.

  Eg, when 'bitset' and 'bools' contain the same information

      bitset.count()  <->  BitOps::count(bools)
      bitset.all()    <->  BitOps::all(bools)
      bitset.any()    <->  BitOps::any(bools)
      bitset.none()   <->  BitOps::none(bools)

  These methods can then be used directly in parameters or in logic.
  Eg,

      returnReduce(bitset.any(), orOp<bool>());
      returnReduce(BitOps::any(bools), orOp<bool>());

      if (BitOps::any(bools)) ...
2018-04-27 10:43:32 +02:00
Mark Olesen
c0766ce8ea STYLE: consistent '// End namespace' markers 2018-04-27 09:51:35 +02:00
mattijs
a9fbaa4b08 ENH: volPointInterpolate: improved debug message 2018-04-26 17:08:50 +01:00
mattijs
a645b2b5c8 BUG: annularThermalMixer: incorrect shm setup. Fixes #811. 2018-04-25 11:43:52 +01:00
Mark Olesen
0226485c77 BUG: extraneous '}' in FULLDEBUG 2018-04-26 14:49:49 +02:00
Mark Olesen
d3c2668cc6 STYLE: extraneous debug output in PackedList
- bitSet::used() method for compatibility with code using the
  PackedBoolList typedef, but marked as deprecated.
2018-04-26 14:10:16 +02:00
Mark Olesen
f181a7ac61 SUBMODULE: minor updates for cfmesh
- with updated DynList that inherits from UList and uses List/FixedList
  internally for its memory management
2018-04-26 10:45:52 +02:00
Mark Olesen
497dde2b2f CONFIG: bump API version number to 1804 to account for bitSet
- since PackedBoolList is now a compatibility typedef for bitSet,
  it is useful to have an additional means of distinction.

STYLE: simplify internal version tests and compiler defines.

- the API version is now conveyed via the OPENFOAM define directly.
  The older OPENFOAM_PLUS define is provided for existing code.
2018-04-26 09:28:42 +02:00
Mark Olesen
ebfe46503f STYLE: improve wmkdepend parse error message
- parsing error state only arises from a missing final newline
  in the file (which the dnl macro does not capture).
  Report with a warning instead of modifying the dnl macro since
  we generally wish to know about this anyhow.

- add missing newline to YEqn.H file.
2018-04-25 14:37:59 +02:00
Andrew Heather
e6787bfa9a Merge branch 'feature-bitset' into 'develop'
ENH: new bitSet class and improved PackedList class (closes #751)

See merge request Development/OpenFOAM-plus!200
2018-04-25 11:39:59 +01:00
Mark Olesen
dffc65d41d STYLE: make token null constructor constexpr, noexcept 2018-04-25 10:42:25 +02:00
Mark Olesen
2fde6c3ab0 ENH: improve handling of mismatched brackets, forgotten ';' (issue #762)
- flags the following type of problems:

  * mismatches:

        keyword  mismatch ( set of { brackets ) in the } entry;

  * underflow (too many closing brackets:

        keyword  too many ( set of ) brackets ) in ) entry;

- a missing semi-colon

        dict
        {
           keyword  entry with missing semi-colon
        }

  will be flagged as 'underflow', since it parses through the '}' but
  did not open with it.

Max monitoring depth is 60 levels of nesting, to avoid incurring any
memory allocation.
2018-04-25 09:55:00 +02:00
Mark Olesen
76cb38fbc7 CONFIG: adjust make scripts for darwin
- handling of dead links (find -L -delete unsupported)

- remove ignore case flag on 's/../../i' used in have_scotch script.
  It is unneeded and not tolerated by Darwin's sed.

- avoid embedded comments in EXE_INC (Make/options files), which do
  not work well with the OSX LLVM cpp.
  It strips out the comments but also removes the continuation char.

STYLE: adjust notes about paraview library locations
2018-04-24 21:20:06 +02:00
Mark Olesen
0dfda5f796 COMP: fix Darwin size ambiguities
- size ambiguity for Foam::min(string::size_type, label)

- stream operators for int16/uint16 which are needed for mode_t (Darwin)
2018-04-24 18:03:42 +02:00
mattijs
7bb7f1b352 ENH: overset: extraneous exchange. Fixes #803. 2018-04-25 09:20:57 +01:00
mattijs
b18a9d73c4 ENH: checkMesh: near-zero vol cell. Fixes #808. 2018-04-23 17:54:16 +01:00
mattijs
366d757937 COMP: ConstCirculator: missing include 2018-04-23 17:50:50 +01:00
Mark Olesen
2768500d57 CONFIG: remove WM_LINK_LANGUAGE env variable (always c++)
- was somewhat redundant in wmake/rules/General/general anyhow
2018-04-24 14:59:47 +02:00
Mark Olesen
b4d38ab468 ENH: improve handling of ThirdParty packages
- generalize some of the library extensions (.so vs .dylib).
  Provide as wmake 'sysFunctions'

- added note about unsupported/incomplete system support

- centralize detection of ThirdParty packages into wmake/ subdirectory
  by providing a series of scripts in the spirit of GNU autoconfig.
  For example,

      have_boost, have_readline, have_scotch, ...

  Each of the `have_<package>` scripts will generally provide the
  following type of functions:

      have_<package>          # detection
      no_<package>            # reset
      echo_<package>          # echoing

  and the following type of variables:

      HAVE_<package>          # unset or 'true'
      <package>_ARCH_PATH     # root for <package>
      <package>_INC_DIR       # include directory for <package>
      <package>_LIB_DIR       # library directory for <package>

  This simplifies the calling scripts:

      if have_metis
      then
          wmake metisDecomp
      fi

  As well as reducing clutter in the corresponding Make/options:

      EXE_INC = \
          -I$(METIS_INC_DIR) \
          -I../decompositionMethods/lnInclude

      LIB_LIBS = \
          -L$(METIS_LIB_DIR) -lmetis

  Any additional modifications (platform-specific or for an external build
  system) can now be made centrally.
2018-04-24 14:51:19 +02:00
Mark Olesen
672f0574e2 COMP: resolve signed/unsigned long ambiguity on Darwin 2018-04-24 13:17:22 +02:00
Mark Olesen
29c020f5b3 COMP: sinclude platform-specific CGAL rules
- permits platform-specific override of the general CGAL rules
2018-04-24 09:26:50 +02:00
Mark Olesen
5af5bfa1a5 ENH: error handling for Ragel STL parsing
- also simplify parsing by accepting any case on keywords.
  This implies that something like "sOlId", "SoLiD" will also
  be accepted. Although nobody should really count on this rather
  generous behaviour, it does simplfy the state machine even further.
2018-04-24 09:15:50 +02:00
Mark Olesen
591a1a0c68 ENH: improve memory allocations for explicit connections (issue #805)
STYLE: change access methods names in mesh wave algorithms

- nUnvisitedCells(), nUnvisitedFaces() etc instead of
  getUnsetCells(), getUnsetFaces()

- simplify some coding with range-for
2018-04-23 10:37:24 +02:00
Mark Olesen
857eed5b51 ENH: change findCell mode in meshRefinement (issue #805)
- in 2.4.x the general default for polyMesh::findCell was FACE_DIAG_TRIS,
  but this was changed to CELL_TETS for better handling of concave
  cells.

- in snappyHexMesh meshRefinement, findCell is used to define
  locations in mesh and cells for closer refinement. Using CELL_TETS
  causes an octree rebuild when the mesh has changed and this adds
  considerable overhead. For this operation, the faster FACE_DIAG_TRIS
  mode can be used instead.
2018-04-23 09:37:24 +02:00
Mark Olesen
1f25c5975d BUG: wmkdepend finds 'include' in multi-line comments (closes #784)
- the previous grammar used

      '/*' { fgoto comment; }

  to start processing multi-line comments and

      comment := any* :>> '*/' @{ fgoto main; };

  as a finishing action to return to normal lexing, but seemed not to
  have been triggered properly.

  Now simply trap in a single rule:

      '/*' any* :>> '*/';             # Multi-line comment

STYLE: use more compact dnl (delete to newline)

  OLD:   [^\n]* '\n'
  NEW:   (any* -- '\n') '\n'

  eliminates the intermediate state
2018-04-20 14:41:32 +02:00
Andrew Heather
694004ad41 ENH: finiteArea - integrated d2dt2 scheme from Alexander Kabat vel Job 2018-04-20 15:04:47 +01:00
Andrew Heather
4a2afb85d6 BUG: Added missing oriented flag to meshPhi 2018-04-19 12:08:19 +01:00
Mark Olesen
b5c7e43c84 DEFEATURE: remove foamToTecplot360
- the API-versioned calls (eg, tecini142, teczne142, tecpoly142, tecend142),
  the limited availability of the SDK and lack of adequate testing make
  proper maintenance very difficult.
2018-04-19 14:51:33 +02:00
Mark Olesen
6b8f037333 STYLE: provide number of unreachable blocked cells
- in debug, also report the first 10 cell ids

- format header documentation
2018-04-05 16:41:52 +02:00
Mark Olesen
12157acf07 STYLE: suppress fatal errors for indexedOctree debug=1
- these errors are mostly rounding related (when a point is located on
  the edge of a bounding box instead of being fully inside it).

  For debug > 1, continue to treat as fatal.
2018-04-04 18:14:34 +02:00
Mark Olesen
0cfe88f2e4 CONFIG: update VTK version to use the latest version
- also see issue #793 (paraview version)
2018-04-19 10:08:09 +02:00
Mark Olesen
0e82e883f0 ENH: make decomposition methods const (issue #796) 2018-04-19 09:48:11 +02:00
Mark Olesen
ef922b6917 STYLE: adjust codeTemplates to use '= delete' 2018-04-19 07:38:31 +02:00
Mark Olesen
367ddb8f05 Merge branch 'style-iostream-option' into 'develop'
Style iostream option

See merge request Development/OpenFOAM-plus!199
2018-04-18 17:23:29 +01:00
mattijs
756502da87 COMP: listOutput: make compatible with stl include files 2018-04-18 11:35:30 +01:00
mattijs
af3f93c057 ENH: snappyHexMeshDict: changed 17x to 1.7.x 2018-04-18 11:32:59 +01:00
Andrew Heather
21369e4702 COMP: correction for Clang 2018-04-18 13:33:09 +01:00