CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   cellCells() parallel (https://www.cfd-online.com/Forums/openfoam-programming-development/149222-cellcells-parallel.html)

Carlen February 27, 2015 22:24

cellCells() parallel
 
Hi foamers,

I am doing a simulation that requires me to find neighbour cells of certain cells in a domain. cellCells() works fine for serial run but fails to look for all neighbour cells in parallel: it only looks for cells in processor0. I tried to use Pstream but it fails every time when I try to run in parallel. Below is my code.

forAll(mesh_.cellCells()[idCell[a]], b)//Create a list for neighbour cells of idCell
{
labelList pnCell(Pstream::nProcs(),0);
pnCell[Pstream::myProcNo()] = mesh_.cellCells()[idCell[a]][b];
reduce(pnCell, maxOp<labelList>());
forAll(pnCell, c)
{
nCell.resize(c+1);
nCell[c] = pnCell[c];
}
pnCell.clear();
}

and the error message is

[2] --> FOAM FATAL IO ERROR:
[2] error in IOstream "IOstream" for operation operator>>(Istream&, List<T>&) : reading first token
[2]
[2] file: IOstream at line 0.
[2]
[2] From function IOstream::fatalCheck(const char*) const
[2] in file db/IOstreams/IOstreams/IOstream.C at line 114.
[2]
FOAM parallel run exiting
[2]

Anyone has suggestions as to how to solve this problem?

Best regards,
Carlen

T.D. November 16, 2017 05:40

Hi
 
Any answer for this problem ? or not yet


All times are GMT -4. The time now is 19:39.