Commit Graph

4002 Commits

Author SHA1 Message Date
Mark Olesen
7349b97ecc STYLE: use labelRange for identity 2020-11-25 19:53:02 +01:00
mattijs
ae49b51182 ENH: improve offsets handling in extrudeToRegionMesh (#1933)
- non-uniform offsets are generated due to truncation errors,
  which can lead to problems later on (e.g. redistributePar).

  Detect if the offsets are close to being uniform.
2020-11-25 19:53:02 +01:00
Mark Olesen
07bbae0c55 STYLE: use brace constructors for Foam::zero and Foam::one
- makes it clearer that these are constructors and not function calls
2020-11-19 16:57:45 +01:00
Mark Olesen
6dd2cc808e CONFIG: provisional cuda rule. Update naming for CGAL rules 2020-11-17 21:29:07 +01:00
Mark Olesen
bed1305d96 BUG: extraneous brackets after Fluent cell types (fixes #1872)
ENH: limit output to 25 cell types per line for readability

- makes it easier to trace potential format errors etc

STYLE: downgrade warning about polyhedrals to a simple info message

- can assume that polyhedral support is widespread enough to not
  warrant a warning.
2020-10-29 11:21:39 +01:00
Mark Olesen
3b7100a9a1 BUG: PDRsetFields fails with non-orthogonal outer region (fixes #1907)
- first sort the cells into their ijk bins, and restrict testing for
  face orientation to those faces with an owner or neighbour that has
  an ijk bin.

ENH: ensure polyMesh from PDRblockMesh is marked as AUTO_WRITE

- the particular polyMesh constructor inherits the writeOpt, which
  makes is dependent on the caller and thus somewhat fragile for the
  top level caller.
2020-10-28 20:56:32 +01:00
Mark Olesen
f959c8eb36 ENH: generate local orientation vectors for blockMesh VTK output (#1903)
- can help when designing/debugging blockMesh layouts

- propagate low-level cellModel methods face() and edge() to cellShape

STYLE: relocate blockMesh OBJ output to application only

- remove blockTopology files in cleanCase function

- improve code consistency in top-level blockMesh, PDRblockMesh
  generation.
2020-10-28 16:04:12 +01:00
Mark Olesen
9eb73a92e2 TUT: fix use of "constant/triSurface" etc (#1887)
- use bracketed syntax (eg, "<constant>/triSurface") instead for
  implicit case resolution.
2020-10-28 16:04:12 +01:00
Mark Olesen
51b2490258 ENH: additional options for transformPoints and surfaceRefineRedGreen
- add -recentre option to shift points according to the bounding box
  centre before performing other operations

- add -auto-origin to use the bounding box centre as the origin for
  rotations. Has lower priority than the -origin option.

- surfaceTransformPoints now has distinct -read-scale, -write-scale
  options (as per surfaceMeshConvert). Silently accepts -scale as
  equivalent to -write-scale, for backwards compatibility and
  similarity with transformPoints

- add -steps option for surfaceRefineRedGreen for successive
  refinement
2020-10-22 14:59:12 +02:00
Mark Olesen
132ae101f6 COMP: avoid autoPtr copy assignment and implicit casting 2020-10-15 17:21:33 +02:00
Mark Olesen
f83bc8c22b Merge remote-tracking branch 'origin/master' into develop 2020-10-12 12:52:17 +02:00
Mark Olesen
9c7aa9727a ENH: add UPstream::parRun(const bool)
- slightly neater code when disabling/restoring parallel state

  New
      const bool oldParRun = Pstream::parRun(false);
      ...
      Pstream::parRun(oldParRun);

  Old
      const bool oldParRun = Pstream::parRun();
      Pstream::parRun() = false;
      ...
      Pstream::parRun() = oldParRun;
2020-10-12 12:51:22 +02:00
Mark Olesen
c1ad429564 BUG: parallel foamToEnsight fails depending on lagrangian order (fixes #1873)
- the problem arises when output fields are missing on some
  processors.

  When the information is combined, the resulting HashTables can have
  different insertion orders. This poses an issue when there are hash
  key collisions and thus different chaining.

- Use sorted order.
2020-10-08 18:23:54 +02:00
Mark Olesen
8939a55653 ENH: relocate blockMesh polyMesh generation into library (for code reuse)
STYLE: adjust blockMesh advanced/non-advanced options

- make -merge-points "non-advanced" (for better exposure)
- make -write-obj "advanced" (-write-vtk is preferred)
2020-10-05 12:36:04 +02:00
Mark Olesen
5dc5ea928a ENH: add UPstream::subProcs() static method
- returns a range of `int` values that can be iterated across.
  For example,

      for (const int proci : Pstream::subProcs()) { ... }

  instead of

      for
      (
          int proci = Pstream::firstSlave();
          proci <= Pstream::lastSlave();
          ++proci
      )
      {
          ...
      }
2020-09-28 14:26:07 +02:00
Mark Olesen
e18ff114a6 ENH: add UPstream::allProcs() method
- returns a range of `int` values that can be iterated across.
  For example,

      for (const int proci : Pstream::allProcs()) { ... }

  instead of

      for (label proci = 0; proci < Pstream::nProcs(); ++proci) { ... }
2020-09-28 14:25:59 +02:00
Mark Olesen
1e95af4d57 STYLE: use more generic terms allow/deny for selections 2020-09-09 13:54:34 +02:00
Mark Olesen
9423d2bd83 CONFIG: improve support for compiler/link options (#1830)
- introduce WM_COMPILE_CONTROL variable to convey control information
  into the build rules.

  The convention (as per spack):
      - '+' to select a feature
      - '~' to deselect a feature

  Eg, to select the gold linker, and disable openmp
  (spaces are not required):

      WM_COMPILE_CONTROL="+gold ~openmp"

CONFIG: accept FOAM_EXTRA_LDFLAGS for AMD, gold, Mingw linkers

CONFIG: generalize PROJECT_LIBS (-ldl used almost universally)
2020-09-07 09:45:51 +02:00
Mark Olesen
1c71c7cb23 Merge remote-tracking branch 'origin/master' into develop 2020-09-03 12:04:45 +02:00
Mark Olesen
73057447a2 COMP: pass-through targetType for a few Allwmake files (#1824) 2020-09-03 11:35:18 +02:00
Mark Olesen
719d3f77be COMP: Intel compiler bug with inheriting constructors (fixes #1821)
- the compiler reports

      Internal error loop: assertion failed:
      find_seq_in_lookup_table: seq_number not found
      (shared/cfe/edgcpfe/il.c, line 4118)

  Seems to be the same as the bug report
  https://community.intel.com/t5/Intel-C-Compiler/Internal-error-loop-assertion-failed-find-seq-in-lookup-table/td-p/1087603

This _should_ be fixed in icc 17.0 update 1, but appears to have
struck here as well.

- workaround: explicitly construct member elements.
2020-09-01 11:49:27 +02:00
Mark Olesen
b2bded48c9 STYLE: use Time::printExecutionTime() method
- makes format of ExecutionTime = ... output configurable (#788)
  and reduces code clutter.

STYLE: more consistent line-breaks after "End" tag
2020-08-07 09:24:56 +02:00
Mark Olesen
42ce617b43 ENH: prefer 'model' keyword instead of 'RASModel',... (#149)
- since the context (laminar/RAS/LES) is already given by the
  sub-dictionary, it is redundant to use as prefix as well.

- silently support the longer names as compat methods
2020-08-05 15:29:03 +02:00
Mark Olesen
74a062d1d5 Merge remote-tracking branch 'origin/master' into develop 2020-07-28 08:42:12 +02:00
Mark Olesen
d5884c8d85 STYLE: use HashSet xor instead of two operations (faceZoneSet)
STYLE: use global operator instead of HashSet -= operator
2020-07-27 09:47:33 +02:00
Mark Olesen
e8b06ac222 STYLE: remove incorrect branch condition in setExprFields 2020-07-23 16:52:15 +02:00
mattijs
bcda061f54 ENH: checkMesh: improved checking on writeFields. Fixes #1786. 2020-07-23 17:26:09 +01:00
Mark Olesen
12c91b9472 STYLE: check autoPtr as plain bool instead of valid()
- cleaner code, more similarity with unique_ptr

  Now
      if (ptr)
      if (!ptr)

  instead
      if (ptr.valid())
      if (!ptr.valid())
2020-07-16 11:39:24 +02:00
Mark Olesen
9af3f85cf9 STYLE: simplify short-circuit involving autoPtr (#1775)
- with '&&' conditions, often better to check for non-null autoPtr
  first (it is cheap)

- check as bool instead of valid() method for cleaner code, especially
  when the wrapped item itself has a valid/empty or good.
  Also when handling multiple checks.

  Now
      if (ptr && ptr->valid())
      if (ptr1 || ptr2)

  instead
      if (ptr.valid() && ptr->valid())
      if (ptr1.valid() || ptr2.valid())
2020-07-16 10:17:25 +02:00
Mark Olesen
3baebcb101 STYLE: replace uses of autoPtr::empty() with bool check (#1775)
- less clutter using plain tests with the bool operator:

      (!ptr)  vs  (ptr.empty())
      (ptr)   vs  (!ptr.empty())
2020-07-16 08:58:22 +02:00
Mark Olesen
5dc04530d9 COMP: additional linkage libraries for AMD compiler (#1627) 2020-07-14 12:17:09 +02:00
mattijs
a86860430a BUG: checkMesh: index into surfaceScalarField. Fixes #1771. 2020-07-13 13:02:07 +01:00
mattijs
331e86cf17 BUG: checkMesh: index into surfaceScalarField. Fixes #1771. 2020-07-13 13:00:13 +01:00
Mark Olesen
6d965d699b BUG: mergeOrSplitBaffles -dict option ignored (fixes #1759)
- regression from f721b5344f
2020-07-01 18:41:31 +02:00
Andrew Heather
538d749220 REL: Updated headers to version v2006 2020-06-29 17:27:54 +01:00
OpenFOAM bot
df7044845e GIT: remove whitespace, backslash escape angle brackets in comments
- fix older '> >' template parameters as '>>'
2020-06-26 12:28:49 +02:00
Andrew Heather
7c1c9fee0c ENH: Updated AMI dependent code 2020-06-24 22:10:20 +01:00
Mark Olesen
676a904c99 BUG: flipped cellZones compat setting for foamToEnsight (#1579)
STYLE: reword text for -excludePatches
2020-06-22 11:19:34 +02:00
Mark Olesen
8526e44884 ENH: dlLibraryTable InfoProxy output (#1735) 2020-06-22 10:22:45 +02:00
Mark Olesen
2dcbc09b3e ENH: add foamHasLibrary to test for availability of libraries (#1735)
- For some cases it can be helpful to test if additional libraries can
  be properly resolved.

  This can be useful in scripts to test for additional capability:

      if foamHasLibrary geometricVoF
      then ...
      fi

  But also directly from the command-line to help resolve configuration
  issues:

      foamHasLibrary -verbose petscFoam

  Could not load "petscFoam"
  libpetsc.so.3.13: cannot open shared object file: No such file or directory
2020-06-19 12:52:00 +02:00
Mark Olesen
b0136d835e ENH: lumped point motion using local linear basic functions (#1341)
- the earlier implementation of externally controlled lumped point
  motion (see merge request !120 and OpenFOAM-v1706 release notes) was
  conceived for the motion of simple structures such as buildings or
  simple beams. The motion controller was simply defined in terms of
  an orientation axis and divisions along that axis.

  To include complex structures, multiple motion controllers are
  defined in terms of support points and connectivity.

  The points can have additional node Ids associated with them, which
  makes it easier to map to/from FEA models.

  OLD system/lumpedPointMovement specification
  --------------------------------------------

      //- Reference axis for the locations
      axis            (0 0 1);

      //- Locations of the lumped points
      locations       (0 0.05 .. 0.5);

  NEW system/lumpedPointMovement specification
  --------------------------------------------

      // Locations of the lumped points
      points
      (
          (0  0  0.00)
          (0  0  0.05)
          ...
          (0  0  0.50)
      );

      //- Connectivity for motion controllers
      controllers
      {
          vertical
          {
              pointLabels (0 1 2 3 4 5 6 7 8 9 10);
          }
      }

  And the controller(s) must be associated with the given
  pointDisplacement patch. Eg,

     somePatch
     {
         type            lumpedPointDisplacement;
         value           uniform (0 0 0);
         controllers     ( vertical );   // <-- NEW
     }

TUT: adjust building motion tutorial

- use new controllor definitions
- replace building response file with executable
- add updateControl in dynamicMeshDict for slowly moving structure
2020-06-17 15:16:27 +02:00
OpenFOAM bot
01ec92fd35 GIT: remove leading/trailing blank lines, trailing whitespace 2020-06-17 10:46:26 +02:00
Mark Olesen
c1c995d3fe COMP: fix some linkage issues for mingw
COMP: automatically add FlexLexer.h to MSwindows OSspecific

- useful, frequently forgotten step for cross-compiling
2020-06-16 23:56:41 +02:00
Kutalmis Bercin
2803f765f5 BUG: decomposePar -decomposeParDict option (fixes #1649)
DOC: reorder the options of decomposePar in the header file
2020-06-11 13:30:30 +01:00
Kutalmis Bercin
5cbdb7a3d7 INT: various integrations from openfoam.org
ENH: add log FO
  ENH: improve log with scale, and offset entries
  BUG: ensure extrueMesh does not fail in parallel with wedge extrusion
  BUG: add missing clone and mapping funcs to copiedFixedValue, fixedMultiPhaseHeatFlux
  ENH: meshToMesh0::cellAddressing slight speed up for some geometries
  BUG:0003495: Divide-by-zero in SHF particle break-up model
  BUG:0003492: The formula in the OF is inconsistent with the Rosin-Rammler distribution theory formula
2020-06-11 13:30:29 +01:00
Mark Olesen
0712beb21a ENH: relocate some PDRsetFields internals into library 2020-06-10 15:29:08 +02:00
Jonathan Cranford
8cf346a9c5 ENH: PDRsetFields adjustments
- missing minThreshold in activePressureForceBaffleVelocity

- update names of cyclics

- increase tolerance for zero-thickness baffles

- velocity field "U" instead of "UBet"

- viscosity field "nut" instead of "mut"
2020-06-10 15:29:07 +02:00
Mark Olesen
b87dd8147a ENH: add moveMesh -deltaT option
- overrides normal deltaT for testing accelerated motion.

  Can be useful to test mesh motions with constant/dynamicMeshDict
  entries (updateControl, updateInterval) where the mesh motion is
  much slower than any of the fluid physics.

  see commit 87bba9ae14
2020-06-10 15:29:07 +02:00
mattijs
aa956f4b05 ENH: Pstream: Feed through outstanding requests more. See #1626.
This e.g. was giving a problem with using volPointInterpolation (in
functionObjects) with non-blocking global reductions.
2020-06-10 12:10:02 +01:00
Henning Scheufler
44a84d4778 CONT: Addition of compressibleIsoInterFOam and PLIC
1) Implementation of the compressibleIsoInterFOam solver
   2) Implementation of a new PLIC interpolation scheme.
   3) New tutorials associated with the solvers

This implementation was carried out by Henning Scheufler (DLR) and Johan
Roenby (DHI), following :

\verbatim

Henning Scheufler, Johan Roenby,
Accurate and efficient surface reconstruction from volume fraction data
on general meshes, Journal of Computational Physics, 2019, doi
10.1016/j.jcp.2019.01.009

\endverbatim

The integration of the code was carried out by Andy Heather and Sergio
Ferraris from OpenCFD Ltd.
2020-06-09 08:11:04 +01:00
Mark Olesen
b3e5620d2a COMP: typo in surfaceBooleanFeatures/PolyhedronReader Make/options
ENH: strip {GMP,MPRF}_ARCH_PATH in make rules
2020-06-05 12:36:37 +02:00
Mark Olesen
fec5093c04 ENH: add blockMesh -write-vtk option
- generates a vtk file in an ASCII, XML format (blockTopology.vtu).

  More information than the equivalent obj file since it includes
  connectivity, cell shapes and cell IDs (equivalent to the block
  numbers).
2020-06-04 22:15:26 +02:00
Mark Olesen
3e43edf056 ENH: unify use of dictionary method names
- previously introduced `getOrDefault` as a dictionary _get_ method,
  now complete the transition and use it everywhere instead of
  `lookupOrDefault`. This avoids mixed usage of the two methods that
  are identical in behaviour, makes for shorter names, and promotes
  the distinction between "lookup" access (ie, return a token stream,
  locate and return an entry) and "get" access (ie, the above with
  conversion to concrete types such as scalar, label etc).
2020-06-02 17:26:03 +02:00
Mark Olesen
f721b5344f ENH: report dictionary name actually used (for -dict option) 2020-06-02 14:29:36 +02:00
Mark Olesen
31b172217c ENH: support predicate checks for argList (similar to dictionary methods)
- Favour use of argList methods that are more similar to dictionary
  method names with the aim of reducing the cognitive load.

  * Silently deprecate two-parameter get() method in favour of the
    more familiar getOrDefault.
  * Silently deprecate opt() method in favour of get()

  These may be verbosely deprecated in future versions.
2020-06-02 13:51:18 +02:00
Mark Olesen
45a05012c6 STYLE: use Time::printExecutionTime() method
- makes format of ExecutionTime = ... output configurable (#788)
  and reduces code clutter.
2020-05-29 15:48:20 +02:00
Mark Olesen
03c2373d2c ENH: align meshRefinement dictionary wrapper with dictionary code
COMP: do not rely on implicit conversion to PtrList from Istream
2020-05-26 08:56:11 +02:00
Mark Olesen
02517e971a ENH: no implicit loading of controlDict libs for foamListRegions (#1713)
ENH: eliminate duplicate input region types
2020-05-23 15:53:17 +02:00
mattijs
8eeb5e8699 ENH: redistributePar: handle cyclicACMI. See #1558.
Explicitly avoid updating cyclicACMI.
2020-05-20 18:03:54 +01:00
Mark Olesen
d7db8f8292 COMP: support cgal header-only configurations
- improve wmake CGAL rule(s) accordingly
2020-05-19 07:13:12 +01:00
Mark Olesen
44b225604d ENH: add blockMeshDict "mergeType" keyword (#1589)
- enumerated values are (points | topology) which can be optionally
  specified in the blockMeshDict. Default is 'topology'.

  If the command-line option `blockMesh -merge-points` is specified,
  this has absolute priority over any blockMeshDict entry.

STYLE: changed blockMesh "-blockTopology" option to "-write-obj"

- this is more specific to what it does. Potentially wish to add a
  "-write-vtk" option in the future.

TUT: adjust tutorials to use preferred or necessary merge strategies:

  * channel395DFSEM - topology
  * nozzleFlow2D - points
  * pipeCyclic - points
2020-05-13 20:59:03 +02:00
Mark Olesen
595579e01d COMP: use -iquotedir for including the local '.' directory
- adds into the include-quoted search list instead the general (-Idir)
  search list.

  * makes it less subject to ordering (since it will now generally be
    searched first) and makes it less subject to how duplicate removal
    is implemented. In some compilers (#1627), the last instance of
    a duplicate directory would be used and not the first instance.

  * removes clutter in some Make/options files

COMP: add missing linkage libraries
2020-05-06 13:06:40 +02:00
Mark Olesen
b4bf26ea4f Merge remote-tracking branch 'origin/master' into develop 2020-05-06 10:13:56 +02:00
Mark Olesen
8756791b00 ENH: use topological merge as default for blockMesh (closes #1589)
- faster and fewer issues with high aspect ratio cells.

- `blockMesh -merge-geometric` for old behaviour
2020-05-04 16:19:03 +02:00
Mark Olesen
8cfb483054 STYLE: some general spelling fixes 2020-05-04 09:15:21 +02:00
Mark Olesen
8a5d108fd2 STYLE: update PrimitivePatch (#1648)
- simplified templating, which cleans up code and does not appear to
  break any normal user coding.

ENH: unique_ptr instead of homegrown demand-driven handling.
2020-04-30 15:52:42 +02:00
Mark Olesen
cc7af66a15 STYLE: use face_type instead of FaceType typedef 2020-04-28 15:38:47 +02:00
Mark Olesen
79048eb68f STYLE: use writeEntry(), beginBlock(), endBlock() methods
- use dictionary::get<..> instead of lookup in a few more places
2020-04-28 10:41:23 +02:00
Mark Olesen
5ab04f5745 GIT: remove prebuilt pdf file(s) 2020-04-27 09:45:17 +02:00
mattijs
c3571b7357 ENH: topoDistanceData: templated on passive data type.
Also adds pointTopoDistance, edgeTopoDistance.
2020-04-24 12:34:08 +01:00
Mark Olesen
9cfa5fe454 Merge remote-tracking branch 'origin/master' into develop 2020-04-21 15:07:35 +02:00
Mark Olesen
6691e6563c COMP: adjust for CGAL-1.14 changes 2020-04-21 14:59:07 +02:00
Mark Olesen
b2bf82360c COMP: cleanup of surfaceCoarsen/bunnylod
- remove MSWindows components (code and makefiles)

- use cxx, hxx extensions to reduce possible confusion with other
  "list" and "vector" classes

- use C++ versions for C headers
2020-04-16 13:34:56 +02:00
Mark Olesen
560c053bc8 ENH: support independent specification of surface read/write format (#1600)
- adjustments to internal handling to improve run-time addition of
  other formats (eg, with additional user library)

  For example, to write a binary STL with a '.stl' extension:

    $ surfaceMeshConvert input.obj  -write-format stlb  output.stl

  Or in a sampler,
  to specify the input type without ambiguity:

  surf
  {
      type        meshedSurface;
      surface     sampling.inp;

      fileType    starcd;
      scale       0.001;
      ...
  }

STYLE: regularize naming for input/output scaling

  * -read-scale   (compat: -scaleIn)
  * -write-scale  (compat: -scaleOut)

CONFIG: change edge/surface selection name for STARCD format

- now select as "starcd" instead of "inp" to avoid naming ambiguity
  with abaqus
2020-04-03 19:11:50 +02:00
Mark Olesen
3e3193aa5e Merge remote-tracking branch 'origin/master' into develop 2020-03-16 15:27:27 +01:00
Andrew Heather
69a61bf835 BUG: objToVTK - corrected for empty lines in obj file. See #1632 2020-03-16 10:21:34 +00:00
Mark Olesen
e3d4443871 ENH: improve surfaceSplitByPatch controls (#1600)
- uses MeshedSurface instead of triSurface to prevent automatic
  triangulation.

- supports '-patches' and '-excludePatches' controls as per foamToVTK.
  For example,

    surfaceSplitByPatch -patches '( ".*rider.*" )'  motorBike.obj

ENH: use MeshedSurface for surfaceSubset
2020-03-12 16:20:57 +01:00
Mark Olesen
6744a2102b Merge remote-tracking branch 'origin/master' into develop 2020-03-12 11:35:26 +01:00
Mark Olesen
8e27022ea2 STYLE: find(), cfind() methods instead of lookupPtr()
- coordinateSystems, DictionaryBase
2020-03-11 22:05:15 +01:00
Mark Olesen
fc26fb758d ENH: add stringListOps with whitelist/blacklist matching
- refactored from ensightMesh, foamToVTK, surfaceMeshExtract

STYLE: use wordRes matching() method instead of findString() function
2020-02-26 21:40:09 +01:00
Mark Olesen
a456e9ae92 STYLE: relocate nonCoupledBoundaryTree into meshSearcher
- use point::uniform in more places
2020-02-24 18:41:02 +01:00
Mark Olesen
4e6caf8d61 STYLE: return Switch by value, not const-reference 2020-02-21 11:44:29 +01:00
Mark Olesen
86fe2b7bc9 STYLE: remove dead code, refactor constructors in extrudePatchMesh 2020-02-21 11:13:22 +01:00
Mark Olesen
fbbf9064b9 STYLE: remove trailing space, shell quoting
- emit "constant " and "uniform " as separate word/space combination
2020-02-20 10:11:23 +01:00
Mark Olesen
42299dca22 ENH: use IOstreamOption for writeObject() calls.
- reduces the number of parameters that are being passed around
  and allows future additions into the IOstreamOption with mininal
  effort.
2020-02-19 09:25:33 +00:00
Kutalmis Bercin
9be1772e0c BUG: surfaceInertia analytic eigendecomposition (fixes #1599)
- was missing cast to symmTensor
2020-02-19 10:14:57 +01:00
Mark Olesen
bb53e8adb3 ENH: adjustments to Switch
- align Switch more with Enum.
  Now have find(), found() static methods.
  Constructors with failsafe option.

  The find() method makes for clearer coding:

  OLD

     Switch sw(some_string, true); // NB: true = allowBad

     if (sw.valid()) ...

  NOW

     Switch sw = Switch::find(some_string);

     if (sw.good()) ...

  or

     if (Switch::found(some_string)) ...

- improve construct from dictionary to handle all valid token types.
  Previously just read in a word.

- Remove asText() method - replaced by c_str() and str() several
  versions ago.
2020-02-18 21:51:35 +01:00
Mark Olesen
4307e1719f STYLE: adjust names, locations for fileFormats
- renamed 'core/' -> 'base/' to avoid gitignore masking when re-adding
  files

- rename 'nas/' to 'nastran/' for more clarity

- relocated OBJstream from surfMesh to fileFormats

STYLE: remove unused parseNASCoord. Was deprecated 2017-09
2020-02-18 13:51:20 +01:00
Mark Olesen
a97628121c ENH: overhaul ensight handling (#1579)
- includes restructuring and simplification of low-level ensight part
  handling and refactor of backends to improve code reuse.

foamToEnsight
-------------

  * new cellZone support.
    This was previously only possible via a separate foamToEnsightParts
    utility that was not parallelized.

  * support for point fields.

  * `-nearCellValue` option (as per foamToVTK)

  * data indexing now uses values from the time index.
    This is consistent with the ensightWrite function object and
    can help with restarts.

  * existing ensight directories are removed, unless the -no-overwrite
    option is supplied

foamToEnsightParts
------------------
  * now redundant and removed.

ensightOutputSurface (new class)
--------------------------------
  * a lightweight wrapper for point/face references that is tailored
    for the ensightSurfaceWriter. It uses compact face/point information
    and is serial only, since this is the format requirements from the
    surfaceWriter class.

ensightMesh (revised class)
---------------------------
  * now only holds a polyMesh reference, which removes its dependency
    on finiteVolume and allows it to be relocated under fileFormats
    instead of conversion.

Removed classes: ensightParts, ensighPartFaces, ensightPartCells

- these were used by foamToEnsightParts, but not needed anymore.
2020-02-18 11:09:43 +00:00
Mark Olesen
79cf72d573 BUG: foamListTimes does not remove collated directories (fixes #1588)
- also now report any verbosity on stderr

- fix similar collated directories issue for foamRestoreFields
2020-02-14 17:44:49 +01:00
Mark Olesen
ec3de7128c STYLE: adjust logic names for point-values in foamToVTK 2020-02-12 18:03:50 +01:00
mattijs
8ab37e13e2 ENH: foamFormatConvert: leave boundary intact. Fixes #1358. 2020-02-12 15:04:05 +00:00
mattijs
01c14532bd ENH: checkMesh: write cellZone, faceZone info. See #1543. 2020-02-06 12:36:26 +00:00
Mark Olesen
87b3006566 STYLE: backslash doxygen commands, email address, typos in error messages 2020-01-31 17:06:30 +01:00
Kutalmis Bercin
f55da4b690 ENH: allow datToFoam writing points dict directly
- refactors the corresponding tutorial by removing redundant files and items:
    compressible/rhoCentralFoam/biconic25-55Run35
2020-01-29 12:26:36 +00:00
Mark Olesen
e252ec46dc COMP: backport of updates for gcc-92 compilation 2020-01-28 16:09:18 +01:00
Mark Olesen
ae40bd9f9b STYLE: use guards for dictionary lookup() 2020-01-28 11:57:23 +01:00
Mark Olesen
de57d2da7e DEFEATURE: remove paraview reader modules (migrate to submodule) 2020-01-23 14:04:23 +01:00
Mark Olesen
ee96dba0cf STYLE: simplify Random constructors
COMP: use generated methods in a few more places
2020-01-21 12:12:44 +01:00
Mark Olesen
f0be8679f6 ENH: provide defaultName() static method for patches, zones
- consistent way of writing "patch" + Foam::name(id) etc.
2020-01-16 13:24:23 +01:00
Mark Olesen
2a98c4e665 ENH: consistency improvements for surface patch handling (fixes #483)
- remove (unused) Istream constructors, prune some unused methods,
  rationalize write() vs writeDict().
  Deprecate inconsistent construction order.

- handle empty names for ".ftr" surface patches (for plain triSurface
  format) with double-quoted strings for more reliable streaming.
  Written on a single line.

  This is _backward_ compatible, but if users have been parsing these
  files manually, they will need to adjust their code.

Previously:
```
  (
  frt-fairing:001%1
  empty

  windshield:002%2
  empty
  ...
  )
```

Updated (with example handling of empty name):
```
  (
  frt-fairing:001%1 empty

  windshield:002%2 ""
  ...
  )
```
2020-01-16 10:07:26 +01:00
OpenFOAM bot
596e4aef3f STYLE: remove trailing space, tabs 2020-01-22 10:00:03 +01:00
Mattijs Janssens
b8c2c0acf6 ENH: shm: support for automatic faceZones 2020-01-16 12:22:02 +00:00
mattijs
0fc4b79dde ENH: checkMesh: write minPyrVol. Fixes #1543. 2020-01-06 13:59:16 +00:00
mattijs
28eb349a30 BUG: checkMesh: handling of unsorted points. Fixes #920. 2020-01-06 11:22:34 +00:00
Vaggelis Papoutsis
c413ec5009 BUG: writeMorpherCPs expects a controlBoxes entry
The controlBoxes wordList was removed from NURBS3DVolume in the
pre-release phase but writeMorpherCPs was not updated accordingly.

TUT: added the invocation of writeMorpherCPs in one of the tutotials to
help identify future regression
2020-01-03 09:36:51 +00:00
Andrew Heather
ae2ab06312 REL: Release preparations 2019-12-23 09:49:23 +00:00
mattijs
df5a056fd3 GIT: interfaceTracking: relocate library 2019-12-19 15:32:34 +00:00
mattijs
427f92215c BUG: foamFormatConvert: missing 'faces' file. Fixes #1529. 2019-12-18 15:00:50 +00:00
sergio
6e8f0dbe76 INT: org integration
1) rPolynomial Eq of State
2) externalForce and softWall in rigidBodyDynamics

INT: Several minor bug fixes plus
2019-12-17 22:23:00 +00:00
Mark Olesen
a60fe9c7b0 ENH: PDRsetFields utility (#1216)
- the PDRsetFields utility processes a set of geometrical obstructions
  to determine the equivalent blockage effects.

  These fields are necessary inputs for PDRFoam calculations.

  After setting up the geometries, the -dry-run option can be used to
  generate a VTK file for diagnosis and post-processing purposes.

- this is an initial release, with improvements slated for the future.

NOTE
  - the field results may be less than fully reliable when run in
    single-precision. This howver does not represent a realistic
    restriction since the prepared fields target a combustion
    application which will invariably be double-precision.
2019-12-16 21:50:47 +01:00
Andrew Heather
f8577a3423 ENH: applyBoundaryLayer - optionally write turbulence fields
- The previous option 'write-nut' controlled the writing of turbulence
  nut, but other turbulence fields were always written.
  These have been shown to be a source of instability for many cases.

  This commit replaces the 'write-nut' option by a 'writeTurbulenceFields'
  option that controls the writing of all turbulence fields.
  If not set, only the velocity field is written.

  For compatibility, the old 'write-nut' option is still recognized
  but is redirected to 'writeTurbulenceFields'.
2019-12-06 20:43:43 +00:00
Vaggelis Papoutsis
b863254308 ENH: New adjont shape optimisation functionality
The adjoint library is enhanced with new functionality enabling
automated shape optimisation loops.  A parameterisation scheme based on
volumetric B-Splines is introduced, the control points of which act as
the design variables in the optimisation loop [1, 2].  The control
points of the volumetric B-Splines boxes can be defined in either
Cartesian or cylindrical coordinates.

The entire loop (solution of the flow and adjoint equations, computation
of sensitivity derivatives, update of the design variables and mesh) is
run within adjointOptimisationFoam. A number of methods to update the
design variables are implemented, including popular Quasi-Newton methods
like BFGS and methods capable of handling constraints like loop using
the SQP or constraint projection.

The software was developed by PCOpt/NTUA and FOSS GP, with contributions from

Dr. Evangelos Papoutsis-Kiachagias,
Konstantinos Gkaragounis,
Professor Kyriakos Giannakoglou,
Andy Heather

[1] E.M. Papoutsis-Kiachagias, N. Magoulas, J. Mueller, C. Othmer,
K.C.  Giannakoglou: 'Noise Reduction in Car Aerodynamics using a
Surrogate Objective Function and the Continuous  Adjoint Method with
Wall Functions', Computers & Fluids, 122:223-232, 2015

[2] E. M. Papoutsis-Kiachagias, V. G. Asouti, K. C. Giannakoglou,
K.  Gkagkas, S. Shimokawa, E. Itakura: ‘Multi-point aerodynamic shape
optimization of cars based on continuous adjoint’, Structural and
Multidisciplinary Optimization, 59(2):675–694, 2019
2019-12-12 14:17:29 +00:00
Mark Olesen
2923daab65 ENH: setExprFields and setExprBoundaryFields
- these are the expressions equivalent of funkySetFields and
  funkySetBoundaryFields
2019-12-10 13:09:22 +01:00
Andrew Heather
5d7d24df94 GIT: Housekeeping 2019-12-06 17:43:08 +00:00
Mark Olesen
1310e85225 ENH: support 'get()' for retrieving argList options
- previously only had 'opt<..>()' for options, but 'get<..>()'
  provides more similarity with dictionary methods.
  The 'opt<..>()' method is retained.
2019-11-26 21:07:11 +01:00
Mark Olesen
241dee29b2 ENH: add transformPoints -time option (issue #1510) 2019-11-25 10:55:05 +01:00
Mark Olesen
98467036b3 STYLE: regularize quoting and exit on failed 'cd' 2019-11-13 13:19:16 +01:00
Mark Olesen
7c1190f0b1 ENH: rationalize some string methods.
- silently deprecate 'startsWith', 'endsWith' methods
  (added in 2016: 2b14360662), in favour of
  'starts_with', 'ends_with' methods, corresponding to C++20 and
  allowing us to cull then in a few years.

- handle single character versions of starts_with, ends_with.

- add single character version of removeEnd and silently deprecate
  removeTrailing which did the same thing.

- drop the const versions of removeRepeated, removeTrailing.
  Unused and with potential confusion.

STYLE: use shrink_to_fit(), erase()
2019-11-11 18:50:00 +01:00
Mark Olesen
713595f0c0 COMP: adjust common paraview library name to vtkPVFoamCommon
- similar prefixing as the dependent readers, making it easier to
  identify

- add FOAM_API information as server module version
2019-11-11 11:21:45 +01:00
Mark Olesen
8495e8e92c COMP: provide separate get_pvplugin_api function 2019-11-11 11:16:54 +01:00
Mark Olesen
e6dfb39c66 STYLE: remove unnecessary stdout, stderr /dev/null redirects
- no stderr redirect needed:
    * 'command -v'

- no stdout/stderr redirect needed:
    * 'rm -f'

STYLE: consistent spacing after redirects
2019-11-06 10:44:36 +01:00
Mark Olesen
ec7e3c88e4 ENH: test for WM_PROJECT_DIR being set/unset in scripts 2019-11-06 09:18:51 +01:00
Mark Olesen
e5916fd9ba ENH: use findMinMax instead of findMin, findMax separately 2019-11-05 13:10:23 +01:00
Mark Olesen
883752cfb9 COMP: restructure paraview reader files, add paraview-5.7 guards
- building plugins with paraview-5.7 is quite different
2019-11-05 09:14:37 +01:00
Mark Olesen
675dbc4333 ENH: use wordHashSet instead of hashedWordList in PV readers
- we don't need the GUI sort order of the values.
2019-11-04 18:29:29 +01:00
Andrew Heather
7aa83ea939 ENH: postProcess - updated app to update on mesh change instead of full clear out 2019-11-12 15:38:52 +00:00
Andrew Heather
fdf8d10ab4 Merge commit 'e9219558d7' into develop-v1906 2019-12-05 11:47:19 +00:00
OpenFOAM bot
e9219558d7 GIT: Header file updates 2019-10-31 14:48:44 +00:00
mattijs
f64125c6d9 ENH: redistributePar: handle -overwrite. Fixes #1450. 2019-10-17 13:27:55 +01:00
Mark Olesen
f75e01c8c2 CONFIG: adjustments for CMake files
- drop plugin support for Qt4 (old paraview)

- handle upcoming changes in VTK version naming in CMake files
  * VTK_MAJOR_VERSION becomes VTK_VERSION_MAJOR etc.
2019-10-04 11:48:03 +02:00
Mark Olesen
dcff32ea65 STYLE: use move insert in featurePointConformer 2019-09-30 09:40:59 +02:00
Mark Olesen
b6bf9129f6 DEFEATURE: pointer dereferencing for HashTable iterator
- this largely reverts 3f0f218d88 and 4ee65d12c4.

  Consistent addressing with support for wrapped pointer types (eg,
  autoPtr, std::unique_ptr) has proven to be less robust than desired.
  Thus rescind HashTable iterator '->' dereferencing (from APR-2019).
2019-09-27 19:45:54 +02:00
OpenFOAM bot
38b53e5346 STYLE: use default destructor in header definitions 2019-09-24 12:14:36 +02:00
sergio
e3b05494f7 COMP: relocate regionProperties to meshTools 2019-09-20 14:06:30 -07:00
Kutalmis Bercin
5447220e6f BUG: Add writeDivider to foamDictionary (#1444) 2019-09-23 14:14:48 +01:00
mattijs
61dfa9b544 ENH: checkMesh: do not create wallDist unless in fvSchemes. See #71 2019-09-19 14:37:38 +01:00
mattijs
1307836caa ENH: checkMesh: write wall distance. See #71 2019-09-02 12:40:22 +01:00
Mark Olesen
dade6957c8 ENH: checkMesh report num global patches and min-max 2019-08-19 14:11:31 +02:00
mattijs
9815d37db3 BUG: corrupt extrudeToRegionMesh boundary patches in parallel (fixes #1295)
- new patches were added to the end of existing patches, which placed
  them _after_ the processor patches. This is incorrect.
2019-08-16 01:07:00 +01:00
Mark Olesen
1d79c0452c ENH: additional contiguous traits (#1378)
- change contiguous from a series of global functions to separate
  templated traits classes:

    - is_contiguous
    - is_contiguous_label
    - is_contiguous_scalar

  The static constexpr 'value' and a constexpr conversion operator
  allow use in template expressions.  The change also makes it much
  easier to define general traits and to inherit from them.

  The is_contiguous_label and is_contiguous_scalar are special traits
  for handling data of homogeneous components of the respective types.
2019-07-29 11:36:30 +02:00
Mark Olesen
1d8ea9182b ENH: add basic zero-initialized constructors for particle classes
- for the most basic level construction with mesh and position only.
2019-08-02 17:23:00 +02:00
Mark Olesen
037be8dbb0 STYLE: use default constructors/destructors for base cloud classes
- use cloud::defaultName instead of "defaultCloud" string literal
2019-08-02 17:22:00 +02:00
Mark Olesen
5382c2f590 STYLE: fix namespace documentation for CGAL-related content 2019-07-30 18:15:48 +02:00
Mark Olesen
f94be1bebb ENH: use FatalIOErrorInLookup instead of FatalErrorInLookup 2019-07-16 10:26:51 +02:00
Mark Olesen
fb09f56aba ENH: use FatalErrorInLookup macros (#1362) 2019-07-12 18:00:00 +02:00
Mark Olesen
1d86fc4f6b ENH: add single-parameter sortedOrder() function 2019-07-17 11:08:40 +02:00
Mark Olesen
f1a48a3c2f ENH: accept bitSet for MeshedSurface::subsetMesh
- add triSurface::subsetMesh single-parameter variant
2019-07-12 08:54:34 +02:00
Andrew Heather
96e7dd8da6 Merge branch 'develop' 2019-06-27 13:27:57 +01:00
Andrew Heather
15a763b931 COMP: Resolved some name clashes for #ifdef statements 2019-06-26 11:52:15 +01:00
Andrew Heather
be44dcaf1f RELEASE: Version clean-up for release 2019-06-25 11:51:19 +01:00
OpenFOAM bot
51bb4e0037 STYLE: remove trailing spaces 2019-06-26 11:36:49 +02:00
Vaggelis Papoutsis
ecc1fb5efb CONTRIB: New adjoint optimisation and tools
A set of libraries and executables creating a workflow for performing
gradient-based optimisation loops. The main executable (adjointOptimisationFoam)
solves the flow (primal) equations, followed by the adjoint equations and,
eventually, the computation of sensitivity derivatives.

Current functionality supports the solution of the adjoint equations for
incompressible turbulent flows, including the adjoint to the Spalart-Allmaras
turbulence model and the adjoint to the nutUSpaldingWallFunction, [1], [2].

Sensitivity derivatives are computed with respect to the normal displacement of
boundary wall nodes/faces (the so-called sensitivity maps) following the
Enhanced Surface Integrals (E-SI) formulation, [3].

The software was developed by PCOpt/NTUA and FOSS GP, with contributions from

Dr. Evangelos Papoutsis-Kiachagias,
Konstantinos Gkaragounis,
Professor Kyriakos Giannakoglou,
Andy Heather

and contributions in earlier version from

Dr. Ioannis Kavvadias,
Dr. Alexandros Zymaris,
Dr. Dimitrios Papadimitriou

[1] A.S. Zymaris, D.I. Papadimitriou, K.C. Giannakoglou, and C. Othmer.
Continuous adjoint approach to the Spalart-Allmaras turbulence model for
incompressible flows. Computers & Fluids, 38(8):1528–1538, 2009.

[2] E.M. Papoutsis-Kiachagias and K.C. Giannakoglou. Continuous adjoint methods
for turbulent flows, applied to shape and topology optimization: Industrial
applications. 23(2):255–299, 2016.

[3] I.S. Kavvadias, E.M. Papoutsis-Kiachagias, and K.C. Giannakoglou. On the
proper treatment of grid sensitivities in continuous adjoint methods for shape
optimization. Journal of Computational Physics, 301:1–18, 2015.

Integration into the official OpenFOAM release by OpenCFD
2019-06-17 12:59:11 +01:00
mattijs
64ed81b78f BUG: gmsh: skip empty lines. See #1155.
Fix provided by Gavin Ridley.
2019-04-11 11:07:28 +01:00
Mark Olesen
8ab09daad0 BUG: foamToVTK writes to undecomposed case (closes #1271)
- when running in serial but within a processor directory,
  argList::globalPath() is to be used instead of Time.globalPath()
  For other cases there is no difference.
2019-04-08 11:53:50 +02:00
Mark Olesen
66a100997f COMP: force dlOpen for windows application binaries (#1238)
- when windows portable executables (.exe or .dll) files are loaded,
  their dependent libraries not fully loaded. For OpenFOAM this means
  that the static constructors which are responsible for populating
  run-time selection tables are not triggered, and most of the run-time
  selectable models will simply not be available.

Possible Solution
=================

  Avoid this problem by defining an additional library symbol such as
  the following:

      extern "C" void libName_Load() {}

  in the respective library, and tag this symbol as 'unresolved' for
  the linker so that it will attempt to resolve it at run-time by
  loading the known libraries until it finds it. The link line would
  resemble the following:

      -L/some/path -llibName -ulibName_Load

  Pros:
    - Allows precise control of forced library loading

  Cons:
    - Moderately verbose adjustment of some source files (even with macro
      wrapping for the declaration).
    - Adjustment of numerous Make/options files and somewhat ad hoc
      in nature.
    - Requires additional care when implementing future libraries and/or
      applications.

  - This is the solution taken by the symscape patches (Richard Smith)

Possible Solution
=================

  Avoid this problem by simply force loading all linked libraries.
  This is done by "scraping" the information out of the respective
  Make/options file (after pre-processing) and using that to define
  the library list that will be passed to Foam::dlOpen() at run-time.

  Pros:
    - One-time (very) minimal adjustment of the sources and wmake toolchain
    - Automatically applies to future applications

  Cons:
    - Possibly larger memory footprint of application (since all dependent
      libraries are loaded).
    - Possible impact on startup time (while loading libraries)
    - More sensitive to build failures. Since the options files are
      read and modified based on the existence of the dependent
      libraries as a preprocessor step, if the libraries are initially
      unavailable for the first attempt at building the application,
      the dependencies will be inaccurate for later (successful) builds.

  - This is solution taken by the bluecape patches (Bruno Santos)

Adopted Solution
================

  The approach taken by Bruno was adopted in a modified form since
  this appears to be the most easily maintained.

Additional Notes
================

  It is always possible to solve this problem by defining a corresponding
  'libs (...)' entry in the case system/controlDict, which forces a dlOpen
  of the listed libraries. This is obviously less than ideal for large-scale
  changes, but can work to resolve an individual problem.

  The peldd utility (https://github.com/gsauthof/pe-util), which is
  also packaged as part of MXE could provide yet another alternative.
  Like ldd it can be used to determine the library dependencies of
  binaries or libraries. This information could be used to define an
  additional load layer for Windows.
2019-05-25 19:10:14 +02:00
Mark Olesen
b5d775a691 STYLE: avoid deprecated lookup methods 2019-05-22 15:06:12 +01:00
Mark Olesen
b043be3063 STYLE: add notices for deprecated dictionary methods 2019-05-17 09:02:51 +01:00
Mark Olesen
4bbd0294bb ENH: add -excludePatches option for surfaceMeshExtract (#1315)
- simplify faceZone selection in surfaceMeshExtract
2019-05-10 17:11:47 +02:00
Mark Olesen
6c8f6a2f50 ENH: support all 12 Euler rotation orders (#1292)
- adjust naming of quaternion 'rotationSequence' to be 'eulerOrder'
  to reflect its purpose.

- provide rotation matrices directly for these rotation orders in
  coordinateRotations::euler for case in which the rotation tensor
  is required but not a quaternion.
2019-05-10 11:20:21 +02:00
Mark Olesen
06b2aa6849 COMP: skip CGAL rules when -DNO_CGAL is defined for surfaceBooleanFeatures 2019-04-30 10:33:01 +02:00
Mark Olesen
897528da1a ENH: streamline handling of static/dynamic libs in detection scripts 2019-04-29 10:04:44 +02:00
Mark Olesen
beefee48d4 COMP: adjust compilation order with updated interdependencies
- Eg, with surface writers now in surfMesh, there are fewer libraries
  depending on conversion and sampling.

COMP: regularize linkage ordering and avoid some implicit linkage (#1238)
2019-04-28 14:44:33 +02:00
Mark Olesen
e1609d16d1 STYLE: use degToRad() instead of pi/180 2019-04-26 11:48:27 +02:00
mattijs
bc53e50c90 CONTRIBUTION: gmshToFoam: support version 4 mesh format. Fixes #1155.
Patch contributed by Gavin Ridley.
2019-04-25 16:33:17 +01:00
mattijs
7cc9961ff2 BUG: gmsh: skip empty lines. See #1155.
Fix provided by Gavin Ridley.
2019-04-11 11:07:28 +01:00
Mark Olesen
eb0c35dc6a STYLE: drop use of objToVTK conversion in viewFactors 2019-04-08 12:20:56 +02:00
Mark Olesen
f0f4af16d2 Merge remote-tracking branch 'origin/master' into develop 2019-04-08 12:05:24 +02:00
Mark Olesen
39c91d8440 ENH: support HashTable iterator pointer dereference 2019-04-06 16:00:21 +02:00
Mark Olesen
f3670521cd STYLE: use std:: qualifier on ::abort, ::exit
- consistent with use of <cstdlib> and makes for a stronger distinct
  from Foam::abort etc.
2019-04-03 20:24:30 +02:00
mattijs
a01b05b8c4 ENH: renumberMesh: renumber refinement data. Fixes #1241. 2019-04-01 09:48:23 +01:00
mattijs
83e321d3e4 ENH: snappyHexMesh: allow cross-patch merging of patch faces. Fixes #1255. 2019-03-27 15:04:48 +00:00
mattijs
f513f8bec6 ENH: extrudeMesh: -dict. See #1253 2019-03-27 10:39:35 +00:00
mattijs
7d077626d3 ENH: moveDynamicMesh: add -overwrite option. Fixes #1233. 2019-03-13 15:43:38 +00:00
Mark Olesen
773ec00d4b ENH: improved consistency of surface writers (#1232)
- remove writeGeometry() in favour of write() and make it pure virtual
  so that all writers must explicitly deal with it.

- establish proxy extension at construction time and treated as an
  invariant thereafter. This avoids potentially surprising changes in
  behaviour when writing.
2019-03-11 15:09:03 +01:00
Mark Olesen
5d445f4ed6 ENH: suppress cell/patch/proc ids for foamToVTK (#1230)
- reduces output size, consistent with vtkWrite function object

STYLE: mark some foamToVTK options as advanced (ie, visible with -help-full)
2019-03-11 11:02:58 +01:00
mattijs
aafbca93b2 ENH: old-time field: avoid reading in postprocessing mode. Fixes #1228. 2019-03-06 11:35:16 +00:00
Mark Olesen
c9549ba6a4 GIT: added PDRblockMesh to Allwmake 2019-02-25 07:46:21 +01:00
Mark Olesen
84270ed667 ENH: new PDRblockMesh mesh generation utility (issue #1216)
- While a rectilinear mesh can be created with blockMesh, not every mesh
  created with blockMesh will satisfy the requirements for being a
  rectilinear mesh.

  This alternative to blockMesh uses a single block that is aligned
  with the xy-z directions and specifications of the control points,
  mesh divisions and expansion ratios. For example,

    x
    {
        points  ( -13.28 -0.10 6.0 19.19 );
        nCells  (  10  12 10 );
        ratios  ( 0.2   1  5 );
    }

    y { ... }
    z { ... }

  With only one block, the boundary patch definition is simple and the
  canonical face number is used directly. For example,

    inlet
    {
        type    patch;
        faces   ( 0 );
    }
    outlet
    {
        type    patch;
        faces   ( 1 );
    }

    sides
    {
        type    patch;
        faces   ( 2 3 );
    }

    ...

- After a mesh is defined, it is trivial to retrieve mesh-related
  information such as cell-volume, cell-centres for any i-j-k location
  without an actual polyMesh.

STYLE: remove -noFunctionObjects from blockMesh

- no time loop, so function objects cannot be triggered anyhow.
2019-02-23 15:45:32 +01:00
Mark Olesen
181c974b11 ENH: improved sample surfaces and surface writers (#1206)
- The writers have changed from being a generic state-less set of
  routines to more properly conforming to the normal notion of a writer.
  These changes allow us to combine output fields (eg, in a single
  VTK/vtp file for each timestep).

  Parallel data reduction and any associated bookkeeping is now part
  of the surface writers.
  This improves their re-usability and avoids unnecessary
  and premature data reduction at the sampling stage.

  It is now possible to have different output formats on a per-surface
  basis.

- A new feature of the surface sampling is the ability to "store" the
  sampled surfaces and fields onto a registry for reuse by other
  function objects.

  Additionally, the "store" can be triggered at the execution phase
  as well
2019-02-07 18:11:34 +01:00
Mark Olesen
9b8ac57e98 BUG: foamToEnsightParts reports the time value twice in log output 2019-01-30 15:41:06 +01:00
Mark Olesen
fe445ac516 ENH: support VTK output of point ids
- can be useful for diagnosing mesh internals and the locations of
  decomposed cells.
2019-02-17 15:09:36 +01:00
Andrew Heather
29315f4644 DEP: Deprecated the ensightFoamReader 2019-01-17 09:35:04 +00:00
Mark Olesen
cf8d500f8c ENH: export FOAM_API in dictionary (issue #1158)
- uses the value of foamVersion::api, which should be reliable.
2019-01-07 19:04:50 +01:00
Mark Olesen
170041aaf5 ENH: for-range, forAllIters() ... in applications/
- reduced clutter when iterating over containers
2019-01-07 09:20:51 +01:00
Mark Olesen
60234ab007 STYLE: reduced nesting on return branching 2019-02-13 08:06:36 +01:00
Mark Olesen
ff54ef8299 ENH: additional vtk::Tools methods for handling faces, points etc.
- includes initial relocation of low-level vtu handling.
  Extracted, refactored from the Catalyst function object.
2019-02-03 17:24:26 +01:00
Mark Olesen
078e34746e ENH: code adjustments for updated NullObject
- can now safely use labelList::null() instead of emptyLabelList for
  return values. No special treatment required for lists.

  Possible replacements:

      if (notNull(list) && list.size())  ->  if (list.size())
      if (isNull(list) || list.empty())  ->  if (list.empty())

  The receiver may still wish to handle differently to distinguish
  between a null list and an empty list, but no additional special
  protection is required when obtaining sizes, traversing, outputting
  etc.
2019-02-07 13:04:24 +01:00
OpenFOAM bot
154029ddd0 BOT: Cleaned up header files 2019-02-06 12:28:23 +00:00
Andrew Heather
cab94a5d0a Merge remote-tracking branch 'origin/master' into develop 2019-02-04 10:55:34 +00:00
Mark Olesen
b7fb6116c3 ENH: restructuring of ensight output files
- changed ensightOutput from a class solely comprising static methods to
  a namespace and added in sub-namespaces Detail and Serial.

  This makes it easier to "mix-in" functions at different levels.
  Refactored and combined some serial/parallel code where possible.

  The general ensightOutput namespace has now shifted to be in the
  fileFormats lib, while leaving volField outputs in the conversion lib
  and cloud outputs in the lagrangian-intermediate lib.

  The ensightCloud namespace is now simply folded into the new
  ensightOutput namespace.

  These changes clean up some code, reduce fragmentation and
  duplication and removes the previous libconversion dependency for
  sampling.

- use int for ensight nTypes constexpr

Note: issue #1176 is unaffected except for the change in file name:

   ensightOutputTemplates.C -> ensightOutputVolFieldTemplates.C
2019-01-29 15:18:17 +01:00
mattijs
14e6b198cc ENH: checkMesh: write correct faceWeights. Fixes #1099. 2019-01-31 15:28:01 +00:00
Mark Olesen
fe21c9c327 ENH: change vtk::Tools from a class to a namespace
- allows localized extension of functionality
2019-01-31 13:43:18 +01:00
mattijs
73705d8290 BUG: decomposePar: incorrect indexing. Fixes #1189. 2019-01-30 11:48:35 +00:00
Andrew Heather
da29c4f0d0 Merge branch 'feature-snappyHexMesh-check' into 'develop'
Feature snappy hex mesh check

See merge request Development/OpenFOAM-plus!229
2019-01-28 08:57:46 +00:00
Mark Olesen
3b91160027 STYLE: centralize example dictionaries under etc/ (issue #1074)
- as well as being more convenient to find, this is necessary when the
  OpenFOAM installation is without sources or tutorials
2019-01-26 17:46:08 +01:00
mattijs
c2debedd08 ENH: changeDictionary: allow removal of patches (!). Fixes #1179. 2019-01-24 12:40:46 +00:00
Mark Olesen
1c85c64984 STYLE: clarify input requirements for extrusion models (#1181)
- changed the sectorCoeffs keyword to 'point' from 'axisPt'
  for more similarity with other dictionaries.
  Continue to accept 'axisPt' for compatibility.
2019-01-24 09:40:12 +01:00
Mark Olesen
8b3a00efcc STYLE: fixup very old-style case headers 2019-01-24 08:44:41 +01:00
Mark Olesen
567ae55e8e STYLE: improve input check on gmshToFoam 2019-01-23 22:45:00 +01:00