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/)
-   -   converting cellCells to properly using globalCellCells (https://www.cfd-online.com/Forums/openfoam-programming-development/174497-converting-cellcells-properly-using-globalcellcells.html)

D.R. July 13, 2016 11:44

converting cellCells to properly using globalCellCells
 
Hello All,
I have a code that works in serial which is looking for neighboring cells of a given cell.



Code:

const fvMesh& mesh_ = alpha1.mesh();
forAll (alpha1, celli) {
              // labelListList& neigh_cells = mesh_.globalCellCells(celli);
                labelListList& neigh_cells = mesh_.cellCells(celli);
                std::set<label> all_neigh_cells;
                for (int i = 0; i < neigh_cells.size(); ++i)
                        all_neigh_cells.insert(neigh_cells[i]);
}




I am currently trying to rewrite my serial code in parallel, and to do so, i must switch from using the
Code:

cellCells
functionality to
Code:

globalCellCells
as is noted in the source code for cellCells.

http://cpp.openfoam.org/v3/a09054_source

However,
I have not been able to compile, as the code is telling me that
Code:

error: ‘const class Foam::fvMesh’ has no member named ‘globalCellCells’
I am wondering how to use globalCellCells for the same purpose


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