Commit Graph

68 Commits

Author SHA1 Message Date
7d7b0bfe84 STYLE: use list methods find/found instead of findIndex function 2017-10-24 19:07:34 +02:00
2defba00a9 ENH: Lagrangian - provided backwards compatibility for cases using the
old "positions" file form

The change to barycentric-based tracking changed the contents of the
cloud "positions" file to a new format comprising the barycentric
co-ordinates and other cell position-based info.  This broke
backwards compatibility, providing no option to restart old cases
(v1706 and earlier), and caused difficulties for dependent code, e.g.
for post-processing utilities that could only infer the contents only
after reading.

The barycentric position info is now written to a file called
"coordinates" with provision to restart old cases for which only the
"positions" file is available. Related utilities, e.g. for parallel
running and data conversion have been updated to be able to support both
file types.

To write the "positions" file by default, use set the following option
in the InfoSwitches section of the controlDict:

    writeLagrangianPositions 1;
2017-09-13 13:13:36 +01:00
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
e70fc61660 ENH: consolidate, cleanup some string methods
- consolidate word::validated() into word::validate() and also allow
  as short form for string::validate<word>(). Also less confusing than
  having similarly named methods that essentially do the same thing.

- more consistent const access when iterating over strings

- add valid(char) for keyType and wordRe
2017-08-02 12:33:35 +02:00
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
5b1ae76abf reconstructPar: Handle the copy of the 'uniform' directory when only 1 region is reconstructed
Resolves bug-report http://bugs.openfoam.org/view.php?id=2186
2016-08-09 16:42:48 +01:00
43df3e4192 reconstructPar: Added support for decomposing "uniform" directories in multi-region cases
Resolves bug-report http://bugs.openfoam.org/view.php?id=2156
2016-07-20 18:47:58 +01:00
d6ce71f39a reconstructPar: Added '-noFields' option 2016-05-17 09:25:29 +01:00
ce0cd35185 Patches contributed by Mattijs Janssens:
splitMeshRegions: handle flipping of faces for surface fields

subsetMesh: subset dimensionedFields

decomposePar: use run-time selection of decomposition constraints. Used to
    keep cells on particular processors. See the decomposeParDict in

$FOAM_UTILITIES/parallel/decomposePar:
  - preserveBaffles: keep baffle faces on same processor
  - preserveFaceZones: keep faceZones owner and neighbour on same processor
  - preservePatches: keep owner and neighbour on same processor. Note: not
    suitable for cyclicAMI since these are not coupled on the patch level
  - singleProcessorFaceSets: keep complete faceSet on a single processor
  - refinementHistory: keep cells originating from a single cell on the
    same processor.

decomposePar: clean up decomposition of refinement data from snappyHexMesh

reconstructPar: reconstruct refinement data (refineHexMesh, snappyHexMesh)

reconstructParMesh: reconstruct refinement data (refineHexMesh, snappyHexMesh)

redistributePar:
  - corrected mapping surfaceFields
  - adding processor patches in order consistent with decomposePar

argList: check that slaves are running same version as master

fvMeshSubset: move to dynamicMesh library

fvMeshDistribute:
  - support for mapping dimensionedFields
  - corrected mapping of surfaceFields

parallel routines: allow parallel running on single processor

Field: support for
  - distributed mapping
  - mapping with flipping

mapDistribute: support for flipping

