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/)
-   -   procMesh.write() in decomposePar (https://www.cfd-online.com/Forums/openfoam-programming-development/137163-procmesh-write-decomposepar.html)

kmou June 11, 2014 06:29

procMesh.write() in decomposePar
 
Hello everyone,

Does anyone know where I could find the function write()? I know there are a few versions of it, if I understood correctly, I need the one that is used as part of the decomposition of the domain for parallel computing.

procMesh.write() is called inside the file domainDecomposition.C

I am looking for it because I need to see where the /processor*/constant/polyMesh/ owner and neighbour files are created. Mines are getting messed up with a lot of "-1" so I would like to understand how these files are being created, as I cannot see for now any errors in the lists created before the procMesh is written out.

Thank you very much for any help.

Bernhard June 12, 2014 05:30

procMesh is of type polyMesh, so you should look at it's write() member function. So, that one you can find here: http://foam.sourceforge.net/docs/cpp...cd904755791076

Are you sure the -1's are not a feature?

kmou June 12, 2014 09:05

Hi Bernhard,
Thanks for your quick response.
My decomposition crashes with the following error:

Code:

--> FOAM FATAL ERROR:
Illegal cell label -1 in neighbour addressing for face 15

    From function polyMesh::initMesh()
    in file meshes/polyMesh/polyMeshInitMesh.C at line 65.

This checking on owner and neighbour labels occurs within the writeDecomposition() function, before field transfer occurs.

polyMeshInitMesh.C seem to imply that neighbour[facei] and owner_[facei] cannot be less than 0:



Code:

    label nCells = -1;

    forAll(owner_, facei)
    {
        if (owner_[facei] < 0)
        {
            FatalErrorIn("polyMesh::initMesh()")
                << "Illegal cell label " << owner_[facei]
                << " in neighbour addressing for face " << facei
                << exit(FatalError);
        }
        nCells = max(nCells, owner_[facei]);
    }
    // The neighbour array may or may not be the same length as the owner
    forAll(neighbour_, facei)
    {
        if (neighbour_[facei] < 0)
        {
            FatalErrorIn("polyMesh::initMesh()")
                << "Illegal cell label " << neighbour_[facei]
                << " in neighbour addressing for face " << facei
                << exit(FatalError);
        }
        nCells = max(nCells, neighbour_[facei]);
    }

    nCells++;



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