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 | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9 -------------------------------------------------------------------------------
10 License
11  This file is part of OpenFOAM.
12 
13  OpenFOAM is free software: you can redistribute it and/or modify it
14  under the terms of the GNU General Public License as published by
15  the Free Software Foundation, either version 3 of the License, or
16  (at your option) any later version.
17 
18  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
19  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
20  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
21  for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
25 
26 Class
27  Foam::pointMeshMapper
28 
29 Description
30  Class holds all the necessary information for mapping fields associated
31  with pointMesh.
32 
33 SourceFiles
34  pointMeshMapper.C
35 
36 \*---------------------------------------------------------------------------*/
37 
38 #ifndef pointMeshMapper_H
39 #define pointMeshMapper_H
40 
41 #include "pointMapper.H"
43 
44 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
45 
46 namespace Foam
47 {
48 
49 // Forward declaration of classes
50 class pointMesh;
51 class mapPolyMesh;
52 
53 /*---------------------------------------------------------------------------*\
54  Class pointMeshMapper Declaration
55 \*---------------------------------------------------------------------------*/
56 
57 class pointMeshMapper
58 {
59  // Private data
60 
61  //- Reference to mesh
62  const pointMesh& mesh_;
63 
64  //- Point mapper
65  pointMapper pointMap_;
66 
67  //- Boundary mapper
68  pointBoundaryMeshMapper boundaryMap_;
69 
70 
71  // Private Member Functions
72 
73  //- No copy construct
74  pointMeshMapper(const pointMeshMapper&) = delete;
75 
76  //- No copy assignment
77  void operator=(const pointMeshMapper&) = delete;
78 
79 
80 public:
81 
82  // Constructors
83 
84  //- Construct from pointMesh
85  pointMeshMapper(const pointMesh& mesh, const mapPolyMesh& mpm)
86  :
87  mesh_(mesh),
88  pointMap_(mesh, mpm),
89  boundaryMap_(mesh, pointMap_, mpm)
90  {}
91 
92 
93  // Member Functions
94 
95 
96  //- Return reference to mesh fields belong to
97  const pointMesh& mesh() const
98  {
99  return mesh_;
100  }
101 
102  //- Return reference to objectRegistry storing fields. Can be
103  // removed once fields stored on pointMesh.
104  const objectRegistry& thisDb() const
105  {
106  return mesh_();
107  }
108 
109  //- Return point mapper
110  const morphFieldMapper& pointMap() const
111  {
112  return pointMap_;
113  }
114 
115  //- Return boundary mapper
116  const pointBoundaryMeshMapper& boundaryMap() const
117  {
118  return boundaryMap_;
119  }
120 };
121 
122 
123 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
124 
125 } // End namespace Foam
126 
127 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
128 
129 #endif
130 
131 // ************************************************************************* //
pointMapper.H
Foam::pointMeshMapper::thisDb
const objectRegistry & thisDb() const
Return reference to objectRegistry storing fields. Can be.
Definition: pointMeshMapper.H:103
Foam::morphFieldMapper
Abstract base class to hold the Field mapping for mesh morphs.
Definition: morphFieldMapper.H:49
Foam::pointMeshMapper::pointMap
const morphFieldMapper & pointMap() const
Return point mapper.
Definition: pointMeshMapper.H:109
Foam::pointMeshMapper::mesh
const pointMesh & mesh() const
Return reference to mesh fields belong to.
Definition: pointMeshMapper.H:96
Foam::objectRegistry
Registry of regIOobjects.
Definition: objectRegistry.H:60
Foam::pointMapper
This object provides mapping and fill-in information for point data between the two meshes after the ...
Definition: pointMapper.H:57
pointBoundaryMeshMapper.H
Foam
Namespace for OpenFOAM.
Definition: atmBoundaryLayer.C:33
Foam::pointMesh
Mesh representing a set of points created from polyMesh.
Definition: pointMesh.H:51
Foam::pointBoundaryMeshMapper
Foam::pointBoundaryMeshMapper.
Definition: pointBoundaryMeshMapper.H:48
Foam::pointMeshMapper
Class holds all the necessary information for mapping fields associated with pointMesh.
Definition: pointMeshMapper.H:56
Foam::pointMeshMapper::pointMeshMapper
pointMeshMapper(const pointMesh &mesh, const mapPolyMesh &mpm)
Construct from pointMesh.
Definition: pointMeshMapper.H:84
Foam::pointMeshMapper::boundaryMap
const pointBoundaryMeshMapper & boundaryMap() const
Return boundary mapper.
Definition: pointMeshMapper.H:115
Foam::mapPolyMesh
Class containing mesh-to-mesh mapping information after a change in polyMesh topology.
Definition: mapPolyMesh.H:161