Commit Graph

10 Commits

Author SHA1 Message Date
Mark Olesen
dc7d0ffeaa ENH: add face/triFace find(edge) method (#3004)
- returns the edge index within the face, -1 if not found
2023-10-27 13:48:18 +02:00
Mark Olesen
d3e285b48b ENH: add FixedList templated get<unsigned>() methods
- provides fast compile-time indexing for FixedList
  (invalid indices trigger a compiler error).

  This enables noexcept access, which can propagate into various
  other uses (eg, triFace, triPoints, ...)

ENH: add triangle edge vectors
2022-11-24 12:21:01 +00:00
Mark Olesen
851be8ea33 ENH: use consistent naming when toggling exception throwing on/off 2021-11-02 21:14:41 +01:00
Mark Olesen
8eef91c5e2 ENH: improve edge access for face/triFace
- additional rcEdge(), rcEdges() methods for reverse order walk

- accept generic edge() method as alternative to faceEdge() for
  single edge retrieval.

- edge() method with points -> returns the vector

- reduce the number of operations in edgeDirection methods

DEFEATURE: remove longestEdge global function

- deprecated and replaced by face::longestEdge() method (2017-04)
2021-05-12 11:24:57 +02:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
Mark Olesen
a5cc0ffcad STYLE: use const reference for caught exceptions 2019-01-23 09:03:06 +01:00
Mark Olesen
1883a872a1 STYLE: adds comments in empty Make/options files
- easier when making modifications

STYLE: spelling in topoSetSource comments
2018-11-13 15:21:13 +01:00
Mark Olesen
62b83a76a4 ENH: face, triFace sign() method analogous to plane
- a quick test for which side of the face a point is located
2018-08-14 10:08:22 +02:00
Mark Olesen
797155f862 ENH: additional method for switching error throwing on/off (issue #552)
- error::throwExceptions(bool) returning the previous state makes it
  easier to set and restore states.

- throwing() method to query the current handling (if required).

- the normal error::throwExceptions() and error::dontThrowExceptions()
  also return the previous state, to make it easier to restore later.
2017-07-29 12:25:30 +02:00
Mark Olesen
a32eff4e59 ENH: ensure face, triFace and labelledTri all work consistently (issue #294)
- triFace() now initialized with '-1', which makes it behave
  equivalently to face(label).

- supply default region=0 for some labelledTri constructors.
  This allows labelledTri to work more like a triFace and makes it
  easier to use in templated methods and eases conversion from
  triFace to a labelledTri.

- labelledTri(const labelUList&) can now be used when converting
  from a face. It can have 3 values (use default region)
  or 4 values (with region).

- face, triFace, labelledTri now all support construction with
  initializer lists. This can be useful for certain types of code.
  Eg,
      triFace     f1{a, b, c};
      face        f2{a, b, c};
      labelledTri f3{a, b, c};

  Work without ambiguity.
  Also useful for templated methods:

      FaceType f{remap[a], remap[b], remap[c]};
2016-11-12 20:57:48 +01:00