Commit Graph

82 Commits

Author SHA1 Message Date
4fe8ed8245 STYLE: use direct iteration for HashSet
- The iterator for a HashSet dereferences directly to its key.

- Eg,

      for (const label patchi : patchSet)
      {
          ...
      }
  vs.
      forAllConstIter(labelHashSet, patchSet, iter)
      {
          const label patchi = iter.key();
          ...
      }
2018-03-06 00:29:03 +01:00
b4d38ab468 ENH: improve handling of ThirdParty packages
- generalize some of the library extensions (.so vs .dylib).
  Provide as wmake 'sysFunctions'

- added note about unsupported/incomplete system support

- centralize detection of ThirdParty packages into wmake/ subdirectory
  by providing a series of scripts in the spirit of GNU autoconfig.
  For example,

      have_boost, have_readline, have_scotch, ...

  Each of the `have_<package>` scripts will generally provide the
  following type of functions:

      have_<package>          # detection
      no_<package>            # reset
      echo_<package>          # echoing

  and the following type of variables:

      HAVE_<package>          # unset or 'true'
      <package>_ARCH_PATH     # root for <package>
      <package>_INC_DIR       # include directory for <package>
      <package>_LIB_DIR       # library directory for <package>

  This simplifies the calling scripts:

      if have_metis
      then
          wmake metisDecomp
      fi

  As well as reducing clutter in the corresponding Make/options:

      EXE_INC = \
          -I$(METIS_INC_DIR) \
          -I../decompositionMethods/lnInclude

      LIB_LIBS = \
          -L$(METIS_LIB_DIR) -lmetis

  Any additional modifications (platform-specific or for an external build
  system) can now be made centrally.
2018-04-24 14:51:19 +02:00
a230e8d408 STYLE: Correcting typos 2018-03-28 17:14:16 +01:00
2f86cdc712 STYLE: more consistent use of dimensioned Zero
- when constructing dimensioned fields that are to be zero-initialized,
  it is preferrable to use a form such as

      dimensionedScalar(dims, Zero)
      dimensionedVector(dims, Zero)

  rather than

      dimensionedScalar("0", dims, 0)
      dimensionedVector("zero", dims, vector::zero)

  This reduces clutter and also avoids any suggestion that the name of
  the dimensioned quantity has any influence on the field's name.

  An even shorter version is possible. Eg,

      dimensionedScalar(dims)

  but reduces the clarity of meaning.

- NB: UniformDimensionedField is an exception to these style changes
  since it does use the name of the dimensioned type (instead of the
  regIOobject).
