interRegionOption.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-2015 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::fv::interRegionOption
26 
27 Description
28  Base class for inter-region exchange.
29 
30 \*---------------------------------------------------------------------------*/
31 
32 #ifndef interRegionOption_H
33 #define interRegionOption_H
34 
35 #include "fvOption.H"
36 #include "volFields.H"
37 #include "autoPtr.H"
38 #include "meshToMesh.H"
39 
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 namespace fv
46 {
47 
48 /*---------------------------------------------------------------------------*\
49  Class interRegionOption Declaration
50 \*---------------------------------------------------------------------------*/
51 
53 :
54  public option
55 {
56 protected:
57 
58  // Protected data
59 
60  //- Master or slave region
61  bool master_;
62 
63  //- Name of the neighbour region to map
65 
66  //- Mesh to mesh interpolation object
68 
69 
70  // Protected member functions
71 
72  //- Set the mesh to mesh interpolation object
73  void setMapper();
74 
75 
76 public:
77 
78  //- Runtime type information
79  TypeName("interRegionOption");
80 
81 
82  // Constructors
83 
84  //- Construct from dictionary
86  (
87  const word& name,
88  const word& modelType,
89  const dictionary& dict,
90  const fvMesh& mesh
91  );
92 
93 
94  //- Destructor
95  virtual ~interRegionOption();
96 
97 
98  // Member Functions
99 
100  // Access
101 
102  //- Return const access to the neighbour region name
103  inline const word& nbrRegionName() const;
104 
105  //- Return const access to the mapToMap pointer
106  inline const meshToMesh& meshInterp() const;
107 
108 
109  // IO
110 
111  //- Read dictionary
112  virtual bool read(const dictionary& dict);
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 } // End namespace fv
119 } // End namespace Foam
120 
121 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
122 
123 #include "interRegionOptionI.H"
124 
125 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
126 
127 #endif
128 
129 // ************************************************************************* //
const fvMesh & mesh() const
Return const access to the mesh database.
Definition: fvOptionI.H:34
Finite volume options abtract base class. Provides a base set of controls, e.g.
Definition: fvOption.H:65
Mesh data needed to do the Finite Volume discretisation.
Definition: fvMesh.H:78
autoPtr< meshToMesh > meshInterpPtr_
Mesh to mesh interpolation object.
virtual bool read(const dictionary &dict)
Read dictionary.
interRegionOption(const word &name, const word &modelType, const dictionary &dict, const fvMesh &mesh)
Construct from dictionary.
const word & name() const
Return const access to the source name.
Definition: fvOptionI.H:28
A class for handling words, derived from string.
Definition: word.H:59
A list of keyword definitions, which are a keyword followed by any number of values (e...
Definition: dictionary.H:137
Namespace for OpenFOAM.
const meshToMesh & meshInterp() const
Return const access to the mapToMap pointer.
Base class for inter-region exchange.
dictionary dict
TypeName("interRegionOption")
Runtime type information.
virtual ~interRegionOption()
Destructor.
bool master_
Master or slave region.
word nbrRegionName_
Name of the neighbour region to map.
const word & nbrRegionName() const
Return const access to the neighbour region name.
labelList fv(nPoints)
void setMapper()
Set the mesh to mesh interpolation object.
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Class to calculate the cell-addressing between two overlapping meshes.
Definition: meshToMesh.H:60