Commit Graph

27070 Commits

Author SHA1 Message Date
a0005c3a54 ENH: make InfoProxy noexcept, add 'operator*' dereference
- conforms better to general use of '*' dereference.
2023-05-17 11:46:57 +02:00
f7a7f1c14c ENH: reduced warnings about createBaffles on processor patches (#2781)
- coupled patches are treated distinctly and independently of
  internalFacesOnly, it makes little sense to report them with a
  warning about turning off boundary faces (which would not work
  anyhow).

STYLE: update code style for createBaffles
2023-05-17 11:46:57 +02:00
a581a8cb8d ENH: disallow implicit cast of autoPtr to non-const pointer
- permitting a cast to a non-const pointer adds uncertainty of
  ownership.

- adjust PtrDynList transfer. Remove the unused 'PtrDynList::remove()'
  method, which is better handled with pop().
2023-05-17 11:46:57 +02:00
521043094e ENH: replace autoPtr<bool> with Switch (#2777)
- initialise with Switch::INVALID and then test if good() to
  trigger the initial update.

  This avoids some overhead, but primarily avoids ambiguity with
  implicit casting to a 'bool' that autoPtr<bool> has.
2023-05-17 11:46:57 +02:00
687a9528b0 DOC: include 'Environment' as filtered doxygen paragraph 2023-05-17 11:46:57 +02:00
5aeb02e23d Merge branch 'feature-forces-fo-performance' into 'develop'
ENH: forces: avoid redundant volumetric operations

See merge request Development/openfoam!598
2023-05-15 16:19:09 +00:00
59b1cf080e ENH: Tensor/SymmTensor: add devSymm and devTwoSymm funcs to avoid intermediates 2023-05-15 17:05:10 +01:00
f98ecb38dc ENH: forces: avoid redundant volumetric operations 2023-05-15 17:05:10 +01:00
fe50b745ae Merge branch 'feature-particle-coulomb-force' into 'develop'
ENH: Coulomb: new particle electric force model calculating Coulomb forces

See merge request Development/openfoam!602
2023-05-15 15:35:10 +00:00
8dee603193 ENH: Coulomb: new particle electric force model calculating Coulomb forces 2023-05-15 15:34:06 +00:00
c7e5e7f4a2 ENH: electricPotential: enable electric field calculations 2023-05-15 15:34:06 +00:00
efe8220a26 STYLE: electricPotential: simplify read function
- change 'fieldName' to 'Vname' for better clarity
2023-05-15 15:34:06 +00:00
7269cc1d3b ENH: electricPotential: replace operandField with getOrReadField 2023-05-15 15:34:06 +00:00
d92583f4b6 BUG: extrudePatchMesh: disable walking across non-manifold. See #2780
This code can be removed if nInternalEdges excludes non-manifold ones
2023-05-15 16:17:27 +01:00
e9160673a1 CONFIG: update paraview patch version. From 5.11.0 to 5.11.1 2023-05-10 19:14:59 +02:00
d069ffa16a SUBMODULE: removed catalyst handling for paraview 5.5 and earlier 2023-05-10 19:14:51 +02:00
c7fc4891ae COMP: adapt solveScalar to scalar for GAMG residual calculation
STYLE: use tmp<xyz>::New factory in matrix operations

COMP: fix bad non-access tmp access (in unused faceH method)
2023-05-10 18:23:13 +02:00
62a68eeea0 ENH: free/nullify of PtrList and UPtrList
- Allows clearing or freeing pointers without touching the underlying
  list size. Was previously only for PtrDynList, but now available on
  UPtrList, PtrList as well.

- add transfer() method to PtrDynList to avoid potential slicing.
2023-05-10 18:23:13 +02:00
139a8fc6ff STYLE: use SPDX-style for scripts 2023-05-10 18:23:13 +02:00
e8bcf4cb1b ENH: additional uniform boundary conditions (#2703)
- provide uniformMixed conditions for finite-area and finite-volume.

  These are intended to replace the exprMixed condition but allow
  the full range of different PatchFunction1 and Function1 types.

- add uniformFixedGradient to finite-area for completeness.

Note:
   - still some possible difficulties with the order of evaluation.
   - eg, using an expression within the 'U' field that depends
     of the surface 'phi' field before that is constructed.
     In this case, the 'value' entry is really needed.
2023-05-09 19:30:58 +02:00
3d091a0d6a ENH: separate nonBlocking send/receive mapDistribute (#2775) 2023-05-09 19:30:58 +02:00
b3fa59db92 ENH: additional handling for multiply-connected finite-area edges (#2771)
- multiply-connected edges can arise at the centre of a "star"
  connection or because the patch faces are actually baffles.

- In the serial case these internal edges are also rather dubious in
  terms of modelling. However, when they are split across multiple
  processors there can only be a single processor-to-processor
  connectivity.

  We don't necessary have enough information to know how things should
  be connected, so connect pair-wise as the first remedial solution

- Any extra dangle edges are relegated to an 'ignore' faPatch
  to tag as needing different handling.
2023-05-09 19:30:58 +02:00
b62e4b06fa ENH: add finite-area 'ignore' boundary condition
- this is a placeholder boundary BC for using with bad or illegal
  edges. It is currently functionally identical to zero-gradient.
  Naming and definition still subject to change.
2023-05-09 19:30:58 +02:00
783934ccad ENH: add global topology check in checkMesh and makeFaMesh (#2771)
- detect when boundary patches are multiply connected across edges

STYLE: initialize some faMesh values
2023-05-09 19:30:58 +02:00
1bef57d018 ENH: optional saving of illegal edges in patch surfaceType() check
- reduce some intermediate storage in looping

STYLE: explicit iterator dereference in syncTools
2023-05-09 19:30:58 +02:00
31600c96d4 ENH: output finiteArea patchID with foamToVTK -with-ids
- can be quite useful for debugging/orientation with complex
  geometries
2023-05-09 19:30:58 +02:00
f462a850ce ENH: added polyBoundaryMesh patchID(meshFacei) method
- this complements the whichPatch(meshFacei) method [binary search]
  and the list of patchID() by adding internal range checks.

  eg,
     Before
     ~~~~~~
     if (facei >= mesh.nInternalFaces() && facei < mesh.nFaces())
     {
         patchi = pbm.patchID()[facei - mesh.nInternalFaces()];
         ...
     }

     After
     ~~~~~
     patchi = pbm.patchID(facei);

     if (patchi >= 0)
     {
         ...
     }
2023-05-09 19:30:58 +02:00
dfa5c05a16 ENH: use New factory methods for Dimensioned/Geometric functions (#2723) 2023-05-09 19:30:58 +02:00
1685e8e418 INT: objectRegistry: optionally caching temporary objects (#2723)
- functionality introduced by openfoam.org to support selective
  caching of temporary fields. The purpose is two-fold: to enable
  diagnostics and to allow more places to use unregistered fields by
  default.

  For example to cache the grad(k) field in

    cacheTemporaryObjects
    (
        grad(k)
    );

  If the name of a field which in never constructed is added to the
  cacheTemporaryObjects list a waning message is generated which
  includes a useful list of ALL the temporary fields constructed
  during the time step

  Multiple regions are also supported by specifying individual region
  names in a cacheTemporaryObjects dictionary.

    cacheTemporaryObjects
    {
        porous
        (
            porosityBlockage:UNbr
        );
    }

    functions
    {
        writePorousObjects
        {
            type        writeObjects;
            libs        (utilityFunctionObjects);

            region      porous;
            writeControl writeTime;
            writeOption anyWrite;

            objects     (porosityBlockage:UNbr);
        }
    }
2023-05-09 19:30:58 +02:00
2df90880d6 ENH: consistent use of name scoping for turbulence fields
- with IOobject::scopedName instead of literal ':' for future
  transitioning of separators
2023-05-09 19:30:57 +02:00
8e32db2b5f STYLE: more explicit use of REGISTER when storing fields
ENH: add phaseScopedName convenience method

- unites IOobject::scopedName + phasePropertyName
2023-05-09 19:30:57 +02:00
16591012e9 ENH: add -verbose option to surface conversion, cleanup
- by default, reduce the amount of output

ENH: support default text description for -verbose option

- simplifies use in more places.
2023-05-09 19:30:57 +02:00
bddda09a08 ENH: earlier exit from interface polling in updateMatrixInterfaces
- exit the wait-some polling loop when no interfaces are left
  to be updated
2023-05-09 19:30:57 +02:00
98c42479f6 ENH: relax processorField waiting requirements
- for interface polling previously required that both send and recv
  requests were completed before evaluating (values or matrix update).
  However, only the recv needs to be complete, which helps disentangle
  the inter-rank waiting.

  NB: this change is possible following (1f5cf3958b) that replaced
      UPstream::resetRequests() call in favour of UPstream::waitRequests()
2023-05-09 19:30:57 +02:00
52b225b6d5 STYLE/COMP: include cyclic patch headers earlier 2023-05-09 19:30:57 +02:00
c6f528588b ENH: use Mprobe/Mrecv for IPstream constructor
- retains the queried message without secondary polling.
2023-05-09 19:30:54 +02:00
2eb1f5678d ENH: use Improbe/Mrecv for NBX size exchange
- retains the queried message without secondary polling.
  Purported to be slightly faster. Better thread-safety.
2023-05-09 14:51:43 +02:00
50f4d0444c ENH: avoid synchronization on UPstream::shutdown with error (#2774)
- UPstream exit with a non-zero return code is raised by things like
  exit(FatalError) which means there is no reason to believe that
  any/all of the buffered sends, requests etc have completed.

  Thus avoid detaching buffers, freeing communicators etc in this
  situation. This makes exit(1) behave much more like abort(), but
  without any stack trace. Should presumably help with avoiding
  deadlocks on exit.
2023-05-09 14:51:43 +02:00
639b800049 ENH: clearer separation of MPI initialize/finalize stages (#2774)
ENH: support transfer from a wrapped MPI request to global list

- allows coding with a list UPstream::Request and subsequently either
  retain that list or transfer into the global list.
2023-05-09 14:51:43 +02:00
9d2ae3da67 CONFIG: remove optional 'value' entry from setConstraintTypes template
- processor types automatically handle a missing 'value' as
  patchInternalField, so no need having it in the setConstraintTypes
  template as well.
2023-05-09 14:51:43 +02:00
d22c206226 STYLE: fix truncated error message for non-constraint patch types 2023-05-09 14:51:43 +02:00
fd1a70f933 BUG: effectivenessTable: fix the sign for secondary outlet temperature (fixes #2772) 2023-05-09 08:26:43 +01:00
868d6dd778 BUG: VTK write pointSet fails in parallel (fixes #2773)
- de-referenced autoPtr with () instead of ref() will fail on
  non-master ranks.
2023-05-05 15:17:31 +02:00
3e382aadea Revert "BUG: Fixing ray dAve and omega for 1D and 2D cases"
This reverts commit 5848b0afd5.
2023-05-05 13:24:23 +01:00
964cb140e2 Merge branch 'feature-parProfiling' into 'develop'
ENH: parProfiling: profile linear solver only

See merge request Development/openfoam!603
2023-05-03 19:04:10 +00:00
b0b3ec0d8e ENH: parProfiling: profile linear solver only 2023-05-03 19:04:10 +00:00
0ae31d4c00 Merge branch 'optimizationBranch' into 'develop'
Optimization to ldu Matrix

See merge request Development/openfoam!601
2023-05-02 16:17:56 +00:00
4f7aa70ad6 ENH: new FPCG solver (faster PCG)
- this should be faster than the regular PCG on larger systems
  since it combines two global reductions
2023-05-02 18:00:50 +02:00
47bb79cb75 ENH: use residual method in GAMGSolverSolve: fuses Amul with b-Amul 2023-05-02 17:54:23 +02:00
b664eea712 ENH: remove redundant distribution in backward sweep (symGaussSeidel) 2023-05-02 17:54:16 +02:00