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

Function updateMesh

src/finiteVolume/fvMesh/fvMesh.C:800–856  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

798
799
800void Foam::fvMesh::updateMesh(const mapPolyMesh& mpm)
801{
802 // Update polyMesh. This needs to keep volume existent!
803 polyMesh::updateMesh(mpm);
804
805 if (VPtr_)
806 {
807 // Grab old time volumes if the time has been incremented
808 // This will update V0, V00
809 storeOldVol(mpm.oldCellVolumes());
810
811 // Few checks
812 if (VPtr_ && (V().size() != mpm.nOldCells()))
813 {
814 FatalErrorInFunction
815 << "V:" << V().size()
816 << " not equal to the number of old cells "
817 << mpm.nOldCells()
818 << exit(FatalError);
819 }
820 if (V0Ptr_ && (V0Ptr_->size() != mpm.nOldCells()))
821 {
822 FatalErrorInFunction
823 << "V0:" << V0Ptr_->size()
824 << " not equal to the number of old cells "
825 << mpm.nOldCells()
826 << exit(FatalError);
827 }
828 if (V00Ptr_ && (V00Ptr_->size() != mpm.nOldCells()))
829 {
830 FatalErrorInFunction
831 << "V0:" << V00Ptr_->size()
832 << " not equal to the number of old cells "
833 << mpm.nOldCells()
834 << exit(FatalError);
835 }
836 }
837
838
839 // Clear mesh motion flux (note: could instead save & map like volumes)
840 deleteDemandDrivenData(phiPtr_);
841
842 // Clear the sliced fields
843 clearGeomNotOldVol();
844
845 // Map all fields
846 mapFields(mpm);
847
848 // Clear the current volume and other geometry factors
849 surfaceInterpolation::clearOut();
850
851 // Clear any non-updateable addressing
852 clearAddressing(true);
853
854 meshObject::updateMesh<fvMesh>(*this, mpm);
855 meshObject::updateMesh<lduMesh>(*this, mpm);
856}
857

Callers

nothing calls this directly

Calls 9

storeOldVolFunction · 0.85
deleteDemandDrivenDataFunction · 0.85
clearGeomNotOldVolFunction · 0.85
mapFieldsFunction · 0.70
clearOutFunction · 0.70
clearAddressingFunction · 0.70
exitFunction · 0.50
sizeMethod · 0.45
nOldCellsMethod · 0.45

Tested by

no test coverage detected