View Issue Details

IDProjectCategoryView StatusLast Update
0003283OpenFOAMBugpublic2019-05-26 12:04
ReporterfedeAssigned Tohenry 
Status resolvedResolutionfixed 
PlatformLinuxOSDebianOS Version9
Product Versiondev 
Fixed in Versiondev 
Summary0003283: calcCutCells on cellZones in parallel
DescriptionThere is a minor bug in the Foam::cuttingPlane::calcCutCells function in the file $FOAM_SRC/sampling/cuttingPlane/cuttingPlane.C when we want to plot a field at the intersection between a plane and a cellZone. The error appears with parallel computations, when the cellZone is split among multiple processor meshes.

in the attached test case we want to plot any field (U in the test case) at the intersection between a plane and a cellZone named "zone1".
In the controlDict file a functionObject is used:

        type surfaces;
        libs ( "" );
        writeControl timeStep;
        writeInterval 1;
        log true;
        fields ( U );
        sampleScheme cell;
        interpolationScheme cell;
        surfaceFormat vtk;
                type plane;
                planeType pointAndNormal ;
                    point (4 0 -3.8);
                    normal (0 0 1);
                zone zone1;
The code works properly in serial. In parallel, the code functionality (=plot only at the intersection with the cellZone) is respected only if the cellZone is located on a single processor mesh; otherwise, the functionality required by the option "zone" in the dictionary is ignored.
Steps To Reproducein testDAER folder, type:

./Allrun <nProcs>

One time step of the simulation will be done and the result on the postProcessing folder is written.

- if nProcs=1 (e.g. ./Allrun), everything works properly

- With nProcs=8, the error is triggered

I attached cuttingPlane.C, with the modifications to solve the issue and to respect the original functionality of the function.
Tests were done on OpenFOAM-dev, commit 0889ff91c.

ps. in Allclean file, I put a modified the "cleanCase" function (few lines). If would be nice to include the feature/option in the cleanCase function to keep the mesh; adding an option (as proposed in the script) would allow to keep the backward compatibility with the old scripts.
TagsNo tags attached.



2019-05-24 10:07


cuttingPlane.C (11,648 bytes)


2019-05-26 12:04

manager   ~0010494

Thanks for the report and patch
Resolved by commit 47d2e03ae3673e4042b5ab9d07513989aff4f0f9

Issue History

Date Modified Username Field Change
2019-05-24 10:07 fede New Issue
2019-05-24 10:07 fede File Added: cuttingPlane.C
2019-05-26 12:04 henry Assigned To => henry
2019-05-26 12:04 henry Status new => resolved
2019-05-26 12:04 henry Resolution open => fixed
2019-05-26 12:04 henry Fixed in Version => dev
2019-05-26 12:04 henry Note Added: 0010494