Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "sammMesh.H"
00030
00031
00032
00033
00034
00035 bool sammMesh::sammEqualFace
00036 (
00037 const face& boundaryFace,
00038 const face& cellFace
00039 ) const
00040 {
00041
00042
00043
00044
00045 label nEqual = 0;
00046
00047 forAll (cellFace, cellFaceLabelI)
00048 {
00049 const label curCellFaceLabel = cellFace[cellFaceLabelI];
00050
00051 forAll (boundaryFace, bouFaceLabelI)
00052 {
00053 if (boundaryFace[bouFaceLabelI] == curCellFaceLabel)
00054 {
00055 nEqual++;
00056
00057 break;
00058 }
00059 }
00060 }
00061
00062 if (nEqual >= 3)
00063 {
00064 return true;
00065 }
00066 else
00067 {
00068 return false;
00069 }
00070 }
00071
00072
00073 void sammMesh::createBoundaryFaces()
00074 {
00075 forAll(boundary_, patchI)
00076 {
00077 faceList& patchFaces = boundary_[patchI];
00078
00079 const labelListList& PointCells = pointCells();
00080
00081 forAll(patchFaces, faceI)
00082 {
00083 bool found = false;
00084
00085 face& curFace = patchFaces[faceI];
00086 const labelList& facePoints = curFace;
00087
00088 forAll(facePoints, pointI)
00089 {
00090 const labelList& facePointCells =
00091 PointCells[facePoints[pointI]];
00092
00093 forAll(facePointCells, cellI)
00094 {
00095 const faceList& curCellFaces =
00096 cellFaces_[facePointCells[cellI]];
00097
00098 forAll(curCellFaces, cellFaceI)
00099 {
00100 if (sammEqualFace(curCellFaces[cellFaceI], curFace))
00101 {
00102
00103 found = true;
00104
00105
00106
00107 curFace = curCellFaces[cellFaceI];
00108 }
00109 if (found) break;
00110 }
00111 if (found) break;
00112 }
00113 if (found) break;
00114 }
00115 if (!found)
00116 {
00117 FatalErrorIn("sammMesh::createBoundaryFaces()")
00118 << "Face " << faceI
00119 << " does not have neighbour cell." << endl
00120 << " face : " << endl << curFace
00121 << abort(FatalError);
00122 }
00123 }
00124 }
00125 }
00126
00127
00128