Merge branch 'master' of ssh://git.code.sf.net/p/foam-extend/foam-extend-3.2
[foam-extend-3.2.git] / applications / utilities / postProcessing / graphics / ensightFoamReader / USERD_get_nsided_conn.H
blob8d46ab5f6f19b3f78c2079c809bb32839f0f9591
2 int USERD_get_nsided_conn
4     int part_number,
5     int *nsided_conn_array
8 #ifdef ENSIGHTDEBUG
9     Info << "Entering: USERD_get_nsided_conn"
10         << ", part_number = " << part_number
11         << endl
12         << flush;
13 #endif
14     if (part_number == 1)
15     {
16         Info << "************* EEEEEEEEERRRRRRRRRRRRRRRRRR *************** " << endl << flush;
18     }
19     else if (part_number < nPatches+2)
20     {
21         //const cellList& cells = meshPtr->cells();
22         //const faceList& faces = meshPtr->faces();
24         label patchi = part_number - 2;
25         const polyBoundaryMesh& bMesh = meshPtr->boundaryMesh();
27         label np = 0;
28         forAll(bMesh[patchi], facei)
29         {
30             label nPoints = bMesh[patchi][facei].size();
31             if ((nPoints != 3) && (nPoints != 4))
32             {
33                 for(label i=0; i<nPoints; i++)
34                 {
35                     nsided_conn_array[np++] = bMesh[patchi][facei][i] + 1;
36                 }
37             }
38         }
39     }
40     else if (part_number == nPatches+2)
41     {
42         return Z_ERR;
43     }
44 #ifdef ENSIGHTDEBUG
45     Info << "Exiting: USERD_get_nsided_conn" << endl
46         << flush;
47 #endif
48     return Z_OK;