Commit Graph

24116 Commits

Author SHA1 Message Date
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
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
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
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
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
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
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
132ae101f6 COMP: avoid autoPtr copy assignment and implicit casting 2020-10-15 17:21:33 +02:00
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
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
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
a475a19d01 CONFIG: bump API to 2010
- mostly reflects minor additions to Pstream methods and blockMesh
  improvements.
2020-10-12 12:52:39 +02:00
f83bc8c22b Merge remote-tracking branch 'origin/master' into develop 2020-10-12 12:52:17 +02:00
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
295eef471d CONFIG: increment patch level 2020-10-12 11:17:59 +02:00
6ecb4b69b1 SUBMODULE: update for bugfixes, compilation (external-solver, OpenQBMM) 2020-10-12 11:17:48 +02:00
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
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
ea0de58bbf ENH: add ffmpeg support to foamCreateVideo
- additional -tool= option to guide the discovery process
2020-10-07 20:48:04 +02:00
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
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
833ee40904 ENH: add pTraits for uint8_t 2020-10-07 09:17:00 +02:00
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
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
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
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
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
179e4cbcf2 STYLE: dimensionSet lookup with LITERAL, not REGEX 2020-10-02 09:19:32 +02:00
f9190e2a3c ENH: primitiveEntry construct with empty token list
- contents to be filled with a later assignment.

  This can help avoid deduction issues when populating from a list of
  tokens, and the templated version is selected:

  ```
  template<class T>
  primitiveEntry(const keyType&, const T&);
  ```

ENH: support construct empty ITstream with given name

- populate contents later by assigment
2020-10-02 09:16:07 +02:00
a415f04431 COMP: cannot compare 'this' for different DynamicList types
- Eg, cannot compare addresses of DynamicList<T,16> and DynamicList<T,8>
  [clang], so compare their cdata pointers instead.
2020-10-01 11:35:59 +02:00
9785029979 BUG: CompactListList transfer leaves old size (fixes #1863)
- use clear/swap paradigm for more code reuse

Note: fixed similar issue with copy/reuse constructor
2020-10-01 11:35:59 +02:00
56c9134ccc ENH: add identity(IntRange) and Istream operator for common types
- provides consistency with identity(label, label) and looks more
  familiar than using labelRange::labels()

- relocates labelRange IO operators to IntRange

ENH: make sliceRange interators random access

STYLE: scalarRanges::match() instead of predicate operator
2020-10-01 11:35:43 +02:00
3b3cffc758 BUG: mapPolyMesh: incorrect addressing. Fixes #1864
Triggered when running e.g. postProcess
2020-09-30 11:44:25 +01:00
27e71c2d9e Merge branch 'Pstream-ranges' into 'develop'
Pstream ranges

See merge request Development/openfoam!382
2020-09-29 10:16:37 +01:00
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
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
f8a8728f8f TUT: update movingCone blockMesh to merge points (#1862)
- wedge geometry, so topology merge results in zero-sized faces.
2020-09-28 11:08:32 +02:00
aca4f077ac ENH: fanPressure - use fanCurve entry if present
- only use implicit legacy handling if the "fanCurve" entry is missing
  and the "file" entry is present.
2020-09-28 11:08:32 +02:00
245ac07312 COMP: add missing include and clone() method to TableFile 2020-09-28 11:08:32 +02:00
43b9b63ab0 ENH: fanPressureFvPatchScalarField - updated fanCurve to use a Function1 2020-09-28 11:08:32 +02:00
12b68e1151 ENH: replace finiteArea timeVaryingUniformFixedValue with Function1 version
- timeVaryingUniformFixedValue -> uniformFixedValue

- allows a variety of functions (eg, coded, expressions, tables, ...)

- more similarity to finiteVolume patch type

STYLE: remove unused timeVarying... from etc/controlDict
2020-09-28 11:08:30 +02:00
bb3660b9a5 ENH: add construct ConstantField with uniform value 2020-09-25 15:30:50 +02:00
97be8fc767 ENH: add finer control to the expected expression types
- adds "future-proofing" for derived expression boundary conditions
  by moving potential failure modes into the base class.
2020-09-25 08:45:16 +02:00
ea42a7a6d4 ENH: change uniformGradient from Function1 to PatchFunction1 2020-09-25 08:39:57 +02:00
0dfdeb36d4 COMP: declare scalarRanges default constructor (gcc-4.8.5)
- failed to properly use the inherited constructors

STYLE: adjust documentation comments
2020-09-25 08:39:57 +02:00
a4c2842420 Merge remote-tracking branch 'origin/master' into develop 2020-09-24 16:17:22 +02:00
cbc0da8a60 CONFIG: increment patch level 2020-09-24 13:46:35 +02:00
d22134ed12 BUG: unexpected treatment of missing fractionExpr (fixes #1858)
- specifying gradientExpr without a valueExpr, a missing fractionExpr
  should be treated as 0 (gradient only), not as 1 (value only)

ENH: improve sanity checks + evaluation short-cuts in exprMixedFvPatchField
2020-09-24 13:46:32 +02:00
1550a12223 BUG: fractionExpr "0" ignored (fixes #1855)
- incorrect branching logic caused the "0" case to be ignored
2020-09-24 11:59:17 +02:00
413ccd5ce3 STYLE: adjust tests and one code instance for updated labelRange 2020-09-23 10:46:04 +02:00