pointMeshMapper.H
Go to the documentation of this file.
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.
10 
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.
15 
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.
20 
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/>.
23 
24 Class
25  Foam::pointMeshMapper
26 
27 Description
28  Class holds all the necessary information for mapping fields associated
29  with pointMesh.
30 
31 SourceFiles
32  pointMeshMapper.C
33 
34 \*---------------------------------------------------------------------------*/
35 
36 #ifndef pointMeshMapper_H
37 #define pointMeshMapper_H
38 
39 #include "pointMapper.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 // Forward declaration of classes
48 class pointMesh;
49 class mapPolyMesh;
50 
51 /*---------------------------------------------------------------------------*\
52  Class pointMeshMapper Declaration
53 \*---------------------------------------------------------------------------*/
54 
55 class pointMeshMapper
56 {
57  // Private data
58 
59  //- Reference to mesh
60  const pointMesh& mesh_;
61 
62  //- Point mapper
63  pointMapper pointMap_;
64 
65  //- Boundary mapper
66  pointBoundaryMeshMapper boundaryMap_;
67 
68 
69  // Private Member Functions
70 
71  //- Disallow default bitwise copy construct
73 
74  //- Disallow default bitwise assignment
75  void operator=(const pointMeshMapper&);
76 
77 
78 public:
79 
80  // Constructors
81 
82  //- Construct from pointMesh
83  pointMeshMapper(const pointMesh& mesh, const mapPolyMesh& mpm)
84  :
85  mesh_(mesh),
86  pointMap_(mesh, mpm),
87  boundaryMap_(mesh, pointMap_, mpm)
88  {}
89 
90 
91  // Member Functions
92 
93 
94  //- Return reference to mesh fields belong to
95  const pointMesh& mesh() const
96  {
97  return mesh_;
98  }
99 
100  //- Return reference to objectRegistry storing fields. Can be
101  // removed once fields stored on pointMesh.
102  const objectRegistry& thisDb() const
103  {
104  return mesh_();
105  }
106 
107  //- Return point mapper
108  const morphFieldMapper& pointMap() const
109  {
110  return pointMap_;
111  }
112 
113  //- Return boundary mapper
114  const pointBoundaryMeshMapper& boundaryMap() const
115  {
116  return boundaryMap_;
117  }
118 };
119 
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 } // End namespace Foam
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #endif
128 
129 // ************************************************************************* //
const pointBoundaryMeshMapper & boundaryMap() const
Return boundary mapper.
Class holds all the necessary information for mapping fields associated with pointMesh.
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:158
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:48
const morphFieldMapper & pointMap() const
Return point mapper.
Abstract base class to hold the Field mapping for mesh morphs.
Foam::pointBoundaryMeshMapper.
This object provides mapping and fill-in information for point data between the two meshes after the ...
Definition: pointMapper.H:55
Registry of regIOobjects.
const objectRegistry & thisDb() const
Return reference to objectRegistry storing fields. Can be.
Namespace for OpenFOAM.
const pointMesh & mesh() const
Return reference to mesh fields belong to.