Commit Graph

20503 Commits

Author SHA1 Message Date
Mark Olesen
8fc6bd17c9 ENH: improvements in profiling (issue #648)
- include amount of free system memory in profiling, which can give an
  indication of when swapping is about to start

- profilingSummary utility to collect profiling from parallel
  calculations. Collects profiling information from processor
  directories and summarize the time spent and number of calls as (max
  avg min) values.
2017-12-01 15:44:20 +01:00
Mark Olesen
e83a9db2ea Merge branch 'feature-domain-decomp' into 'develop'
Feature domain decomp (wp05)

See merge request Development/OpenFOAM-plus!163
2017-11-30 19:58:20 +00:00
Andrew Heather
dc2177cc68 Merge branch 'feature-trisurface-cleanup' into 'develop'
consolidate surfaceFormats for reading/writing triSurface

See merge request Development/OpenFOAM-plus!174
2017-11-30 08:46:43 +00:00
Andrew Heather
e0f397d863 BUG: ensightSurfaceReader - corrected initial list sizing 2017-11-30 08:36:07 +00:00
Mark Olesen
cdb22d4476 Merge branch 'feature-externalCoupled' into 'develop'
preliminary improvements for externalCoupled

See merge request Development/OpenFOAM-plus!175
2017-11-28 16:54:06 +00:00
Mark Olesen
57f750cc55 ENH: add simple subLoopTime
- similar idea as subCycleTime but without sub-dividing the time
  interval or incrementing time itself
2017-11-28 09:57:18 +01:00
Mark Olesen
bb0fa65122 ENH: respond to externalCoupled lock file contents
- waitForSlave now return a Time::stopAtControls enumeration:

    unknown:     when lockfile has no specially recognized content.
    endTime:     when lockfile contains "status=done"
    writeNow:    when lockfile contains "action=writeNow"
    nextWrite:   when lockfile contains "action=nextWrite"
    noWriteNow:  when lockfile contains "action=noWriteNow"

These values can be used by the caller to terminate the master
(OpenFOAM) as desired in response to information placed there by the
slave process.
2017-11-28 12:02:18 +01:00
Mark Olesen
402e605391 ENH: expose solutionControl::maxResiduals as a static with simpler parameters
- use a Pair<scalar> with first() / last() residuals
2017-11-28 11:46:48 +01:00
Mark Olesen
ca5b0dcbaa ENH: improvements to Time
- expose the names of write and stopAt controls for reuse elsewhere and
  provide a stopAtControls enum for 'unknown'

- track the requested number of sub-cycles (was previously a bool)
2017-11-28 10:11:06 +01:00
Mark Olesen
fab9fb4332 STYLE: use readScalar(std::string) and readInt(std::string) wrappers 2017-11-28 10:08:36 +01:00
Mark Olesen
c0e86940b0 ENH: minor improvements for Enum
- found() method for consistency with other classes

- operator()(name, deflt) for similarity to lookupOrDefault,
  but without a dictionary
2017-11-28 09:15:04 +01:00
mattijs
b53e5b7404 BUG: fieldMinMax: max cell 2017-11-27 17:41:38 +00:00
Mark Olesen
966a941a64 ENH: fix foamListTimes to work with -fileHandler collated 2017-11-26 15:23:02 +01:00
Mark Olesen
2787a8664d STYLE: relegate special purpose readList<T> function to points of use
- the readList<T>(Istream&) function was introduced to handle command
  -options with either a single or a list value, but was also used for
  the #remove dictionary directive. However, the parsing was fragile
  if the list did not start with a '('.
  Now handle command-line arg/option list directly (via ITstream)
  and #remove with special-purpose reading of a string or word list.

  This removes ambiguity and reduces potential future problems.

STYLE: use ITstream instead of IStringStream for command-line lookups

- parses directly to a tokenList without a string copy.
2017-11-26 12:45:49 +01:00
Mark Olesen
5947f9a337 ENH: more succinct output from command-line errors.
- unknown options or missing option values now emit a shorter message
  without the entire usage. This makes it easier to identify the errors
  and is better aligned with the behaviour of GNU system tools.

  ====
     $ simpleFoam -case
     Using: OpenFOAM-plus (see www.OpenFOAM.com)
     Build: plus-01234

     Error: option '-case' requires an argument

     See 'simpleFoam -help' for usage
  ====

- provide for reduced (-help) and full (-help-full) usage information.
  In many cases the reduced usage provided sufficient and easier
  to find the information.

- make -srcDoc an alias for -doc-source

- no warnings about option aliases for future dates.
2017-11-24 10:27:11 +01:00
Mark Olesen
9985b93cfc ENH: argList::optionReadList now uses ITstream directly
- stricter and robuster than previous solution using List::readList
  since the option input can be fully tokenized prior to list
  conversion.
2017-11-24 10:39:20 +01:00
Mark Olesen
d3d82b909e BUG: the -decomposeParDict option inadvertent triggers parallel run (fixes #645) 2017-11-24 10:36:34 +01:00
Mark Olesen
d49929b210 ENH: improvements to stringOps format and split functions
- split now optionally retains empty substrings.
  Added split on fixed field width.

- Foam::name() now formats directly into string buffer, which a
  removes one layer of copying and also avoids using a non-constexpr
  in the temporary.

STYLE: explicit type narrowing on zero-padded output for ensight
2017-11-23 20:17:33 +01:00
Mark Olesen
6e8586df5d DEFEATURE: remove ccm26ToFoam (issue #536)
- not maintained and less functionality than ccmToFoam.
2017-11-23 14:16:09 +01:00
Mark Olesen
63812aa110 Merge branch 'feature-arglist-option-aliases' into 'develop'
Feature arglist option aliases

See merge request Development/OpenFOAM-plus!172
2017-11-23 09:27:34 +00:00
Mark Olesen
416a3790ea STYLE: prefer autoPtr::reset() to autoPtr::set()
- in most cases already checked valid() so don't need additional check
  for setting an existing pointer
2017-11-22 19:11:11 +01:00
Mark Olesen
e96cbd9050 STYLE: remove deprecated non-const tmp() operator (deprecated since FEB-2016) 2017-11-22 18:10:25 +01:00
Mark Olesen
aa112c3f26 ENH: support option aliases with versioning
- can be used for adjusting option names between versions
2017-11-22 14:42:31 +01:00
Mark Olesen
f2ba618c19 STYLE: consistency in using argList::addArgument, argList::addOption 2017-11-22 12:54:28 +01:00
Mark Olesen
d8f31f6ded STYLE: use HashTable ternary-like lookup in argList 2017-11-22 12:04:45 +01:00
Mark Olesen
fd5cd9dc6f ENH: command-line -doc, -srcDoc display online documentation
- browser is spawned as a background process to avoid blocking the
  command-line
2017-11-22 11:50:44 +01:00
Mark Olesen
4023158497 ENH: provide system() command with CStringList
- allows (for example) splitting a user string on whitespace and
  passing this to system as a list of arguments, thus bypassing any
  implicit use of 'sh'.

- system() with optional background, for spawning processes.
2017-11-22 10:48:55 +01:00
Mark Olesen
a881204946 ENH: stringOps inplace methods now use a std::string parameter
- this makes them applicable to Foam::string, Foam::word etc

ENH: improvements to CStringList

- add strings() sublist variant which can be useful when handling
  command arguments separately

- add construct from SubStrings.
2017-11-22 08:03:52 +01:00
Mark Olesen
d65ca495d3 STYLE: minor changes in comments 2017-11-22 10:52:42 +01:00
Mark Olesen
3ef8906a66 ENH: consolidate surfaceFormats for reading/writing triSurface (issue #294)
- eliminates previous code duplication and improves maintainability
2017-11-20 14:55:36 +01:00
Mark Olesen
75933928de Merge branch 'feature-multiple-stitch-mesh' into 'develop'
Feature multiple stitch mesh (wp04)

See merge request Development/OpenFOAM-plus!164
2017-11-20 09:32:30 +00:00
Mark Olesen
d4b7fbe9a1 Merge branch 'style-list-typedefs' into 'develop'
Consistency update for list typedefs

See merge request Development/OpenFOAM-plus!171
2017-11-20 07:48:08 +00:00
Mark Olesen
7c1d8cb146 STYLE: more consistent use of labelUList and labelUIndList typedefs 2017-11-19 09:27:47 +01:00
Mark Olesen
a573e0e1aa STYLE: use fully-scoped names in meshTools, sampling 2017-11-19 11:34:41 +01:00
sergio
d6b3595fe8 BUG: Correcting expression for adimensional pressure drop table for fanFvPatchField 2017-11-16 11:01:54 -08:00
sergio
93587afefc ENH: Avoidding 0/0 conflict in externalCoupledTemperatureMixed increaging the zero order of denomitaror 2017-11-15 12:58:58 -08:00
sergio
37d92d0714 ENH: adding non-dimensional option to fanFvPatchField.C 2017-11-15 12:54:09 -08:00
Andrew Heather
6fd27353e4 STYLE: improve formatting of doxygen filter output 2017-11-10 14:53:18 +01:00
Mark Olesen
834d46c64a ENH: add argList support for non-mandatory arguments
- in rare cases we may wish to have command-line arguments that are
  non-mandatory. This can now be reflected in the usage output, provided
  that the argList::nonMandatoryArgs() has been used.

- added setRootCaseNonMandatoryArgs.H that applies the
  argList::nonMandatoryArgs() settings and otherwise performs largely
  as per setRootCase.H, except that the check for mandatory arguments
  is deferred to later user code.
2017-11-18 13:36:56 +01:00
Mark Olesen
a59c87d5ac ENH: improved zone constructors
- constructor for empty cell/face/point Zones, with contents to be
  transferred in later.

- ZoneMesh::operator(const word&) to return existing zone or a new empty one.
2017-11-10 02:09:37 +01:00
Mark Olesen
ccc07d3234 Merge branch 'style-cellModel-enum' into 'develop'
cellModel enumerations

See merge request Development/OpenFOAM-plus!170
2017-11-18 13:14:39 +00:00
Mark Olesen
8730a7622a ENH: enumerations for known cell models in cellModel, ptr/ref lookups
- this provides a better typesafe means of locating predefined cell
  models than relying on strings. The lookup is now ptr() or ref()
  directly. The lookup functions behave like on-demand singletons when
  loading "etc/cellModels".

  Functionality is now located entirely in cellModel but a forwarding
  version of cellModeller is provided for API (but not ABI) compatibility
  with older existing user code.

STYLE: use constexpr for cellMatcher constants
2017-11-18 11:05:05 +01:00
Mark Olesen
810d090e34 ENH: add -case option for foamLog 2017-11-17 19:04:13 +01:00
Mark Olesen
9c3bef5a99 ENH: improve robustness of MPI start/stop
- warn or fatal if Pstream::init or Pstream::exit are called multiple
  times.

- additional Pstream::initNull method as failsafe to initialize MPI
  when the underlying OpenFOAM process is not running in parallel but
  the application still needs MPI.

- Pstream::exit() can now also be called without having used MPI::init(),
  which means it can be used to cleanup serial process or for
  applications that used the special purpose Pstream::initNull()
  mechanism.
2017-11-17 11:29:26 +01:00
Mark Olesen
00b1ecad60 ENH: add UPtrList swap() method 2017-11-13 21:39:30 +01:00
Mark Olesen
5a52dfa4f4 CONFIG: update ADIOS version 2017-11-17 08:46:19 +01:00
Mark Olesen
67265d2c35 BUG: missing space in ensight (surface format) case file (closes #637)
- now also fixed collated output format
2017-11-16 07:31:39 +01:00
Mark Olesen
3cafdccb4c ENH: add dictionary-driven multi-pass stitchMesh facility
- the dictionary-driven variant of stitchMesh allows sequential
  application of 'stitch' operation with requiring intermediate
  writing to disk.

- Without arguments:
  * stitchMesh uses a system/stitchMeshDict or -dict dict

- With arguments:
  * master/slave patches specified on the command-line as in previous
    versions.
2017-11-10 01:53:30 +01:00
Mark Olesen
a9ffcab5af ENH: region-wise decomposition specification for decomposeParDict
Within decomposeParDict, it is now possible to specify a different
  decomposition method, methods coefficients or number of subdomains
  for each region individually.

  The top-level numberOfSubdomains remains mandatory, since this
  specifies the number of domains for the entire simulation.
  The individual regions may use the same number or fewer domains.

  Any optional method coefficients can be specified in a general
  "coeffs" entry or a method-specific one, eg "metisCoeffs".

  For multiLevel, only the method-specific "multiLevelCoeffs" dictionary
  is used, and is also mandatory.

----

ENH: shortcut specification for multiLevel.

  In addition to the longer dictionary form, it is also possible to
  use a shorter notation for multiLevel decomposition when the same
  decomposition method applies to each level.
2017-11-09 12:30:24 +01:00
Andrew Heather
69238a9e14 BUG: steadyStateDdtSchems - corrected oriented state of return fields for *Corr functions. Fixes #634 2017-11-07 12:10:47 +00:00