Commit Graph

16442 Commits

Author SHA1 Message Date
925a2e724b ENH: add caching selector to PatchFunction1
- extend handling of uniform PatchFunction1 to include new Function1
  types and pass through the objectRegistry information
2021-11-26 11:22:36 +00:00
f29eb55cee ENH: Refactored TimeFunction1 - now possible using Function1 directly 2021-11-26 11:22:36 +00:00
b9b011f5ea ENH: Added new sample Function1 2021-11-26 11:22:36 +00:00
bc2b469f9d ENH: Added new Function1: FunctionObjectValue
Returns a value retrieved from a function object result.

Usage:
    <entryName> functionObjectValue;
    <entryName>Coeffs
    {
        functionObject          <name>;
        functionObjectResult    <function object result field name>
    }
2021-11-26 11:22:36 +00:00
2c2310dc17 ENH: reference function object - retrieve reference using Function1
Note: previous behaviour to set the reference to a cell value can be recovered
by using the new 'sample' Function1
2021-11-26 11:22:36 +00:00
70b55be684 COMP: Function1 - propagated API change resulting from new objectRegistry access 2021-11-26 11:22:36 +00:00
c1a04abd96 ENH: Function1 - added optional objectRegistry reference
Function1 can now be created with an object registry, e.g. time or mesh
database. This enables access to other stored objects, e.g. fields,
dictionaries etc. making Function1 much more flexible.

Note: will allow TimeFunction1 to be deprecated
2021-11-26 11:22:36 +00:00
aeef96251f ENH: Refactored stateFunctionObject
- created new functionObjects::properties class derived from IOdictionary
  - replaces raw state IOdictionary owned by functionObjectList
  - state dictionary access/manipulators moved from stateFunctionObject
- stateFunctionObject now acts as a light wrapper around
  functionObjecties::properties
- updated dependent code
2021-11-26 11:22:36 +00:00
b19e767b8f ENH: sampledSets - added min,max,average values to the results dict 2021-11-26 11:22:36 +00:00
f078643f8c ENH: add blockFaces.vtp output for blockMesh -write-vtk 2021-11-25 20:02:09 +01:00
f459b11e24 STYLE: direct iteration over dictionary entries 2021-11-25 20:02:08 +01:00
1804d3fed5 ENH: additional #word and #message dictionary directives (#2276)
- use `#word` to concatenate, expand content with the resulting string
  being treated as a word token. Can be used in dictionary or
  primitive context.

  In dictionary context, it fills the gap for constructing dictionary
  names on-the-fly. For example,

  ```
  #word "some_prefix_solverInfo_${application}"
  {
      type    solverInfo;
      libs    (utilityFunctionObjects);
      ...
  }
  ```

  The '#word' directive will automatically squeeze out non-word
  characters. In the block content form, it will also strip out
  comments. This means that this type of content should also work:

  ```
  #word {
     some_prefix_solverInfo
     /* Appended with application name (if defined) */
     ${application:+_}  // Use '_' separator
     ${application}     // The application
  }
  {
      type    solverInfo;
      libs    (utilityFunctionObjects);
      ...
  }
  ```
  This is admittedly quite ugly, but illustrates its capabilities.

- use `#message` to report expanded string content to stderr.
  For example,

  ```
  T
  {
     solver          PBiCG;
     preconditioner  DILU;
     tolerance       1e-10;
     relTol          0;
     #message "using solver: $solver"
  }
  ```
  Only reports on the master node.
