Commit Graph

27105 Commits

Author SHA1 Message Date
mattijs
bc03a538cf ENH: mapDistribute: improved error message 2024-03-18 10:44:54 +00:00
Andrew Heather
f639538600 Merge branch 'feature-overlapping_zones' into 'develop'
Feature overlapping zones

See merge request Development/openfoam!670
2024-03-13 14:44:14 +00:00
Mattijs Janssens
3973cf7a83 Feature overlapping zones 2024-03-13 14:44:13 +00:00
Mark Olesen
28e212030d CONFIG: increment API level to 2401 2024-03-13 08:21:27 +00:00
Andrew Heather
cff9c7b60c ENH: singleCellFvMesh - added access to patchFaceAgglomeration 2024-03-11 14:20:36 +00:00
Andrew Heather
ef47662131 STYLE: liquidFilmModel - report film initial temperature when T0 employed 2024-03-11 14:20:36 +00:00
Mark Olesen
0c84e50583 ENH: refine renumberMesh and renumberMethod (addenda to !669)
- provide no_topology() characteristic to avoid triggering potentially
  expensive mesh connectivity calculations when they are not required.

- remove/deprecate unused pointField references from the renumber
  methods. These appear to have crept in from outer similarities
  with decompositionMethod, but have no meaning for renumbering.

- remove/deprecate various unused aggregation renumberings since these
  have been previously replaced by pre-calling calcCellCells, or
  using bandCompression directly.

- make regionFaceOrder for block-wise renumbering optional and
  treat as experimental (ie, default is now disabled).

  The original idea was to sort the intra-region and inter-region faces
  separately. However, this will mostly lead to non-upper triangular
  ordering between regions, which checkMesh and others don't really like.

ENH: add timing information for various renumberMesh stages

ENH: add reset of clockTime and cpuTime increment

- simplifies section-wise timings

ENH: add globalIndex::null() and fieldTypes::processorType conveniences

- provides more central management of these characteristics
2024-03-10 17:45:44 +01:00
Kutalmış Berçin
618faa0ab6 Merge branch 'misc-reduced-overheads' into 'develop'
misc changes for reduced stringstream and MPI overhead

See merge request Development/openfoam!672
2024-03-07 18:11:38 +00:00
Mark Olesen
5680ce1ee2 STYLE: use spanstream instead of stringstream in more places
- particularly useful in these combinations:

  1.
      OCharStream buf;
      // populate

      ISpanStream is(buf.view());
      // parse

  2.
      // read from file
      ifile.getLine(str);

      ISpanStream is(str);
      // parse

  These avoid making a copy of the character content, compared to
  versions with stringstream:

      OStringStream buf;
      IStringStream is(buf.str());
2024-03-07 15:04:54 +01:00
Mark Olesen
f6825c7952 ENH: replace listCombineReduce with equivalent
- a few places still used listCombineReduce instead of
  newer constructs (eg allGatherList) with fewer MPI calls.

- align triangulation handling of turbulentDFSEMInlet and
  patchInjectionBase with meshTools/triangulatedPatch
  (will ease future code refactoring)
2024-03-07 11:19:56 +01:00
Kutalmış Berçin
d89ecc74be Merge branch 'update-matrix-streaming' into 'develop'
Improve streaming matrix and internal memory management

See merge request Development/openfoam!671
2024-03-07 10:18:27 +00:00
Mark Olesen
27aa7e4e91 ENH: improve procLduMatrix streaming and assembly of LUscalarMatrix
- reduce local overhead prior to sending for master assembly
- non-blocking mode when assembling solution vector
- automatic resizing of pivots
2024-03-07 10:40:30 +01:00
Mark Olesen
43c0c3989b ENH: handle matrix demand-driven internals with unique_ptr
- align member order between template and non-template versions
- move construct, move assignment
2024-03-07 10:40:26 +01:00
Kutalmış Berçin
05194796ef Merge branch 'update-renumbering-methods' into 'develop'
ENH: adjust renumbering methods, extend renumberMesh options

