Commit Graph

24139 Commits

Author SHA1 Message Date
Mark Olesen
26ec9b5a17 CONFIG: rationalize compiler tuning
- support prefs.compiler with better possibilities to provide
  overload values

STYLE: reduce code for WM_ARCH_OPTION (seldom-used)
2020-11-11 17:58:47 +01:00
Mark Olesen
67b3c01e13 ENH: generalize argList help output 2020-11-11 16:59:01 +01:00
Mark Olesen
ef2ea9629c STYLE: line breaks and spelling 2020-11-11 10:02:17 +01:00
sergio
30ea7d6134 BUG: Make volUpdateType default to constRho particle. Fixes #1916 2020-11-10 09:17:21 -08:00
sergio
fbcf7111be BUG: Taking out contErr contribution to TEq for divUp. Fixes #1813.
contErr is based on rhoPhi not on phi. The term contErr/rho*p in TEq
makes a large correction which occasionally makes T unbounded
2020-11-10 08:52:31 -08:00
Mark Olesen
4cf44850a7 CONFIG: detect newer adios library name (fixes #1911)
ENH: provide fallback prefix for cmake detection

STYLE: simplify some shell syntax, avoid uname call in sysFunctions

STYLE: report FOAM_MPI during mpiLib builds
2020-11-09 15:43:52 +01:00
Mark Olesen
f7c8e39804 ENH: update lemon version (#1768)
- upstream fixes: minor compiler warnings, style changes
2020-11-07 18:04:55 +01:00
Mark Olesen
1d544540d9 ENH: handle wmake -debug option via FOAM_EXTRA_CXX_FLAGS
- ensures that subsequent Allwmake scripts know about it.

ENH: add bin/tools/query-detect wrapper for wmake have_* scripts

CONFIG: use project/ThirdParty without additional sanity checks

- no need to test for Allwmake or platforms/ if ThirdParty is located
  within the project directory itself.

COMP: add simple mpi test to 00-dummy

- for testing library linkage, etc.
2020-11-04 15:17:28 +01:00
Mark Olesen
83fb48678d COMP: adjust build order
- blockMesh <- extrudeModel <- dynamicMesh

COMP: bad constructor in searchableSphere

- used brace initializer instead of bracket initializer, which
  triggered component-wise construction instead of copy/move
  construction (gcc 4.8)

STYLE: use uint8_t instead of relying on definition of 'direction'
2020-11-04 15:15:36 +01:00
Mark Olesen
aea876885f ENH: support surfaceFieldValue faceZone on internal volume (#1884)
- uses averaged value instead of emitting a fatal error
2020-10-29 11:32:50 +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
043419f30a TUT: add examples of general spheroid (#1901)
- for blockMesh meshing and as snappyHexMesh geometry
  (adjust the igloo aspect ratio)
2020-10-28 16:04:12 +01:00
Victor Olesen
e9d130f022 ENH: support general searchable spheroid (issue #1901)
- a sphere/spheroid can be specified as a single radius or three radii.
  If all three values happen to be identical, they are collapsed to a
  single value. Examples,

      radius 2;
      radius (2 2 2);
      radius (2 3 4);
      radius (2 2 4);

  The search for nearest point on an ellipse or ellipsoid follows the
  description given by Geometric Tools (David Eberly), which also
  include some pseudo code. The content is CC-BY 4.0

  In the search algorithm, symmetry is exploited and the searching is
  confined to the first (+x,+y,+z) octant, and the radii are ordered
  from largest to smallest.

  Searching is optimized for sphere, prolate and oblate spheroids.
2020-10-28 16:04:12 +01:00
Mark Olesen
4258f8059f ENH: adjustments to searchable surfaces
- code reduction, documentation, code stubs for spheroid (#1901)

- make searchableSurfaceCollection available as 'collection'
  for consistency with other objects
2020-10-28 16:04:12 +01:00
Mark Olesen
f999013f41 ENH: use static to define default blockMesh verbosity
- make handling of verbosity more consistent.

  Make all setter return the old value, remove (unused) default
  parameter as being counter-intuitive.  This makes it easier to
  restore the original values.

  For example,

     const bool oldVerbose = sampler.verbose(false);
     ...
     sampler.verbose(oldVerbose);
2020-10-28 16:04:12 +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
242d9e40a2 ENH: consistency update for GeometricField::Boundary constructor
- make patchFieldType default to calculated,
  as per GeometricField constructor
2020-10-28 16:04:12 +01:00
Mark Olesen
410d38b9d9 ENH: support true/false, yes/no values for FOAM_ABORT (#1896)
- consistent with FOAM_SIGFPE etc.

- centralize code as error::useAbort() static function to avoid
  scattering the logic throughout the code.

ENH: also accept "0" and "1" string values for Switch

- not the normal path for Switch input (eg, from a dictionary), but
  consistent with bool definitions and simplifies string parsing.

  This means that `FOAM_SIGFPE=1 application` will now also work.
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
5579e7a62b ENH: improve some efficiency in expressions
- use refPtr to simplify some logic.
- avoid copying field if an average will be used
- initialize geometric fields with a uniform value instead of Zero
- minor tweak of method names

- apply bugfix #1889 (longer description elsewhere)
2020-10-28 16:04:08 +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
4f84aa5362 STYLE: adjustments for code integration
- adjust contributor names to include windows port

BUG: bash script marked as sh (fixes #1890)
2020-10-22 14:52:56 +02:00
Ivor Clifford
d8525f1746 INT: polyline: new extrusion model
Allows specification of extrusion path using blockMesh 'edges' syntax.
See tutorials/mesh/extrudeMesh/polyline

Contribution by Ivor Clifford/Paul Scherrer Institut
2020-10-22 10:13:15 +01:00
Mark Olesen
e11c072bc4 CONFIG: incorrect BC code templates (fixes #1885)
- autoPtr to Function requires clone() method, not optional copy/move
  argument.

- fix bad character range for 'sed'
2020-10-20 14:23:40 +02:00
Mark Olesen
f425424eef ENH: add api/patch information to FatalError (#1880)
- can be useful when confronted with partial outputs

- provision for redirecting error/warning
2020-10-19 21:14:22 +02:00
Mark Olesen
1071d413a3 ENH: add ROOTGREAT constants (symmetry with ROOTSMALL)
ENH: add some scalar constants for .org compatibility (#1881)

Although it can very much be a moving target, it can prove partly
useful to have some compatibility constants/methods.

- The wholesale change of 'GREAT' -> 'great' etc (JAN-2018), makes
  user coding for multiple versions problematic. When
  COMPAT_OPENFOAM_ORG is defined, now define constants (aliases) named
  as per the openfoam.org version. Values, however, remain identical.

- For type-safe dictionary value retrieval, we have the templated
  get<> methods added around NOV-2018 and deprecated the lookupType
  method.

  The .org version followed suit in NOV-2019, but opted for renaming
  the templated lookupType method as a templated 'lookup' method.

  Using this is discouraged, but allowed when COMPAT_OPENFOAM_ORG is
  defined.
2020-10-19 21:14:17 +02:00
Mark Olesen
cb47decbf1 ENH: add Switch::negate() method (no-op for invalid state)
- flips state while preserving the textual representation.
  Eg, OFF <-> ON, YES <-> NO etc.

- fix test case to avoid triggering abort(), which we cannot try/catch
2020-10-15 17:21:33 +02:00
Mark Olesen
f7839acd47 ENH: output Enum name list without leading number
- not usually of any interest.
  Unifies code for Ostream and std::ostream operators
2020-10-15 17:21:33 +02:00
Mark Olesen
f1d9fea6f2 ENH: construct token::compound from object and token from compound (#1879)
- provides a more direct means of generating a compound token without
  an Istream

- add transferCompoundToken() without Istream reference

- mark more token methods as noexcept
2020-10-15 17:21:33 +02:00
Mark Olesen
de544c9422 COMP: mark autoPtr copy assigment as '= delete' (#639)
- was marked as transitional/deprecated (2018-02), now deleted.

- avoids unexpected stealing of the pointer.
  Use the move assignment it that is the intention.
2020-10-15 17:21:33 +02:00
Mark Olesen
132ae101f6 COMP: avoid autoPtr copy assignment and implicit casting 2020-10-15 17:21:33 +02:00
Mark Olesen
f0d4f7cdc5 ENH: additional cellModel edge() method to return a single edge
STYLE: update cell methods

- avoid shadow variable names, range-for, etc
- simplify coding

STYLE: relocate cellModeller (compatibility) from namespace to a struct

- avoids misleading namespace clutter in doxygen
2020-10-13 12:47:37 +02:00
Mark Olesen
2d67788c74 ENH: simplify treeBoundBox::calcExtremities
STYLE: avoid shadow variable names, add more doxygen markup

STYLE: cull some unused code from triangleFuncs
2020-10-13 12:47:37 +02:00
Mark Olesen
2a6cbeb7cb ENH: update and document point/object hit methods
- add point() as unchecked getter method.

- add hitPoint(.., label) convenience method for common combination of
  setHit() + setIndex(label) + setPoint(..)

GIT: remove unused headers, typedefs (point2DHit.H pointHitSort.H)
2020-10-13 12:47:37 +02:00
Mark Olesen
a475a19d01 CONFIG: bump API to 2010
- mostly reflects minor additions to Pstream methods and blockMesh
  improvements.
2020-10-12 12:52:39 +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
295eef471d CONFIG: increment patch level 2020-10-12 11:17:59 +02:00
Mark Olesen
6ecb4b69b1 SUBMODULE: update for bugfixes, compilation (external-solver, OpenQBMM) 2020-10-12 11:17:48 +02:00
Mark Olesen
bea6563210 CONFIG: ptscotch header not found on ArchLinux (fixes #1877)
- on ArchLinux, everything is installed under /usr/include/scotch.

  The detection script uses SCOTCH_ARCH_PATH as an initial guess for
  ptscotch as well. However, on the second pass, it has an absolute
  value ("/usr") instead of a logical one ("scotch-system").
  This resulted in the logic for handling scotch+ptscotch subdirs
  being bypassed.
2020-10-12 10:34:49 +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
mattijs
ea0de58bbf ENH: add ffmpeg support to foamCreateVideo
- additional -tool= option to guide the discovery process
2020-10-07 20:48:04 +02:00
Mark Olesen
0783bd28d1 ENH: additional face constructors, cellModel methods
- support construct face from subset of labels.

- additional cellModel face() method to return a single face.

- reduce some allocations in cellModel centre/mag methods

STYLE: mark old cellModeller methods as compile-time deprecated

- deprecated in 2017, but not marked as such

STYLE: indentation, spacing in some headers
2020-10-07 09:18:23 +02:00
Mark Olesen
525ad206be BUG: compilation error for DimensionedField::T() fixes #1868
- incorrectly used const access for the tmp instead of ref()
2020-10-07 09:18:23 +02:00
Mark Olesen
833ee40904 ENH: add pTraits for uint8_t 2020-10-07 09:17:00 +02:00
Mark Olesen
568cb050f2 STYLE: place projectCurveEdge, projectEdge into blockEdges namespace
- consistent with other blockEdge types
- adjust some debug output
2020-10-07 09:17:00 +02:00
Andrew Heather
57a76e2647 Merge branch 'feature-blockMesh-edges' into 'develop'
Feature block mesh edges

See merge request Development/openfoam!383
2020-10-06 09:37:10 +01:00
Mark Olesen
121c69ef2e TUT: use new 'arc' specification in several tutorials
- in most cases this eliminates manually calculation of circumferential
  points.

TUT: improve parameterization of sphere blockMeshDict

- allow separate parameterization of radius, ratio of inner to outer,
  and the number of divisions in x/y/z and radial directions
2020-10-05 15:45:39 +02:00
Mark Olesen
1d08ed9be2 ENH: support arc edge specification with origin point
- The arc will frequently enclose an angle less than 180 degrees.
  For the case, it is possible to define the arc by its endpoints
  and its centre (origin) point. For example,

      arc 0 1 origin (0 0 0);

  When defined in the way, any discrepancy in the arc radius for the
  endpoints is resolved by adjusting the origin to ensure that the
  average radius is satisfied.

  It is also possible to specify a \em flatness factor as a multiplier
  of the radius. For example,

      arc 0 1 origin 1.1 (0 0 0);

ENH: minor code cleanup for block edges

ENH: expose point appending as polyList::concat
2020-10-05 14:08:48 +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