2021-11-25 17:05:37 +01:00
55af2fc2c6 BUG: missing unit-normal weighting for surfaceFieldValue (fixes #2273)
- when using a vector field for weighting, it either used mag()
  or mag * area, but did not have a unit-normal projection version
2021-11-25 09:39:20 +01:00
ccb0fd9cf0 EMH: Adding layers option and writing out HR and Tdew fields for
humidityTemperature BC
2021-11-24 15:52:24 -08:00
19f7825a04 ENH: electrostaticDeposition: new finiteVolume boundary condition 2021-11-24 18:05:58 +00:00
aaeddba466 ENH: electricPotential: new solver function object 2021-11-24 18:05:58 +00:00
fd9670d4a3 ENH: add objectRegistry handling to expressions driver
- needed for future embedding
2021-11-23 13:37:37 +01:00
fbd7b78999 ENH: make expressions::FieldAssociation a common enum
- use FACE_DATA (was SURFACE_DATA) for similarity with polySurface

ENH: add expression value enumerations and traits

- simple enumeration of standard types (bool, label, scalar, vector)
  that can be used as a value type-code for internal bookkeeping.

GIT: relocate pTraits into general traits/ directory
2021-11-23 12:53:45 +01:00
141403ed98 BUG: compare of two zero-sized faces was returning false 2021-11-23 10:31:24 +01:00
bb7d8d0f4d BUG: mapped: make consistent with AMI. Fixes #2275 2021-11-22 12:21:13 +00:00
39d244ad91 ENH: add check for isTimeDb() into objectRegistry
- add missing time() into pointMesh

STYLE: use static_cast instead of dynamic_cast for Time -> objectRegistry
2021-11-17 19:52:33 +01:00
3d889b6dbf ENH: report dictionary defaults with Executable prefix
- provides better context when default values are accessed from
  a dictionary than reporting a source file location.
2021-11-17 16:04:46 +01:00
bb771a3caf GIT: remove spurious method declaration in regIOobject
STYLE: adjust param/return for internal readStream method
2021-11-17 16:04:40 +01:00
92d52243af ENH: support cref() and shallow copies (refPtr and tmp)
- enables building HashTables with shadowed variables

- support good() and valid() as synonyms in memory classes
2021-11-17 16:04:40 +01:00
96735dce20 ENH: expose ITstream hasPutback to allow better handling
STYLE: relocate ITstream::parseStream from static to file-scope
2021-11-17 16:04:40 +01:00
4e59ad9d8d ENH: make objectRegistry::cfindIOobject public 2021-11-15 22:13:21 +01:00
effd69a005 ENH: add refPtr release() method
- releases ownership of the pointer. A no-op (and returns nullptr)
  for references.

  Naming consistent with unique_ptr and autoPtr.

DOC: adjust wording for memory-related classes

- add is_const() method for tmp, refPtr.

  Drop (ununsed and confusing looking) isTmp method from refPtr
  in favour of is_pointer() or movable() checks

ENH: noexcept for some pTraits methods, remove redundant 'inline'

- test for const first for tmp/refPtr (simpler logic)
2021-11-15 19:34:01 +01:00
9c9d6c64b5 DEFEATURE: remove general objects storage from exprResult
- unused, generally fragile.
2021-11-15 19:19:55 +01:00
adb01bddf4 ENH: use float-narrowing for ensight set writer
- replaces hand-rolled checks

STYLE: minor cleanup of ensightPTraits
2021-11-15 18:14:16 +01:00
e62a260bdd ENH: rhoThermos: enable new set of combinations 2021-11-15 18:14:16 +01:00
8e887d3395 BUG: snappyHexMesh: parallel consistency. Fixes #2271. 2021-11-15 11:46:38 +00:00
168c13c514 ENH: cht: suppress printing of thicknessLayers. Fixes #2266 2021-11-11 08:54:42 +00:00
53e8f2a807 ENH: fvSolution: allow Function1 for all scalars
TUT: demonstrate some ramping

- compressible/rhoPimpleFoam/RAS/angledDuct
2021-11-10 17:28:52 +01:00
ba95b89e5f ENH: add Function1 caching selector 2021-11-10 17:28:45 +01:00
fd82f3e47a ENH: distinguish between compressible/incompressible coded source
- previously had codeAddSup used for both incompressible and
  compressible source terms. However, it was not actually possible to
  use it for compressible sources since any references to the 'rho'
  parameter would cause a compilation error for the incompressible case.

  Added 'codeAddSupRho' to distinguish the compressible case.
  User must supply one or both of them on input.
2021-11-09 21:48:42 +01:00
8638d82325 ENH: additional dictionary controls, methods
STYLE: declaration order of topoSet, resize_nocopy for sortedOrder

STYLE: remove cstring dependency from SHA1

STYLE: use Ostream endEntry()
2021-11-09 21:33:32 +01:00
a78e79908b ENH: additional decompose options
- decomposePar: -no-fields to suppress decomposition of fields

- makeFaMesh: -no-decompose to suppress creation of *ProcAddressing
  and fields, -no-fields to suppress decomposition of fields only
2021-11-09 15:44:54 +01:00
e8aa3aad25 ENH: simple detection for collapsed block descriptions
- switch from default topology merge to point merge if degenerate
  blocks are detected. This should alleviate the problems noted in
  #1862.

  NB: this detection only works for blocks with duplicate vertex
      indices, not ones with geometrically duplicate points.

ENH: add patch block/face summary in blockMesh generation

- add blockMesh -verbose option to override the static or dictionary
  settings.  The -verbose option can be used multiple times to increase
  the verbosity.

ENH: extend hexCell handling with more cellShape-type methods

- allows better reuse in blockMesh.
  Remove blockMesh-local hex edge definitions that shadowed the
  hexCell values.

ENH: simplify some of the block-edge internals
2021-11-09 15:44:54 +01:00
5a121119e6 ENH: add -verbose support into argList
- similar to -dry-run handling, can be interrogated from argList,
  which makes it simpler to add into utilities.

- support multiple uses of -dry-run and -verbose to increase the
  level. For example, could have

    someApplication -verbose -verbose

 and inside of the application:

    if (args.verbose() > 2) ...

BUG: error with empty distributed roots specification (fixes #2196)

- previously used the size of distributed roots to transmit if the
  case was running in distributed mode, but this behaves rather poorly
  with bad input. Specifically, the following questionable setup:

      distributed true;
      roots ( /*none*/ );

  Now transmit the ParRunControl distributed() value instead,
  and also emit a gentle warning for the user:

      WARNING: running distributed but did not specify roots!
2021-11-09 15:44:54 +01:00
c45c649d15 ENH: portable scoping char for solver info names (#2224, #1675)
COMP: implicit cast scope name to C++-string in IOobject::scopedName

- handles 'const char*' and allows a check for an empty scope name

COMP: avoid potential name conflict in local function (Istream)

- reportedly some resolution issues (unconfirmed) with Fujitsu clang
2021-11-09 15:44:54 +01:00
9371c517b9 COMP: adjust include guards 2021-11-09 12:18:07 +01:00
d4f3581265 BUG: createPhiv - updated flux call 2021-11-08 19:32:13 +00:00
76dcc4f28f ENH: kL: new RANS model for geophysical applications
STYLE: atmosphericModels: regroup atmospheric turbulence models
ENH: kEpsilonLopesdaCosta: enable this RANS model for compressible applications
2021-11-08 18:56:59 +00:00
b90ba9d125 ENH: noiseModel updates. Fixes #2263
- updated safeLog10 - returns -GREAT instead of zero
- enabled reference for dB calc to be user defined

Cross reference exchange platform 1689
2021-11-08 18:48:46 +00:00
7fc943c178 ENH: improvements for makeFaMesh, checkFaMesh
- added -dry-run, -write-vtk options.
  Additional mesh information after creation.

- add parallel reductions and more information for checkFaMesh

ENH: minor cleanup of faPatch internals

- align pointLabels and pointEdges creation more closely with coding
  patterns used in PrimitivePatch

- use fileHandler when loading "S0" field.
2021-11-05 18:07:36 +00:00
a95427c28a ENH: improve handling of area calculations in faMesh (#2233)
- previous handling did not correctly account for off-processor
  connections (SEGFAULT).

- revised the point/area normal calculations to use the dual of the
  faces. This simplifies the logic and reduces the depth of loops.

  Point corrections from the neighbouring patches is handled
  centrally by the new halo face information, which properly handles
  on-processor or off-processor faces irrespective of any explicit
  processor patches.

STYLE: local function and add comments for finiteArea area weighting

- following the original Tukovic code, the area-weighted normal
  for a vector pair (defining a triangle) is weighted by
    (1) area : larger weight for larger areas
    (2) sin  : lower weight for narrow angles (eg, shards)
    (3) invDist squared : lower weights for distant points

  Refactored to eliminate intermediate operations, some additional
  divide-by-zero protection - similar to vector normalise()
2021-11-05 18:07:36 +00:00
ea92cb82c4 ENH: add boundary halo handling to faMesh
- the finiteArea is typically restricteed to one or more patches on a
  polyMesh but will have an external connectivity to other parts of
  the polyMesh. For proper determination of the point normals (for
  example), the neighbouring information is needed.

  These outside 'halo' faces can be located on different processors,
  but not correspond to an internal processor-processor interface.

  Add a dedicated form of mapDistribute for swapping this type of
  information. Since this is a collective operation, locate
  corresponding methods directly on the faMesh level instead of
  the faPatch level.
2021-11-05 18:07:36 +00:00
8e45108905 BUG: parallel construct finiteArea fails with arbitrary connections (#2152)
- the case of 'fan-like' processor was previously assumed to be
  rare (see merge-request !490 and issue #2084).

  However, Vaggelis Papoutsis noticed that even fairly normal geometries
  can trigger problems.

- replaced the old patch/patch matching style with a more general
  edge-based synchronisation and matching that appears to handle
  the corner cases inherently. The internal communication overhead
  is essentially unchanged, and the logic is simpler.

ENH: additional framework for managing patch connectivity
2021-11-05 18:07:36 +00:00
9c1f94d4fd BUG: parallel blocking with faFieldDecomposer, faMeshReconstructor (fixes #2237)
- the patch remapping in faFieldDecomposer calls weights
  internalField() which can trigger parallel communication on the
  complete mesh for some processors only (ie, blocks).

  Force a priori creation of weights instead.

- ensure that the complete mesh (reconstruction helper)
  is serial when adding patches.
2021-11-05 18:07:36 +00:00
a809265432 BUG: incorrect finite-area faceProcAddressing (fixes #2155)
- when creating a finite-area mesh in parallel, need to determine
  the equivalent ProcAddressing for the faMesh.

  In the faceProcAddressing the collected and sorted order was being
  scattered directly back to the individual processors instead of only
  the sections relevant to each particular processor.

  This caused the observed jumbled order for reconstructed fields.
2021-11-05 18:07:36 +00:00