CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

accessing neighbour cells in parallel computing

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes
  • 2 Post By LG Liang

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 3, 2012, 17:16
Default accessing neighbour cells in parallel computing
  #1
Member
 
Kim Yusik
Join Date: Dec 2009
Posts: 39
Rep Power: 16
impecca is on a distinguished road
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

Last edited by impecca; May 3, 2012 at 17:52.
impecca is offline   Reply With Quote

Old   January 9, 2013, 22:35
Default cellCells and cellPoints can run in parallel
  #2
New Member
 
charlse
Join Date: Mar 2011
Location: china
Posts: 6
Rep Power: 15
star shower is on a distinguished road
I meet similar problems. I find that the cellCells() and cellPoints() function are don't work yet in processor interface.
star shower is offline   Reply With Quote

Old   May 19, 2014, 13:42
Default
  #3
ooo
Member
 
Join Date: Feb 2012
Posts: 49
Rep Power: 14
ooo is on a distinguished road
Hey guys,
Have you found how to use cellCells in parallel?
ooo is offline   Reply With Quote

Old   July 11, 2014, 05:24
Default
  #4
New Member
 
Thomas F.
Join Date: Jun 2013
Location: Graz, Austria
Posts: 14
Rep Power: 12
Dommy is on a distinguished road
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!

Last edited by Dommy; July 11, 2014 at 11:24.
Dommy is offline   Reply With Quote

Old   April 11, 2019, 04:09
Default
  #5
New Member
 
James Lee
Join Date: Jul 2017
Posts: 5
Rep Power: 8
LG Liang is on a distinguished road
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
tonnykz and yueyun like this.
LG Liang is offline   Reply With Quote

Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Netgen] Import netgen mesh to OpenFOAM hsieh OpenFOAM Meshing & Mesh Conversion 32 September 13, 2011 05:50
Accessing neighbour cells!! Thiyagarajandhayalan Siemens 2 March 21, 2008 04:26
Question about ghost cells in parallel processing vishwas Main CFD Forum 3 March 12, 2006 21:46
physical boundary error!! kris Siemens 2 August 3, 2005 00:32
Parallel Computing Classes at San Diego Supercomputer Center Jan. 20-22 Amitava Majumdar Main CFD Forum 0 January 5, 1999 12:00


All times are GMT -4. The time now is 10:06.