cyclicAMIGAMGInterface.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::cyclicAMIGAMGInterface
26 
27 Description
28  GAMG agglomerated cyclic AMI interface.
29 
30 SourceFiles
31  cyclicAMIGAMGInterface.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicAMIGAMGInterface_H
36 #define cyclicAMIGAMGInterface_H
37 
38 #include "GAMGInterface.H"
39 #include "cyclicAMILduInterface.H"
40 
41 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
42 
43 namespace Foam
44 {
45 
46 /*---------------------------------------------------------------------------*\
47  Class cyclicAMIGAMGInterface Declaration
48 \*---------------------------------------------------------------------------*/
49 
51 :
52  public GAMGInterface,
53  virtual public cyclicAMILduInterface
54 {
55  // Private data
56 
57  //- Reference for the cyclicLduInterface from which this is
58  // agglomerated
60 
61  //- AMI interface
63 
64 
65  // Private Member Functions
66 
67  //- Disallow default bitwise copy construct
69 
70  //- Disallow default bitwise assignment
71  void operator=(const cyclicAMIGAMGInterface&);
72 
73 
74 public:
75 
76  //- Runtime type information
77  TypeName("cyclicAMI");
78 
79 
80  // Constructors
81 
82  //- Construct from fine level interface,
83  // local and neighbour restrict addressing
85  (
86  const label index,
88  const lduInterface& fineInterface,
89  const labelField& restrictAddressing,
90  const labelField& neighbourRestrictAddressing,
91  const label fineLevelIndex,
92  const label coarseComm
93  );
94 
95 
96  //- Destructor
97  virtual ~cyclicAMIGAMGInterface();
98 
99 
100  // Member Functions
101 
102  // Interface transfer functions
103 
104  //- Transfer and return internal field adjacent to the interface
106  (
107  const Pstream::commsTypes commsType,
108  const labelUList& iF
109  ) const;
110 
111 
112  //- Cyclic interface functions
113 
114  //- Return neighbour processor number
115  virtual label neighbPatchID() const
116  {
118  }
119 
120  virtual bool owner() const
121  {
123  }
124 
125  virtual const cyclicAMIGAMGInterface& neighbPatch() const
126  {
127  return dynamic_cast<const cyclicAMIGAMGInterface&>
128  (
130  );
131  }
132 
133  virtual const AMIPatchToPatchInterpolation& AMI() const
134  {
135  return amiPtr_();
136  }
137 
138  //- Return face transformation tensor
139  virtual const tensorField& forwardT() const
140  {
142  }
143 
144  //- Return neighbour-cell transformation tensor
145  virtual const tensorField& reverseT() const
146  {
148  }
149 
150 
151  // I/O
152 
153  //- Write to stream
154  virtual void write(Ostream&) const
155  {
156  //TBD. How to serialise the AMI such that we can stream
157  // cyclicAMIGAMGInterface.
159  }
160 };
161 
162 
163 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
164 
165 } // End namespace Foam
166 
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
168 
169 #endif
170 
171 // ************************************************************************* //
Foam::cyclicAMIGAMGInterface::fineCyclicAMIInterface_
const cyclicAMILduInterface & fineCyclicAMIInterface_
Reference for the cyclicLduInterface from which this is.
Definition: cyclicAMIGAMGInterface.H:58
Foam::cyclicAMIGAMGInterface::neighbPatch
virtual const cyclicAMIGAMGInterface & neighbPatch() const
Return processor number.
Definition: cyclicAMIGAMGInterface.H:124
Foam::tmp
A class for managing temporary objects.
Definition: PtrList.H:118
Foam::cyclicAMILduInterface
An abstract base class for cyclic AMI coupled interfaces.
Definition: cyclicAMILduInterface.H:49
Foam::lduInterface
An abstract base class for implicitly-coupled interfaces e.g. processor and cyclic patches.
Definition: lduInterface.H:53
Foam::cyclicAMIGAMGInterface::owner
virtual bool owner() const
Definition: cyclicAMIGAMGInterface.H:119
Foam::cyclicAMIGAMGInterface::write
virtual void write(Ostream &) const
Write to stream.
Definition: cyclicAMIGAMGInterface.H:153
Foam::cyclicAMIGAMGInterface::reverseT
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Definition: cyclicAMIGAMGInterface.H:144
Foam::cyclicAMIGAMGInterface::TypeName
TypeName("cyclicAMI")
Runtime type information.
Foam::cyclicAMILduInterface::neighbPatchID
virtual label neighbPatchID() const =0
Return neighbour.
NotImplemented
#define NotImplemented
Issue a FatalErrorIn for a function not currently implemented.
Definition: error.H:365
GAMGInterface.H
Foam::label
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
Definition: label.H:59
Foam::cyclicAMIGAMGInterface::neighbPatchID
virtual label neighbPatchID() const
Cyclic interface functions.
Definition: cyclicAMIGAMGInterface.H:114
Foam::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::cyclicAMIGAMGInterface::amiPtr_
autoPtr< AMIPatchToPatchInterpolation > amiPtr_
AMI interface.
Definition: cyclicAMIGAMGInterface.H:61
Foam::cyclicAMILduInterface::reverseT
virtual const tensorField & reverseT() const =0
Return face reverse transformation tensor.
Foam::GAMGInterface::coarseInterfaces_
const lduInterfacePtrsList & coarseInterfaces_
All interfaces.
Definition: GAMGInterface.H:64
Foam::GAMGInterface
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:51
Foam::cyclicAMILduInterface::owner
virtual bool owner() const =0
Foam::UPtrList
A templated 1D list of pointers to objects of type <T>, where the size of the array is known and used...
Definition: UPtrList.H:53
Foam::cyclicAMIGAMGInterface::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: cyclicAMIGAMGInterface.H:138
Foam::cyclicAMIGAMGInterface::AMI
virtual const AMIPatchToPatchInterpolation & AMI() const
Definition: cyclicAMIGAMGInterface.H:132
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::GAMGInterface::index
virtual label index() const
Definition: GAMGInterface.H:210
Foam::autoPtr
An auto-pointer similar to the STL auto_ptr but with automatic casting to a reference to the type and...
Definition: PtrList.H:117
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:64
Foam::cyclicAMIGAMGInterface
GAMG agglomerated cyclic AMI interface.
Definition: cyclicAMIGAMGInterface.H:49
Foam::cyclicAMIGAMGInterface::~cyclicAMIGAMGInterface
virtual ~cyclicAMIGAMGInterface()
Destructor.
Definition: cyclicAMIGAMGInterface.C:169
Foam::AMIInterpolation
Interpolation class dealing with transfer of data between two primitive patches with an arbitrary mes...
Definition: AMIInterpolation.H:77
Foam::UList
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
Definition: HashTable.H:60
Foam::cyclicAMIGAMGInterface::operator=
void operator=(const cyclicAMIGAMGInterface &)
Disallow default bitwise assignment.
Foam::cyclicAMIGAMGInterface::cyclicAMIGAMGInterface
cyclicAMIGAMGInterface(const cyclicAMIGAMGInterface &)
Disallow default bitwise copy construct.
Foam::cyclicAMIGAMGInterface::internalFieldTransfer
virtual tmp< labelField > internalFieldTransfer(const Pstream::commsTypes commsType, const labelUList &iF) const
Transfer and return internal field adjacent to the interface.
Definition: cyclicAMIGAMGInterface.C:176
Foam::GAMGInterface::coarseInterfaces
virtual const lduInterfacePtrsList & coarseInterfaces() const
Definition: GAMGInterface.H:215
Foam::Ostream
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
Definition: Ostream.H:53
Foam::cyclicAMILduInterface::forwardT
virtual const tensorField & forwardT() const =0
Return face transformation tensor.
cyclicAMILduInterface.H