CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (http://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   accessing neighbour cells in parallel computing (http://www.cfd-online.com/Forums/openfoam-programming-development/101429-accessing-neighbour-cells-parallel-computing.html)

impecca May 3, 2012 17:16

accessing neighbour cells in parallel computing
 
hi,

I try to access to neighbour cell centre values with parallel computing and I have an issue on the cells (presumably) next to the interface of subdomains.

what I did with a structured mesh (channel) is,

const vectorField& cCentre = mesh.C(); // get cell centre coordinate
const labelListList& neighbour = mesh.cellCells(); // get neighbour cell list on each cell

forAll(cCentre, celli){
labelList nCellID = neighbour[celli];
forAll(nCellID,cellNe){
//to access neighbour cells only in x-z plane
if( (cCentre[celli]-cCentre[nCellID[cellNe]]).component(vector::Y)==0 ){
Info<<cellNe<<" "<<cCentre[celli]<<" "<<cCentre[nCellID[cellNe]]<<nl;
}
}
}




Then what I got with a single processor case,

...
1 (1.45 0.015 -0.55) (1.35 0.015 -0.55)
2 (1.45 0.015 -0.55) (1.45 0.015 -0.45)
3 (1.45 0.015 -0.55) (1.45 0.015 -0.65)
4 (1.45 0.015 -0.55) (1.55 0.015 -0.55)
1 (1.45 0.015 -0.45) (1.35 0.015 -0.45)
2 (1.45 0.015 -0.45) (1.45 0.015 -0.35)
3 (1.45 0.015 -0.45) (1.45 0.015 -0.55)
4 (1.45 0.015 -0.45) (1.55 0.015 -0.45)
1 (1.45 0.015 -0.35) (1.35 0.015 -0.35)
2 (1.45 0.015 -0.35) (1.45 0.015 -0.25)
3 (1.45 0.015 -0.35) (1.45 0.015 -0.45)
4 (1.45 0.015 -0.35) (1.55 0.015 -0.35)
...

and with a mutiple processors (parallel computing)
...
1 (1.45 0.015 -0.55) (1.45 0.015 -0.45)
2 (1.45 0.015 -0.55) (1.45 0.015 -0.65)
3 (1.45 0.015 -0.55) (1.55 0.015 -0.55)
1 (1.45 0.015 -0.45) (1.45 0.015 -0.35)
2 (1.45 0.015 -0.45) (1.45 0.015 -0.55)
3 (1.45 0.015 -0.45) (1.55 0.015 -0.45)
1 (1.45 0.015 -0.35) (1.45 0.015 -0.25)
2 (1.45 0.015 -0.35) (1.45 0.015 -0.45)
3 (1.45 0.015 -0.35) (1.55 0.015 -0.35)
...


as you can see when x=1.45, number of neighbour cells are different between single and parallel computing. with the single computing, the number of neighbour cells are 4 everywhere. but it is only 3 at some place with the parallel computing. of course, mostly the number of cells are 4 with the parallel computing but not everywhere. I think x=1.45 is where the interface of subdomains is placed (correct me if I am wrong). So I am wondering how to access full neighbour cells EVERYWHERE (including the adjacent to the interface of subdomains) with the parallel computing. I hope that I made myself clear. Any advice will be appreciated.
Regards

Yusik

star shower January 9, 2013 23:35

cellCells and cellPoints can run in parallel
 
I meet similar problems. I find that the cellCells() and cellPoints() function are don't work yet in processor interface. :confused:

ooo May 19, 2014 13:42

Hey guys,
Have you found how to use cellCells in parallel?

Dommy July 11, 2014 05:24

I think it still doesn´t work!

I`m working on a tool which can do essentially the same thing, but faster and in parallel - only for structured grids of course.

I will show it when its ready!


All times are GMT -4. The time now is 21:17.