cyclicAMIGAMGInterfaceField.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-2013 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::cyclicAMIGAMGInterfaceField
26 
27 Description
28  GAMG agglomerated cyclic interface field.
29 
30 SourceFiles
31  cyclicAMIGAMGInterfaceField.C
32 
33 \*---------------------------------------------------------------------------*/
34 
35 #ifndef cyclicAMIGAMGInterfaceField_H
36 #define cyclicAMIGAMGInterfaceField_H
37 
38 #include "GAMGInterfaceField.H"
39 #include "cyclicAMIGAMGInterface.H"
41 
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
43 
44 namespace Foam
45 {
46 
47 /*---------------------------------------------------------------------------*\
48  Class cyclicAMIGAMGInterfaceField Declaration
49 \*---------------------------------------------------------------------------*/
50 
52 :
53  public GAMGInterfaceField,
54  virtual public cyclicAMILduInterfaceField
55 {
56  // Private data
57 
58  //- Local reference cast into the cyclic interface
60 
61  //- Is the transform required
62  bool doTransform_;
63 
64  //- Rank of component for transformation
65  int rank_;
66 
67 
68  // Private Member Functions
69 
70  //- Disallow default bitwise copy construct
72 
73  //- Disallow default bitwise assignment
75 
76 
77 public:
78 
79  //- Runtime type information
80  TypeName("cyclicAMI");
81 
82 
83  // Constructors
84 
85  //- Construct from GAMG interface and fine level interface field
87  (
88  const GAMGInterface& GAMGCp,
89  const lduInterfaceField& fineInterfaceField
90  );
91 
92  //- Construct from GAMG interface and fine level interface field
94  (
95  const GAMGInterface& GAMGCp,
96  const bool doTransform,
97  const int rank
98  );
99 
100 
101  //- Destructor
103 
104 
105  // Member Functions
106 
107  // Access
108 
109  //- Return size
110  label size() const
111  {
112  return cyclicAMIInterface_.size();
113  }
114 
115 
116  // Interface matrix update
117 
118  //- Update result field based on interface functionality
119  virtual void updateInterfaceMatrix
120  (
121  scalarField& result,
122  const scalarField& psiInternal,
123  const scalarField& coeffs,
124  const direction cmpt,
125  const Pstream::commsTypes commsType
126  ) const;
127 
128 
129  //- Cyclic interface functions
130 
131  //- Does the interface field perform the transfromation
132  virtual bool doTransform() const
133  {
134  return doTransform_;
135  }
136 
137  //- Return face transformation tensor
138  virtual const tensorField& forwardT() const
139  {
140  return cyclicAMIInterface_.forwardT();
141  }
142 
143  //- Return neighbour-cell transformation tensor
144  virtual const tensorField& reverseT() const
145  {
146  return cyclicAMIInterface_.reverseT();
147  }
148 
149  //- Return rank of component for transform
150  virtual int rank() const
151  {
152  return rank_;
153  }
154 };
155 
156 
157 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
158 
159 } // End namespace Foam
160 
161 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
162 
163 #endif
164 
165 // ************************************************************************* //
Foam::cyclicAMIGAMGInterfaceField::doTransform
virtual bool doTransform() const
Cyclic interface functions.
Definition: cyclicAMIGAMGInterfaceField.H:131
Foam::GAMGInterface::size
virtual label size() const
Return size.
Definition: GAMGInterface.H:205
Foam::cyclicAMIGAMGInterfaceField::rank_
int rank_
Rank of component for transformation.
Definition: cyclicAMIGAMGInterfaceField.H:64
Foam::cyclicAMILduInterfaceField
Abstract base class for cyclic AMI coupled interfaces.
Definition: cyclicAMILduInterfaceField.H:48
Foam::cyclicAMIGAMGInterfaceField::~cyclicAMIGAMGInterfaceField
virtual ~cyclicAMIGAMGInterfaceField()
Destructor.
Definition: cyclicAMIGAMGInterfaceField.C:87
Foam::cyclicAMIGAMGInterfaceField::cyclicAMIGAMGInterfaceField
cyclicAMIGAMGInterfaceField(const cyclicAMIGAMGInterfaceField &)
Disallow default bitwise copy construct.
Foam::cyclicAMIGAMGInterface::reverseT
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Definition: cyclicAMIGAMGInterface.H:144
Foam::cyclicAMIGAMGInterfaceField::cyclicAMIInterface_
const cyclicAMIGAMGInterface & cyclicAMIInterface_
Local reference cast into the cyclic interface.
Definition: cyclicAMIGAMGInterfaceField.H:58
Foam::cyclicAMIGAMGInterfaceField
GAMG agglomerated cyclic interface field.
Definition: cyclicAMIGAMGInterfaceField.H:50
cyclicAMILduInterfaceField.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::Field
Pre-declare SubField and related Field type.
Definition: Field.H:57
Foam::GAMGInterface
Abstract base class for GAMG agglomerated interfaces.
Definition: GAMGInterface.H:51
Foam::cyclicAMIGAMGInterfaceField::updateInterfaceMatrix
virtual void updateInterfaceMatrix(scalarField &result, const scalarField &psiInternal, const scalarField &coeffs, const direction cmpt, const Pstream::commsTypes commsType) const
Update result field based on interface functionality.
Definition: cyclicAMIGAMGInterfaceField.C:94
cyclicAMIGAMGInterface.H
Foam::cyclicAMIGAMGInterface::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: cyclicAMIGAMGInterface.H:138
Foam::cyclicAMIGAMGInterfaceField::rank
virtual int rank() const
Return rank of component for transform.
Definition: cyclicAMIGAMGInterfaceField.H:149
Foam::GAMGInterfaceField
Abstract base class for GAMG agglomerated interface fields.
Definition: GAMGInterfaceField.H:51
Foam::cyclicAMIGAMGInterfaceField::TypeName
TypeName("cyclicAMI")
Runtime type information.
GAMGInterfaceField.H
Foam
Namespace for OpenFOAM.
Definition: combustionModel.C:30
Foam::cyclicAMIGAMGInterfaceField::operator=
void operator=(const cyclicAMIGAMGInterfaceField &)
Disallow default bitwise assignment.
Foam::cyclicAMIGAMGInterfaceField::doTransform_
bool doTransform_
Is the transform required.
Definition: cyclicAMIGAMGInterfaceField.H:61
Foam::lduInterfaceField
An abstract base class for implicitly-coupled interface fields e.g. processor and cyclic patch fields...
Definition: lduInterfaceField.H:55
Foam::UPstream::commsTypes
commsTypes
Types of communications.
Definition: UPstream.H:64
Foam::cyclicAMIGAMGInterfaceField::forwardT
virtual const tensorField & forwardT() const
Return face transformation tensor.
Definition: cyclicAMIGAMGInterfaceField.H:137
Foam::cyclicAMIGAMGInterface
GAMG agglomerated cyclic AMI interface.
Definition: cyclicAMIGAMGInterface.H:49
Foam::direction
unsigned char direction
Definition: direction.H:43
Foam::cyclicAMIGAMGInterfaceField::size
label size() const
Return size.
Definition: cyclicAMIGAMGInterfaceField.H:109
Foam::cyclicAMIGAMGInterfaceField::reverseT
virtual const tensorField & reverseT() const
Return neighbour-cell transformation tensor.
Definition: cyclicAMIGAMGInterfaceField.H:143