SidedInterfacialModel.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration | Website: https://openfoam.org
5  \\ / A nd | Copyright (C) 2014-2023 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::SidedInterfacialModel
26 
27 Description
28 
29 SourceFiles
30  SidedInterfacialModel.C
31 
32 \*---------------------------------------------------------------------------*/
33 
34 #ifndef SidedInterfacialModel_H
35 #define SidedInterfacialModel_H
36 
37 #include "phaseInterface.H"
38 
39 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
40 
41 namespace Foam
42 {
43 
44 /*---------------------------------------------------------------------------*\
45  Class SidedInterfacialModel Declaration
46 \*---------------------------------------------------------------------------*/
47 
48 template<class ModelType>
50 :
51  public regIOobject
52 {
53  // Private Data
54 
55  //- The interface
56  const phaseInterface interface_;
57 
58  //- Model for within phase 1
59  autoPtr<ModelType> modelInPhase1_;
60 
61  //- Model for within phase 2
62  autoPtr<ModelType> modelInPhase2_;
63 
64 
65 public:
66 
67  //- Runtime type information
68  TypeName("SidedInterfacialModel");
69 
70 
71  // Constructors
72 
73  //- Construct from a dictionary and an interface
75  (
76  const dictionary& dict,
78  );
79 
80  //- Disallow default bitwise copy construction
82  (
84  ) = delete;
85 
86 
87  //- Destructor
89 
90 
91  // Member Functions
92 
93  //- Access the interface
94  const phaseInterface& interface() const;
95 
96  //- Does a model exist in the given phase?
97  bool haveModelInThe(const phaseModel& phase) const;
98 
99  //- Access the model within the given phase
100  const ModelType& modelInThe(const phaseModel& phase) const;
101 
102  //- Access the model within the given phase
103  ModelType& modelInThe(const phaseModel& phase);
104 
105  //- Dummy write for regIOobject
106  bool writeData(Ostream& os) const;
107 
108 
109  // Member Operators
110 
111  //- Disallow default bitwise assignment
112  void operator=(const SidedInterfacialModel<ModelType>&) = delete;
113 };
114 
115 
116 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
117 
118 #define defineSidedInterfacialModelTypeNameAndDebug(ModelType, DebugSwitch) \
119  \
120  defineTemplateTypeNameAndDebugWithName \
121  ( \
122  SidedInterfacialModel<ModelType>, \
123  ( \
124  word(SidedInterfacialModel<ModelType>::typeName_()) + "<" \
125  + ModelType::typeName + ">" \
126  ).c_str(), \
127  DebugSwitch \
128  );
129 
130 
131 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
132 
133 } // End namespace Foam
134 
135 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
136 
137 #ifdef NoRepository
138  #include "SidedInterfacialModel.C"
139 #endif
140 
141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
142 
143 #endif
144 
145 // ************************************************************************* //
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:57
const phaseInterface & interface() const
Access the interface.
bool writeData(Ostream &os) const
Dummy write for regIOobject.
TypeName("SidedInterfacialModel")
Runtime type information.
void operator=(const SidedInterfacialModel< ModelType > &)=delete
Disallow default bitwise assignment.
SidedInterfacialModel(const dictionary &dict, const phaseInterface &interface)
Construct from a dictionary and an interface.
bool haveModelInThe(const phaseModel &phase) const
Does a model exist in the given phase?
const ModelType & modelInThe(const phaseModel &phase) const
Access the model within the given phase.
A list of keyword definitions, which are a keyword followed by any number of values (e....
Definition: dictionary.H:160
Class to represent an interface between phases. Derivations can further specify the configuration of ...
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
Definition: regIOobject.H:55
Namespace for OpenFOAM.
dictionary dict