OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

USERD_get_nfaced_conn.H

Go to the documentation of this file.
00001 
00002 int USERD_get_nfaced_conn
00003 (
00004     int part_number,
00005     int *nfaced_conn_array
00006 )
00007 {
00008 #ifdef ENSIGHTDEBUG
00009     Info << "Entering: USERD_get_nfaced_conn" 
00010         << ", part_number = " << part_number
00011         << endl 
00012         << flush;
00013 #endif
00014 
00015     if (part_number == 1)
00016     {
00017         label nPoint = 0;
00018         const cellShapeList& cellShapes = meshPtr->cellShapes();
00019         const cellList& cells = meshPtr->cells();
00020         const faceList& faces = meshPtr->faces();
00021         label nCells = cellShapes.size();
00022 
00023         for (label n=0; n<nCells; n++)
00024         {
00025             label nFacesInCell = cells[n].size();
00026             labelList points = cellShapes[n];
00027             if ((nFacesInCell == 6) && (points.size() == 8))
00028             {}
00029             else if ((nFacesInCell == 4) && (points.size() == 4))
00030             {}
00031             else if (nFacesInCell == 5)
00032             {
00033                 if (points.size() == 6)
00034                 {}
00035                 else if (points.size() == 5)
00036                 {}
00037                 else
00038                 {
00039                     for(label i=0; i<nFacesInCell; i++)
00040                     {
00041                         label facei = cells[n][i];
00042                         label nPoints = faces[facei].size();
00043                         for(label j=0; j<nPoints; j++)
00044                         {
00045                             nfaced_conn_array[nPoint++] = faces[facei][j] + 1;
00046                         }
00047                     }
00048                 }
00049             }
00050             else
00051             {
00052                 for(label i=0; i<nFacesInCell; i++)
00053                 {
00054                     label facei = cells[n][i];
00055                     label nPoints = faces[facei].size();
00056                     for(label j=0; j<nPoints; j++)
00057                     {
00058                         nfaced_conn_array[nPoint++] = faces[facei][j] + 1;
00059                     }
00060                 }
00061             }
00062         }
00063         
00064     }
00065     else if (part_number < nPatches+2)
00066     {
00067         
00068     }
00069     else
00070     {
00071         return Z_ERR;
00072     }
00073 
00074 #ifdef ENSIGHTDEBUG
00075     Info << "Exiting: USERD_get_nfaced_conn" << endl 
00076         << flush;
00077 #endif
00078     return Z_OK;
00079 }
Copyright © 2000-2009 OpenCFD Ltd