Commit Graph

17687 Commits

Author SHA1 Message Date
mattijs
c90e6ed48c ENH: surfaceCheck: additional printing. Additional self-intersect test with reverse ray 2016-10-31 15:41:34 +00:00
mattijs
aa0b3934b0 ENH: snappyHexMeshDict: improved comment 2016-10-26 16:03:41 +01:00
mattijs
196a4ea4e5 ENH: setTimeStep: adjust timestep for adjustableRunTime writeInterval. Fixes #268. 2016-10-24 13:07:51 +01:00
Andrew Heather
e24917a7af Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-10-19 13:20:52 +01:00
Andrew Heather
a7bdbccaed STYLE: Corrected typo 2016-10-19 13:20:18 +01:00
Andrew Heather
509517e996 ENH: gmshToFoam: Updated for line entries 2016-10-19 13:20:02 +01:00
Andrew Heather
3c496ae4c7 ENH: noiseModel: Updated check for uniform time step size 2016-10-19 13:19:34 +01:00
Mark Olesen
175c7744c0 STYLE: adjust mergePoints to ease adoption of different list types (issue #250)
- A preliminary minor adjustment only.
2016-10-19 10:42:47 +02:00
Mark Olesen
03b5d5c108 BUG: foamCleanPath problem if path contains @ (closes #264)
- Can occur with some user names, or mounted paths.
  Resolve by using '?' for the separation character.

  Since '?' is a shell-glob, it is highly unlikely to occur appear in
  filenames.  Additionally, it is not a meta-character in standard sed,
  nor in the GNU extension (which uses '\?').
2016-10-18 09:52:37 +02:00
Mark Olesen
fe6ea956f7 COMP: compile issue with gcc-5.2 (closes #273)
- Superfluous #include "FieldFunctions.H" provokes warnings/errors
  with newer gcc.
2016-10-17 21:50:30 +02:00
mattijs
4ee8ba4ae6 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-10-17 12:28:33 +01:00
mattijs
82c3eed531 BUG: snappyHexMesh: findCellZoneTopo was copying same value but still setting
changed flag which caused infinite while loop. Background info:
- findCellZoneTopo tries to find for all named surface intersections
which side of the face is in the faceZone
- i.e. it tries to make the cellZone consistent with the faceZone
(to fix small problems)
- this had some logic to assign the neighbour cellZone to the owner cellZone
- which didn't check for the neighbour being the same value as the owner
- but still set a 'changed' flag which caused the loop to never end.
2016-10-17 12:25:03 +01:00
mattijs
c4a4c38858 ENH: subTriSurfaceMesh: fixed comment 2016-10-17 12:24:11 +01:00
Andrew Heather
55c9238259 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-10-04 09:35:11 +01:00
Andrew Heather
35fc264a2e Merge branch 'feature-wallDistanceCalcInterval' into 'develop'
ENH: wallDist - added option to evaluate every XXX steps

Added functionality to update the wall distance every XXX steps

Note: only applies to movePoints() - topology change bypasses the update interval and triggers a re-calculation
Syntax:
```
wallDist
{
    method          ...
    updateInterval 5; // optional - default is 1
}
```

Test case: [mixerVesselAMI2D.tgz](/uploads/c0bee1decc0337018272f3566b6a4416/mixerVesselAMI2D.tgz)

See merge request !62
2016-10-04 08:58:05 +01:00
Mark Olesen
96c3a09024 ENH: provide direct access to raw pointer/reference from autoPtr (issue #252)
All of the access methods for autoPtr include validity checks and will
fail if the underlying point is NULL. In some cases, however, we'd
like to retain the automatic deletion mechanism, but still address a
nullptr. This is mostly for cases in which a file-stream should be
allocated, but only on the master process. For these cases we'd still
like to pass through and reference the underlying pointer (eg, to
obtain the correct method call) without tripping the pointer check
mechanism. If we attempt to use the ptr() method, the autoPtr memory
management is bypassed and we risk memory leaks.

Instead provide an alternative mechanism to obtain the raw underlying
pointers/references. Use rawPtr() and rawRef() for these potentially
useful, but also potentially dangerous, operations.
2016-10-03 16:38:19 +02:00
mattijs
598da1ac25 ENH: surfaceCheck: added -outputThreshold option to manage file writing 2016-10-03 13:55:30 +01:00
Andrew Heather
64560defc5 ENH: wallDist - suppress calc if updateInterval is zero 2016-09-30 11:47:38 +01:00
Andrew Heather
6645d6d1cd STYLE: Added header documentation to function 2016-09-29 10:30:30 +01:00
Andrew Heather
5c4bd557cb ENH: wallDist - added option to evaluate every XXX steps 2016-09-28 16:59:57 +01:00
mattijs
95c74f9b93 Merge branch 'develop' of develop.openfoam.com:Development/OpenFOAM-plus into develop 2016-09-28 12:26:58 +01:00
mattijs
1c2aadb8d8 ENH: distributedTriSurfaceMesh: bail out if getting stuck due to precision errors 2016-09-28 12:26:23 +01:00
Mark Olesen
6d7ff59fc8 ENH: provide refOrNull method for autoPtr.
- Normally use '()' to deference. This has extra safety and issues a
  fatal error if the underlying pointer is not valid.

  However, in some cases we are happy with getting a null reference.
  The refOrNull() method returns the reference without any checking.

  Usage example:

      autoPtr<OFstream> osPtr;
      if (Pstream::master())
      {
          osPtr.reset(new OFstream(...));
      }
      writeViaMaster(osPtr.refOrNull());

      - The writeViaMaster() call takes an OFstream reference,
        but this is only used directly on the master.
        The slaves will pass things through to the master.
2016-09-28 11:26:42 +02:00
Mark Olesen
bbec683e42 ENH: provide list of enums for NamedEnum
- can be used to loop over all enumerations in the order of definition.
2016-09-27 12:40:17 +02:00
Mark Olesen
ba249f8e76 STYLE: minor adjustment to echoed information 2016-09-26 08:02:03 +02:00
Mark Olesen
3c935ca89e Fix tensor names in foamToEnsightParts case file (fixes #243) 2016-09-26 07:41:02 +02:00
Mark Olesen
cff8efb98b ENH: reduce startup time for foamToVTK conversion
- Similar to ensight converters (issue #240),
  improve speed for detection of lagrangian clouds.

- provide a -noLagrangian option for symmetry
2016-09-23 18:45:06 +02:00
Mark Olesen
88ca081c8c ENH: reduce startup time for ensight conversion (issue #240).
- Less looping when detecting lagrangian clouds and their fields.

- Avoid using Time::setTime() and IOobjectList in tight loops.
  They both kill performance immensely.

ENH: provide a -noLagrangian option to foamToEnsight and foamToEnsightParts
for even more control.
2016-09-23 17:45:47 +02:00
Mark Olesen
3503c872a5 STYLE: add OpenFOAM version to ensight geom file description.
- More informative than a horizonal line, can help when debugging.

STYLE: remove unused write field methods from ensightParts
2016-09-23 14:53:01 +02:00
Mark Olesen
06699f17f5 BUG: ensight output failing with dimensioned field (fixes #244)
- The new field needs initialization with a dimensioned<Type> not just
  the dimensionSet.

- The new field was also incorrectly being registered, which could
  cause issues later.
2016-09-23 13:13:12 +02:00
Mark Olesen
3c25f26aab BUG: incorrect symmTensor order for some ensight output (fixes #243)
- affects foamToEnsightParts, sampled surfaces

- Use ensightPTraits mechanism throughout to avoid this issue
2016-09-23 09:10:57 +02:00
Mark Olesen
0c168c43fa ENH: improve startup time for foamToEnsight conversion (issue #240).
Old code:
    Found 10990 time steps
    Search for moving mesh ... no moving mesh detected.
    Startup in 329.09 s

Updated:
    Found 10990 time steps
    Search for moving mesh ... no moving mesh detected.
    Startup in 1.6 s

- Cause was checking "polyMesh/points" via an IOobject.
  Short-circuit with a check for a polyMesh/ directory first.

  Limit the check to the master-node as well to further reduce
  load on the file-system.

------------------------------

ENH: improve per-step conversion times for foamToEnsight.

Old code:
    Converting 11001 time steps
    Time [0] = 0       Wrote in 1.53 s
    Time [1] = 1       Wrote in 1.52 s
    ...
    Time [100] = 100   Elapsed time 205.35 s

Updated:
    Converting 11001 time steps
    Time [0] = 0       Wrote in 1.4 s
    Time [1] = 1       Wrote in 0.07 s
    ...
    Time [100] = 100   Elapsed time 42.4 s

- Speedup by hashing test results from the first conversion step
  instead of checking each time.

  Check data on all nodes to avoid problems with incomplete writes.

------------------------------

BUG: moving mesh detection failed for foamToEnsightParts

- adjusted to agree with updated foamToEnsight

------------------------------

Note:

- foamToEnsightParts (serial) still has about twice the throughput of
  foamToEnsight.
2016-09-21 18:15:19 +02:00
mattijs
6c56d61846 ENH: fvc: instantiating 2D volVectorField 2016-09-20 17:07:30 +01:00
Andrew Heather
19d4355387 Merge branch 'Fix_GL_224' into 'develop'
BUG: output field name instead of field (fixes #224)



See merge request !59
2016-09-20 10:53:54 +01:00
Prashant
4dc06c656d BUG: output field name instead of field (fixes #224) 2016-09-20 15:15:19 +05:30
Mark Olesen
b4d83b8f83 ENH: more flexible selection/naming for ddt2 FO (issue #224)
- bugfix (empty patches), and added detection of steady-state
  scheme.

Caveat: when called via execFlowFunctionObjects will always produce a
  zero field, since the oldTime field is not available for this mode.
2016-09-16 14:49:47 +02:00
Mark Olesen
3008d80bc7 ENH: runTime calculation of zeroGradient volume fields (issue #235)
Extrapolate internal field to walls for post-processing.
Uses as new syntax for handling the naming of multiple fields.

The input fields are selected via a wordReList.
For example,

    fields      (U "(T|k|epsilon|omega)");

The names of the resulting output fields use placeholder tokens for
flexibility. For example,

    result      zeroGradient(@@);

The '@@' placeholder is replaced by the name of the input field.
Eg,
    fields      (U T);
    result      zeroGradient(@@);
->  zeroGradient(U), zeroGradient(T)

Or,
    fields      (U T);
    result      @@nearWall;
->  UnearWall, TnearWall

NOTE:
    The function object will skip over fields that only have
    processor, empty, zeroGradient patches. The operation does not
    make much sense for these, and it avoids inadvertently
    re-processing fields twice.
2016-09-16 21:33:40 +02:00
Mark Olesen
d3d693e17c ENH: runTime calculation of (dp/dt)^2 - issue #224
- implemented using magSqr() instead of sqr().
  For scalar fields they are the same, but can be useful
  if this function object is extended for more field types.
2016-09-14 14:02:40 +02:00
Mark Olesen
9de4a75813 ENH: expand data mask for foamToEnsight (issue #231)
- Default is a width of 8 characters, but this can be extended up to 31
  characters via the '-width' command-line option.

- Now use a similar structure as foamToEnsightParts for the masking.
  This reduces the clutter within the directory, makes it easier to
  selectively delete some time steps (using shell commands).

- Added in a "time" information data in each sub-directory to
  make it possible to reconstruct the case file with an external
  script.

- Conversion of cloud data should now also work in parallel
  (may need more testing).

- Support binary output for cloud data.

- Better avoidance of illegal ensight variable names.
  But still partially incomplete (due to patch fields).

==================================================
Example of NEW file structure:

    EnSight/verticalChannel.case        # case name
    EnSight/geometry                    # for non-moving geometry

    EnSight/data/                       # time-varying data
    EnSight/data/00000000/
    EnSight/data/00000001/
    ...

  Fields are stored by name within the data/********/ directories:

    EnSight/data/00000001/time          # human-readable time info
    EnSight/data/00000001/U
    EnSight/data/00000001/p
    ...
    EnSight/data/00000001/geometry      # for moving geometry

  Clouds are stored at the next sub-directory level:

    EnSight/data/00000001/lagrangian/<cloudName>/positions
    EnSight/data/00000001/lagrangian/<cloudName>/U
    ...

==================================================
The old structure was significantly more cluttered:

    EnSight/verticalChannel.case
    EnSight/verticalChannel.0000.mesh
    EnSight/verticalChannel.0001.p
    EnSight/verticalChannel.0001.<cloudName>
    EnSight/verticalChannel.0001.<cloudName>.U

==================================================
2016-09-13 18:26:00 +02:00
Mark Olesen
d56924624b COMP: CGAL rules should use lib64/ (fixes #234)
- 64-bit builds of gcc/mpfr/gmp use lib64/ for their installation path.
  Use this for the wmake rules as well.
2016-09-13 08:58:00 +02:00
Mark Olesen
04300070cf BUG: metisDecomp compile failure for WM_DP (closes #232)
- spurious use of floatScalar instead of scalar for processor weights.

STYLE: partially updated dummy metis.h to reflect metis-5.1.0 API
2016-09-13 08:51:03 +02:00
Andrew Heather
4ea1613653 Merge branch 'master' into develop 2016-09-08 12:00:46 +01:00
mattijs
b2694847d6 STYLE: PrimitivePatch: undefined function 2016-09-07 12:40:35 +01:00
mattijs
ae9643e181 ENH: snappyHexMesh: combine previous zone based algorithm with v3+ one.
Fixes #66.
2016-09-07 12:38:59 +01:00
Andrew Heather
4dcbb32d24 BUG: runTimePostProcessing - corrected surface visualisation caused by regression update/bug 2016-09-07 10:02:02 +01:00
Mark Olesen
03cb76a213 BUG: Non-const dereferencing of tmp in fvc:dt2dt2 (closes #227) 2016-09-07 09:33:26 +02:00
Mark Olesen
17f0aa1db8 STYLE: propogate WM_CC for CMake (fixes #226)
- reported by Bruno
2016-09-06 16:17:20 +02:00
Mark Olesen
99efe5f8d8 BUG: triSurface IO operators are asymmetrical (fixed #225)
- Also reported as http://bugs.openfoam.org/view.php?id=2188
2016-09-06 14:57:40 +02:00
Mark Olesen
29d5a10f97 ENH: add stream operators for MeshedSurface, UnsortedMeshedSurface
- add corrsponding testing into surfaceMeshConvertTesting too
2016-09-06 14:45:44 +02:00
sergio
292c522c71 ENH: Adding iso-plane histogram to regionSizeDistribution 2016-09-02 12:28:20 -07:00