Commit Graph

1663 Commits

Author SHA1 Message Date
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
6e8586df5d DEFEATURE: remove ccm26ToFoam (issue #536)
- not maintained and less functionality than ccmToFoam.
2017-11-23 14:16:09 +01: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
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
7c1d8cb146 STYLE: more consistent use of labelUList and labelUIndList typedefs 2017-11-19 09:27:47 +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
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
0ca0a6264b STYLE: use readLabel/readScalar (string) instead of via IStringStream 2017-11-13 11:23:17 +01:00
mattijs
5a6b59d8b0 ENH: snappyHexMesh: added missing entry 2017-11-13 08:57:43 +00:00
Mark Olesen
c51ee22101 STYLE: fix stray use of argList option() instead of [] 2017-11-09 18:59:55 +01:00
Mark Olesen
166f62f19d STYLE: spelling, doxygen 2017-11-09 11:04:34 +01:00
Mark Olesen
874452717a ENH: add mergeMeshes -resultTime option (as per subsetMesh) 2017-10-10 12:46:40 +02: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
7d7b0bfe84 STYLE: use list methods find/found instead of findIndex function 2017-10-24 19:07:34 +02:00
mattijs
4818b5808e ENH: snappyHexMesh: add different method for cellZone-faceZone consistency. Fixes #629. 2017-10-26 12:08:15 +01: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
Mark Olesen
b29f2a61b6 BUG: missing parallel-aware for metis-like decomposition 2017-10-13 12:45:28 +02:00
Andrew Heather
c60627686a Merge branch 'feature-kahip-decompose' into 'develop'
add support for KaHIP decomposition

See merge request Development/OpenFOAM-plus!154
2017-10-11 16:36:48 +01:00
Andrew Heather
528bd95ae8 Merge branch 'feature-list-methods' into 'develop'
Feature list methods

See merge request Development/OpenFOAM-plus!152
2017-10-11 16:34:22 +01:00
mattijs
27cd94e954 ENH: checkMesh: handle label overflow. Fixes #617. 2017-10-11 09:22:23 +01:00
Mark Olesen
e9254eee58 ENH: support KaHIP decomposition
- refactor some common metis-like elements into the metisLikeDecomp
  abstract class.
2017-10-09 21:00:34 +02:00
Mark Olesen
f76552f7f9 STYLE: rebase edge on labelPair, additional methods in Pair
- use FixedList first/last in Pair first/second

- consistent first/second access for line
2017-10-06 20:10:49 +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
Mark Olesen
049617d037 ENH: update List and DynamicList methods (issue #595)
- improve functional compatibility with DynList (remove methods)
  * eg, remove an element from any position in a DynamicList
  * reduce the number of template parameters
  * remove/subset regions of DynamicList

- propagate Swap template specializations for lists, hashtables

- move construct/assignment to various containers.

- add find/found methods for FixedList and UList for a more succinct
  (and clearer?) usage than the equivalent global findIndex() function.

- simplify List_FOR_ALL loops
2017-09-20 17:20:54 +02:00
Sergio Ferraris
e8ec236cdf Merge branch 'feature-string-parsing' into 'develop'
improve consistency in parsing primitives from strings

See merge request !146
2017-09-25 18:28:47 +01:00
Mark Olesen
610854af03 STYLE: minor cleanup after merge 2017-09-22 16:25:17 +02: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
mattijs
d27457d41d refineMesh: Correct parallel operation
Patch contributed by Mattijs Janssens
Resolves bug-report https://bugs.openfoam.org/view.php?id=2621
2017-07-22 22:39:40 +01:00
Andrew Heather
fb20bc107e INT: Updated dependent code following latest set of integrations 2017-09-06 16:05:12 +01: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
Will Bainbridge
994b303ad7 tetrahedron: triangle: Improved barycentric handling on tets and tris
Updated the tetrahedron and triangle classes to use the barycentric
primitives. Removed duplicate code for generating random positions in
tets and tris, and fixed bug in tri random position.
2017-06-06 12:01:02 +01:00
Will Bainbridge
62e3d37324 primitiveShapes: Generalised tetrahedron and triangle cutting. Cuts are
now possible with level-sets as well as planes. Removed tetPoints class
as this wasn't really used anywhere except for the old tet-cutting
routines. Restored tetPointRef.H to be consistent with other primitive
shapes. Re-wrote tet-overlap mapping in terms of the new cutting.
2017-05-22 11:40:37 +01:00
mattijs
e23999e5da Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-09-18 08:43:21 +01:00
mattijs
404aa759ca ENH: mirrorMesh: run parallel. Fixes #587.
Note that now mirrorMesh does not delete empty patches anymore.
2017-09-18 08:42:33 +01:00
mattijs
0430ad474f ENH: modifyMesh: added -dict argument 2017-09-07 15:02:39 +01:00
mattijs
aad962a0e4 COMP: checkMesh: missing header 2017-09-07 09:42:03 +01:00
mattijs
775f39960f Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-09-06 12:27:38 +01:00
mattijs
dbc0bbc903 ENH: extrudeMesh: preserve hexRef8Data. Fixes #471. 2017-09-06 12:24:32 +01:00
Prashant
b5f96306ea ENH: checkMesh: output information about zones 2017-08-31 17:41:50 +05:30
Prashant
82a18e4cd9 ENH: Print info on zones only if present 2017-08-28 10:21:47 +05:30
Prashant
81d4292855 ENH: Adds basic information for faceZone and cellZones during checkMesh
fixes #560
2017-08-18 17:04:51 +05:30
Mark Olesen
139edb2468 ENH: add input surface scaling (issue #514)
- surfaceFeatureExtract
  * dictionary "scale" entry

- triSurface
- triSurfaceLoader
  * optional scaleFactor on reading

- surfaceAdd
- surfaceBooleanFeatures
- surfaceClean
- surfaceCoarsen
  * scale option

- surfaceTransformPoints, transformPoints
  * scale option as scalar or vector quantity
2017-08-14 09:18:15 +02:00
mattijs
59b70b04d5 BUG: setSet: use of one-argument constructor. Fixes #566. 2017-08-10 18:41:22 +01:00
Mark Olesen
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
Mark Olesen
a1742e7ad6 Merge branch 'style-string-access' into 'develop'
Consistent use of string methods

See merge request !128
2017-07-21 16:04:35 +01:00
Mark Olesen
b0b4c1aae5 COMP: intel compiler issues with operator ""_deg (fixes #544)
- this represents a partial revert for commit 6a0a8b99b3
2017-07-21 16:40:31 +02:00
Mark Olesen
2c69b7d7c4 STYLE: adjust some line lengths, doxygen comments 2017-07-20 13:50:35 +02:00
Andrew Heather
67e6f54808 Merge branch 'feature-streams-cleanup' into 'develop'
Feature streams cleanup

See merge request !127
2017-07-18 12:48:31 +01:00