ENH: autoLayerDriver: better layering information message
[OpenFOAM-2.0.x.git] / src / OpenFOAM / matrices / lduMatrix / solvers / GAMG / interfaceFields / processorGAMGInterfaceField / processorGAMGInterfaceField.H
blobc1bdac02460856c176ab80f4efc3f1ea893c986d
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 2011 OpenFOAM Foundation
6      \\/     M anipulation  |
7 -------------------------------------------------------------------------------
8 License
9     This file is part of OpenFOAM.
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.
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.
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/>.
24 Class
25     Foam::processorGAMGInterfaceField
27 Description
28     GAMG agglomerated processor interface field.
30 SourceFiles
31     processorGAMGInterfaceField.C
33 \*---------------------------------------------------------------------------*/
35 #ifndef processorGAMGInterfaceField_H
36 #define processorGAMGInterfaceField_H
38 #include "GAMGInterfaceField.H"
39 #include "processorGAMGInterface.H"
40 #include "processorLduInterfaceField.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 /*---------------------------------------------------------------------------*\
48                   Class processorGAMGInterfaceField Declaration
49 \*---------------------------------------------------------------------------*/
51 class processorGAMGInterfaceField
53     public GAMGInterfaceField,
54     public processorLduInterfaceField
56     // Private data
58         //- Local reference cast into the processor interface
59         const processorGAMGInterface& procInterface_;
61         //- Is the transform required
62         bool doTransform_;
64         //- Rank of component for transformation
65         int rank_;
68     // Private Member Functions
70         //- Disallow default bitwise copy construct
71         processorGAMGInterfaceField(const processorGAMGInterfaceField&);
73         //- Disallow default bitwise assignment
74         void operator=(const processorGAMGInterfaceField&);
77 public:
79     //- Runtime type information
80     TypeName("processor");
83     // Constructors
85         //- Construct from GAMG interface and fine level interface field
86         processorGAMGInterfaceField
87         (
88             const GAMGInterface& GAMGCp,
89             const lduInterfaceField& fineInterface
90         );
93     //- Destructor
94     virtual ~processorGAMGInterfaceField();
97     // Member Functions
99         // Access
101             //- Return size
102             label size() const
103             {
104                 return procInterface_.size();
105             }
108         // Interface matrix update
110             //- Initialise neighbour matrix update
111             virtual void initInterfaceMatrixUpdate
112             (
113                 const scalarField& psiInternal,
114                 scalarField& result,
115                 const lduMatrix& m,
116                 const scalarField& coeffs,
117                 const direction cmpt,
118                 const Pstream::commsTypes commsType
119             ) const;
121             //- Update result field based on interface functionality
122             virtual void updateInterfaceMatrix
123             (
124                 const scalarField& psiInternal,
125                 scalarField& result,
126                 const lduMatrix&,
127                 const scalarField& coeffs,
128                 const direction cmpt,
129                 const Pstream::commsTypes commsType
130             ) const;
133         //- Processor interface functions
135             //- Return processor number
136             virtual int myProcNo() const
137             {
138                 return procInterface_.myProcNo();
139             }
141             //- Return neigbour processor number
142             virtual int neighbProcNo() const
143             {
144                 return procInterface_.neighbProcNo();
145             }
147             //- Does the interface field perform the transfromation
148             virtual bool doTransform() const
149             {
150                 return doTransform_;
151             }
153             //- Return face transformation tensor
154             virtual const tensorField& forwardT() const
155             {
156                 return procInterface_.forwardT();
157             }
159             //- Return rank of component for transform
160             virtual int rank() const
161             {
162                 return rank_;
163             }
167 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
169 } // End namespace Foam
171 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
173 #endif
175 // ************************************************************************* //