Commit Graph

21 Commits

Author SHA1 Message Date
a199fef957 STYLE: use globalPath() instead of path()/".." for parallel 2018-12-05 22:54:50 +01:00
1036cf9612 ENH: avoid raw dictionary lookup in functionObjects (issue #762)
Style changes:
    - use lookupObjectRef instead of using const_cast
    - use tmp::New factory
2018-08-04 00:23:18 +02:00
aec949d7cc ENH: Consistency improvement for setting postProcessing directory name 2018-02-27 14:37:05 +00:00
3a569c9fd5 ENH: streamLineBase - construct with curve distance 2018-03-27 11:01:06 +01:00
801fb7bd5f ENH: streamLine/wallBoundedStreamLine - minor refactoring to enable new derived functionality 2018-03-27 11:00:12 +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
7d7b0bfe84 STYLE: use list methods find/found instead of findIndex function 2017-10-24 19:07:34 +02:00
9b2a25516e ENH: make creation of streamline seeds demand-driven 2017-10-12 18:43:12 +02:00
c462d48196 ENH: wallBoundedStreamline: handle patches with zero faces. See #502. 2017-06-21 14:05:26 +01:00
91b90da4f3 Integrated Foundation code to commit 104aac5 2017-05-17 16:35:18 +01:00
e6b67f6790 ENH: Clean-up after latest Foundation integrations 2017-03-28 14:21:07 +01:00
e76d5ce567 ENH: use invertedBox instead of greatBox for signalling no clipping
- more stable/predictable to check for a bounding box !empty() rather
  than comparing to greatBox directly.
2017-02-01 14:31:09 +00:00
db0d8de756 ENH: Streamline function object - report velocity field being employed - see #323 2016-12-16 20:59:13 +00:00
1f826361c6 STYLE: Consistency updates to change input of <var>Name to <var>. Fixes #306 2016-11-22 14:50:33 +00:00
91459881a3 ENH: streamLineBase - set tracking velocity field name to U by default 2016-10-27 16:15:43 +01:00
54042b08df ENH: Function objects - first pass at updating read functionality
Note: should be using the result of the parent::read(dict) when
deciding whether to read local entries...
2016-09-30 13:24:58 +01:00
3dbd39146c STYLE: consistency updates 2016-09-27 15:17:55 +01:00
b9940cbbb1 COMP: Multiple changes - first clean build after latest merge - UNTESTED 2016-09-23 15:36:53 +01:00
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00