Commit Graph

20494 Commits

Author SHA1 Message Date
mattijs
a79d2835f1 ENH: functionObjectList: format errors from FO reading. Fixes #575. 2017-10-30 11:43:12 +00:00
Mark Olesen
7e4f3a8237 STYLE: consistent rounding for float/double underflow (issue #625)
- use (value <= VSMALL) instead of (value < VSMALL) for consistency
  with what equal(value, 0) delivers.
2017-10-30 11:38:24 +01:00
Mark Olesen
ba8fdda5cc ENH: improve wcleanBuild, wcleanPlatform flexibility (issue #627)
- add -compiler=NAME option to remove a build or platforms directory
  corresponding to any specified compiler on the current arch.

- when -compiler or -compiler=NAME is specified, also clean related
  sub-directories as well. This will cleanup mpi-related directory.
2017-10-30 10:31:05 +01:00
Mark Olesen
cd46cb7041 ENH: consistent reverse iterator definitions for UList and FixedList
- consistent with C++ STL conventions, the reverse iterators should
  use operator++ to transit the list from rbegin() to rend().

  The previous implementation used raw pointers, which meant that they
  had the opposite behaviour: operator-- to transit from rbegin() to
  rend().

  The updated version only has operator++ defined, thus the compiler
  should catch any possible instances where people were using the old
  (incorrect) versions.

- updated forAllReverseIters() and forAllConstReverseIters() macros to
  be consistent with new implementation and with C++ STL conventions.
2017-10-29 20:57:43 +01:00
Mark Olesen
d6b32094e1 ENH: add reverse iteration macros
- forAllReverseIters and forAllReverseConstIters macros
- stdFoam::rbegin(), stdFoam::rend()
  stdFoam::crbegin(), stdFoam::crend()
2017-10-29 16:02:19 +01:00
Mark Olesen
15ac4e5c54 Merge branch 'feature-dictionary-scoping-lvalue' into 'develop'
Feature dictionary scoping lvalue

See merge request Development/OpenFOAM-plus!124
2017-10-29 15:36:07 +00:00
Mark Olesen
743e75b978 STYLE: code cleanup in stringOps 2017-10-29 13:53:34 +01:00
Mark Olesen
f76431c536 ENH: retain original FoamFile dictionary header when including files.
- previously using a top-level #include would inadvertently remove the
  original header
2017-10-29 12:37:47 +01:00
Mark Olesen
69786840af STYLE: code cleanup for includeEntry 2017-10-29 11:34:09 +01:00
Mark Olesen
b4b9303868 Merge branch 'style-list-methods' into 'develop'
Style list methods

See merge request Development/OpenFOAM-plus!157
2017-10-28 16:46:10 +01:00
Mark Olesen
9729edf293 STYLE: adjusted comments in natstrcmp 2017-10-28 17:38:42 +02:00
Mark Olesen
5b8b689a37 STYLE: split off HashTableCore into separate header 2017-10-27 16:13:45 +02:00
Mark Olesen
0a62fd2f87 ENH: allow passing of comparator to sortToc methods
- this increases the flexibility of the interface

- Add stringOps 'natural' string sorting comparison.
  Digits are sorted in their natural order, which means that
      (file10.txt file05.txt file2.txt)
  are sorted as
      (file2.txt file05.txt file10.txt)

STYLE: consistent naming of template parameters for comparators

  - Compare for normal binary predicates
  - ListComparePredicate for list compare binary predicates
2017-10-27 14:28:00 +02:00
Mark Olesen
8ec64d8128 STYLE: compilation of some unit tests 2017-10-26 23:59:18 +02:00
Mark Olesen
16e75d8475 ENH: add fileName::validate static method (issue #628)
- similar to word::validate to allow stripping of invalid characters
  without triggering a FatalError.

- use this validated fileName in Foam::readDir to avoid problems when
  a directory contains files with invalid characters in their names

- adjust rmDir to handle filenames with invalid characters

- fileName::equals() static method to compare strings while ignoring
  any differences that are solely due to duplicate slashes
2017-10-26 21:23:24 +02:00
mattijs
4818b5808e ENH: snappyHexMesh: add different method for cellZone-faceZone consistency. Fixes #629. 2017-10-26 12:08:15 +01:00
Mark Olesen
2bd2f83f6e ENH: cleanup and rationalize memory-backed streams
- more consistent naming:
  * Versions that hold and manage their own memory:
      IListStream, OListStream

  * Versions that reference a fixed size external memory:
      UIListStream, UOListStream

- use List storage instead of DynamicList within OListStream.
  Avoids duplicate bookkeeping, more direct handling of resizing.
2017-10-26 12:09:47 +02:00
mattijs
9d334e5601 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-10-26 09:11:24 +01:00
mattijs
6fd6610b57 ENH: redistributePar: create dummy sets on non-existing processors 2017-10-26 09:10:21 +01:00
Mark Olesen
c1c4e91ffb ENH: handle underflow (rounding) of float/double as zero (issue #625)
- The problem occurs when using atof to parse values such as "1e-39"
  since this is out of range for a float and _can_ set errno to
  ERANGE.

  Similar to parsing of integers, now parse with the longest floating
  point representation "long double" via strtold (guaranteed to be
  part of C++11) and verify against the respective VGREAT values for
  overflow. Treat anything smaller than VSMALL to be zero.
2017-10-25 20:55:37 +02:00
mattijs
9a7c236add Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-10-25 16:29:33 +01:00
mattijs
49bcba2da7 ENH: snappyHexMesh: allow restart through suppression of refinement. Fixes #626. 2017-10-25 16:22:59 +01:00
mattijs
f45832b537 COMP: finiteVolume: single precision build 2017-10-25 15:17:33 +01:00
Mark Olesen
5c1ec7ecb8 ENH: relocate protected List::size(label) to UList (issue #595)
- makes it accessible for containers that manage their own storage
  and derive directly from UList.

- DynamicList::min_size() method to access the corresponding
  SizeMin template parameter.

- ensure consistency in the reserve size for the constructor

      DynamicList<..> lst(N);

  now has identical sizing as

      DynamicList<..> lst();
      reserve(N);
2017-10-25 08:45:05 +02:00
Mark Olesen
88f6b8888c Merge branch 'feature-Arrhenius-viscocity-energyFO' into 'develop'
ENH: Arrhenius viscocity model for incompressible viscocity

See merge request Development/OpenFOAM-plus!155
2017-10-28 11:04:46 +01:00
sergio
ffabc42dbf ENH: Arrhenius viscocity model and energyTransport function-object
- Arrhenius viscocity model for incompressible viscocity.

- energyTransport FO for incompressible single and multiple phase
  flows and viscousDissipation fvOption source.

- Tutorial to show the use of energyTransport:
     multiphase/multiphaseInterFoam/laminar/mixerVessel2D

- Tutorial to show viscousDissipation:
     compressible/rhoPimpleFoam/RAS/TJunction
2017-10-25 10:17:55 -07:00
Mark Olesen
11da9bdc36 Merge branch 'feature-config-cray' into 'develop'
CONFIG: add settings for Cray compiler and cray mpich

See merge request Development/OpenFOAM-plus!138
2017-10-24 18:28:54 +01:00
Mark Olesen
7d7b0bfe84 STYLE: use list methods find/found instead of findIndex function 2017-10-24 19:07:34 +02:00
Andrew Heather
a6c918d6a3 Merge branch 'feature-io-streams' into 'develop'
low-level binary Ostream output, additional stream classes

See merge request Development/OpenFOAM-plus!156
2017-10-24 15:23:33 +01:00
Mark Olesen
2ab03f7abe STYLE: simplify stream types
- reduce coding clutter, avoiding allocated pointers when possible.
  IFstream and OFstream continue to use pointers since they handle
  compressed files, other streams can do without them.
2017-10-24 13:18:01 +02:00
Mark Olesen
88bb403fe0 ENH: new stream output: OListStream
- an output stream to a DynamicList
2017-10-24 11:59:11 +02:00
Mark Olesen
3cbf399470 BUG: failed swap/transfer for DynamicList with different sizing parameters
- now use public functions instead of direct access of private 'capacity_'
  information
2017-10-24 10:29:09 +02:00
Mark Olesen
7e8217fd17 ENH: include memory streams
- these provide a similar functionality to string-streams, but operate
  on a externally provided memory buffer which can be used to reduce
  the amount of copying.

- classes were previously staged as part of the ADIOS community
  repository.
2017-10-23 12:06:59 +02:00
Mark Olesen
2269294d36 ENH: use FixedList for dimensionSet storage
- makes it easier to transmit or stream as a list of scalars
2017-10-23 10:15:50 +02:00
Mark Olesen
0adf8d0a7e STYLE: use word methods to obtain IOobject member/group 2017-10-23 09:56:34 +02:00
Mark Olesen
e1167d9592 ENH: provide openmp compile and link flags.
- the USE_OMP preprocessor symbol is also defined with the openmp
  compile flag to allow conditional compilation of openmp-specific
  code.
2017-10-23 09:38:43 +02:00
Mark Olesen
953bd5bdca COMP: clang warnings 2017-10-23 09:09:59 +02:00
Mark Olesen
360ccea24e COMP: incorrect specialization for Swap(HashSet..) 2017-10-23 09:05:22 +02:00
Mark Olesen
af5f857618 ENH: add reset() method to IStringStream
- for convenience and symmetry with OStringStream

STYLE: void return value for stream rewind() methods

- this makes it easier to design bidirectional streams
2017-10-23 07:50:12 +02:00
Mark Olesen
f603e3e1de STYLE: pass through -test argument 2017-10-20 14:10:12 +02:00
Mark Olesen
74f667a85b ENH: additional low-level raw binary output for Ostream.
- low-level beginRaw(), writeRaw(), endRaw() methods.
  These can be used to directly add '()' decorators for serial output
  or prepare/cleanup parallel buffers.
  Used, for example, when outputting indirect lists in binary to avoid.
2017-10-20 10:26:55 +02:00
Mark Olesen
c792a9d7df TUT: script cleanup, provide cleanCase0 for commonly used operation 2017-10-12 19:20:56 +02:00
Mark Olesen
e16121af68 ENH: emit number of blocks for decomposedBlockData in header
- better documentation of the file contents.
- quicker to obtain number of blocks without reading an entire file.
2017-10-19 18:04:24 +02:00
Mark Olesen
10c512f9ef STYLE: note correct defaults for profiling 2017-10-19 17:25:53 +02:00
Andrew Heather
4cc8e9d4be Merge remote-tracking branch 'origin/master' into develop 2017-10-13 14:03:13 +01:00
Mark Olesen
b29f2a61b6 BUG: missing parallel-aware for metis-like decomposition 2017-10-13 12:45:28 +02:00
Mark Olesen
9b2a25516e ENH: make creation of streamline seeds demand-driven 2017-10-12 18:43:12 +02:00
Mark Olesen
f116217466 STYLE: remove FULLDEBUG output on readLabel, readScalar
- used in various places to test if the input can be parsed as a
  label/scalar, so warnings tend to flood the output.

- be more explicit when encountering range errors
2017-10-12 12:15:56 +02:00
Mark Olesen
9bb8f6aefc COMP: create lnInclude directory for kahip 2017-10-12 09:49:16 +02:00
Mark Olesen
5f98600b53 COMP: handle kahip .so version, and openmp dependency 2017-10-11 18:41:28 +02:00