USERD_get_maxsize_info.H
Go to the documentation of this file.00001 int USERD_get_maxsize_info
00002 (
00003 int *max_number_of_nodes,
00004 int *max_number_of_elements[Z_MAXTYPE],
00005 int *max_ijk_dimensions[3]
00006 )
00007 {
00008 return Z_ERR;
00009
00010 #ifdef ENSIGHTDEBUG
00011 Info << "Entering: USERD_get_maxsize_info" << endl;
00012 #endif
00013
00014 label maxNPoints = 0;
00015 label maxNParcels = 0;
00016
00017 label nPen06Max = 0;
00018 label nHex08Max = 0;
00019 label nPyr05Max = 0;
00020 label nTet04Max = 0;
00021
00022 Info<< "Checking all time steps for EnSight memory allocation purpose. This can take some time." << endl;
00023
00024 for (label timeI=1; timeI < timeDirs.size(); ++timeI)
00025 {
00026
00027 label nPen06 = 0;
00028 label nHex08 = 0;
00029 label nPyr05 = 0;
00030 label nTet04 = 0;
00031
00032 runTimePtr->setTime(timeDirs[timeI], timeI);
00033
00034 Info<< "Checking time = " << runTimePtr->timeName() << endl;
00035
00036 const cellShapeList& cells = meshPtr->cellShapes();
00037
00038 const label nPoints = meshPtr->nPoints();
00039 const label nCells = cells.size();
00040
00041 maxNPoints = max(maxNPoints, nPoints);
00042
00043 for (label n=0; n<nCells;n++)
00044 {
00045 label nFaces = cells[n].nFaces();
00046 const labelList& points = cells[n];
00047
00048 if ((nFaces == 6) && (points.size() == 8))
00049 {
00050 nHex08++;
00051 }
00052 else if ((nFaces == 5) && (points.size() == 6))
00053 {
00054 nPen06++;
00055 }
00056 else if ((nFaces == 5) && (points.size() == 5))
00057 {
00058 nPyr05++;
00059 }
00060 else if ((nFaces == 4) && (points.size() == 4))
00061 {
00062 nTet04++;
00063 }
00064 }
00065
00066 nPen06Max = max(nPen06Max, nPen06);
00067 nHex08Max = max(nHex08Max, nHex08);
00068 nPyr05Max = max(nPyr05Max, nPyr05);
00069 nTet04Max = max(nTet04Max, nTet04);
00070
00071 if (Numparts_available > 1)
00072 {
00073
00074
00075 Cloud<passiveParticle> lagrangian(*meshPtr);
00076
00077 if (lagrangian.size() > nMaxParcels)
00078 {
00079 nMaxParcels = lagrangian.size();
00080 }
00081 }
00082 }
00083
00084 max_number_of_nodes[0] = maxNPoints;
00085 max_number_of_elements[0][Z_HEX08] = nHex08Max;
00086 max_number_of_elements[0][Z_PEN06] = nPen06Max;
00087 max_number_of_elements[0][Z_PYR05] = nPyr05Max;
00088 max_number_of_elements[0][Z_TET04] = nTet04Max;
00089
00090 if (Numparts_available > 1)
00091 {
00092 max_number_of_nodes[1] = maxNParcels;
00093 max_number_of_elements[1][Z_POINT] = maxNParcels;
00094 }
00095
00096 #ifdef ENSIGHTDEBUG
00097 Info<< "Leaving: USERD_get_maxsize_info" << endl;
00098 #endif
00099
00100 return Z_OK;
00101 }
Copyright © 2000-2009 OpenCFD Ltd