2018-03-16 10:24:03 +01:00
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
57291e8692 STYLE: use autoPtr::New and tmp::New for simple return types 2018-02-26 14:00:30 +01:00
660f3e5492 ENH: cleanup autoPtr class (issue #639)
Improve alignment of its behaviour with std::unique_ptr

  - element_type typedef
  - release() method - identical to ptr() method
  - get() method to get the pointer without checking and without releasing it.
  - operator*() for dereferencing

Method name changes

  - renamed rawPtr() to get()
  - renamed rawRef() to ref(), removed unused const version.

Removed methods/operators

  - assignment from a raw pointer was deleted (was rarely used).
    Can be convenient, but uncontrolled and potentially unsafe.
    Do allow assignment from a literal nullptr though, since this
    can never leak (and also corresponds to the unique_ptr API).

Additional methods

  - clone() method: forwards to the clone() method of the underlying
    data object with argument forwarding.

  - reset(autoPtr&&) as an alternative to operator=(autoPtr&&)

STYLE: avoid implicit conversion from autoPtr to object type in many places

- existing implementation has the following:

     operator const T&() const { return operator*(); }

  which means that the following code works:

       autoPtr<mapPolyMesh> map = ...;
       updateMesh(*map);    // OK: explicit dereferencing
       updateMesh(map());   // OK: explicit dereferencing
       updateMesh(map);     // OK: implicit dereferencing

  for clarity it may preferable to avoid the implicit dereferencing

- prefer operator* to operator() when deferenced a return value
  so it is clearer that a pointer is involve and not a function call
  etc    Eg,   return *meshPtr_;  vs.  return meshPtr_();
2018-02-26 12:00:00 +01:00
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
8931e443d8 ENH: collated support. Fixes lumpedPointMotion in #675. 2017-12-21 14:53:16 +00:00
7c1d8cb146 STYLE: more consistent use of labelUList and labelUIndList typedefs 2017-11-19 09:27:47 +01:00
23a6cadfa6 BUG: redistributePar: remove inconsistent *ProcAddressing. Fixes #351. 2016-12-19 12:58:49 +00:00
4f4b1d76c4 BUG: renumberMesh: Checking for cellProcAddressing after deleting it.
This is part of #340.
2016-12-14 17:21:56 +00:00
4a77294c7c ENH: renumberMesh: remove old files 2016-12-05 15:24:52 +00:00
ae3d2f4d57 ENH: topoSet: clear sets upon writing modified mesh. Fixes #129. 2016-11-16 14:58:46 +00:00
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +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
2d5ff31649 boundaryField() -> boundaryFieldRef() 2016-04-24 22:07:37 +01:00
0aaf154100 utilities/mesh/manipulation: Rationalized "End" message 2016-04-21 21:06:45 +01:00
cd852be3da OpenFOAM: Updated all libraries, solvers and utilities to use the new const-safe tmp
The deprecated non-const tmp functionality is now on the compiler switch
NON_CONST_TMP which can be enabled by adding -DNON_CONST_TMP to EXE_INC
in the Make/options file.  However, it is recommended to upgrade all
code to the new safer tmp by using the '.ref()' member function rather
than the non-const '()' dereference operator when non-const access to
the temporary object is required.

Please report any problems on Mantis.

Henry G. Weller
CFD Direct.
2016-02-26 17:31:28 +00:00
efb39a8790 ENH: (further) Doxygen documentation updates for module support 2016-06-27 20:34:19 +01:00
fd9d801e2d GIT: Initial commit after latest foundation merge 2016-04-25 11:40:48 +01:00
dc64f53924 GIT: remove remnants of conflict 2015-12-09 10:20:10 +00:00
8f1d043364 GIT: Resolved conflict 2015-12-09 09:32:38 +00:00
73dac8c7ee ENH: Updating utilities based on internal development line 2015-12-02 10:17:28 +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
765b81853e renumberMesh: Now supports sets
Resolves bug-report http://www.openfoam.org/mantisbt/view.php?id=1377
2015-10-21 16:49:57 +01:00
91e04d69c1 Resolve various unimportant warning messages from Gcc, Clang and Icpc 2015-07-19 11:31:49 +01:00
0bf2543df6 utilities: Correct "End" statement to be consistent with all other applications 2015-02-12 22:14:02 +00:00
c778346c96 Formatting: Rationalized the indentation of #include 2015-02-10 20:35:50 +00:00
4ca945f49b ENH: fvMesh: map fields using old volume 2013-09-20 17:35:49 +01:00
2f9111a50a BUG: renumberMesh: conversion scalar*label -> label 2013-08-12 12:02:56 +01:00
179085af97 ENH: renumberMesh: sort face/cellZones 2013-03-28 10:26:25 +00:00
9ccd5809b8 BUG: sampleDict: missing type 2012-12-05 15:21:00 +00:00
3e06dc9878 ENH: renumberMesh: renumber cellZones and faceZones (pointZones were already handled) 2012-11-20 16:02:14 +00:00
069c5ee218 ENH: renumberMesh: ignore inconsistent *ProcAddressing 2012-06-13 10:25:48 +01:00
01444d4b61 BUG: renumberMesh.C: update flip status for renumbered faces 2012-04-24 15:23:32 +01:00
b8eb3cae7d ENH: renumberMesh: do not print frontWidth if not calculated 2012-03-30 09:56:25 +01:00
8695d09a92 BUG: renumberMesh: not flipping faces 2012-03-07 14:53:09 +00:00
129d1224e8 BUG: renumberMesh: multiple processor faces on cells 2012-03-07 09:27:42 +00:00
c6b11dd751 ENH: renumberMesh: add zoltan 2012-03-01 17:48:22 +00:00
139c22716d ENH: renumberMesh: make frontwidth calculation an option 2012-02-22 16:34:58 +00:00
a0597834a9 ENH: renumberMesh: added Sloan renumbering 2012-02-21 13:00:35 +00:00
faacebb1f2 ENH: renumberMesh: changed api of renumber library.
Changed API. Made bandCompression proper CutHillMcKey. Better stats.
2012-02-20 13:07:21 +00:00
704b33fa79 ENH: renumberMesh: get block ordering working
- added boundaryFirst renumbering method
- renumbering in parallel
- make api methods const
2011-12-21 15:13:04 +00:00
5d4030b7f2 BUG: renumberMesh.C: reading bool from dictionary 2011-12-21 10:34:42 +00:00
f80b3a793a ENH: nonBlockingGaussSmoother: block as late as possible.
renumberMesh: option for sorting proc cells last to benefit from this.
2011-12-20 09:09:51 +00:00
5588507299 ENH: renumberMesh: have -dict option to read renumberMeshDict 2011-12-13 13:00:39 +00:00
72ef3d26e4 ENH: renumberMesh: backwards compatibility: use default if no system/renumberMeshDict 2011-12-09 11:27:11 +00:00
d5268bf30c ENH: renumberMesh: use renumberMethods library 2011-12-08 16:28:32 +00:00