AMIInterpolation: avoid constructing localPoints
2016-05-15 16:36:48 +01:00
450728ea84 Standardized cell, patch, face and processor loop index names 2016-04-25 12:00:53 +01:00
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
efb39a8790 ENH: (further) Doxygen documentation updates for module support 2016-06-27 20:34:19 +01:00
3f55f752fc GIT: Resolve conflict with upstream merge from Foundation 2015-12-07 17:07:20 +00:00
916dcb8685 ENH: parallel: overhaul of parallel mapping
- redistributePar to have almost (complete) functionality of decomposePar+reconstructPar
- low-level distributed Field mapping
- support for mapping surfaceFields (including flipping faces)
- support for decomposing/reconstructing refinement data
2015-11-17 15:05:05 +00:00
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
87b26d09cb reconstructPar: Corrected time directory for reconstructed sets
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1880
2015-10-27 16:27:04 +00:00
82c0cc5312 timeSelector: Rename option zeroTime -> withZero for consistency with the noZero option 2015-04-25 15:12:08 +01:00
0bf2543df6 utilities: Correct "End" statement to be consistent with all other applications 2015-02-12 22:14:02 +00:00
311288a1e0 STYLE: reconstructPar: added comment 2014-01-20 09:38:13 +00:00
2dfa827af1 ENH: reconstructPar: pick up cellSets from current time instead of mesh time 2013-12-16 12:43:17 +00:00
b99906f32d BUG: reconstructPar: setting time (#1107) 2013-12-13 16:53:07 +00:00
bcc8f6013f ENH: reconstructPar: always reconstruct cellSets, faceSets, pointSets 2013-11-07 12:32:40 +00:00
fa328ab678 ENH: reconstructPar: additional printing 2013-10-30 15:12:36 +00:00
8fb58d0e88 BUG: reconstructPar: disallow explicit conversion of instant 2013-09-10 09:07:27 +01:00
1f64e5c7f5 ENH: reconstructPar: added reconstructing cellSets, pointSets, faceSets 2013-06-14 14:56:33 +01:00
34ac08a931 ENH: Code updates following changed to IOobjectList 2013-04-08 15:33:02 +01:00
2eb05ebb87 reconstructPar: -newTimes no longer constructs the mesh if all times are already reconstructed 2013-01-25 12:42:54 +00:00
da17674f0f ENH: decomposePar,reconsturctPar: added -allRegions option 2012-09-26 12:08:43 +01:00
c1ef233e5d ENH: pointMesh: use MeshObject form 2012-08-31 12:57:17 +01:00
32f31a4fef ENH: reconstructPar: -newTimes cleanup 2012-07-02 15:33:50 +01:00
14aafe2b71 ENH: reconstructPar: -newTimes argument to reconstruct missing times 2012-06-22 16:40:52 +01:00
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
099cc39e2e Revert "STYLE: 2011 copyright date."
This reverts commit b18f6cc1ce.
2011-01-05 18:24:29 +00:00
b18f6cc1ce STYLE: 2011 copyright date. 2011-01-05 11:14:26 +00:00
8f0a5ff145 ENH: Adding lagrangianFields option to reconstruction. 2010-11-18 14:56:03 +00:00
c91b71b521 ENH: Added support for DimensionedField<Type, volMesh> to reconstructPar 2010-08-06 13:20:46 +01:00
0531475578 ENH: IO Improvements, seg fault in parallel needing found. 2010-05-28 16:12:54 +01:00
0f7a124152 ENH. Adding more IOFieldFields, using them in decomposePar and
reconstructPar to decompose and reconstruct lagrangian FieldField
data.
2010-05-27 19:10:55 +01:00
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
c521e80c9f ENH: Added missing surfaceField types (surfaceVectorField, surfaceTensorField etc) 2010-03-26 13:38:55 +00:00
dc06f24a0c ENH: Split src/parallel into decompse and reconstruct to remove cyclic build dependency 2010-03-18 12:23:01 +00:00
b61537bd28 Merge commit 'OpenCFD/master' into olesenm 2010-02-17 09:32:41 +01:00
ee293cde8e ENH: add usage information for '-overwrite' option.
- make centrally available via #include "addOverwriteOption.H"
2010-02-16 11:44:27 +01:00
d4f73877e3 ENH: have field selection work for pointFields instead of just volFields. 2010-02-10 14:39:55 +00:00
c091d856ae pedantic changes: 'forAll (' -> 'forAll(' in applications/
- to match coding guidelines
2009-12-03 14:12:08 +01:00
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
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
2c52705cf7 move reconstructPar 'guts' to src/parallel/reconstruct
- in preparation for adding an optional '-reconstruct' to a few utilities
  re-use as -lreconstruct library

- move related stuff there too
      src/decompositionMethods/decompositionMethods
      -> src/parallel/decompositionMethods

- added missing namespace qualifiers
2009-11-20 14:37:56 +01:00
791b5aaeaa replacing isType with isA to enable directMappedWall to work 2009-09-15 17:51:59 +01:00