| 662 | |
| 663 | |
| 664 | void Foam::polyMesh::resetPrimitives |
| 665 | ( |
| 666 | const Xfer<pointField>& points, |
| 667 | const Xfer<faceList>& faces, |
| 668 | const Xfer<labelList>& owner, |
| 669 | const Xfer<labelList>& neighbour, |
| 670 | const labelList& patchSizes, |
| 671 | const labelList& patchStarts, |
| 672 | const bool validBoundary |
| 673 | ) |
| 674 | { |
| 675 | // Clear addressing. Keep geometric props and updateable props for mapping. |
| 676 | clearAddressing(true); |
| 677 | |
| 678 | // Take over new primitive data. |
| 679 | // Optimized to avoid overwriting data at all |
| 680 | if (notNull(points)) |
| 681 | { |
| 682 | points_.transfer(points()); |
| 683 | bounds_ = boundBox(points_, validBoundary); |
| 684 | } |
| 685 | |
| 686 | if (notNull(faces)) |
| 687 | { |
| 688 | faces_.transfer(faces()); |
| 689 | } |
| 690 | |
| 691 | if (notNull(owner)) |
| 692 | { |
| 693 | owner_.transfer(owner()); |
| 694 | } |
| 695 | |
| 696 | if (notNull(neighbour)) |
| 697 | { |
| 698 | neighbour_.transfer(neighbour()); |
| 699 | } |
| 700 | |
| 701 | |
| 702 | // Reset patch sizes and starts |
| 703 | forAll(boundary_, patchi) |
| 704 | { |
| 705 | boundary_[patchi] = polyPatch |
| 706 | ( |
| 707 | boundary_[patchi], |
| 708 | boundary_, |
| 709 | patchi, |
| 710 | patchSizes[patchi], |
| 711 | patchStarts[patchi] |
| 712 | ); |
| 713 | } |
| 714 | |
| 715 | |
| 716 | // Flags the mesh files as being changed |
| 717 | setInstance(time().timeName()); |
| 718 | |
| 719 | // Check if the faces and cells are valid |
| 720 | forAll(faces_, facei) |
| 721 | { |
nothing calls this directly
no test coverage detected