| 139 | } |
| 140 | |
| 141 | std::vector<int> GetIOSSTransformation(VTKCellType cellType, int npts) |
| 142 | { |
| 143 | std::vector<int> result; |
| 144 | switch (cellType) |
| 145 | { |
| 146 | case VTK_LINE: |
| 147 | case VTK_LAGRANGE_CURVE: |
| 148 | switch (npts) |
| 149 | { |
| 150 | case 2: |
| 151 | case 3: |
| 152 | case 4: |
| 153 | result.resize(npts, 0); |
| 154 | std::iota(result.begin(), result.end(), 1); |
| 155 | break; |
| 156 | default: |
| 157 | vtkLog(WARNING, << "Unsupported number of points for cell - VTK_LINE." |
| 158 | << "Supported: One of 2, 3, 4 " |
| 159 | << "Got: " << npts); |
| 160 | break; |
| 161 | } |
| 162 | break; |
| 163 | case VTK_TRIANGLE: |
| 164 | case VTK_LAGRANGE_TRIANGLE: |
| 165 | switch (npts) |
| 166 | { |
| 167 | case 3: |
| 168 | case 6: |
| 169 | case 10: |
| 170 | result.resize(npts, 0); |
| 171 | std::iota(result.begin(), result.end(), 1); |
| 172 | break; |
| 173 | default: |
| 174 | vtkLog(WARNING, << "Unsupported number of points for cell - VTK_TRIANGLE." |
| 175 | << "Supported: One of 3, 6, 10" |
| 176 | << "Got: " << npts); |
| 177 | break; |
| 178 | } |
| 179 | break; |
| 180 | case VTK_QUAD: |
| 181 | case VTK_LAGRANGE_QUADRILATERAL: |
| 182 | switch (npts) |
| 183 | { |
| 184 | case 4: |
| 185 | case 9: |
| 186 | case 16: |
| 187 | result.resize(npts, 0); |
| 188 | std::iota(result.begin(), result.end(), 1); |
| 189 | break; |
| 190 | default: |
| 191 | vtkLog(WARNING, << "Unsupported number of points for cell - VTK_QUAD." |
| 192 | << "Supported: One of 4, 9, 16 " |
| 193 | << "Got: " << npts); |
| 194 | break; |
| 195 | } |
| 196 | break; |
| 197 | case VTK_TETRA: |
| 198 | case VTK_LAGRANGE_TETRAHEDRON: |
no test coverage detected