Commit Graph

19645 Commits

Author SHA1 Message Date
Mark Olesen
034ddfa78f ENH: make coeffs dictionaries optional for surfaceFeatureExtract 2017-05-10 14:11:28 +02:00
Mark Olesen
0e7630feca ENH: improved handling of 'unresolved' surface intersections (issue #450)
- the heuristic for matching unresolved intersections is a relatively
  simple matching scheme that seems to be more robust than attempting to walk
  the geometry or the cuts.

- avoid false positives for self intersection
2017-05-08 14:57:47 +02:00
Mark Olesen
da8ea0f21a ENH: refactor code from surfaceFeatureExtract to triSurfaceTools (issue #450) 2017-04-28 09:12:33 +02:00
Mark Olesen
11c5456628 ENH: improvements for surfaceIntersection (issue #450)
- adjust for updates in 'develop'

- change surfaceIntersection constructor to take a dictionary of
  options.

        tolerance      | Edge-length tolerance          | scalar | 1e-3
        allowEdgeHits  | Edge-end cuts another edge     | bool   | true
        avoidDuplicates | Reduce the number of duplicate points    | bool | true
        warnDegenerate | Number of warnings about degenerate edges | label | 0
2017-04-28 08:49:45 +02:00
Mark Olesen
cd5ca147a7 ENH: multiple surfaces, self-intersection in surfaceFeatureExtract (issue #450)
- If the dictionary is named 'surfaces', a 'surfaces' entry is mandatory.
  This is a list of wordRe, which is used to load multiple surfaces from
  constant/triSurface directory.

- Other dictionaries may contain a 'surfaces' entry.
  In which case the behaviour is as above (loading multiple surfaces).
  The dictionary name will *NOT* be taken as a surface name itself.

- Regardless of how the surfaces are loaded or features extracted,
  an additional selfIntersection test may be used.

  Eg,

    surfaces
    {
        extractionMethod    extractFromSurface;

        surfaces            (surface1.stl surface2.nas);

        // Generate features from self-intersect
        selfIntersection    true;

        // Base output name (optiona)
        output              surfaces;

        // Tolerance for self-intersect
        planarTolerance     1e-3;

        extractFromSurfaceCoeffs
        {
            includedAngle   120;

            // Do not mark region edges
            geometricTestOnly       yes;
        }
    }
2017-04-11 11:46:00 +02:00
Mark Olesen
837cbafcf3 ENH: improve handling of surface self-intersection (issue #450)
- provide a dedicated constructor to handle this special case.

  Tolerancing when cutting between two surfaces likely needs some
  more attention.
2017-04-11 10:31:23 +02:00
Mark Olesen
79ea782301 Merge branch 'ccm-bugfixes' into 'develop'
ccm conversion bugfixes

See merge request !115
2017-05-31 11:51:09 +01:00
Mark Olesen
8da6e8eb74 DEFEATURE: remove CCM combine boundary code
- was generally somewhat fragile. The main problem stems from the fact
  that several interfaces may be attached to a boundary. No trivial
  means of solving this without too much work for a feature that is only
  "nice-to-have".
2017-05-31 12:34:07 +02:00
Mark Olesen
62e7ddccdc ENH: add (C++11) user-literal for degrees to radians conversion
- Programming convenience.
  Eg, cos(45_deg) vs cos(degToRad(45))

STYLE: conversions marked as constexpr and noexcept
2017-05-31 10:16:19 +02:00
Mark Olesen
0be69605fd STYLE: incorrect namespace for doxygen 2017-05-31 10:02:55 +02:00
mattijs
3fd1c47324 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-31 09:00:16 +01:00
mattijs
8a52553b63 BUG: snappyHexMesh: extraneous debug printing. Fixes #485. 2017-05-31 08:59:36 +01:00
Mark Olesen
408b6c7e6b ENH: mergePoints now with template for list types
- makes it possible to use list types other than UList.
  For example, UIndirectList<point>
2017-05-30 18:21:01 +02:00
Mark Olesen
104f43583f CONFIG: bump baseline version to 1706
- not yet release, but some of the API and file locations are closer
  to 1706 than to 1612. Needed, for example, for swak4foam.
2017-05-30 15:09:06 +02:00
Mark Olesen
d9072f527c COMP: provide NamedEnum::found() method for third-party code
- eg, swak4Foam uses it for NumericAccumulationNamedEnum
2017-05-30 14:47:08 +02:00
Mark Olesen
49129ba88b COMP: using private data in HashPtrTableIO 2017-05-30 14:44:37 +02:00
Mark Olesen
98ccc6ed50 ENH: add prune option for ListOps reorder, inplaceReorder
- allows simultaneously reordering and truncation of lists

STYLE: add const ref for UnaryPredicate parameter
2017-05-30 13:18:06 +02:00
Mark Olesen
6d26b40e8b STYLE: use newer forAll macros 2017-05-30 12:44:13 +02:00
Mark Olesen
5d60d7e15c BUG: incorrectly dimensioned edge directions in extendedEdgeMesh:add() 2017-05-29 22:26:14 +02:00
Mark Olesen
6563c98d6c ENH: support different triSurface loading options
- "single" = One region for all files
 - "file"   = One region for each file
 - "offset" = Offset regions per file
 - "merge"  = Merge regions by name

These specifications provide finer control when loading multiple
surfaces.
2017-05-29 18:25:23 +02:00
Mark Olesen
67237e9385 CONFIG: adjust boost,CGAL versions 2017-05-29 17:18:26 +02:00
Mark Olesen
0f83b3f04b BUG: incorrect fall-through in directionalPressureGradientExplicitSource (fixed #486) 2017-05-29 15:34:14 +02:00
Mark Olesen
76c39302dd CONFIG: add compiler config for Gcc 7.1.0 2017-05-29 15:20:56 +02:00
Mark Olesen
90a07ff4cc BUG: enum constant in boolean context 2017-05-29 15:18:35 +02:00
Mark Olesen
d7a4088caa COMP: explicit handling of fallthrough cases 2017-05-29 15:10:54 +02:00
Mark Olesen
8afc6cbd86 ENH: Enum class as drop-in alternative for NamedEnum
- the NamedEnum wrapper is somewhate too rigid.
  * All enumerated values are contiguous, starting as zero.
  * The implicit one-to-one mapping precludes using it for aliases.
  * For example, perhaps we want to support alternative lookup names for an
    enumeration, or manage an enumeration lookup for a sub-range.
2017-05-29 13:13:53 +02:00
Mark Olesen
77a5b99e92 COMP: Hash.H was not included with HashTable/HashSet
- was only included indirectly via FixedList.H
2017-05-29 11:20:49 +02:00
Mark Olesen
c6c79ab313 STYLE: use std::pair (not Tuple2) in conjunction with std::initializer_list
- no penalty compared to Tuple2, potential future benefits with C++
  constructor forwarding.
2017-05-29 11:07:39 +02:00
Mark Olesen
fb4971644f ENH: cleanup of NamedEnum
- Remove the unused enums() method since it delivers wholly unreliable
  results. It is not guaranteed to cover the full enumeration range,
  but only the listed names.

- Remove the unused strings() method.
  Duplicated functionality of the words(), but was never used.

- Change access of words() method from static to object.
  Better code isolation. Permits the constructor to take over
  as the single point of failure for bad input.

- Add values() method

- do not expose internal (HashTable) lookup since it makes it more
  difficult to enforce constness and the implementation detail should
  not be exposed. However leave toc() and sortedToc() for the interface.

STYLE: relocated NamedEnum under primitives (was containers)

- internal typedef as 'value_type' for some consistency with STL conventions
2017-05-29 10:30:55 +02:00
Mark Olesen
dd54aa3018 BUG: non-lazy PackedList (fixes #484)
- The unset() method never auto-vivifies, whereas the set() method
  always auto-vivifies. In the case where set() is called with a zero
  for its argument - eg, set(index, 0) - this should behave
  identically to an unset() and not auto-vivify out-of-range entries.
2017-05-26 21:02:28 +02:00
Mark Olesen
8f1a4f792d ENH: include region counting in triSurface writeStats 2017-05-26 15:00:48 +02:00
Mark Olesen
26fef427ed ENH: provide lookupOrDefault for NamedEnum - makes for easier use. 2017-05-26 16:59:20 +02:00
Mark Olesen
b83007594a ENH: HashTable cfind() method returning a const_iterator
- This follows the same idea as cbegin/cend and is helpful when using
  C++11 auto to ensure we have unambiguous const-safe access.

  Previously:
  ====
    typename someLongClass::const_iterator iter = someTable.find(key);

    ... later on:
    *iter = value; // Oops, but caught by compiler.

  We can save some typing with auto, but it is uncertain what we get:
  ====
    auto iter = someTable.find(key);
        // iterator or const_iterator?
        // depends on someTable having const or non-const access.

    ... later on:
    *iter = value;  // Oops, but not caught by compiler.

  Using cfind instead, auto will deduce const_iterator as the type:
  ====
    auto iter = someTable.cfind(key);  // definitely const_iterator

    ... later on:
    *iter = value; // Oops, but caught by compiler.
2017-05-26 12:42:30 +02:00
Mark Olesen
2af602c2f4 STYLE: for Istream/Ostream check() use FUNCTION_NAME in messages 2017-05-26 10:59:16 +02:00
Mark Olesen
0564efb9e1 ENH: add basic support for file extensions to word
- when a plain word is used as a directory-local name for file.
  We don't have a full blown fileName, but still want to check/remove
  extensions etc.
2017-05-26 10:48:01 +02:00
Mark Olesen
ccc1ce4a25 ENH: avoid calling fileName::components twice in Foam::cp 2017-05-26 10:39:56 +02:00
Mark Olesen
5efe22c2f0 ENH: align constructors of geometricSurfacePatch with surfZoneIdentifier
- both classes are nearly identical and should be merged in the future.
2017-05-26 09:10:48 +02:00
Mark Olesen
8d3e106166 STYLE: remove redundant size check 2017-05-26 08:15:49 +02:00
mattijs
15d5fca144 BUG: argList: -decomposeParDict handling in combination with -case.
Related to #482 but this one is the handling inside argList.
2017-05-25 12:12:43 +01:00
mattijs
757cc7a15d BUG: cshrc: account for lsof printing mount point after files
Some versions of lsof print the mount point (if remote) after the
script path:
    /hosts/mymachine/OpenFOAM/OpenFOAM-plus.develop/etc/cshrc (mymachine:/home)
This now gets filtered out.
2017-05-25 10:43:57 +01:00
mattijs
4b20991841 ENH: argEdge: order of member initialisation. Fixes #481. 2017-05-25 09:16:49 +01:00
mattijs
391a9c5fe2 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-24 16:11:33 +01:00
Andrew Heather
ce88aca9f7 Merge branch 'feature-oriented-fields' into 'develop'
Initial attempt to track oriented surface fields

See merge request !104
2017-05-24 14:30:51 +01:00
mattijs
0215e330d5 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2017-05-24 14:30:46 +01:00
mattijs
2838c4554c BUG: pointConstraints: resize all constraints arrays. Fixes #480. 2017-05-24 14:28:28 +01:00
Andrew Heather
e0a5537d3f Merge branch 'feature-oriented-fields' of develop.openfoam.com:Development/OpenFOAM-plus into feature-oriented-fields 2017-05-24 14:22:54 +01:00
Andrew Heather
9a864bdd85 GIT: Resolved merge conflict when merging develop branch 2017-05-24 12:30:09 +01:00
Andrew Heather
b5ed93a40a ENH: orientedFields - refectored and simplified usage 2017-05-24 12:26:12 +01:00
Mark Olesen
51b4c38987 STYLE: explicitly use iterator object() in ListOps
STYLE: adjust parameter names and template types in invertManyToMany

- more explicit about the acceptable list types
2017-05-24 07:51:38 +02:00
Mark Olesen
c4caef3a1b ENH: nicer indentation of inGroups patch entry (issue #474)
- The inGroups is a wordList.
  It can be flattened on output to make files more readable.
2017-05-24 07:40:48 +02:00