initial commit for version 1.6.x patch release
[OpenFOAM-1.6.x.git] / src / finiteVolume / interpolation / interpolation / interpolationCellPoint / cellPointWeight / cellPointWeight.H.old
blobc9cf16d7edc83c212d165fdc674c52022b385714
1 /*---------------------------------------------------------------------------*\
2   =========                 |
3   \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
4    \\    /   O peration     |
5     \\  /    A nd           | Copyright (C) 1991-2009 OpenCFD Ltd.
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 the
13     Free Software Foundation; either version 2 of the License, or (at your
14     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, write to the Free Software Foundation,
23     Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25 Class
26     cellPointWeight
28 Description
30 SourceFiles
31     cellPointWeight.C
32     findCellPointTet.H
33     findCellPointTriangle.H
35 \*---------------------------------------------------------------------------*/
37 #ifndef cellPointWeight_H
38 #define cellPointWeight_H
40 #include "vector.H"
42 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
44 namespace Foam
47 class polyMesh;
49 /*---------------------------------------------------------------------------*\
50                            Class cellPointWeight Declaration
51 \*---------------------------------------------------------------------------*/
53 class cellPointWeight
55     // Private data
57        vector position_;
58        label cellNo_;
59        label face_;
60        FixedList<scalar, 4> weights_;
61        FixedList<label, 3> faceVertices_;
62        label cellFace_;
64        
65     // Private Member Functions
67         bool findTet
68         (
69             const polyMesh& mesh,
70             const label nFace,
71             vector tetPoints[],
72             label tetLabelCandidate[],
73             scalar phiCandidate[],
74             label& closestFace,
75             scalar& minDistance
76         );
78         bool findTriangle
79         (
80             const polyMesh& mesh,
81             const label nFace
82         );
85 public:
87     // Constructors
89         //- Construct from components
90         cellPointWeight
91         (
92             const polyMesh& mesh,
93             const vector& position, 
94             const label nCell,
95             const label facei = -1
96         );
99     // Member Functions
101         //- cell label
102         inline label cell() const
103         {
104             return cellNo_;
105         }
107         //- face label
108         inline label face() const
109         {
110             return face_;
111         }
112         
113         //- interpolation weights
114         inline const FixedList<scalar, 4>& weights() const
115         {
116             return weights_;
117         }
118         
119         //- interpolation addressing for points on face
120         inline const FixedList<label, 3>& faceVertices() const
121         {
122             return faceVertices_;
123         }
125         //- face label
126         inline label cellFace() const
127         {
128             return cellFace_;
129         }
133 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
135 } // End namespace Foam
137 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
139 #endif
141 // ************************************************************************* //