ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / OpenFOAM / meshes / pointMesh / pointMesh.C
blob6022f03c39bd51df8ef895c244b4d3e182bd0f61
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
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
19     for more details.
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)
37     // Create a mapper
38     const pointMeshMapper m(*this, mpm);
40     MapGeometricFields<scalar, pointPatchField, pointMeshMapper, pointMesh>(m);
41     MapGeometricFields<vector, pointPatchField, pointMeshMapper, pointMesh>(m);
42     MapGeometricFields
43     <
44         sphericalTensor,
45         pointPatchField,
46         pointMeshMapper,
47         pointMesh
48     >(m);
49     MapGeometricFields<symmTensor, pointPatchField, pointMeshMapper, pointMesh>
50     (m);
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
79     mapFields(mpm);
83 // ************************************************************************* //