OpenFOAM logo
Open Source CFD Toolkit

globalProcessorPointPatch.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     globalProcessorPointPatch
00027 
00028 Description
00029 
00030 SourceFiles
00031     globalProcessorPointPatch.C
00032 
00033 \*---------------------------------------------------------------------------*/
00034 
00035 #ifndef globalProcessorPointPatch_H
00036 #define globalProcessorPointPatch_H
00037 
00038 #include "pointPatch.H"
00039 #include "edgeList.H"
00040 
00041 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00042 
00043 namespace Foam
00044 {
00045 
00046 class parallelInfo;
00047 
00048 /*---------------------------------------------------------------------------*\
00049              Class globalProcessorPointPatch Declaration
00050 \*---------------------------------------------------------------------------*/
00051 
00052 class globalProcessorPointPatch
00053 :
00054     public pointPatch
00055 {
00056     // Private data
00057 
00058         //- Global point size - number of all shared points in decomposition
00059         label globalPointSize_;
00060 
00061         //- List of local multiply shared points
00062         labelList meshPoints_;
00063 
00064         //- Addressing into the global point patch
00065         labelList sharedPointAddr_;
00066 
00067         //- Index in the boundary mesh
00068         label boundaryIndex_;
00069 
00070 
00071     // Private Member Functions
00072 
00073         //- Disallow default construct as copy
00074         globalProcessorPointPatch
00075         (
00076             const globalProcessorPointPatch&
00077         );
00078 
00079         //- Disallow default assignment
00080         void operator=(const globalProcessorPointPatch&);
00081 
00082         // Construction of demand-driven data
00083 
00084             //- Calculate local points
00085             void calcLocalPoints() const;
00086 
00087 
00088 public:
00089 
00090     typedef pointBoundaryMesh BoundaryMesh;
00091 
00092 
00093     //- Runtime type information
00094     TypeName("globalProcessor");
00095 
00096     // Constructors
00097 
00098         //- Construct from components
00099         globalProcessorPointPatch
00100         (
00101             const parallelInfo& pi,
00102             const pointBoundaryMesh& bm,
00103             const label index
00104         );
00105 
00106 
00107     // Destructor
00108 
00109         virtual ~globalProcessorPointPatch();
00110 
00111     // Member functions
00112 
00113         //- Return name
00114         virtual const word& name() const
00115         {
00116             // There can only be a single patch of this type - therefore
00117             // its name is hard-coded.  
00118             return type();
00119         }
00120 
00121         //- Return size
00122         virtual label size() const
00123         {
00124             return meshPoints().size();
00125         }
00126 
00127         //- Return true if running parallel
00128         virtual bool coupled() const
00129         {
00130             if (Pstream::parRun())
00131             {
00132                 return true;
00133             }
00134             else
00135             {
00136                 return false;
00137             }
00138         }
00139 
00140         //- Return number of faces
00141         virtual label nFaces() const
00142         {
00143             return 0;
00144         }
00145 
00146         //- Return total number of shared points
00147         virtual label globalPointSize() const
00148         {
00149             return globalPointSize_;
00150         }
00151 
00152         //- Return total number of shared edges. Not implemented
00153         virtual label globalEdgeSize() const
00154         {
00155             return 0;
00156         }
00157 
00158         //- Return the index of this patch in the pointBoundaryMesh
00159         virtual label index() const
00160         {
00161             return boundaryIndex_;
00162         }
00163 
00164         //- Return mesh points
00165         virtual const labelList& meshPoints() const
00166         {
00167             return meshPoints_;
00168         }
00169 
00170         //- Return local points.  Not implemented
00171         virtual const pointField& localPoints() const;
00172 
00173         //- Return point normals.  Not implemented
00174         virtual const vectorField& pointNormals() const;
00175 
00176         //- Face decomposition into triangle.  Not implemented
00177         virtual triFaceList faceTriangles(const label faceID) const;
00178 
00179         //- Return addressing into the global points list
00180         const labelList& sharedPointAddr() const
00181         {
00182             return sharedPointAddr_;
00183         }
00184 
00185         //- Return mesh edges.  Not implemented
00186         virtual const edgeList& meshEdges() const;
00187 
00188         //- Return addressing into the global edge list.  Not implemented
00189         const labelList& sharedEdgeAddr() const;
00190 
00191         //- Return cut mesh edges.  Not implemented
00192         const edgeList& meshCutEdges() const;
00193 
00194         //- Return cut mesh edges multiplication mask
00195         //  Warning: this one is in the original cut edge order.
00196         //  For patch matrix multiplication se the reordered one.
00197         //  Not implemented
00198         const scalarField& meshCutEdgeMask() const;
00199 
00200         // Access functions for demand driven data
00201 
00202             //- Return list of edge indices for edges local to the patch
00203             //  Not implemented
00204             virtual const labelList& localEdgeIndices() const;
00205 
00206             //- Return list of edge indices for cut edges
00207             //  (i.e. connecting points within the patch ot points outside it)
00208             //  Not implemented
00209             virtual const labelList& cutEdgeIndices() const;
00210 
00211             // Cut edge addressing
00212 
00213                //- Return cut edge owner edge indices.  Not implemented
00214                const labelList& cutEdgeOwnerIndices() const;
00215 
00216                //- Return cut edge owner edge starts.  Not implemented
00217                const labelList& cutEdgeOwnerStart() const;
00218 
00219                //- Return cut edge neighbour edge indices.  Not implemented
00220                const labelList& cutEdgeNeighbourIndices() const;
00221 
00222                //- Return cut edge neighbour edge starts.  Not implemented
00223                const labelList& cutEdgeNeighbourStart() const;
00224 
00225               // Doubly cut edge addressing
00226 
00227                   //- Return doubly cut edge indices.  Not implemented
00228                   const labelList& doubleCutEdgeIndices() const;
00229 
00230                   //- Return doubly cut edge owner addressing
00231                   //  into current patch.  Not implemented
00232                   const labelList& doubleCutOwner() const;
00233 
00234                   //- Return doubly cut edge neighbour addressing
00235                   //  into current patch.  Not implemented
00236                   const labelList& doubleCutNeighbour() const;
00237 
00238               //- Return cut edge multiplication mask.  Not implemented
00239               const scalarField& ownNeiDoubleMask() const;
00240 };
00241 
00242 
00243 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00244 
00245 } // End namespace Foam
00246 
00247 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
00248 
00249 #endif
00250 
00251 // ************************************************************************* //
For further information go to www.openfoam.org