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

Function mapFields

src/finiteVolume/fvMesh/fvMesh.C:562–718  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

560
561
562void Foam::fvMesh::mapFields(const mapPolyMesh& meshMap)
563{
564 if (debug)
565 {
566 InfoInFunction
567 << " nOldCells:" << meshMap.nOldCells()
568 << " nCells:" << nCells()
569 << " nOldFaces:" << meshMap.nOldFaces()
570 << " nFaces:" << nFaces()
571 << endl;
572 }
573
574
575 // We require geometric properties valid for the old mesh
576 if
577 (
578 meshMap.cellMap().size() != nCells()
579 || meshMap.faceMap().size() != nFaces()
580 )
581 {
582 FatalErrorInFunction
583 << "mapPolyMesh does not correspond to the old mesh."
584 << " nCells:" << nCells()
585 << " cellMap:" << meshMap.cellMap().size()
586 << " nOldCells:" << meshMap.nOldCells()
587 << " nFaces:" << nFaces()
588 << " faceMap:" << meshMap.faceMap().size()
589 << " nOldFaces:" << meshMap.nOldFaces()
590 << exit(FatalError);
591 }
592
593 // Create a mapper
594 const fvMeshMapper mapper(*this, meshMap);
595
596 // Map all the volFields in the objectRegistry
597 MapGeometricFields<scalar, fvPatchField, fvMeshMapper, volMesh>
598 (mapper);
599 MapGeometricFields<vector, fvPatchField, fvMeshMapper, volMesh>
600 (mapper);
601 MapGeometricFields<sphericalTensor, fvPatchField, fvMeshMapper, volMesh>
602 (mapper);
603 MapGeometricFields<symmTensor, fvPatchField, fvMeshMapper, volMesh>
604 (mapper);
605 MapGeometricFields<tensor, fvPatchField, fvMeshMapper, volMesh>
606 (mapper);
607
608 // Map all the surfaceFields in the objectRegistry
609 MapGeometricFields<scalar, fvsPatchField, fvMeshMapper, surfaceMesh>
610 (mapper);
611 MapGeometricFields<vector, fvsPatchField, fvMeshMapper, surfaceMesh>
612 (mapper);
613 MapGeometricFields<symmTensor, fvsPatchField, fvMeshMapper, surfaceMesh>
614 (mapper);
615 MapGeometricFields<symmTensor, fvsPatchField, fvMeshMapper, surfaceMesh>
616 (mapper);
617 MapGeometricFields<tensor, fvsPatchField, fvMeshMapper, surfaceMesh>
618 (mapper);
619

Callers 1

updateMeshFunction · 0.70

Calls 7

mapCloudsFunction · 0.85
exitFunction · 0.50
forAllFunction · 0.50
nOldCellsMethod · 0.45
nOldFacesMethod · 0.45
sizeMethod · 0.45
setSizeMethod · 0.45

Tested by

no test coverage detected