Commit Graph

27344 Commits

Author SHA1 Message Date
Mark Olesen
0ba4f36c60 ENH: use List containers for Pstream read/write calls
- using the List containers, and not their low-level data_bytes(),
  size_bytes() methods is more convenient and allows future
  adjustments to be centralized

ENH: trivial intptr_t wrapper for MPI_Win

STYLE: minor adjustments to mpirunDebug
2025-02-11 11:09:30 +01:00
Mark Olesen
0adc745b50 CONFIG: mpirunDebug 2025-02-10 14:27:51 +01:00
Mark Olesen
3b40dd8c29 ENH: add prescan handling of -debug-switch etc
- allows use of registered switches before startup of UPstream etc.
2025-02-10 14:27:51 +01:00
mattijs
6f2fadb48f ENH: extrudeToRegionMesh: ignore zone boundaries. Fixes #3318 2025-02-10 12:01:48 +00:00
Mark Olesen
559ed6c464 SUBMODULE: update adios module (fixes compilation change) 2025-02-07 14:49:28 +01:00
Andrew Heather
0cb812f6ac Merge branch 'feature-assignable' into 'develop'
ENH: assignable: extend to pointPatchFields and fvsPatchFields

See merge request Development/openfoam!726
2025-02-05 15:47:55 +00:00
Mattijs Janssens
4ae8ce3f0c ENH: assignable: extend to pointPatchFields and fvsPatchFields 2025-02-05 15:47:55 +00:00
Kutalmış Berçin
9f0d1c7121 Merge branch 'style-demand-driven-memory' into 'develop'
ENH: use unique_ptr instead of raw pointers for demand-driven data

See merge request Development/openfoam!697
2025-02-05 09:44:26 +00:00
Mark Olesen
e1d40646cc ENH: use unique_ptr instead of raw pointers for demand-driven data
- simplifies construct/destruct and any later code extensions
2025-02-05 09:43:52 +00:00
Mark Olesen
9013c9941d STYLE: mark SHA1Digest as having is_contiguous content
- send/recv List<SHA1Digest> without serialization
2025-02-04 11:21:11 +01:00
Mark Olesen
0cc5273d0a GIT: cleanup old 'removed' files (ones left only for dependency checks)
GIT: minor directory structure cleanup
2025-02-04 08:27:55 +01:00
Kutalmış Berçin
8f83ed786c Merge branch 'c++17-updates' into 'develop'
upgrade code to use some C++17 constructs

See merge request Development/openfoam!724
2025-01-31 14:17:34 +00:00
Mark Olesen
cf2b305b4f ENH: upgrade to use some C++17 constructs
- 'if constexpr (...)'
   * instead of std::enable_if
   * terminate template recursion
   * compile-time elimination of code

- use C++14 '_t', '_v' versions,
  eg, std::is_integral_v<T> instead of std::is_integral<T>::value

- std::begin, std::end, std::void_t instead of prev stdFoam versions

- provide is_contiguous_v<..> as short form of is_contiguous<..>::value
  with the additional benefit of removing any cv qualifiers.

ENH: include is_rotational_vectorspace trait

- tests for vector-space and nComponents > 1 (ie, not sphericalTensor)

ENH: improve robustness of pTraits_.. tests by removing cv qualifiers
2025-01-31 09:51:44 +01:00
mattijs
b9f05bdc01 ENH: refineMesh: user-specified coordinate system 2025-01-29 09:25:40 +00:00
mattijs
0b831572f3 ENH: refineMesh: tutorial to demo directional refinement 2025-01-27 17:24:35 +00:00
mattijs
6dc57a1a8b STYLE: consistent parameter naming 2025-01-27 15:41:06 +00:00
Mark Olesen
a18c15a4cf ENH: add VectorSpace component fill() method
- as per std::array and FixedList

STYLE: rename Scalar.[CH] -> scalarImpl.[CH] (these are internal files)

