1 /*---------------------------------------------------------------------------*\
3 \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
5 \\ / A nd | Copyright (C) 2011 OpenFOAM Foundation
7 -------------------------------------------------------------------------------
9 This file is part of OpenFOAM.
11 OpenFOAM is free software: you can redistribute it and/or modify it
12 under the terms of the GNU General Public License as published by
13 the Free Software Foundation, either version 3 of the License, or
14 (at your option) any later version.
16 OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
17 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
18 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21 You should have received a copy of the GNU General Public License
22 along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
24 \*---------------------------------------------------------------------------*/
26 #include "pointMesh.H"
27 #include "globalMeshData.H"
28 #include "pointMeshMapper.H"
29 #include "pointFields.H"
30 #include "MapGeometricFields.H"
31 #include "MapPointField.H"
33 // * * * * * * * * * * * * * Private Member Functions * * * * * * * * * * * //
35 void Foam::pointMesh::mapFields(const mapPolyMesh& mpm)
38 const pointMeshMapper m(*this, mpm);
40 MapGeometricFields<scalar, pointPatchField, pointMeshMapper, pointMesh>(m);
41 MapGeometricFields<vector, pointPatchField, pointMeshMapper, pointMesh>(m);
49 MapGeometricFields<symmTensor, pointPatchField, pointMeshMapper, pointMesh>
51 MapGeometricFields<tensor, pointPatchField, pointMeshMapper, pointMesh>(m);
55 // * * * * * * * * * * * * * * * * Constructors * * * * * * * * * * * * * * //
57 Foam::pointMesh::pointMesh(const polyMesh& pMesh)
59 MeshObject<polyMesh, pointMesh>(pMesh),
60 GeoMesh<polyMesh>(pMesh),
61 boundary_(*this, pMesh.boundaryMesh())
63 // Calculate the geometry for the patches (transformation tensors etc.)
64 boundary_.calcGeometry();
68 void Foam::pointMesh::movePoints(const pointField& newPoints)
70 boundary_.movePoints(newPoints);
74 void Foam::pointMesh::updateMesh(const mapPolyMesh& mpm)
76 boundary_.updateMesh();
78 // Map all registered point fields
83 // ************************************************************************* //