Commit Graph

32 Commits

Author SHA1 Message Date
Mark Olesen
345a2a42f1 ENH: simplify method names for reading argList options and arguments
- use succincter method names that more closely resemble dictionary
  and HashTable method names. This improves method name consistency
  between classes and also requires less typing effort:

    args.found(optName)        vs.  args.optionFound(optName)
    args.readIfPresent(..)     vs.  args.optionReadIfPresent(..)
    ...
    args.opt<scalar>(optName)  vs.  args.optionRead<scalar>(optName)
    args.read<scalar>(index)   vs.  args.argRead<scalar>(index)

- the older method names forms have been retained for code compatibility,
  but are now deprecated
2018-01-08 15:35:18 +01:00
Mark Olesen
f2ba618c19 STYLE: consistency in using argList::addArgument, argList::addOption 2017-11-22 12:54:28 +01: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
66104f2569 ENH: improve input stringency for argList options
Previously:

  - bad command-line input such as -label 1234xyz would parse as a
    label (with value 1234) and the trailing junk would be silently
    ignored. This may or may not be appropriate. If the trailing junk
    looked like this '100E' or '1000E-' (ie, forgot to type the
    exponent), the incorrectly parsed values can be quite bad:

        label  = 32684
        scalar = 6.93556e-310

Now:

  - use the updated readLabel/readScalar routines that trigger a
    FatalIOError on bad input:

        --> FOAM FATAL IO ERROR:
        Trailing content found parsing '1234xyz'

        --> FOAM FATAL IO ERROR:
        Trailing content found parsing '100E'

   This traps erroneous command-line input immediately.
2017-09-21 16:53:46 +02:00
Andrew Heather
04c3d535b0 MRG: Integrated Foundation code to commit 47bd8e1 2017-03-23 10:12:38 +00:00
Henry Weller
f8e9a0dbf5 fluentMeshToFoam: Added '-2D' option consistent with plot3dToFoam
Patch contributed by Bruno Santos
Resolves patch request https://bugs.openfoam.org/view.php?id=2238
2017-01-05 15:59:42 +00:00
Mark Olesen
a32a915d2e BUG: polyMesh removeFiles side-effect for blockMesh viewer (issue #346)
- polyMesh constructor from cell shapes invoked 'removeFiles'.
  This may or may not be what the caller wants or expects.
  With the ParaView blockMesh viewer, this behaviour causes deletion of
  all mesh data (points, faces, etc) when the viewer is refreshed.

  Triggered even when just building the blockMesh topology.

- only a few places that construct a polyMesh from cell shapes
  (mostly mesh conversion utilities).
  Ensure that the file removal (if any) occurs in the application
  and *not* as a side-effect of calling the polyMesh constructor.

--

  blockMesh (application)
    - The placement of the removeFiles seems to also remove freshly
      generated sets (Bug or feature to remove sets?)

  +-----------------------+---------------+------------------+
  | Application           | Constructor   | removeFiles      |
  |                       | (patch info)  | new / existing   |
  +-----------------------+---------------+------------------+
  | blockMesh             | dictionary    | existing         |
  | ansysToFoam           | names         | new              |
  | cfx4ToFoam            | dictionary    | new              |
  | fluentMeshToFoam      | names         | new              |
  | gambitToFoam          | dictionary    | new              |
  | gmshToFoam            | names         | new              |
  | ideasUnvToFoam        | names         | new              |
  | kivaToFoam            | dictionary    | new              |
  | mshToFoam             | names         | new              |
  | netgenNeutralToFoam   | names         | new              |
  | plot3dToFoam          | names         | new              |
  | tetgenToFoam          | names         | new              |
  | vtkUnstructuredToFoam | names         | new              |
  +-----------------------+---------------+------------------+
2016-12-15 19:07:05 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
67de20df25 Further standardization of loop index naming: pointI -> pointi, patchI -> patchi 2016-05-18 21:20:42 +01:00
Henry Weller
450728ea84 Standardized cell, patch, face and processor loop index names 2016-04-25 12:00:53 +01:00
Andrew Heather
efb39a8790 ENH: (further) Doxygen documentation updates for module support 2016-06-27 20:34:19 +01:00
Henry
c778346c96 Formatting: Rationalized the indentation of #include 2015-02-10 20:35:50 +00:00
mattijs
41650787b1 ENH: mesh tools: max write precision 2013-10-29 09:59:21 +00:00
andy
951c8436aa ENH: Applying Gijs' patch: Update header documentation for utilities 2013-02-21 10:54:34 +00:00
Henry
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
Henry
c3cb632c24 Documentation: converted javadoc @ to LaTeX style \ in Doxygen code docs 2011-02-08 18:22:00 +00:00
andy
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
andy
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
graham
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
mattijs
d820925462 ENH: preservePatchTypes preserves whole patch dictionary, not just type. 2010-10-13 11:05:29 +01:00
Mark Olesen
147fa2a75d STYLE: add notes to some (most) command-line options
- mapFields and splitMeshRegions need more clarification
2010-04-27 10:50:15 +02:00
Mark Olesen
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
Mark Olesen
d857d671ac STYLE: use new argList argRead() method and operator[] for cleaner code.
- deprecate argList::additionalArgs() method and remove uses of it
2010-02-16 17:57:49 +01:00
Mark Olesen
c091d856ae pedantic changes: 'forAll (' -> 'forAll(' in applications/
- to match coding guidelines
2009-12-03 14:12:08 +01:00
Mark Olesen
58b7e64185 Use argList::addOption, argList::addBoolOption (almost) everywhere
- ensure that the standard options (eg, from timeSelector) also have
  some usage information
2009-12-03 13:32:12 +01:00
Mark Olesen
d1295da31f adjust solvers and utilities to use new argList methods
- also drop various unused time options from src/OpenFOAM/include
2009-05-19 20:21:50 +02:00
Mark Olesen
28b200bcd9 update copyrights for 2009 2008-12-31 19:01:56 +01:00
Mark Olesen
9a4de95354 made xfer constructors explicit, with trickle down to polyMesh/fvMesh calls 2008-10-27 13:14:07 +01:00
Mark Olesen
b42e13583a More cleanup on headers/source for doxygen
- it also found things like size_t instead of size_type in fileName class
2008-07-22 11:12:40 +02:00
Mark Olesen
02cabc3cf2 updated Copyright (C) \d+-2008 OpenCFD Ltd. 2008-06-25 15:01:46 +02:00
mattijs
f53f614c43 Initial autoMesh merge 2008-04-24 13:16:10 +01:00
OpenFOAM-admin
3170c7c0c9 Creation of OpenFOAM-dev repository 15/04/2008 2008-04-15 18:56:58 +01:00