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