cyclicACMIGAMGInterface.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) 2013-2015 OpenFOAM Foundation
9-------------------------------------------------------------------------------
10License
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
26Class
27 Foam::cyclicACMIGAMGInterface
28
29Description
30 GAMG agglomerated cyclic ACMI interface.
31
32SourceFiles
33 cyclicACMIGAMGInterface.C
34
35\*---------------------------------------------------------------------------*/
36
37#ifndef cyclicACMIGAMGInterface_H
38#define cyclicACMIGAMGInterface_H
39
40#include "GAMGInterface.H"
42
43// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44
45namespace Foam
46{
47
48/*---------------------------------------------------------------------------*\
49 Class cyclicACMIGAMGInterface Declaration
50\*---------------------------------------------------------------------------*/
53:
54 public GAMGInterface,
55 virtual public cyclicACMILduInterface
56{
57 // Private data
58
59 //- Reference for the cyclicLduInterface from which this is
60 // agglomerated
61 const cyclicACMILduInterface& fineCyclicACMIInterface_;
62
63 //- AMI interface
65
66
67 // Private Member Functions
68
69 //- No copy construct
71
72 //- No copy assignment
73 void operator=(const cyclicACMIGAMGInterface&) = delete;
74
75
76public:
77
78 //- Runtime type information
79 TypeName("cyclicACMI");
80
81
82 // Constructors
83
84 //- Construct from fine level interface,
85 //- local and neighbour restrict addressing
87 (
88 const label index,
90 const lduInterface& fineInterface,
91 const labelField& restrictAddressing,
92 const labelField& neighbourRestrictAddressing,
93 const label fineLevelIndex,
94 const label coarseComm
95 );
96
97
98 //- Destructor
100
101
102 // Member Functions
103
104 // Interface transfer functions
105
106 //- Transfer and return internal field adjacent to the interface
108 (
109 const Pstream::commsTypes commsType,
110 const labelUList& iF
111 ) const;
112
113
114 //- Cyclic interface functions
115
116 //- Return neighbour processor number
117 virtual label neighbPatchID() const
118 {
119 return fineCyclicACMIInterface_.neighbPatchID();
120 }
122 virtual bool owner() const
123 {
124 return fineCyclicACMIInterface_.owner();
125 }
127 virtual const cyclicACMIGAMGInterface& neighbPatch() const
128 {
129 return dynamic_cast<const cyclicACMIGAMGInterface&>
130 (
132 );
133 }
135 virtual const AMIPatchToPatchInterpolation& AMI() const
136 {
137 return *amiPtr_;
138 }
139
140 //- Return face transformation tensor
141 virtual const tensorField& forwardT() const
142 {
143 return fineCyclicACMIInterface_.forwardT();
144 }
145
146 //- Return neighbour-cell transformation tensor
147 virtual const tensorField& reverseT() const
148 {
149 return fineCyclicACMIInterface_.reverseT();
150 }
151
152
153 // I/O
154
155 //- Write to stream
156 virtual void write(Ostream&) const
157 {
158 //TBD. How to serialise the AMI such that we can stream
159 // cyclicACMIGAMGInterface.
161 }
162};
163
164
165// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
166
167} // End namespace Foam
168
169// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
170
171#endif
172
173// ************************************************************************* //
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:57
virtual label index() const
virtual const lduInterfacePtrsList & coarseInterfaces() const
const lduInterfacePtrsList & coarseInterfaces_
All interfaces.
Definition: GAMGInterface.H:66
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:62
commsTypes
Types of communications.
Definition: UPstream.H:67
Pointer management similar to std::unique_ptr, with some additional methods and type checking.
Definition: autoPtr.H:66
GAMG agglomerated cyclic ACMI interface.
virtual const cyclicACMIGAMGInterface & neighbPatch() const
Return processor number.
virtual ~cyclicACMIGAMGInterface()
Destructor.
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
virtual label neighbPatchID() const
Cyclic interface functions.
TypeName("cyclicACMI")
Runtime type information.
virtual const AMIPatchToPatchInterpolation & AMI() const
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Transfer and return internal field adjacent to the interface.
virtual void write(Ostream &) const
Write to stream.
virtual const tensorField & forwardT() const
Return face transformation tensor.
An abstract base class for cyclic ACMI coupled interfaces.
virtual const tensorField & forwardT() const =0
Return face transformation tensor.
virtual bool owner() const =0
virtual label neighbPatchID() const =0
Return neighbour.
virtual const tensorField & reverseT() const =0
Return face reverse transformation tensor.
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Definition: lduInterface.H:58
A class for managing temporary objects.
Definition: tmp.H:65
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:517
Namespace for OpenFOAM.
runTime write()
#define TypeName(TypeNameString)
Declare a ClassName() with extra virtual type info.
Definition: typeInfo.H:73