| 321 | |
| 322 | |
| 323 | void Foam::fvMeshTools::reorderPatches |
| 324 | ( |
| 325 | fvMesh& mesh, |
| 326 | const labelList& oldToNew, |
| 327 | const label nNewPatches, |
| 328 | const bool validBoundary |
| 329 | ) |
| 330 | { |
| 331 | polyBoundaryMesh& polyPatches = |
| 332 | const_cast<polyBoundaryMesh&>(mesh.boundaryMesh()); |
| 333 | fvBoundaryMesh& fvPatches = const_cast<fvBoundaryMesh&>(mesh.boundary()); |
| 334 | |
| 335 | // Shuffle into place |
| 336 | polyPatches.reorder(oldToNew, validBoundary); |
| 337 | fvPatches.reorder(oldToNew); |
| 338 | |
| 339 | reorderPatchFields<volScalarField>(mesh, oldToNew); |
| 340 | reorderPatchFields<volVectorField>(mesh, oldToNew); |
| 341 | reorderPatchFields<volSphericalTensorField>(mesh, oldToNew); |
| 342 | reorderPatchFields<volSymmTensorField>(mesh, oldToNew); |
| 343 | reorderPatchFields<volTensorField>(mesh, oldToNew); |
| 344 | reorderPatchFields<surfaceScalarField>(mesh, oldToNew); |
| 345 | reorderPatchFields<surfaceVectorField>(mesh, oldToNew); |
| 346 | reorderPatchFields<surfaceSphericalTensorField>(mesh, oldToNew); |
| 347 | reorderPatchFields<surfaceSymmTensorField>(mesh, oldToNew); |
| 348 | reorderPatchFields<surfaceTensorField>(mesh, oldToNew); |
| 349 | |
| 350 | // Remove last. |
| 351 | trimPatches(mesh, nNewPatches); |
| 352 | } |
| 353 | |
| 354 | |
| 355 | // ************************************************************************* // |
no test coverage detected