#include <orthofaceaccessorwithholes.h>
Public Member Functions | |
OrthoFaceAccessorWithHoles (const OrthoMesh &mesh, unsigned rawIndex) | |
OrthoFaceAccessorWithHoles (const OrthoCellAccessorWithHoles &cell, FaceDirection3D dir) | |
OrthoFaceAccessorWithHoles (const OrthoFaceAccessor &face) | |
OrthoFaceAccessorWithHoles () | |
~OrthoFaceAccessorWithHoles () | |
bool | at_boundary () |
void | getAdjCellIndices (unsigned &index1, unsigned &index2) const |
void | ghostAdjCellIndices (unsigned &index1, unsigned &index2) |
void | getValidCellIndices (unsigned &index1, unsigned &index2) |
void | operator++ (int) |
unsigned | index () const |
unsigned | raw_index () const |
bool | hasPosCell () |
bool | hasNegCell () |
unsigned | getNegCell () |
unsigned | getPosCell () |
Private Member Functions | |
void | updateAdjCells () const |
Private Attributes | |
unsigned | m_newIndex |
DelIndexLst::Iterator | m_delFace |
DelIndexLst::Iterator | m_delCell |
DelIndexLst::Iterator | m_delVert |
unsigned | m_cell1 |
unsigned | m_cell2 |
bool | m_bComputedAdjCells |
Definition at line 8 of file orthofaceaccessorwithholes.h.
OrthoFaceAccessorWithHoles::OrthoFaceAccessorWithHoles | ( | const OrthoMesh & | mesh, | |
unsigned | rawIndex | |||
) |
Definition at line 4 of file orthofaceaccessorwithholes.cpp.
00005 :OrthoFaceAccessor(mesh,rawIndex) 00006 { 00007 m_delFace = mesh._delFaceLst.begin(); 00008 m_newIndex = mesh._delFaceLst.adjust(rawIndex,m_delFace); 00009 m_delFace= mesh._delFaceLst.findLUEntry(rawIndex); 00010 00011 m_delCell=mesh._delCellLst.begin(); 00012 m_delVert=mesh._delVertLst.begin(); 00013 m_bComputedAdjCells=false; 00014 }
OrthoFaceAccessorWithHoles::OrthoFaceAccessorWithHoles | ( | const OrthoCellAccessorWithHoles & | cell, | |
FaceDirection3D | dir | |||
) |
Definition at line 16 of file orthofaceaccessorwithholes.cpp.
00017 :OrthoFaceAccessor(cell,dir) 00018 { 00019 const OrthoMesh &mesh = cell.getMesh(); 00020 m_delFace = mesh._delFaceLst.begin(); 00021 m_newIndex = mesh._delFaceLst.adjust(m_index,m_delFace); 00022 m_delFace= mesh._delFaceLst.findLUEntry(m_index); 00023 00024 m_delCell=mesh._delCellLst.begin(); 00025 m_delVert=mesh._delVertLst.begin(); 00026 m_bComputedAdjCells=false; 00027 }
OrthoFaceAccessorWithHoles::OrthoFaceAccessorWithHoles | ( | const OrthoFaceAccessor & | face | ) |
Definition at line 31 of file orthofaceaccessorwithholes.cpp.
00032 { 00033 *this=face; 00034 const OrthoMesh &mesh=face.getMesh(); 00035 m_delFace = mesh._delFaceLst.begin(); 00036 m_newIndex = mesh._delFaceLst.adjust(m_index,m_delFace); 00037 m_delFace= mesh._delFaceLst.findLUEntry(m_index); 00038 00039 m_delCell=mesh._delCellLst.begin(); 00040 m_delVert=mesh._delVertLst.begin(); 00041 m_bComputedAdjCells=false; 00042 00043 }
OrthoFaceAccessorWithHoles::OrthoFaceAccessorWithHoles | ( | ) |
Definition at line 45 of file orthofaceaccessorwithholes.cpp.
00046 { 00047 m_bComputedAdjCells=false; 00048 00049 00050 }
OrthoFaceAccessorWithHoles::~OrthoFaceAccessorWithHoles | ( | ) | [inline] |
Definition at line 25 of file orthofaceaccessorwithholes.h.
bool OrthoFaceAccessorWithHoles::at_boundary | ( | ) |
Reimplemented from OrthoFaceAccessor.
Definition at line 98 of file orthofaceaccessorwithholes.cpp.
00099 { 00100 assert(isValid()); 00101 updateAdjCells(); 00102 return (m_cell1 == OrthoMesh::INVALID_INDEX || 00103 m_cell2 == OrthoMesh::INVALID_INDEX); 00104 }
void OrthoFaceAccessorWithHoles::getAdjCellIndices | ( | unsigned & | index1, | |
unsigned & | index2 | |||
) | const |
Reimplemented from OrthoFaceAccessor.
Definition at line 78 of file orthofaceaccessorwithholes.cpp.
00079 { 00080 assert(isValid()); 00081 updateAdjCells(); 00082 index1=m_cell1; 00083 index2=m_cell2; 00084 }
unsigned OrthoFaceAccessorWithHoles::getNegCell | ( | ) |
Definition at line 143 of file orthofaceaccessorwithholes.cpp.
00144 { 00145 updateAdjCells(); 00146 return m_cell2; 00147 }
unsigned OrthoFaceAccessorWithHoles::getPosCell | ( | ) |
Definition at line 149 of file orthofaceaccessorwithholes.cpp.
00150 { 00151 updateAdjCells(); 00152 return m_cell1; 00153 }
void OrthoFaceAccessorWithHoles::getValidCellIndices | ( | unsigned & | index1, | |
unsigned & | index2 | |||
) |
Definition at line 86 of file orthofaceaccessorwithholes.cpp.
00087 { 00088 assert(isValid()); 00089 updateAdjCells(); 00090 index1=m_cell1; 00091 index2=m_cell2; 00092 if (index1 == OrthoMesh::INVALID_INDEX) 00093 index1=index2; 00094 if (index2 == OrthoMesh::INVALID_INDEX) 00095 index2=index1; 00096 }
void OrthoFaceAccessorWithHoles::ghostAdjCellIndices | ( | unsigned & | index1, | |
unsigned & | index2 | |||
) |
Reimplemented from OrthoFaceAccessor.
Definition at line 156 of file orthofaceaccessorwithholes.cpp.
00157 { 00158 assert(this->isValid()); 00159 00160 if (m_normal == OrthoMesh::NORMAL_X) 00161 { 00162 if (m_i == m_mesh->_nElemX) 00163 { 00164 index2 = m_mesh->_HGhostRightOff + m_j + m_k*m_mesh->_nElemY; 00165 index1 = m_index - m_j - m_k*m_mesh->_nElemY -1; 00166 } 00167 else if (m_i == 0) 00168 { 00169 index1 = m_mesh->_HGhostLeftOff + m_j + m_k*m_mesh->_nElemY; 00170 index2 = m_index - m_j - m_k*m_mesh->_nElemY; 00171 } 00172 else 00173 { 00174 index2 = m_index - m_j - m_k*m_mesh->_nElemY; 00175 index1 = index2 -1; 00176 00177 00178 00179 index1=m_mesh->_delCellLst.convertGhost(index1,m_delCell,m_mesh->_HGhostWellOff); 00180 index2=m_mesh->_delCellLst.convertGhost(index2,m_delCell,m_mesh->_HGhostWellOff); 00181 00182 } 00183 } 00184 if (m_normal == OrthoMesh::NORMAL_Y) 00185 { 00186 unsigned setIndex = m_index - m_mesh->_fyOff; 00187 00188 if (m_j == 0) 00189 { 00190 index2 = setIndex - m_k*m_mesh->_nElemX; 00191 index1 = m_mesh->_HGhostFrontOff + m_i + m_k*m_mesh->_nElemX; 00192 } 00193 else if (m_j == m_mesh->_nElemY) 00194 { 00195 index1 = setIndex - (m_k+1)*m_mesh->_nElemX; 00196 index2 = m_mesh->_HGhostBackOff + m_i + m_k*m_mesh->_nElemX; 00197 } 00198 else 00199 { 00200 index2 = setIndex - m_k*m_mesh->_nElemX; 00201 index1 = index2 - m_mesh->_nElemX; 00202 00203 index1=m_mesh->_delCellLst.convertGhost(index1,m_delCell,m_mesh->_HGhostWellOff); 00204 index2=m_mesh->_delCellLst.convertGhost(index2,m_delCell,m_mesh->_HGhostWellOff); 00205 00206 } 00207 } 00208 if (m_normal == OrthoMesh::NORMAL_Z) 00209 { 00210 unsigned setIndex = m_index - m_mesh->_fzOff; 00211 00212 if (m_k == 0) 00213 { 00214 index2 = setIndex; 00215 index1 = m_mesh->_HGhostBottomOff + m_i + m_j*m_mesh->_nElemX; 00216 } 00217 else if (m_k == m_mesh->_nElemZ) 00218 { 00219 index2 = m_mesh->_HGhostUpOff + m_i + m_j*m_mesh->_nElemX; 00220 index1 = setIndex - m_mesh->_ZStride; 00221 } 00222 else 00223 { 00224 index2 = setIndex; 00225 index1 = index2 - m_mesh->_ZStride; 00226 00227 index1=m_mesh->_delCellLst.convertGhost(index1,m_delCell,m_mesh->_HGhostWellOff); 00228 index2=m_mesh->_delCellLst.convertGhost(index2,m_delCell,m_mesh->_HGhostWellOff); 00229 00230 } 00231 } 00232 00233 }
bool OrthoFaceAccessorWithHoles::hasNegCell | ( | ) |
Definition at line 137 of file orthofaceaccessorwithholes.cpp.
00138 { 00139 updateAdjCells(); 00140 return m_cell1 != OrthoMesh::INVALID_INDEX; 00141 }
bool OrthoFaceAccessorWithHoles::hasPosCell | ( | ) |
Definition at line 130 of file orthofaceaccessorwithholes.cpp.
00131 { 00132 updateAdjCells(); 00133 return m_cell2 != OrthoMesh::INVALID_INDEX; 00134 }
unsigned OrthoFaceAccessorWithHoles::index | ( | ) | const [inline] |
Reimplemented from OrthoFaceAccessor.
Definition at line 31 of file orthofaceaccessorwithholes.h.
00031 {return m_newIndex;}
void OrthoFaceAccessorWithHoles::operator++ | ( | int | ) |
Reimplemented from OrthoFaceAccessor.
Definition at line 107 of file orthofaceaccessorwithholes.cpp.
00108 { 00109 assert(isValid()); 00110 m_bComputedAdjCells=false; 00111 OrthoFaceAccessor &rawFace = *this; 00112 assert(rawFace.index() < m_delFace->index()); 00113 rawFace++; 00114 if (rawFace.index() < m_delFace->index()) 00115 { 00116 m_newIndex = m_delFace->adjust(rawFace.index()); 00117 return; 00118 } 00119 else 00120 { 00121 do { 00122 rawFace++; 00123 m_delFace++; 00124 } while(rawFace.index() == m_delFace->index()); 00125 m_newIndex = m_delFace->adjust(rawFace.index()); 00126 } 00127 }
unsigned OrthoFaceAccessorWithHoles::raw_index | ( | ) | const [inline] |
Definition at line 32 of file orthofaceaccessorwithholes.h.
00032 {return m_index;}
void OrthoFaceAccessorWithHoles::updateAdjCells | ( | ) | const [private] |
Private function used to compute the values of the attributes m_cell1,m_cell2. This attributes have the indices of the adjacent cells of the face
Definition at line 56 of file orthofaceaccessorwithholes.cpp.
00057 { 00058 if (m_bComputedAdjCells) 00059 { 00060 return; 00061 } 00062 else //need to find the adj cells' indices 00063 { 00064 OrthoFaceAccessor::getAdjCellIndices(m_cell1,m_cell2); 00065 if (m_cell1 != OrthoMesh::INVALID_INDEX) 00066 { 00067 m_cell1 = m_mesh->_delCellLst.convert(m_cell1,m_delCell); 00068 } 00069 if (m_cell2 != OrthoMesh::INVALID_INDEX) 00070 { 00071 m_cell2 = m_mesh->_delCellLst.convert(m_cell2,m_delCell); 00072 } 00073 m_bComputedAdjCells=true; 00074 } 00075 }
bool OrthoFaceAccessorWithHoles::m_bComputedAdjCells [mutable, private] |
Definition at line 14 of file orthofaceaccessorwithholes.h.
unsigned OrthoFaceAccessorWithHoles::m_cell1 [mutable, private] |
Definition at line 13 of file orthofaceaccessorwithholes.h.
unsigned OrthoFaceAccessorWithHoles::m_cell2 [mutable, private] |
Definition at line 13 of file orthofaceaccessorwithholes.h.
DelIndexLst::Iterator OrthoFaceAccessorWithHoles::m_delCell [mutable, private] |
Definition at line 12 of file orthofaceaccessorwithholes.h.
DelIndexLst::Iterator OrthoFaceAccessorWithHoles::m_delFace [mutable, private] |
Definition at line 12 of file orthofaceaccessorwithholes.h.
DelIndexLst::Iterator OrthoFaceAccessorWithHoles::m_delVert [mutable, private] |
Definition at line 12 of file orthofaceaccessorwithholes.h.
unsigned OrthoFaceAccessorWithHoles::m_newIndex [private] |
Definition at line 11 of file orthofaceaccessorwithholes.h.