Commit Graph

98 Commits

Author SHA1 Message Date
f9fe71815a STYLE: consistent use of '= delete' for removed constructors/assignments
- make the purpose more explicit, and reduces some work for the
  compiler as well.
2018-05-30 12:03:17 +02:00
12157acf07 STYLE: suppress fatal errors for indexedOctree debug=1
- these errors are mostly rounding related (when a point is located on
  the edge of a bounding box instead of being fully inside it).

  For debug > 1, continue to treat as fatal.
2018-04-04 18:14:34 +02:00
a230e8d408 STYLE: Correcting typos 2018-03-28 17:14:16 +01:00
ca15b5779d Merge remote-tracking branch 'origin/master' into safe-develop 2018-03-22 23:47:20 +01:00
1edb2f7dd0 BUG: mesh refinement crash with degenerate mesh distributions (closes #778)
- occurred when the initial mesh distribution was missing cells on
  some processors.
2018-03-21 21:54:40 +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
ca5b0dcbaa ENH: improvements to Time
- expose the names of write and stopAt controls for reuse elsewhere and
  provide a stopAtControls enum for 'unknown'

- track the requested number of sub-cycles (was previously a bool)
2017-11-28 10:11:06 +01:00
f55c568f13 ENH: upgrade from NamedEnum to Enum (issue #515) 2017-07-03 21:43:33 +02:00
2af602c2f4 STYLE: for Istream/Ostream check() use FUNCTION_NAME in messages 2017-05-26 10:59:16 +02:00
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
fb95a08e20 indexedOctree: Corrected comment
Resolves bug-report http://bugs.openfoam.org/view.php?id=2319
2016-11-05 21:00:16 +00:00
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
c4c60fad80 BUG: polyMesh::movePoints: clear cellTree since gets constructed using current geometry
so will be out of date (w.r.t bounding box, subdivisions) when the mesh moves.
Only when all cells stays in all the same boxes can you skip rebuilding it
so this was not deemed worthwhile. Fixes #172
2016-07-18 16:07:15 +01:00
450728ea84 Standardized cell, patch, face and processor loop index names 2016-04-25 12:00:53 +01:00
fd9d801e2d GIT: Initial commit after latest foundation merge 2016-04-25 11:40:48 +01:00
43beb06018 Standardized cell, patch and face loop index names 2016-04-25 10:28:32 +01:00
683cfb9d97 vector::zero -> Zero 2016-04-15 11:32:42 +01:00
3963149c05 src/OpenFOAM: Moved function documentation comments into .H files and removed duplicates 2016-02-29 21:21:41 +00:00
7ba41e0095 Removed duplicate, inconsistent and spurious comments in .C files 2016-02-29 18:33:54 +00:00
95d146ecdf Rationalized the indentation of C-preprocessor directives 2016-02-29 15:42:03 +00:00
56fa7c0906 Update code to use the simpler C++11 template syntax removing spaces between closing ">"s 2016-01-10 22:41:16 +00:00
3f55f752fc GIT: Resolve conflict with upstream merge from Foundation 2015-12-07 17:07:20 +00:00
a4ab3f61db src/OpenFOAM: Update ...ErrorIn -> ...ErrorInFunction
Avoids the clutter and maintenance effort associated with providing the
function signature string.
2015-11-08 12:23:52 +00:00
42fb1b9e8e Updated notImplemented -> NotImplemented
The new NotImplemented macro uses __PRETTY_FUNCTION__ for GNU compatible
compilers otherwise __func__ to provide the function name string.
2015-11-01 10:26:37 +00:00
9dd6a5b003 ENH: snappyHexMesh: add automatic gap-level detection and refinement 2015-10-28 13:28:32 +00:00
8cd3023439 Rationalize position searching and add cell->tet decomposition as the default cell-search algorithm
Resolves issues with probes and findRefCell for meshes in which all cell face-pyramids are positive.
2015-02-25 10:57:06 +00:00
8628ef2fea Corrected capitalization of Doxygen documentation comments 2015-02-14 13:10:15 +00:00
333e6541f3 BUG: indexedOctree: construct with shapes outside bb 2013-09-23 20:37:28 +01:00
2989a25d44 BUG: indexedOctree: construct with no points inside bb 2013-09-20 16:43:16 +01:00
0cb4e1ecd8 ENH: indexedOctree: print memory size 2013-09-12 15:24:12 +01:00
ca3bde9f20 BUG: labelBits: allow negative labels 2013-07-18 13:07:50 +01:00
f9664eb3e4 STYLE: indexedOctree: removed commented out code 2013-07-10 12:29:07 +01:00
a1ec3f06b3 COMP: labelBits: unsigned integer overflow 2013-07-05 13:46:22 +01:00
e2482a4e8b ENH: Merge searchableSurface and indexedOctree volumeType 2013-04-11 19:52:03 +01:00
72c3da08b2 Merge branch 'master' into feature/cvMesh
Conflicts:
	applications/test/Matrix/Test-Matrix.C
	applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.C
	applications/utilities/mesh/generation/extrude2DMesh/extrude2DMesh/extrude2DMesh/extrude2DMesh.H
	src/OpenFOAM/algorithms/indexedOctree/indexedOctree.C
	src/OpenFOAM/primitives/Tensor2D/Tensor2DI.H
2013-04-05 16:09:24 +01:00
9064e37da7 ENH: Add extra octree functionality
+ Make intersection and nearest functions functors. This makes adding
  different intersection and nearest routines easier.
+ treeDataPrimitivePatch takes its tolerance as a constructor argument
+ Make treeDataTriSurface a typedef of treeDataPrimitivePatch
2013-03-15 12:38:57 +00:00
74e16d7729 Reformat "template <..." to template<"
Add support for constructing VectorSpaces from forms with lower component type,
e.g. Vector<scalar> from Vector<label>
2013-02-21 15:07:50 +00:00
944b8d438b Reformat "template <..." to template<"
Add support for constructing VectorSpaces from forms with lower component type,
e.g. Vector<scalar> from Vector<label>
2013-02-21 15:07:09 +00:00
ff3654956a STYLE: Code cleanup and add some comments 2013-01-10 10:50:05 +00:00
db89978ade Updated headers for Laurence and Andy 2012-12-17 11:42:00 +00:00
6622eb4ad4 Merge branch 'master' of /home/dm4/OpenFOAM/OpenFOAM-dev 2012-12-12 12:08:50 +00:00
5527f8e8fb ENH: indexedOctree: Remove quickCircumsphereRejection
Found no speed advantage
2012-12-11 16:53:08 +00:00
26a9fbb6e1 ENH: boundBox: Move overlaps function from treeBoundBox.
Update indexedOctree::overlaps to use boundBox::overlaps.
2012-12-11 16:49:36 +00:00
8e968f5647 STYLE: debug: move debug declaration into Foam namespace 2012-12-11 09:33:20 +00:00
051afeb419 subCycle: Updated handling of the old-time field and timeIndex to support outer-iterations 2012-11-14 15:47:04 +00:00
138f149b47 ENH: surfaceFeatures: Add constructor that takes an edgeMesh 2012-03-20 17:43:27 +00:00
f46e2fadf7 Corrected header 2012-03-19 16:15:23 +00:00
308739d2e8 src/OpenFOAM/algorithms/subCycle: corrected handling of oldTime field to support outer iteration
Note: currently only the oldTime field is handled so only Euler ddt is supported with outer iteration
2012-03-19 16:13:20 +00:00