Commit Graph

51 Commits

Author SHA1 Message Date
0e7954c22b BUG: sampledTriSurfaceMesh: sampling outside of mesh. Fixes #575.
There are a few issues:
- error would only throw exceptions if not parallel
- if we change this we also need to make sure the functionObjectList
  construction is synchronised
- bounding box overlap was not returning the correct status so the code
  to avoid the issue of 'badly formed bounding box' was not triggered.
2017-08-29 14:41:22 +01:00
2af602c2f4 STYLE: for Istream/Ostream check() use FUNCTION_NAME in messages 2017-05-26 10:59:16 +02:00
f7e502d459 STYLE: relocate some friend operations to be global ones 2017-05-04 02:39:57 +02:00
0ffae6461a ENH: creating a bounding box without points yields an inverted box
- The code create a box with a (0,0,0) point.
  The new definition is more logical and makes it very easy to grow
  the bounding box to include new points. It also simplifies much of
  the logic in the constructors.

- Use ROOTVGREAT instead of VGREAT for sizing greatBox and invertedBox.
  Avoids some overflow issues reported by Mattijs (thus GREAT has been
  used in treeBoundBox), but might still need further revision.
2017-02-01 12:15:00 +00:00
722d23f59c ENH: additional methods/operators for boundBox (related to #196)
- Constructor for bounding box of a single point.

- add(boundBox), add(point) ...
  -> Extend box to enclose the second box or point(s).

  Eg,
      bb.add(pt);
  vs.
      bb.min() = Foam::min(bb.min(), pt);
      bb.max() = Foam::max(bb.max(), pt);

Also works with other bounding boxes.
  Eg,
      bb.add(bb2);
      // OR
      bb += bb2;
  vs.
      bb.min() = Foam::min(bb.min(), bb2.min());
      bb.max() = Foam::max(bb.max(), bb2.max());

'+=' operator allows the reduction to be used in parallel
gather/scatter operations.

A global '+' operator is not currently needed.

Note: may be useful in the future to have a 'clear()' method
that resets to a zero-sized (inverted) box.

STYLE: make many bounding box constructors explicit
2017-01-25 19:26:50 +01:00
17d76e6261 ENH: boundBox 'reduce' method (related to #196)
reduce()
- parallel reduction of min/max values.
  Reduces coding for the callers.

  Eg,
      bb.reduce();

  instead of the previous method:
      reduce(bb.min(), minOp<point>());
      reduce(bb.max(), maxOp<point>());

STYLE:

- use initializer list for creating static content
- use point::min/point::max when defining standard boxes
2017-01-25 18:52:37 +01:00
9fbd612672 GIT: Initial state after latest Foundation merge 2016-09-20 14:49:08 +01:00
2b5e73fbce BUG: incorrect face order/orientation in boundBox (issue #196)
- was fortunately not used anywhere previously
2016-07-28 07:00:33 +02:00
a4f8f589de Added forward declaration of friend functions 2016-05-29 22:28:37 +01:00
683cfb9d97 vector::zero -> Zero 2016-04-15 11:32:42 +01:00
95d146ecdf Rationalized the indentation of C-preprocessor directives 2016-02-29 15:42:03 +00:00
15b7e87da7 tmp: Updated to store and preserve the const-ness of the reference to a constant object
This change requires that the de-reference operator '()' returns a
const-reference to the object stored irrespective of the const-ness of
object stored and the new member function 'ref()' is provided to return
an non-const reference to stored object which throws a fatal error if the
stored object is const.

In order to smooth the transition to this new safer 'tmp' the now
deprecated and unsafe non-const de-reference operator '()' is still
provided by default but may be switched-off with the compilation switch
'CONST_TMP'.

The main OpenFOAM library has already been upgraded and '-DCONST_TMP'
option specified in the 'options' file to switch to the new 'tmp'
behavior.  The rest of OpenFOAM-dev will be upgraded over the following
few weeks.

Henry G. Weller
CFD Direct
2016-02-22 16:23:21 +00:00
db89978ade Updated headers for Laurence and Andy 2012-12-17 11:42:00 +00:00
44d1ed3eae ENH: boundBox: Change distanceFromBoxSqr to nearest()
Returns the nearest point instead of a distance
2012-12-12 11:07:52 +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
fb138be9eb ENH: boundBox: Add function to return the faces. 2012-02-16 15:03:10 +00:00
4f40cdb7d7 GIT: Resolve conflict 2011-08-16 16:09:56 +01:00
c2dd153a14 Copyright transfered to the OpenFOAM Foundation 2011-08-14 12:17:30 +01:00
a372dbfb53 ENH: Further updates to AMI functionality 2011-07-21 17:48:20 +01:00
81d380ddac ENH: Initial commit of arbitrary mesh interface (AMI) functionality 2011-07-18 11:24:22 +01: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
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
25de194d33 Merge remote branch 'OpenCFD/olesenm' into olesenm 2011-01-04 15:46:43 +01:00
59228f8c9a STYLE: Minor code formatting changes 2011-01-04 15:27:00 +01:00
b50395b846 STYLE: Minor code formatting changes 2011-01-04 10:52:17 +00:00
881b3dafa2 Merge remote branch 'OpenCFD/master' into olesenm
Conflicts:
	applications/solvers/multiphase/twoPhaseEulerFoam/kineticTheoryModels/kineticTheoryModel/kineticTheoryModel.C
	applications/utilities/mesh/generation/extrude/extrudeToRegionMesh/createShellMesh.C
	applications/utilities/surface/surfaceCheck/surfaceCheck.C
	src/finiteVolume/fields/fvPatchFields/derived/advective/advectiveFvPatchField.C
	src/finiteVolume/fields/fvPatchFields/derived/waveTransmissive/waveTransmissiveFvPatchField.C
	src/meshTools/directMapped/directMappedPolyPatch/directMappedPatchBase.C

NOTE: also needed to strip trailing space/lines in various files
2010-12-21 10:19:53 +01:00
f46446f1b1 ENH: boundBox : test after ascii io 2010-12-20 17:13:13 +00:00
63e24812c2 ENH: Renaming "corners" in boundBox to "points". Overridden in treeBoundBox.
Keeping both functions to ensure that the octant ordering specified in
treeBoundBox is obeyed at the octree level, irrespective of the implementation
of the basic boundBox.
2010-12-13 14:39:55 +00:00
24a96a21ca ENH: add 'containsAny' and extra 'contains' methods to boundBox 2010-11-29 13:44:59 +01:00
f7ce5fbf0c ENH: Construct bounding box as subset of the pointField.
STYLE: move inline functions into boundBoxI.H

STYLE: reduce duplicate methods in treeBoundBox
2010-11-29 11:13:19 +01:00
9b1788ac85 ENH: boundBox volume function. 2010-11-04 16:49:47 +00:00
d79237597e STYLE: Fixing code style requirements for all src. 2010-07-28 13:31:46 +01:00
d29c438657 STYLE: use url for FSF license instead of postal address, switch to GPL v3 2010-03-29 14:07:56 +02:00
190bbd69de add corners() method to boundBox 2009-12-07 13:06:03 +01:00
bb4a182081 comment 2009-04-06 13:27:51 +01:00
d5cbc3bf08 cosmetic cleanups
- grammar in comments, namespace qualifiers, etc.
2009-01-16 19:07:14 +01:00
95dcb6ded7 Simplify checking of container (List/HashTable, strings) sizes
- can use 'XX.empty()' instead of 'XX.size() == 0', 'XX.size() < 1' or
  'XX.size() <= 0' or for simpler coding.
  It also has the same number of characters as '!XX.size()' and /might/ be
  more readable

- many size checking had 'XX.size() > 0', 'XX.size() != 0', or 'XX.size() >= 1'
  when a simple 'XX.size()' suffices
2009-01-10 20:28:06 +01:00
973b9ea0ce boundBox, octree cleanup
- added boundBox(const tmp<pointField>&) constructor for use with
    coordinate systems
  - moved some methods from treeBoundBox to boundBox and use VectorSpace ops
2009-01-01 17:03:19 +01:00
28b200bcd9 update copyrights for 2009 2008-12-31 19:01:56 +01:00
dcc82bf77b boundingBox has mag() and span() methods - use them 2008-12-31 17:58:23 +01:00
b7e349a727 Merge commit 'bundle/home' into olesenm 2008-11-24 08:44:47 +01:00
d6b247a3b1 added static data boundBox::greatBox and boundBox::invertedBox
- boundBox::invertedBox is useful for initializing our own calculations
- NOTE treeBoundBox::greatBox is still in place, since it uses GREAT
  instead of VGREAT. If this is only historical, we can drop it.
2008-11-22 11:15:20 +01:00
fbc185dee4 Removed the Warning again. 2008-11-20 22:12:05 +00:00
93a3a4fc0d replace const List with UList in some constructors 2008-11-07 22:00:22 +01:00
e06bf70095 binary read/write 2008-09-16 21:10:49 +01:00
a8a3ea5475 binary output 2008-09-03 10:56:24 +01:00
212a70a17b boundbox intersect renaming 2008-08-28 15:50:11 +01:00
02cabc3cf2 updated Copyright (C) \d+-2008 OpenCFD Ltd. 2008-06-25 15:01:46 +02:00