Commit Graph

729 Commits

Author SHA1 Message Date
d62e301b4b Merge branch 'master' into develop 2017-02-03 12:29:49 +00:00
b4f0b2930d STYLE: Minor code tidying 2017-02-03 12:20:58 +00: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
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
14d8f6cb17 DEFEATURE: remove writers for OpenDX format (issue #294)
- last OpenDX release/news was from 2007.
  Cannot maintain or verify if the writers are correct.
2017-01-25 11:51:14 +01:00
77a3022c43 BUG: boundaryDataTemplates - make dir before writing to stream. Fixes #390 2017-01-23 08:41:43 +00:00
084963143c BUG: meshToMesh - corrected indexing of cutting patches. Fixes #376 2017-01-10 17:02:58 +00:00
4a845f5c41 ENH: newly structured surface 'sources' for sampling.
- extend the sampling concept to include surfMeshes and surfFields
  for storage.

- Note the createOnRead switch in surfMeshSamplers can be desirable in
  some situations to force creation of the surface faces within the
  constructor.
2016-12-15 09:54:25 +01:00
64548a6283 meshToMesh0: fixed segmentation fault
Patch contributed by Mattijs Janssens
Resolves bug-report http://bugs.openfoam.org/view.php?id=2363
2016-12-01 19:55:39 +00:00
5d7f8f11d6 GIT: rearrange files for surface sampling sources
- isolate the surface source (plane, iso-surface etc), from sampling
2016-11-30 10:31:07 +01:00
8b75035f29 ENH: change UnsortedMeshedSurface -> meshedSurface for sampledTriSurfaceMesh
- all sampled surface types now consistently use the same storage,
  which allows some more simplifications in the future.

- before/after comparison of the sampledTriSurfaceMesh tested with
  motorbike passenger helmet (serial and parallel). Use the newly added
  'keepIds' functionality to retain the original ids, and can also
  compare them to the original obj file with "GenerateIds" in paraview.
2016-11-29 22:56:08 +01:00
3c41b80b38 ENH: change from triSurface to meshedSurface storage for iso-surfaces
- this makes it easier to reuse the code, and sampledSurface expect
  a face (not a labelledFace), so this also eliminates a translation
  level and simplifies memory management.

- before/after comparison of the sampled iso-surfaces tested with
  iso-surfaces from interFoam/RAS/angledDuct tutorial (serial and
  parallel)
2016-11-29 17:24:26 +01:00
e7a4a3a73d STYLE: some documentation for sampledSurfaces specification 2016-12-14 17:54:23 +01:00
690f58d2cb ENH: support retention of original surface ids when sampling (related to issue #104)
For example,
    surfaces
    (
        helmet
        {
            type        sampledTriSurfaceMesh;
            surface     motorBike-passenger-helmet.obj;
            source      cells;
            keepIds     true;  <<-- NEW
        }
    );

    This will create an additional "Ids" field that can be used to sort
    or as a faceMap to recover the original face order.
2016-11-29 17:14:56 +01:00
989883d62b GIT: Resolved merge conflict 2016-12-12 12:23:45 +00:00
c0f44ac4f3 MRG: Integrated foundation code 2016-12-12 12:10:29 +00:00
27ae7d5b00 STYLE: minor comments added to ensightSurfaceReader 2016-12-09 14:38:15 +00:00
f281f77e4a Updated member type comments
Resolves bug-report http://bugs.openfoam.org/view.php?id=2356
2016-11-28 21:23:00 +00:00
c3005794ab ENH: provide triSurfaceTools::validTri() method to reduce code duplication
- identical code was present in surfaceCheck (original source),
  and isoSurface, isoSurfaceCell (copies).

- add in a MeshedSurface<face> variant as well, since this will likely
  be needed in the near future
2016-11-24 15:31:32 +01:00
ed27b25ff8 STYLE: use meshCells() instead of cutCells() for consistency
- other sampled surface types use meshCells() throughout.
  Only cuttingPlane was different.
2016-11-24 15:33:17 +01:00
1f826361c6 STYLE: Consistency updates to change input of <var>Name to <var>. Fixes #306 2016-11-22 14:50:33 +00:00
a6665e395b Merge branch 'feature-keep-sampled-pids' into 'develop'
Feature keep sampled pids

Rebased version of merge request !58, following ticket closure for issue #104 .

See merge request !75
2016-11-09 14:58:42 +00:00
0026347c0e ENH: cloudSet: report the number of missing points 2016-11-09 14:42:12 +00:00
9d63e7f78c ENH: cloudSet: report missing samples. (fixes #228) 2016-11-07 14:15:27 +00:00
82f9089b6a Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-11-03 12:12:35 +00:00
e3420b8a27 STYLE: Corrected typo 2016-11-03 12:12:27 +00:00
f0107b47f5 Merge branch 'ensight-preview' into 'develop'
Reworking of the ensight infrastructue and new ensightWrite function object



See merge request !70
2016-11-03 08:24:52 +00:00
2857e9512f ENH: propagate face area to sampling (issue #266)
- make top-level Sf(), magSf(), Cf() pure virtual since the
  sub-classes will always be providing the face/point storage,
  with either triSurface or MeshedSurface in the background
2016-10-20 08:58:27 +02:00
53faca832d Merge branch 'merge-foundation' of develop.openfoam.com:Development/OpenFOAM-plus into merge-foundation 2016-10-07 10:20:45 -07:00
b9b2ac694a ENH: Adding eddyDissipationDiffusionModel, thermocouple probe and thermocoupleTestCase 2016-10-07 10:17:43 -07:00
3915942195 ENH: cleanup ensightParts to use updated infrastructure (issue #241).
- Use ensightCase for case writing.
  Rebase ensightPartCells/ensightPartFaces on
  ensightCells/ensightFaces routines.

- Greatly reduces code duplication potential source of errors.
2016-10-07 11:24:47 +02:00
182f0a72ae MRG: Incremental foundation merge 2016-10-03 08:27:06 +01:00
3dbd39146c STYLE: consistency updates 2016-09-27 15:17:55 +01:00
1fbcb686ff STYLE: Consistency updates 2016-09-23 16:52:46 +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
4ea1613653 Merge branch 'master' into develop 2016-09-08 12:00:46 +01:00
8e3dd09425 BUG: ensightSurfaceReader - enabled reading of data from sub-directory and updated field mask (See #215) 2016-08-18 15:29:56 +01:00
c79544b197 ENH: mergedSurf helper class (fixes #104)
- For merging meshedSurf content from parallel sources.
  Ensures zoneIds are properly preserved for sampling in parallel.

Current state
~~~~~~~~~~~~~

Current producers of the region information:
 * sampledTriSurfaceMesh

Current consumers of the region information:
 * nastran writer. The zone ids passed through as PSHELL Ids (with offset 1).

Limitations

  The per-face region association is preserved, but the face/element
  sort order gets lost in reconstruction. Would need to attach
  additional information to the sampled surface and use that for
  sorting, but this would also imply that sampled values be written
  indirectly (or resorted) too to match the order. Zone ids are passed
  through, but not their names. After reconstruction, zone ids are no
  longer contiguous. Re-sorting (as mentioned above) would solve this
  too, but again at the cost of more complexity when writing.
2016-08-11 13:25:51 +02:00
f8bb01e9f1 STYLE: harmonize nastran writer with more standard method calls
- unhide indexing of element/property ids (pass as const parameters).
  Proper indexing is the responsiblity of the caller.
2016-08-10 21:05:15 +02:00
1fc2a73213 ENH: use meshedSurf API for surface writers (issue #104)
- Allows passing of additional information (per-face zone ids) or possibly
  other things, while reducing the number of arguments to pass.

- In sampledTriSurfaceMesh, preserve the region information that was
  read in, passing it onwards via the UnsortedMeshSurface content.

  The Nastran surface writer is currently the only writer making use
  of this per-face zone information.
  Passing it through as a PSHELL attribute, which should retain the
  distinction for parts. (issue #204)
2016-08-10 15:41:24 +02:00
44416dd44f ENH: sampledSets: warn for no fields (fixes #206) 2016-08-10 13:32:47 +01:00
3dffee8a6a STYLE: change MeshedSurface 'faces' access to 'surfFaces' (related to issue #104)
- use surfFaces() to return the templated list of faces.
  This frees up the method 'faces()' to be used as a virtual method,
  which will be needed at a later stage.
2016-08-10 10:03:51 +02:00
58f905ff70 C++11: Replaced the C NULL with the safer C++11 nullptr
Requires gcc version 4.7 or higher
2016-08-05 17:19:38 +01:00
cd2b0ff742 meshToMeshTemplates: Updated non-const access to the source patch field
Resolves bug-report http://bugs.openfoam.org/view.php?id=2165
2016-08-01 14:28:18 +01:00
ab84d6941f Updated template formatting to C++11 2016-07-12 20:03:29 +01:00
a623ab42a3 timeVaryingMappedFixedValue: Reinstated support for AverageField 2016-07-01 10:26:20 +01:00
ff0557cf22 BUG: ensight output - corrected mask 2016-06-30 23:05:23 +01:00
6d71d03f44 ENH: default to collateTimes on for ensight output
- the uncollated version becomes quite difficult to process.

  Caveat: cannot use "collateTimes true" for non-static geometries
2016-06-30 15:32:21 +02:00