Commit Graph

57 Commits

Author SHA1 Message Date
Mark Olesen
e0f83938ee ENH: ignore -noFunctionObjects option when disabled
- With argList::noFunctionObjects() we use the logic added in
  4b93333292 (issue #352)

  By removing the '-noFunctionObjects' option, we automatically
  suppress the creation of function-objects via Time (with argList
  as a parameter).
  There is generally no need in these cases for an additional

      runTime.functionObjects().off()  statement

  Use the argList::noFunctionObjects() for more direct configuration
  and reduce unnecessary clutter in the -help information.

  In previous versions, the -noFunctionObjects would have been redundant
  anyhow, so we can also just ignore it now instead.
2018-08-08 09:44:28 +02:00
Mark Olesen
cb919a6c41 ENH: tag some options as 'advanced' (only shown with -help-full)
General:
    * -roots, -hostRoots, -fileHandler

Specific:
    * -to <coordinateSystem> -from <coordinateSystem>

- Display -help-compat when compatibility or ignored options are available

STYLE: capitalization of options text
2018-07-31 11:54:15 +02:00
Mark Olesen
a592ebc073 STYLE: avoid unrestricted dictionary lookup in conversion, sampling, surfMesh
- aids with detection of excess tokens (issue #762)

- deprecated dictionary::operator[] in favour of the lookup() method
  which offers more flexibilty and clarity of purpose.
  Additionally, the read<> and get<> forms should generally be used
  instead anyhow.
2018-07-18 13:33:00 +02:00
Mark Olesen
2662042d49 ENH: improve controls for Time (issue #910)
- relocate some standard functionality to TimePaths to allow a lighter
  means of managing time directories without using the entire Time
  mechanism.

- optional enableLibs for Time construction (default is on)
  and a corresponding argList::noLibs() and "-no-libs" option

STYLE:

- mark Time::outputTime() as deprecated MAY-2016

- use pre-increment for runTime, although there is no difference in
  behaviour or performance.
2018-07-02 10:20:01 +02:00
Mark Olesen
3d608bf06a ENH: remove reliance on the Xfer class (issue #639)
This class is largely a pre-C++11 holdover. It is now possible to
simply use move construct/assignment directly.

In a few rare cases (eg, polyMesh::resetPrimitives) it has been
replaced by an autoPtr.
2018-03-05 13:28:53 +01:00
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
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
Mark Olesen
f2ba618c19 STYLE: consistency in using argList::addArgument, argList::addOption 2017-11-22 12:54:28 +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
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
1cfb59fe1a ENH: add read-option for polyTopoChanger (issue #608)
- avoid meshModifier contents from being read immediately upon
  construction, since this recreates an existing modifier instead of
  allowing us to specify our own.
2017-10-04 08:19:39 +02:00
Mark Olesen
24577907a1 ENH: add faceZone::resetAddressing with constant flipMap
- remove unused static variable, use updated hashtable methods
2017-10-04 08:55:00 +02:00
Andrew Heather
d8d6030ab6 INT: Integration of Mattijs' collocated parallel IO additions
Original commit message:
------------------------

Parallel IO: New collated file format

When an OpenFOAM simulation runs in parallel, the data for decomposed fields and
mesh(es) has historically been stored in multiple files within separate
directories for each processor.  Processor directories are named 'processorN',
where N is the processor number.

This commit introduces an alternative "collated" file format where the data for
each decomposed field (and mesh) is collated into a single file, which is
written and read on the master processor.  The files are stored in a single
directory named 'processors'.

The new format produces significantly fewer files - one per field, instead of N
per field.  For large parallel cases, this avoids the restriction on the number
of open files imposed by the operating system limits.

The file writing can be threaded allowing the simulation to continue running
while the data is being written to file.  NFS (Network File System) is not
needed when using the the collated format and additionally, there is an option
to run without NFS with the original uncollated approach, known as
"masterUncollated".

The controls for the file handling are in the OptimisationSwitches of
etc/controlDict:

OptimisationSwitches
{
    ...

    //- Parallel IO file handler
    //  uncollated (default), collated or masterUncollated
    fileHandler uncollated;

    //- collated: thread buffer size for queued file writes.
    //  If set to 0 or not sufficient for the file size threading is not used.
    //  Default: 2e9
    maxThreadFileBufferSize 2e9;

    //- masterUncollated: non-blocking buffer size.
    //  If the file exceeds this buffer size scheduled transfer is used.
    //  Default: 2e9
    maxMasterFileBufferSize 2e9;
}

When using the collated file handling, memory is allocated for the data in the
thread.  maxThreadFileBufferSize sets the maximum size of memory in bytes that
is allocated.  If the data exceeds this size, the write does not use threading.

When using the masterUncollated file handling, non-blocking MPI communication
requires a sufficiently large memory buffer on the master node.
maxMasterFileBufferSize sets the maximum size in bytes of the buffer.  If the
data exceeds this size, the system uses scheduled communication.

The installation defaults for the fileHandler choice, maxThreadFileBufferSize
and maxMasterFileBufferSize (set in etc/controlDict) can be over-ridden within
the case controlDict file, like other parameters.  Additionally the fileHandler
can be set by:
- the "-fileHandler" command line argument;
- a FOAM_FILEHANDLER environment variable.

A foamFormatConvert utility allows users to convert files between the collated
and uncollated formats, e.g.
    mpirun -np 2 foamFormatConvert -parallel -fileHandler uncollated

An example case demonstrating the file handling methods is provided in:
$FOAM_TUTORIALS/IO/fileHandling

The work was undertaken by Mattijs Janssens, in collaboration with Henry Weller.
2017-07-07 11:39:56 +01:00
Mark Olesen
95e7faf309 STYLE: use the more succinct forms for argList (issue #307)
* args[int]   vs  args.args()[int]
  * args[word]  vs  args.options()[word]
  etc.
2016-11-20 13:06:57 +01:00
Andrew Heather
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
Henry Weller
6164c2f262 Standardized the naming of functions which control the writing of fields etc.
to have the prefix 'write' rather than 'output'

So outputTime() -> writeTime()

but 'outputTime()' is still supported for backward-compatibility.

Also removed the redundant secondary-writing functionality from Time
which has been superseded by the 'writeRegisteredObject' functionObject.
2016-05-12 17:38:01 +01:00
Henry Weller
2d5ff31649 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
Henry Weller
5f13806591 Updated headers 2016-04-21 21:07:28 +01:00
Henry Weller
0aaf154100 utilities/mesh/manipulation: Rationalized "End" message 2016-04-21 21:06:45 +01:00
Andrew Heather
efb39a8790 ENH: (further) Doxygen documentation updates for module support 2016-06-27 20:34:19 +01:00
andy
fd9d801e2d GIT: Initial commit after latest foundation merge 2016-04-25 11:40:48 +01:00
Andrew Heather
8f1d043364 GIT: Resolved conflict 2015-12-09 09:32:38 +00:00
Andrew Heather
73dac8c7ee ENH: Updating utilities based on internal development line 2015-12-02 10:17:28 +00:00
Henry Weller
e2ef006b91 applications: Update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-10 17:53:31 +00:00
Henry Weller
34f060cfbb stitchMesh: Improved docs
Provided by Bruno Santos
Resolves report http://www.openfoam.org/mantisbt/view.php?id=1767
2015-09-09 19:56:07 +01:00
Henry
8628ef2fea Corrected capitalization of Doxygen documentation comments 2015-02-14 13:10:15 +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
c51a2b0f63 ENH: have MUST_READ_IF_MODIFIED on IOdictionary construction 2010-06-02 09:48:07 +01:00
Mark Olesen
72f7d46f23 ENH: add operator[](const word&) as "find-by-name" to some classes
- affected: polyBoundary, fvBoundaryMesh, ZoneMesh, searchableSurfaces

  before:
      const label zoneI = mesh.cellZones().findZoneID(zoneName);
      const cellZone& cz = mesh.cellZones()[zoneI];
  after:
      const cellZone& cz = mesh.cellZones()[zoneName];
2010-04-29 10:12:35 +02: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
a50f01b079 STYLE: use forAllIter, forAllConstIter instead of long-hand version
STYLE: use 'forAll(' NOT 'forAll (', as per coding guide
2010-04-12 11:18:38 +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
mattijs
6680ddcfee ENH: Reuse existing zones. 2010-03-22 10:31:37 +00: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
ee293cde8e ENH: add usage information for '-overwrite' option.
- make centrally available via #include "addOverwriteOption.H"
2010-02-16 11:44:27 +01:00
mattijs
d0b95d6949 Added mesh region option 2010-01-15 17:16:07 +00: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
fa93ce8cd7 coding style adherence
- markup codingStyleGuide.org examples so they actually indent correctly

- use 'Info<<' as per codingStyleGuide instead of 'Info <<'
2009-11-27 15:39:14 +01:00
mattijs
ddfe6c39e9 user overrideable tolerances 2009-08-18 22:12:06 +01:00
mattijs
0fd2a5f056 making stitchMesh,mergePatchPairs work 2009-06-18 20:35:55 +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
mattijs
0128b2be68 UIndirectList 2009-03-12 19:25:21 +00:00
mattijs
9b0bebec00 making overwrite work 2009-02-06 15:12:24 +00:00