|
[Sponsors] |
July 13, 2020, 10:04 |
Loop over faces of a cell in paralele
|
#1 |
New Member
Simon Guillot
Join Date: Mar 2020
Posts: 1
Rep Power: 0 |
Dear Foamers
I would like to know how to loop over faces of a cell in paralele. I currently have the following code : Code:
forAll(psi.internalField(), celli) { const labelList& faces = mesh.cells()[celli]; forAll(faces, fi) // Local numbering { const label facei = faces[fi]; // Global numbering if (mesh.isInternalFace(facei)) { dgPsi[celli] = max( mag( d[facei] & gPsi[celli] ), dgPsi[celli]); } else { } } volScalarField::Boundary psiBf = psi.boundaryField(); forAll(psiBf,patchi) { scalarField& psip = psiBf[patchi]; fvPatchScalarField& pDX = dXbf[patchi]; fvPatchScalarField& pEps = epsbf[patchi]; forAll(psip,i) { pDX[i] = Foam::pow(V[patchi], 1.0/3.0); pEps[i] = (3.0/2.0) * pDX[i]; } } I don't have the same results for serial and paralele when I want to plot dX for example. I think I have to do something in the "else{ }" (test if patch.coupled() for example) but everything I use is quite bad. Thank you for your help ! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[snappyHexMesh] Add Mesh Layers doesnt work on the whole surface | Kryo | OpenFOAM Meshing & Mesh Conversion | 13 | February 17, 2022 08:34 |
[snappyHexMesh] Help with Snappy: no layers growing | GianF | OpenFOAM Meshing & Mesh Conversion | 2 | September 23, 2020 09:26 |
[snappyHexMesh] layer not added | Rasmusiwersen | OpenFOAM Meshing & Mesh Conversion | 1 | January 2, 2020 10:43 |
Need help setting up chtMultiRegion | OskarT | OpenFOAM Pre-Processing | 1 | September 25, 2019 16:51 |
decomposePar -allRegions | stru | OpenFOAM Pre-Processing | 2 | August 25, 2015 04:58 |