Commit Graph

24084 Commits

Author SHA1 Message Date
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
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
2aa46d4379 STYLE: manage send/recv ensight parallel output with integer range 2020-09-23 10:46:04 +02:00
d204d33c4e ENH: new IntRange class, enhancements to labelRange, sliceRange
- add reverse iterators and replace std::iterator
  (deprecated in C++17) with full definitions

- simplify construction of iterators

- construct labelRange from a single single parameter.
  This creates a (0,len) range.

- make basic constructors forms constexpr.
  Remove unused size checks.

- Derive labelRange from new IntRange template class.
  Allows reuse of base functionality with different integral sizes.

Deprecations:

  - deprecate labelRange::valid() in favour of using
    labelRange::empty() or the bool operator.
    For example,

        if (range) ...  vs older  if (range.valid()) ...

DEFEATURE: drop labelRange::null, scalarRange::null static variables

- turned out to be not particularly useful.
  Can simply use constexpr contructor forms

DEFEATURE: drop labelRange::identity static method

- simply use the single-parameter constructor
2020-09-23 10:45:57 +02:00
ad8ac2fcd0 STYLE: remove unused code references to Pstream::procID() 2020-09-23 09:25:07 +02:00
48cb2de4eb STYLE: adjust send/receive in tests 2020-09-23 09:25:07 +02:00
52025dfb1b STYLE: add END tag for dependency files
- aids when locating truncated files
2020-09-23 09:25:07 +02:00
2cba04e204 STYLE: make some tmp, refPtr constructors constexpr 2020-09-23 09:25:07 +02:00
49ae975b72 Merge branch 'lagragianEvaporation' into 'develop'
New Evap-Cond Lagrangian model  (FuchsKnudsen)  for solution (liquid + solid) droplets

See merge request Development/openfoam!377
2020-09-22 16:37:02 +01:00
274bb0740e STY: Headers and code style 2020-09-22 16:35:53 +01:00
11d17fec5f ENH: Adding evaporation-condensation lagragian model for solution
1) Adding LiquidEvapFuchsKnudsen model for lagrangian evaporation.
   This models is based on a diffusion type of evaporation/
   condensation on particles composed of solution (liquid + solid).

2) Adding modes of calculating the particle rho and volume change.
   The new keyword in constantProperties is 'volumeUpdateMethod'
   which three options:
        a) constantRho
        b) constantVolume
        c) updateRhoAndVol

   The old keyword 'constantVolume' true/face is still valid

3) The entry rho0 is now optional for multicomponent parcels.
   If defined , it is used, but if it is not the actual mixture
   provided is used to calculate rho0 of the particle.
   T0 is still used as initial T and Cp0 is over-written in the
   multicomponent cloud but still required.

4) Adding tutorial for evaporation/condensation model
2020-09-22 16:35:53 +01:00
973e2d4e2d COMP: remnant foam-extend code in faMatrix::setValues (fixes #1834)
BUG: faMatrix::residual changes source vector (fixes #1835)

ENH: improve code alignment between faMatrix and fvMatrix

- support setValues() with a single value
2020-09-16 17:27:56 +02:00
bf3b4fabb4 ENH: UniformList to wrap a single value into a list-like container
- refactor UniformField accordingly
2020-09-16 17:27:56 +02:00
0d08942bf3 STYLE: mark globalMeshData::ListPlusEqOp as deprecated
- can use ListOps::appendEqOp as the more general form.
  Note that this uses a different template parameter.
  Eg,
      `globalMeshData::ListPlusEqOp<labelList>()`
  vs. `ListOps::appendEqOp<label>()`
2020-09-16 17:27:56 +02:00
0a1cd580ac ENH: improvements for nastran surface writer
- select default nastran PLOAD2 or PLOAD4 based on field type.
  Default to PLOAD2 for scalar types and PLOAD4 for vectors etc.

- relocate nastran SHELL/MAT cards.
  Previously wrote at the end of the file, now emit when writing the
  geometry itself. This improves modularity (of code and files)

- initial support for common geometry file for nastran
2020-09-16 17:27:56 +02:00
7d203443c3 ENH: refactor surface writer collated time management (#1600)
- abstracted out from ensight surface writer for potential reuse by
  other surface writers.
2020-09-16 17:27:56 +02:00
f8ffee8135 ENH: support fieldScale for more surface writers 2020-09-16 17:27:56 +02:00
a9bf69b551 ENH: suppress surface Face-id field if writer manages that itself (#1600)
- for CAE formats such as abaqus, nastran, starcd, etc, the element id
  is already part of the output format itself. For these cases, there
  is no use in generating an additional "Ids" field.

ENH: add code to ignore negative face ids

- these will arise from very special cases, such as when a
  solid element and side are encoded into a single integer.

BUG: starcd surface values output did not use original face ids
2020-09-16 17:27:56 +02:00
a001c0d2fa BUG: volPointInterpolation: fixes #1831 2020-09-16 15:30:09 +01:00
52e0ebca57 ENH: gradingDescriptor(s) correct() and normalise() methods
- single entry point to handle negative expansions etc.
  Reduces typos and forgotten code (as per #1841)
2020-09-16 09:47:08 +02:00
9762b547fe BUG: gradingDescriptor stream input ignores negative expansion (Fix #1841)
- mostly only tripped when using fractional edge grading, since this
  is where the list reading is used. Overseen in commit 7da0b5bee1.
2020-09-16 09:25:28 +02:00
ab55157358 BUG: snappyHexMesh: fixes #1836.
When truncating layers in one go (nBufferCellsNoExtrude -1) it
should set the nCells per face to be the min of the number of points
per edge.
2020-09-10 14:09:58 +01:00
c9ab12cb3d ENH: IOobject: print some more info 2020-09-10 14:09:57 +01:00
1e95af4d57 STYLE: use more generic terms allow/deny for selections 2020-09-09 13:54:34 +02:00
d4cd87830d BUG: Changing rho mixing to volume-based in rhoThermo. Fixes #1812. 2020-09-08 15:24:12 -07:00
7be3092414 BUG: Fixing parallel writing for interfaceHeight FO. Fixes #1788 2020-09-08 09:20:51 -07:00
be99805986 ENH: isolate config/version information from regular globals
- slight speed gain for recompilation and provisions for future
  refactoring
2020-09-07 17:36:26 +02:00
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
fbfcdfc723 ENH: allow default parameter for Tuple2 (#1827)
- simplifies cases where Tuple2 is used as a Pair replacement
  (for output format reasons)
2020-09-07 09:37:05 +02:00
1c71c7cb23 Merge remote-tracking branch 'origin/master' into develop 2020-09-03 12:04:45 +02:00
916dcc85a5 ENH: bin/tools/git-find-non-ascii: find non-ASCII chars in source code 2020-09-03 12:04:04 +02:00
73057447a2 COMP: pass-through targetType for a few Allwmake files (#1824) 2020-09-03 11:35:18 +02:00
4735776246 COMP: pass shell args for Allwmake-mpi (#1824) 2020-09-03 10:15:12 +02:00
0e6df58c70 STYLE: simpler construct for empty tmp field in volFieldValue
- originally (incorrectly) was a Field(0.0), which was generalized
  to Field(Zero), but Field() is the correct form

STYLE: rename 'mustGet' to more standard 'mandatory' variable
2020-09-03 09:26:37 +02:00