OpenFOAM logo
Open Source CFD Toolkit

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-2005 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     pointPatch
00027 
00028 Description
00029     Basic pointPatch represents a set of points from the mesh.
00030 
00031 SourceFiles
00032     pointPatch.C
00033 
00034 \*---------------------------------------------------------------------------*/
00035 
00036 #ifndef pointPatch_H
00037 #define pointPatch_H
00038 
00039 #include "labelList.H"
00040 #include "vectorField.H"
00041 #include "triFaceList.H"
00042 
00043 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00044 
00045 namespace Foam
00046 {
00047 
00048 // Class forward declarations
00049 
00050 class pointBoundaryMesh;
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 public:
00074 
00075     //- Runtime type information
00076     TypeName("basePatch");
00077 
00078 
00079     // Constructor
00080 
00081         pointPatch
00082         (
00083             const pointBoundaryMesh& bm
00084         )
00085         :
00086             boundaryMesh_(bm)
00087         {}
00088 
00089 
00090     // Destructor
00091 
00092         virtual ~pointPatch()
00093         {}
00094 
00095 
00096     // Member Functions
00097 
00098         //- Return name
00099         virtual const word& name() const = 0;
00100 
00101         //- Return size
00102         virtual label size() const = 0;
00103 
00104         //- Return number of faces
00105         virtual label nFaces() const = 0;
00106 
00107         //- Return the index of this patch in the pointBoundaryMesh
00108         virtual label index() const = 0;
00109 
00110         //- Return boundaryMesh reference
00111         const pointBoundaryMesh& boundaryMesh() const
00112         {
00113             return boundaryMesh_;
00114         }
00115 
00116         //- Return true if this patch field is coupled
00117         virtual bool coupled() const
00118         {
00119             return false;
00120         }
00121 
00122         //- Return mesh points
00123         virtual const labelList& meshPoints() const = 0;
00124 
00125         //- Return mesh points
00126         virtual const vectorField& localPoints() const = 0;
00127 
00128         //- Return  point normals
00129         virtual const vectorField& pointNormals() const = 0;
00130 
00131         //- Face decomposition into triangle
00132         //  Used for implementation of FEM boundary conditions
00133         virtual triFaceList faceTriangles(const label faceID) const = 0;
00134 };
00135 
00136 
00137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00138 
00139 } // End namespace Foam
00140 
00141 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00142 
00143 #endif
00144 
00145 // ************************************************************************* //
For further information go to www.openfoam.org