MCPcopy Create free account
hub / github.com/OpenFOAM/OpenFOAM-dev / resetPrimitives

Function resetPrimitives

src/OpenFOAM/meshes/polyMesh/polyMesh.C:664–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

662
663
664void 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 {

Callers

nothing calls this directly

Calls 15

pointsFunction · 0.85
minFunction · 0.85
maxFunction · 0.85
initMeshFunction · 0.85
returnReduceFunction · 0.85
clearAddressingFunction · 0.70
setInstanceFunction · 0.70
boundBoxClass · 0.50
forAllFunction · 0.50
polyPatchClass · 0.50
abortFunction · 0.50
transferMethod · 0.45

Tested by

no test coverage detected