| 234 | |
| 235 | |
| 236 | void Foam::particle::changeTet(const label tetTriI) |
| 237 | { |
| 238 | const bool isOwner = mesh_.faceOwner()[tetFacei_] == celli_; |
| 239 | |
| 240 | const label firstTetPtI = 1; |
| 241 | const label lastTetPtI = mesh_.faces()[tetFacei_].size() - 2; |
| 242 | |
| 243 | if (tetTriI == 1) |
| 244 | { |
| 245 | changeFace(tetTriI); |
| 246 | } |
| 247 | else if (tetTriI == 2) |
| 248 | { |
| 249 | if (isOwner) |
| 250 | { |
| 251 | if (tetPti_ == lastTetPtI) |
| 252 | { |
| 253 | changeFace(tetTriI); |
| 254 | } |
| 255 | else |
| 256 | { |
| 257 | reflect(); |
| 258 | tetPti_ += 1; |
| 259 | } |
| 260 | } |
| 261 | else |
| 262 | { |
| 263 | if (tetPti_ == firstTetPtI) |
| 264 | { |
| 265 | changeFace(tetTriI); |
| 266 | } |
| 267 | else |
| 268 | { |
| 269 | reflect(); |
| 270 | tetPti_ -= 1; |
| 271 | } |
| 272 | } |
| 273 | } |
| 274 | else if (tetTriI == 3) |
| 275 | { |
| 276 | if (isOwner) |
| 277 | { |
| 278 | if (tetPti_ == firstTetPtI) |
| 279 | { |
| 280 | changeFace(tetTriI); |
| 281 | } |
| 282 | else |
| 283 | { |
| 284 | reflect(); |
| 285 | tetPti_ -= 1; |
| 286 | } |
| 287 | } |
| 288 | else |
| 289 | { |
| 290 | if (tetPti_ == lastTetPtI) |
| 291 | { |
| 292 | changeFace(tetTriI); |
| 293 | } |
no test coverage detected