See merge request Development/openfoam!669
2024-03-06 22:20:54 +00:00
Mark Olesen
61aaacd088 ENH: adjust renumbering methods, extend renumberMesh options
- renumberMesh now has -dry-run, -write-maps, -no-fields,
  -renumber-method, -renumber-coeffs options.

  * Use -dry-run with -write-maps to visualize the before/after
    effects of renumbering (creates a VTK file).

  * -no-fields to renumber the mesh only.
    This is useful and faster when the input fields are uniform
    and the -overwrite option is specified.

  * -renumber-method allows a quick means of specifying a different
    default renumber method (instead of Cuthill-McKee).

    The -renumber-coeffs option allows passing of dictionary content
    for the method.

    Examples,

       // Different ways to specify reverse Cuthill-McKee

       *  -renumber-method RCM
       *  -renumber-coeffs 'reverse true;'
       *  -renumber-method CuthillMcKee
       *  -renumber-coeffs 'reverse true;'
       *  -renumber-coeffs 'method CuthillMcKee; reverse true;'

       // Other (without dictionary coefficients)
       *  renumberMesh -renumber-method random

       // Other (with dictionary coefficients)
       renumberMesh \
           -renumber-method spring \
           -renumber-coeffs 'maxCo 0.1; maxIter 1000; freezeFraction 0.99;'

       // Other (with additional libraries)
       renumberMesh -renumber-method zoltan -lib zoltanRenumber

COMP: build zoltan renumbering to MPI-specific location

- zoltan and Sloan renumbering are now longer automatically linked to
  the renumberMesh utility but must be separately loaded by a
  command-line option or through a dictionary "libs" entry.

ENH: add output cellID for decomposePar -dry-run -cellDist
2024-03-06 17:58:47 +01:00
Mark Olesen
e7f0628d79 ENH: promote IFstream::readContents() to public static function
- reads file contents into a DynamicList<char>, which can then be
  broadcast, moved to a ICharStream etc.
2024-03-06 15:05:36 +01:00
Mark Olesen
7006056eae ENH: remove blocking communication for gather patterns
ENH: eliminate unnecessary duplicate communicator

- in globalMeshData previously had a comm_dup hack to avoid clashes
  with deltaCoeffs calculations. However, this was largely due to a
  manual implementation of reduce() that used point-to-point
  communication. This has since been updated to use an MPI_Allreduce
  and now an MPI_Allgather, neither of which need this hack.
2024-03-06 11:10:54 +01:00
Mark Olesen
b98f53ceca ENH: make ITstream positioning methods noexcept
ENH: add rank() method for compound tokens

ENH: add IOstream::minPrecision(unsigned)

- reduced typing, more expressive, no namespace ambiguity with max()

    new: IOstream::minPrecision(10);
    old: IOstream::defaultPrecision(max(10u, IOstream::defaultPrecision()));

STYLE: namespace qualify min/max for some buffer sizing [clang/hipp]
2024-03-06 11:01:57 +01:00
Mark Olesen
5a70be0846 ENH: use SubList for CompactListList access
- this was previously a UList instead of SubList,
  but SubList supports better assignment of values

ENH: add invertOneToManyCompact

- returns a CompactListList<label> instead of labelListList, which
  allows for reuse as partitioning table etc and/or slightly reduced
  memory overhead
