openfoam merge requestshttps://develop.openfoam.com/Development/openfoam/-/merge_requests2024-03-19T16:02:23Zhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/673reduced overhead and non-blocking transfers for collated and masterOnly file ...2024-03-19T16:02:23ZMark OLESENreduced overhead and non-blocking transfers for collated and masterOnly file handlingThe aim of these changes is to avoid duplicate copies of character data and improved communication throughput.
The buffering in the output stream are now based on OCharStream instead of OStringStream. This allows full recovery of the st...The aim of these changes is to avoid duplicate copies of character data and improved communication throughput.
The buffering in the output stream are now based on OCharStream instead of OStringStream. This allows full recovery of the streamed characters without additional copies. The character data are _"yielded_" from the streaming buffer to pass on to the backend writers without an intermediate copy into string and copy back out of a string. The full buffer, including unused portions, is transferred to avoid triggering any alloc/free at that point. The char data can then be directly communicated (non-blocking) to the output.
On the receiving end, the size of the character content can be established directly from an MPI_Probe prior to setting up the MPI_Recv/MPI_Irecv. This avoids both the memory overhead of PstreamBuffers (the previous implementation) as well as needing to coordinate between all ranks (the PstreamBuffers has a synchronization point when establishing the buffer sizes as part of the PEX algorithm).
When using a master-only writing (non-collated), now use polling dispatch to write file content when it becomes available.v2406Mattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comMattijs Janssens4-Mattijs@users.noreply.develop.openfoam.comhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/643Draft: INT: introduce demand-driven fvSchemes and fvSolution2023-12-12T11:58:15ZMark OLESENDraft: INT: introduce demand-driven fvSchemes and fvSolution- functionality similar to that introduced by openfoam.org
fvSchemes/fvSolution now demand-driven and accessed by their respective
member functions schemes() and solution().
This means that the corresponding system files ...- functionality similar to that introduced by openfoam.org
fvSchemes/fvSolution now demand-driven and accessed by their respective
member functions schemes() and solution().
This means that the corresponding system files are not required upon
construction (which simplifies initialization) and potentially allows
supporting different file locations (TBD).v2312Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/588Draft: New renumbering based on Hamiltonian path2023-06-23T07:39:56ZAlon ZameretDraft: New renumbering based on Hamiltonian path### Summary
Included a new renumbering method called 'hpathRenumber' which reorder the mesh cells using an Hamiltonian path approach.
### Details of new models
Hamiltonian path is a path that traverses through the mesh faces and visi...### Summary
Included a new renumbering method called 'hpathRenumber' which reorder the mesh cells using an Hamiltonian path approach.
### Details of new models
Hamiltonian path is a path that traverses through the mesh faces and visits each cell exactly once. The Hamiltonian path approach tries to find such a path and renumber the mesh accordingly. This method ensures that after the mesh renumbering, consecutive cells in memory will likely share a common geometrical face. This in turn may allow for more efficient memory access and better vectorization performances when traversing the mesh.
![2D_Cylinder_Hpath](/uploads/90b36b3ca4136da32aaa93090c9300c0/2D_Cylinder_Hpath.png)
### Usage
Described below is the renumberMethodDict example used to apply Hamiltonian path renumbering:
```
method hpath;
hpathCoeffs
{
layered true;
}
```
The 'layered' argument (default true) controls whether the algorithm will separate the mesh cells into different 'layers' (otherwise, all cells are considered to be within the same layer). The layer separation approach is known to obtain better results and improved run-time for 3D cases, while 2D cases where a simpler Hamiltonian path may exist will benefit from avoiding the layer separation.
The algorithm will than try to find an Hamiltonian path traversing through all the cells sharing the same layer, and report the Hamiltonian path accuracy obtained.
The path accuracy is defined as the percentage of consecutive cells in the renumbered order that share a common face.v2312Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/587Draft: New decomposition method (multiNodeDecomp)2023-06-23T07:40:04ZAlon ZameretDraft: New decomposition method (multiNodeDecomp)### Summary
A new decomposition method 'multiNodeDecomp' which extends the capabilities of the multi-level decomposition method found within OpenFOAM while maintaining full backwards compatibility.
The multiNodeDecomp allow users contro...### Summary
A new decomposition method 'multiNodeDecomp' which extends the capabilities of the multi-level decomposition method found within OpenFOAM while maintaining full backwards compatibility.
The multiNodeDecomp allow users control over the properties of each node within the decomposition tree, as opposed to multi-level decomposition which supports level-based modifications.
### Details of new decomposition method
The multiNodeDecomp method adds the following capabilities:
1. Support decomposition to un-even nodes by changing the number of children of each node. For example:
```
multiNodeCoeffs {
method metis;
domains (3 4);
domains[0] (8);
}
```
In the example above, the mesh will be decomposed into 3 domains, where the first domain (domain[0]) will be further decomposed into 8 subdomains, while the remaining 2 domains will be decomposed into 4 subdomains only.
This will result in a total of 20 subdomains.
Note that the user passes a list value, which allows to have a different number of levels under different branches of the decomposition tree.
2. Simplified interface for decomposition weights - uniform/relative weight distribution may be used to initialize the weight of each node. The user may later overwrite any of the nodes weight.
```
weightsInitialization relative;
weight[0][3] 2;
```
'Uniform' initialization will recursively set all of the nodes weights to 1, while the 'Relative' initialization sets each nodes weight to the number of leaves in its decomposition subtree.
The weight of a node is then used during its parent's decomposition to control the sub-mesh size it will receive.
3. Modify the nodes decomposition method:
```
method[2] {
method scotch;
coeffs {
...
}
}
```
This will overwrite the method of the third subdomain of the root to use scotch and the given coefficients.
### Syntax
multiNodeDecomp supports setting the decomposition properties above on a level scope (parameter[] value) or on a node scope (parameter[#nodeIndex] value).
The square brackets indicate indices of the children we want to modify (0 based indexing). The user may specify ranges by using a hyphen ([0-3]) or specifying all of the children by using empty brackets ([]).v2312Andrew HeatherAndrew Heatherhttps://develop.openfoam.com/Development/openfoam/-/merge_requests/472Draft: ENH: relative velocity usage for porosity in MRF regions2021-12-15T10:52:37ZAndrew HeatherDraft: ENH: relative velocity usage for porosity in MRF regionsRelated to #1652 - updates porosity calculation when used with MRF to use relative velocity
Test case from bug report: [rotatingCylinders-test.tgz](/uploads/49641463ba3d523874517a126aa32293/rotatingCylinders-test.tgz)Related to #1652 - updates porosity calculation when used with MRF to use relative velocity
Test case from bug report: [rotatingCylinders-test.tgz](/uploads/49641463ba3d523874517a126aa32293/rotatingCylinders-test.tgz)v2212Sergio FerrarisSergio Ferraris