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

Parallelization of looping through all faces

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 19, 2020, 21:00
Default Parallelization of looping through all faces
  #1
New Member
 
siavash
Join Date: Jul 2019
Location: Indiana, US
Posts: 11
Rep Power: 7
szamani is on a distinguished road
Hi,
I have the following code:
surfaceScalarField interfacialSurface(fvc::interpolate(alpha1));
const labelUList& owner = mesh.owner();
const labelUList& neighbour = mesh.neighbour();

Quote:
forAll(owner, facei)
{
const label own = owner[facei];
const label nbr = neighbour[facei];

if((alpha1.ref()[own] - 0.5)*(alpha1.ref()[nbr]-0.5) < 0.0){
interfacialSurface[facei]=1.0;
}
else{
interfacialSurface[facei]=0.0;
}



}

when I run the code in parallel, the shared faces between patches are not included in the loop above. I believe I need to write another for loop to include shared faces between patches.
My problem is that the owner and neighbours are not necessarily from the same patch, so how could I make the patches communicate the data between each other?
I appreciate any help
szamani is offline   Reply With Quote

Reply

Tags
openfoam, parallel code, surfacescalarfield

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Foam::error::PrintStack almir OpenFOAM Running, Solving & CFD 92 May 21, 2024 07:56
Decomposing meshes Tobi OpenFOAM Pre-Processing 22 February 24, 2023 09:23
GenerateVolumeMesh Error - Surface Wrapper Self Interacting (?) AndreP STAR-CCM+ 10 August 2, 2018 07:48
[snappyHexMesh] sHM layer process keeps getting killed MBttR OpenFOAM Meshing & Mesh Conversion 4 August 15, 2016 03:21
snappyhexmesh remove blockmesh geometry philipp1 OpenFOAM Running, Solving & CFD 2 December 12, 2014 10:58


All times are GMT -4. The time now is 03:58.