- added inclusion guards to protect against bad use
2025-01-27 10:31:09 +01:00
Mark Olesen
39e1eb9dc6 Merge remote-tracking branch 'origin/master' into develop 2025-01-27 09:45:18 +01:00
Mark Olesen
97c8e62fe4 COMP: disambiguate some reactingEuler/multiphaseSystem file names
- poor naming (eg, 'exponential.[CH]') within the same set of library
  files means that the lnInclude/ contents are inconsistent or partly
  meaningless (related to #2520 and !542).
  Remedied by adding model-type qualifiers to the file names.
2025-01-27 09:39:18 +01:00
Mark Olesen
297fee00f1 COMP: adjustments for nvc++ compiler
- remove unneeded -Wno-old-style flags with boost/cgal elements
- add nvc equivalent to gcc/clang -Wno-invalid-offsetof
- avoid warnings about set-but-unused variable and change of scoping

STYLE: remove wmake 'CGAL' rule
- was a transitional forward to 'cgal' rule since DEC-2020
2025-01-24 10:46:06 +00:00
Mark Olesen
c987ac228c SUBMODULE: update visualization for v2412 (with c++17 standand) 2025-01-24 11:40:32 +01:00
Mark Olesen
c77b0e14a1 MISC: extend foamGrep...Targets tools 2025-01-16 16:30:37 +01:00
Kutalmis Bercin
77cdf22eac STYLE: cellDecomposer: print operand fields in rows 2025-01-13 11:29:44 +00:00
Johan Roenby
4fe3f55e4d BUG: Fixes bug in plicRDF interface reconstruction across cyclic boundaries (fixes #3279)
Description:
The plicRDF interface reconstruction scheme calculates a reconstructed distance
function (RDF) in all interface cells and their point neighbours.
In point neighbours to interface cells, the RDF is calculated as a weighted
average of the distances to all adjacent interface cell centres with the weight
being the inverse distance to the cell centre.
By using the zoneDistribute class written by Henning Scheufler, the required
stencil data is communicated efficiently for stencil cells living on different
sides of one or more processor patches.
Some of the data required for the RDF reconstruction are cell centre and
interface centre positions. When a stencil extends across a cyclic patch these
positions have so far not been properly transformed in OpenFOAM. This issue is
fixed by the current contribution.
The fix is done by modifying the zoneDistribute class to hold the required
information about zone cells adjacent to cyclic patches. Positions are then
communicated with a new getPosition function which replaces getValue for
position data in the reconstructedDistanceFunction and plicRDF classes.
The implementation does not change the behaviour for cells not on
a cyclic patch and should have insignificant effect on efficiency for these.
The implementation can probably be optimised in terms of efficiency for zone
cells on cyclic patches, but we note that there are generally only very few of
these (interface cells and their point neighbours on cyclic patches) and so
the potential for speedup is expected to be limited.

Current limitations:

- In parallel, the user must constrain the decomposition to preserve cyclic
patches on the same processor, for the implementation to work properly.
  - See an example here: tutorials/discInConstantFlowCyclicBCs/system/decomposeParDict
- In the case of parallel rotational cyclics that are split by the decomposition
the current bugfix does not work and therefore throws an error. This is ongoing
work and should be reported and fixed by a future patch.

For further details, please see the modified files and the comments therein:
- $FOAM_SRC/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.H
- $FOAM_SRC/finiteVolume/fvMesh/zoneDistribute/zoneDistribute.C
- $FOAM_SRC/finiteVolume/fvMesh/zoneDistribute/zoneDistributeI.H
- $FOAM_SRC/transportModels/geometricVoF/reconstructedDistanceFunction/reconstructedDistanceFunction.C
- $FOAM_SRC/src/transportModels/geometricVoF/reconstructionSchemes/plicSchemes/plicRDF/plicRDF.C

Co-authored-by: David Müller <> KIT
Co-authored-by: Konstantinos Missios <> Roskilde University
Co-authored-by: Johan Roenby <> Roskilde University and STROMNING
2025-01-10 15:52:52 +00:00
Mark Olesen
cb1aa273fd SUBMODULE: update external-solver, OpenQBMM for v2412 2025-01-09 11:45:11 +01:00
Mattijs Janssens
2e1552dd30 Merge branch 'style-pointSmoothing' into 'develop'
STYLE: update code style for point-smoothing

See merge request Development/openfoam!723
2025-01-08 19:32:21 +00:00
Mark Olesen
d072ad0e3f STYLE: update code style for point-smoothing 2025-01-08 15:04:12 +01:00
mattijs
0a99702f9e ENH: lowerCSR: ignore lowerCSR for matrix type.
Reverting 267bd1af36 since makes it hard
to run cell-based algorithm on symmetric matrix.

- might become a problem if all discretisation
becomes lowerCSR based and lower() is never
constructed ...
2025-01-08 11:53:16 +00:00
mattijs
5aa40389c2 BUG: snappyHexMesh: update dependent vars. Fixes #3297 2025-01-06 17:40:45 +00:00
mattijs
7904a2734f BUG: twoPhaseEuler: incorrect phase. Fixes #3295. 2025-01-06 11:30:02 +00:00
mattijs
b86ba60d35 ENH: lduMatrix: pass through dictionary 2025-01-03 14:48:38 +00:00
Mark Olesen
392aa56f23 COMP: dllexport symbols for conversion/ccm (fixes #3199)
- normally mingw will export *all* symbols, but since the ADF library
  explicitly uses __declspec(dllexport) itself we must do the same
  otherwise none of our library symbols are exported and linking fails.

- update some code style for conversion/ccm
2025-01-02 12:38:22 +01:00
mattijs
6520d8e061 BUG: jumpCyclic: avoid neighbourField cache. Fixes #3292
- no caching of neighbour field
- no overlap of comms so not as efficient as cyclicAMI
2024-12-31 15:50:30 +00:00
Andrew Heather
45e7c4a005 Merge branch 'develop' into 'master'
RELEASE: develop branch to master

Closes #3291, #3278, #3286, #3193, #3276, #2457, #3269, #3271, #3267, #3265, #3258, #3259, #3218, #3255, #3088, #3241, #3192, #3204, #3217, and #3191

See merge request Development/openfoam!722
2024-12-24 11:57:24 +00:00
Andrew Heather
71d3f2344a Merge branch 'openfoam-v2412-rc' into 'develop'
Openfoam v2412 rc

See merge request Development/openfoam!721
2024-12-24 11:50:24 +00:00
Andrew Heather
d3949086ce RELEASE: Updated headers to v2412 2024-12-24 11:17:31 +00:00
Andrew Heather
03b470bec0 ENH: Updated completions 2024-12-24 11:17:30 +00:00
mattijs
131bbaf476 TUT: v2412: optional backwards-compatibility setting 2024-12-24 09:05:49 +00:00
mattijs
f6f6ffe055 ENH: mesh: added new tutorials 2024-12-24 08:39:39 +00:00
mattijs
639e87b52f BUG: extrude: handle internal faces. See #3162 2024-12-23 17:53:31 +00:00
Kutalmis Bercin
18f73c211d TUT: cylinder2D: avoid runtime errors due to the fix b0b1d0f8b2 2024-12-23 15:33:10 +00:00
mattijs
6eae520af7 BUG: pointBoundaryMesh: use correct db. Fixes #3291 2024-12-23 14:48:43 +00:00
mattijs
25de821e93 COMP: snappyHexMesh: extraneous code 2024-12-23 12:03:16 +00:00
Andrew Heather
0733d1cded Merge branch 'feature-distributedTriSurfaceMesh-noFill' into 'develop'
ENH: distributedTriSurfaceMesh: improvements

See merge request Development/openfoam!720
2024-12-23 09:56:50 +00:00
Mattijs Janssens
4fdeae66d5 ENH: distributedTriSurfaceMesh: improvements 2024-12-23 09:56:50 +00:00
Kutalmış Berçin
8bf1108677 Merge branch 'feature-reporting' into 'develop'
Reporting tools

See merge request Development/openfoam!716
2024-12-20 12:46:56 +00:00
Andrew Heather
cddfe0e324 TUT: motorBike - added example for foamReport 2024-12-20 09:51:42 +00:00
Andrew Heather
dffb5774d5 ENH: Added new foamReport functionObject
Replaces user-supplied keywords by run-time computed values in a text file.

Usage
    Example using system/controlDict.functions:

    foamReport1
    {
        // Mandatory entries (unmodifiable)
        type            foamReport;
        libs            (foamUtilityFunctionObjects);

        template        "<system>/myTemplate.md";

        substitutions
        {
            divSchemes1
            {
                type        dictionaryValue;
                object      fvSchemes;

                entries
                {
                    divSchemes      "divSchemes";
                }
            }
            fvSolution1
            {
                type        dictionaryValue;
                path        "<system>/fvSolution";

                entries
                {
                    solver_p        "solvers/p/solver";
                    solver_p_tol    "solvers/p/tolerance";
                    solver_p_reltol "solvers/p/relTol";
                    solver_U        "solvers/U/solver";
                    solver_U_tol    "solvers/U/tolerance";
                    solver_U_reltol "solvers/U/relTol";
                }
            }
            controlDict1
            {
                type        dictionaryValue;
                path        "<system>/controlDict";

                entries
                {
                    initial_deltaT       "deltaT";
                }
            }
            continuityErrors
            {
                type        functionObjectValue;
                functionObject continuityError1;

                entries
                {
                    cont_error_local    local;
                    cont_error_global   global;
                    cont_error_cumulative cumulative;
                }
            }
        }
2024-12-20 09:51:42 +00:00
Andrew Heather
c926f146d4 TUT: motorBike - added example for graphFunctionObject 2024-12-20 09:51:42 +00:00
Andrew Heather
82e471e045 ENH: Added new graphFunctionObject function object
Accumulates function object result values and renders into a graph in SVG format

Minimal example by using system/controlDict.functions to plot the residuals from
the solverInfo function Object:

    residualGraph
    {
        type            graphFunctionObject;
        libs            (utilityFunctionObjects);
        writeControl    writeTime;

        logScaleX       no;
        logScaleY       yes;

        xlabel          "Iteration";
        ylabel          "log10(Initial residual)";

        functions
        {
            line1
            {
                object      solverInfo1;
                entry       Ux_initial;
            }
            line2
            {
                object      solverInfo1;
                entry       Uy_initial;
            }
            line3
            {
                object      solverInfo1;
                entry       Uz_initial;
            }
            line4
            {
                object      solverInfo1;
                entry       p_initial;
            }
        }
    }
2024-12-20 09:51:42 +00:00