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 |
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:
|
Hey guys,
Have you found how to use cellCells in parallel? |
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! |
Hi,
You can have a look at the source code src/finiteVolume/fvMatrices/solvers/MULES/MULESTempletes.C In the definition of the member function limiter(), there is an algorithm that checks for local max/min of a cell by comparing the values of its neighboring cells. It works in parallel by communicating between patches. Hope it helps. Regards, LG Liang |
All times are GMT -4. The time now is 20:23. |