| 107 | } |
| 108 | |
| 109 | MatrixIr CellPartition::get_cell_faces(const size_t cell_id) const { |
| 110 | const size_t num_faces = m_faces.rows(); |
| 111 | std::vector<VectorI> cell_faces; |
| 112 | for (size_t i=0; i<num_faces; i++) { |
| 113 | const size_t patch_id = m_patches[i]; |
| 114 | if (m_cells(patch_id,0) == cell_id) { |
| 115 | cell_faces.push_back(m_faces.row(i).reverse()); |
| 116 | } else if (m_cells(patch_id,1) == cell_id) { |
| 117 | cell_faces.push_back(m_faces.row(i)); |
| 118 | } |
| 119 | } |
| 120 | MatrixIr faces = MatrixUtils::rowstack(cell_faces); |
| 121 | return faces; |
| 122 | } |
| 123 | |
| 124 | size_t CellPartition::get_num_patches() const { |
| 125 | if (m_patches.size() > 0) return m_patches.maxCoeff(); |
no outgoing calls
no test coverage detected