OpenFOAM® v1906: New and improved parallel operation

27/06/2019

New random decomposition method

The new random decomposition method puts each cell on a randomly selected processor. It produces an extremely bad decomposition that is useful for testing purposes, e.g. to stress-test parallel implementations, making it easier to detect parallel inconsistencies.

The new method is set in the system/decomposeParDict dictionary:

//- The total number of domains (mandatory)
numberOfSubdomains  2;

//- The decomposition method (mandatory)
method          random;

and can be visualised by e.g. running decomposePar -cellDist and post-process the resulting cellDist field. The following image shows the decomposition for the lid-driven cavity tutorial with 5 processors, coloured by destination processor number:

Extended distributed triangulated surface functionality

Triangulated surfaces are employed to describe geometry, used for input into meshing tools, e.g. snappyHexMesh, and post-processing, e.g. for iso-surfaces. The distributedTriSurfaceMesh variant is suitable for parallel workflows where each processor just holds a subset of triangles.

In this release the distributedTriSurfaceMesh has been extended to:

• no longer require a separate utility surfaceRedistributePar for decomposition
• allow inside/outside tests and so can be used e.g. to perform volume refinement in snappyHexMesh
• speed up various queries and made more memory efficient

The distributedTriSurfaceMesh is specified in the geometry section of the snappyHexMeshDict dictionary:

geometry
{
sphere.stl
{
type distributedTriSurfaceMesh;
}
}

• an already decomposed surface: processorDDD/constant/triSurface/sphere.stl and corresponding processorDDD/constant/triSurface/sphere.stlDict. The latter dictionary contains e.g. the bounding box of the local surface.
• the undecomposed constant/triSurface/sphere.stl and distribute it; this is the most frequently used operation.

The following images show the difference for a simple test case employing both a triSurfaceMesh and a distributedTriSurfaceMesh:

Limitations

An undecomposed distributedTriSurfaceMesh currently requires the decomposition method in the system/decomposeParDict to be set to hierarchical. This can be automated using the new conditionals in dictionaries:

#ifeq $FOAM_APPLICATION decomposePar method scotch; #else method hierarchical; coeffs { n (5 2 1); } #endif Source code$FOAM_SRC/parallel/distributed/distributedTriSurfaceMesh
Solver