FreeFOAM The Cross-Platform CFD Toolkit
Hosted by SourceForge:
Get FreeFOAM at SourceForge.net.
            Fast, secure and Free Open Source software downloads

pointPatch.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-2010 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
00013     the Free Software Foundation, either version 3 of the License, or
00014     (at your 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, see <http://www.gnu.org/licenses/>.
00023 
00024 Class
00025     Foam::pointPatch
00026 
00027 Description
00028     Basic pointPatch represents a set of points from the mesh.
00029 
00030 SourceFiles
00031     pointPatch.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef pointPatch_H
00036 #define pointPatch_H
00037 
00038 #include <OpenFOAM/labelList.H>
00039 #include <OpenFOAM/vectorField.H>
00040 #include <OpenFOAM/triFaceList.H>
00041 
00042 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00043 
00044 namespace Foam
00045 {
00046 
00047 // Forward declaration of classes
00048 
00049 class pointBoundaryMesh;
00050 class pointConstraint;
00051 
00052 /*---------------------------------------------------------------------------*\
00053                       Class pointPatch Declaration
00054 \*---------------------------------------------------------------------------*/
00055 
00056 class pointPatch
00057 {
00058     // Private data
00059 
00060         //- Reference to boundary mesh
00061         const pointBoundaryMesh& boundaryMesh_;
00062 
00063 
00064     // Private Member Functions
00065 
00066         //- Disallow default bitwise copy construct
00067         pointPatch(const pointPatch&);
00068 
00069         //- Disallow default bitwise assignment
00070         void operator=(const pointPatch&);
00071 
00072 
00073 protected:
00074 
00075     // Protected Member Functions
00076 
00077         // The pointPatch geometry initialisation is called by pointBoundaryMesh
00078         friend class pointBoundaryMesh;
00079 
00080         //- Initialise the calculation of the patch geometry
00081         virtual void initGeometry()
00082         {}
00083 
00084         //- Calculate the patch geometry
00085         virtual void calcGeometry()
00086         {}
00087 
00088         //- Initialise the patches for moving points
00089         virtual void initMovePoints(const pointField&)
00090         {}
00091 
00092         //- Correct patches after moving points
00093         virtual void movePoints(const pointField&)
00094         {}
00095 
00096         //- Initialise the update of the patch topology
00097         virtual void initUpdateMesh()
00098         {}
00099 
00100         //- Update of the patch topology
00101         virtual void updateMesh()
00102         {}
00103 
00104 
00105 public:
00106 
00107     //- Runtime type information
00108     TypeName("basePatch");
00109 
00110 
00111     // Constructor
00112 
00113         pointPatch
00114         (
00115             const pointBoundaryMesh& bm
00116         )
00117         :
00118             boundaryMesh_(bm)
00119         {}
00120 
00121 
00122     // Destructor
00123 
00124         virtual ~pointPatch()
00125         {}
00126 
00127 
00128     // Member Functions
00129 
00130         //- Return name
00131         virtual const word& name() const = 0;
00132 
00133         //- Return size
00134         virtual label size() const = 0;
00135 
00136         //- Return the index of this patch in the pointBoundaryMesh
00137         virtual label index() const = 0;
00138 
00139         //- Return boundaryMesh reference
00140         const pointBoundaryMesh& boundaryMesh() const
00141         {
00142             return boundaryMesh_;
00143         }
00144 
00145         //- Return true if this patch field is coupled
00146         virtual bool coupled() const
00147         {
00148             return false;
00149         }
00150 
00151         //- Return mesh points
00152         virtual const labelList& meshPoints() const = 0;
00153 
00154         //- Return mesh points
00155         virtual const vectorField& localPoints() const = 0;
00156 
00157         //- Return  point normals
00158         virtual const vectorField& pointNormals() const = 0;
00159 
00160         //- Accumulate the effect of constraint direction of this patch
00161         virtual void applyConstraint
00162         (
00163             const label pointi,
00164             pointConstraint&
00165         ) const
00166         {}
00167 };
00168 
00169 
00170 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00171 
00172 } // End namespace Foam
00173 
00174 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00175 
00176 #endif
00177 
00178 // ************************ vim: set sw=4 sts=4 et: ************************ //
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines