OpenFOAM logo
The Open Source CFD Toolbox
  Source Guide OpenCFD Solutions Contact OpenFOAM

lduInterfaceField.H

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002   =========                 |
00003   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
00004    \\    /   O peration     |
00005     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
00006      \\/     M anipulation  |
00007 -------------------------------------------------------------------------------
00008 License
00009     This file is part of OpenFOAM.
00010 
00011     OpenFOAM is free software; you can redistribute it and/or modify it
00012     under the terms of the GNU General Public License as published by the
00013     Free Software Foundation; either version 2 of the License, or (at your
00014     option) any later version.
00015 
00016     OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
00017     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00018     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
00019     for more details.
00020 
00021     You should have received a copy of the GNU General Public License
00022     along with OpenFOAM; if not, write to the Free Software Foundation,
00023     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
00024 
00025 Class
00026     Foam::lduInterfaceField
00027 
00028 Description
00029     An abstract base class for implicitly-coupled interface fields
00030     e.g. processor and cyclic patch fields.
00031 
00032 SourceFiles
00033     lduInterfaceField.C
00034 
00035 \*---------------------------------------------------------------------------*/
00036 
00037 #ifndef lduInterfaceField_H
00038 #define lduInterfaceField_H
00039 
00040 #include "lduInterface.H"
00041 #include "primitiveFieldsFwd.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00049 
00050 class lduMatrix;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                      Class lduInterfaceField Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class lduInterfaceField
00057 {
00058     // Private data
00059 
00060         //- Reference to the coupled patch this field is defined for
00061         const lduInterface& interface_;
00062 
00063 
00064     // Private Member Functions
00065 
00066         //- Disallow default bitwise copy construct
00067         lduInterfaceField(const lduInterfaceField&);
00068 
00069         //- Disallow default bitwise assignment
00070         void operator=(const lduInterfaceField&);
00071 
00072 
00073 public:
00074 
00075     //- Runtime type information
00076     TypeName("lduInterfaceField");
00077 
00078 
00079     // Constructors
00080 
00081         //- Construct given coupled patch
00082         lduInterfaceField(const lduInterface& patch)
00083         :
00084             interface_(patch)
00085         {}
00086 
00087 
00088     // Destructor
00089 
00090         virtual ~lduInterfaceField();
00091 
00092 
00093     // Member Functions
00094 
00095         // Access
00096 
00097             //- Return the interface
00098             const lduInterface& interface() const
00099             {
00100                 return interface_;
00101             }
00102 
00103             //- Return the interface type
00104             virtual const word& interfaceFieldType() const
00105             {
00106                 return type();
00107             }
00108 
00109 
00110         // Coupled interface matrix update
00111 
00112             //- Initialise neighbour matrix update
00113             virtual void initInterfaceMatrixUpdate
00114             (
00115                 const scalarField&,
00116                 scalarField&,
00117                 const lduMatrix&,
00118                 const scalarField&,
00119                 const direction,
00120                 const Pstream::commsTypes commsType
00121             ) const
00122             {}
00123 
00124             //- Update result field based on interface functionality
00125             virtual void updateInterfaceMatrix
00126             (
00127                 const scalarField&,
00128                 scalarField&,
00129                 const lduMatrix&,
00130                 const scalarField&,
00131                 const direction,
00132                 const Pstream::commsTypes commsType
00133             ) const = 0;
00134 };
00135 
00136 
00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00138 
00139 } // End namespace Foam
00140 
00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00142 
00143 #endif
00144 
00145 // ************************************************************************* //
Copyright © 2000-2009 OpenCFD Ltd