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