Commit Graph

30 Commits

Author SHA1 Message Date
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
34a1a5dec2 STYLE: Minor corrections to comments/fix typos 2017-06-23 12:13:46 +01:00
1319df48d9 Rationalized Doxygen documentation of command-line options 2016-06-17 09:11:58 +01:00
9cfccd2093 Simplify and correct Doxygen lists using '-' rather than '\li \c' 2016-06-16 20:10:39 +01:00
3f608e95e6 Added forward declaration of friend functions 2016-05-30 08:28:35 +01:00
e57874859a Updated Doxygen documentation and files
Contributed by Bruno Santos
Resolves patch report http://www.openfoam.org/mantisbt/view.php?id=2023

Update online documentation http://openfoam.github.io/Documentation-dev/html/
2016-03-14 11:00:24 +00:00
573e8a891f Rename localAxesRotation -> cylindrical
This class does not simply rotate the coordinate system is also changes
it from Cartesian to cylindrical which is not clear from the original name.

We plan to rewrite the coordinateRotation classes to be
coordinateTransformation classes and massively simplify the interface
from the currently unintelligible mess.
2015-08-13 09:25:28 +01:00
7c28d5fb5d BUG: http://www.openfoam.org/mantisbt/view.php?id=708
Bug fixing in vector transformation using localAxesRotation
Adding constructor for localAxesRotation class.
2014-05-09 14:59:07 +01:00
e6cef52788 ENH: porosity model updates for moving meshes 2014-04-11 14:32:31 +01:00
a07b59c279 STYLE: Updated copyright year 2013-01-21 16:49:49 +00:00
685635e6a3 ENH: Deleting parabolicCylindricalCS, sphericalCS and toroidalCS
coordinate systems
Modifying constructors from dictionary of coordinateSystem class (no
default type)
Adding localAxesRotation type. It constructs a axes-rotation tensor on each
cell centre.
Adding functionality to coordinateRotation blase class (transformTensor,
transformVector, etc)
2013-01-21 12:17:17 +00:00
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
c3cb632c24 Documentation: converted javadoc @ to LaTeX style \ in Doxygen code docs 2011-02-08 18:22:00 +00:00
e95e9700c8 Merge remote branch 'OpenCFD/master' into olesenm 2011-01-17 10:21:58 +01:00
eaef8d482b STYLE: Updated 1991 start copyright year to 2004 2011-01-14 16:08:00 +00:00
305bdb5978 ENH: add clear() method to coordinateSystem, coordinateRotation 2011-01-11 13:09:41 +01: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
69526c6c1c BUG: various reinterpret_cast to enable strict-aliasing 2010-08-19 15:44:17 +01:00
82dec4824e ENH: support find via keyType for coordinateSystems
- findAll() method returns a labelList of all matching names
- find() method returns the index to the first matching name

  For example, use a regex to specify alternative coordinate systems
  in porousZones
  (
      "cat1?(Back|Front)*"
      {
          coordinateSystem    "(cat1|system_10)";
          porosity    0.781;
          ...
      }
  )
2010-07-21 11:11:42 +02:00
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
7425942742 DOCU: add date of deprecation to deprecated methods/classes 2010-02-17 12:48:19 +01:00
3e0ec9d835 code tidying 2009-08-18 10:43:51 +01:00
a83961a02a coordinate system cleanup
- coordinateSystem, cylindricalCS, sphericalCS:
  get copy with name constructor

- cylindricalCS, sphericalCS:
  can switch off default degrees

- dropped cartesianCS class (already covered by coordinateSystem) and just
  always use coordinateSystem directly.
  The dictionary runtime selection still accepts type "cartesian" as an alias,
  to provide the least surprises.

- dropped runtime selection based on origin/axis/direction (not used), but
  left runtime selection based on origin/coordinateRotation as still being
  potentially useful.
2009-01-16 22:08:24 +01:00
28b200bcd9 update copyrights for 2009 2008-12-31 19:01:56 +01:00
0a8286b8ed inspired by MeshObject - added coordinateSystems::New selector 2008-10-29 15:00:50 +01:00
59821d6094 added optional notes to coordinate systems
porousZone constructor in the same order as sampling
2008-10-28 17:25:59 +01:00
02cabc3cf2 updated Copyright (C) \d+-2008 OpenCFD Ltd. 2008-06-25 15:01:46 +02:00
3170c7c0c9 Creation of OpenFOAM-dev repository 15/04/2008 2008-04-15 18:56:58 +01:00