2024-03-06 09:14:42 +01:00
Mark Olesen
78fc102df1 ENH: minor reduction in allocations for inactive profiling (#3112)
- avoid string conversion/concatenation unless profiling hooks
  are possible (ie, active or Extrae is loaded).
2024-03-06 08:18:08 +01:00
Andrew Heather
fa2aeec45b Merge branch 'feature-fa-various' into 'develop'
Misc. changes in the finite-area module

See merge request Development/openfoam!661
2024-03-05 18:14:12 +00:00
Kutalmis Bercin
d03a225061 ENH: finiteArea: reduce various code footprint 2024-03-05 18:13:59 +00:00
Kutalmis Bercin
abfe30454a ENH: finiteArea: consolidate various IOobject calls 2024-03-05 18:13:59 +00:00
Kutalmis Bercin
3535d7890d ENH: faPatch: remove intermediate/unused fields 2024-03-05 18:13:59 +00:00
Kutalmis Bercin
47232ccf66 ENH: finiteArea: replace raw pointers with unique_ptr 2024-03-05 18:13:59 +00:00
Kutalmis Bercin
cd8bc891f0 ENH: fvMatrix, faMatrix: replace raw pointers with unique_ptr (#3107) 2024-03-05 18:13:59 +00:00
Kutalmis Bercin
1cbbcf15d3 ENH: finiteArea: remove redundant header files 2024-03-05 18:13:59 +00:00
Kutalmis Bercin
b393d6eca1 STYLE: finiteArea: add/fix comments
STYLE: finiteArea: consistent use of =delete for removed ctors/assignments
2024-03-05 18:13:59 +00:00
Martin Lichtmes
9de77857a6 ENH: add surface patch index to surfaceCheck output
- makes it somewhat easier to find a correspondence of patch names and
  patch index (for paraview)
2024-03-05 16:18:02 +01:00
mattijs
46e0ef92d3 STYLE: spelling 2024-02-28 09:08:07 +00:00
Mark Olesen
8b793f8866 ENH: add global point/face/cell addressing to globalMeshData (#3108)
- permits reuse in other places without subsequent communication
2024-02-24 21:08:01 +01:00
Mark Olesen
337e672d53 ENH: extend globalMeshData::calcCellCells handling
- add convenience forms for common combinations

- avoid allocation for 1:1 identity agglomerations

- support subsetting forms (avoids an intermediate fvMeshSubset)
  that also return the cellMap

- refactored to eliminate code duplication between weighted and
  unweighted forms
2024-02-24 21:07:58 +01:00
Mark Olesen
04d880e2ce STYLE: use send/recv serializers for globalIndex and mapDistribute etc 2024-02-24 19:51:24 +01:00
Mark Olesen
4f43f0302d ENH: additional Map/HashTable constructors and ListOp functions
- construct Map/HashTable from key/value lists.

- invertToMap() : like invert() but returns a Map<label>,
  which is useful for sparse numbering

- inplaceRenumber() : taking a Map<label> for the mapper

ENH: construct/reset CStringList for list of C-strings
2024-02-23 18:10:48 +01:00
Mark Olesen
f7cdd3ef63 ENH: extra objectRegistry::newIOobject form with IOobjectOption
- example use:

      mesh.newIOobject(name, { IOobject::REGISTER });

  vs

      mesh.newIOobject
      (
          name,
          IOobject::NO_READ,
          IOobject::NO_WRITE,
          IOobject::REGISTER
      );
2024-02-23 17:58:21 +01:00
Andrew Heather
fac940e1cc Merge branch 'feature-regionFa-various' into 'develop'
Misc. changes in the regionFaModels

See merge request Development/openfoam!663
2024-02-23 15:54:08 +00:00
Kutalmis Bercin
7891960bd1 ENH: KirchhoffShell: reduce code footprint 2024-02-23 12:14:30 +00:00
Kutalmis Bercin
6e2bdb0613 ENH: liquidFilmBase: remove unused energy source field 2024-02-23 12:14:30 +00:00
Kutalmis Bercin
05e4001cf2 ENH: regionFaModels: remove redundant header files 2024-02-23 12:14:30 +00:00
Kutalmis Bercin
b6eb300718 ENH: liquidFilm: consolidate and inline various access funcs 2024-02-23 12:14:23 +00:00
Kutalmis Bercin
b4d7a31913 STYLE: regionFaModels: add/remove various comments 2024-02-23 12:14:19 +00:00
Kutalmis Bercin
90e9a070a7 DOC: regionFaModels: improve header documentation 2024-02-23 12:03:07 +00:00
mattijs
3b966afb9c BUG: snappyHexMesh: parallel inconsistency. Fixes #3106 2024-02-22 16:08:51 +00:00
mattijs
613959c52b ENH: faceZoneSet: doc. See #2024 2024-02-22 10:08:08 +00:00
mattijs
25551b23bf BUG: faceZoneSet: allow construction of faceZone. Fixes #2024 2024-02-22 09:56:59 +00:00
Andrew Heather
73b6ddd760 Merge branch 'md23-update-registry-handling' into 'develop'
Updates to reduce unnecessary registration of tmp fields

See merge request Development/openfoam!665
2024-02-21 15:28:09 +00:00
Mark Olesen
8b73d06898 ENH: use tmp field factory methods [12] (#2723)
- applications
2024-02-21 14:31:40 +01:00
Mark Olesen
ec2b1be8c5 ENH: use tmp field factory methods [11] (#2723)
- src/optimisation
2024-02-21 14:31:40 +01:00
Mark Olesen
c138f89c1f ENH: use tmp field factory methods [10] (#2723)
- src/TurbulenceModels
2024-02-21 14:31:40 +01:00
Mark Olesen
d9483f5080 ENH: use tmp field factory methods [9] (#2723)
- src/phaseSystemModels
2024-02-21 14:31:40 +01:00