Commit Graph

320 Commits

Author SHA1 Message Date
02edc5b206 STYLE: tabs and line length in files, very dubious NULL in ensight reader.
- disable automatically upgrading copyrights in files since changes to
  not automatically imply a change in copyright. Eg, fixing a typo in
  comments, or changing a variable from 'loopI' to 'loopi' etc.
2017-06-26 13:43:05 +02:00
acdeb308be ENH: sampledTriSurfaceMeshNormal: variant of sampledTriSurfaceMesh. Fixes #500. 2017-06-15 11:18:38 +01:00
f31d5cf217 STYLE: sampledSurface: added comment for interpolation 2017-06-07 15:19:51 +01:00
2af602c2f4 STYLE: for Istream/Ostream check() use FUNCTION_NAME in messages 2017-05-26 10:59:16 +02:00
6e72ceddd0 Merge branch 'enh-iter-cleanup' into 'develop'
Further hash table iter clean-up

See merge request !113
2017-05-19 12:44:05 +01:00
bb67ccd37d ENH: Cleaned up hash table item found checks 2017-05-19 11:15:35 +01:00
aeae8e70de ENH: simplify sampling grouping using new IOobjectList methods 2017-05-17 16:25:20 +02:00
4b7c74f8eb BUG: sampledPlane: fix parallel running on subset. Fixes #463. 2017-05-04 17:50:07 +01:00
a6d37e5728 COMP: silence some compiler warnings
- remove some spurious regExp includes
2017-02-21 12:56:27 +01:00
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
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
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
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
27ae7d5b00 STYLE: minor comments added to ensightSurfaceReader 2016-12-09 14:38:15 +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
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
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
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
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
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
8e3dd09425 BUG: ensightSurfaceReader - enabled reading of data from sub-directory and updated field mask (See #215) 2016-08-18 15:29:56 +01: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
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
c224d19c83 sampledCuttingPlane: Rationalized 2016-06-30 10:33:28 +01:00
c6200ea25e sampledPlane, plane: standardize the selection of the plane type 2016-06-30 10:32:31 +01:00
fdb4f37148 foamFileSurfaceWriter -> foamSurfaceWriter for consistency with the naming of the other writers 2016-06-30 10:31:09 +01:00
3be20b492d Merge remote-tracking branch 'origin/develop' into develop
- conflicts resolved:
    src/conversion/ensight/file/ensightGeoFile.C
2016-06-30 01:05:35 +02:00
ad4e8a1f76 ENH: cleaner output directory for ensight surfaces
- similar to foamToEnsightParts, provide a data/ subdirectory to hold
  the time-varying field information (collated output only).

- widen data mask to avoid possible overflows with many time steps
2016-06-30 00:44:14 +02:00
a4f6836f3e BUG: avoid duplicate ensight surface mesh/geometries (issue #167)
- ensight does supports geometry in a separate file, but for the
  surface writer we claim that this is not true. This allows
  the field writers to control where the mesh/case files land.

  With 'true', the uncollated output would incidentally create
  things like this:

  Previous (w/ fields)        | Now (w/ fields)
  ----------------------------+----------------------
    0.05/surf.case            |
    0.05/surf.mesh            |
    0.05/p/surf.case          |  0.05/p/surf.case
    0.05/p/surf.mesh          |  0.05/p/surf.mesh
    0.05/p/surf.0000.p        |  0.05/p/surf.0000.p

  Previous (w/o fields)       | Now (w/o fields)
  ----------------------------+----------------------
    0.05/surf.case            | 0.05/surf.mesh
    0.05/surf.case            | 0.05/surf.mesh

  Move the separateGeometry() flag to the *.C code, where it is less
  likely to be mistakenly altered.
2016-06-29 23:11:27 +02:00
fe13ff56fc ENH: Updated ensight surface file reading 2016-06-29 20:43:20 +01:00
a158c30710 plane, sampledPlane: Rationalize the naming convention for the defining normal and point
normalVector -> normal
basePoint -> point

The old names are supported for backward-compatibility.
2016-06-29 16:58:35 +01:00
cc36db19de GIT: Resolved conflict 2016-06-28 16:59:01 +01:00