cellModelI.H
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #include "error.H"
00030 #include "cellModel.H"
00031
00032
00033
00034 namespace Foam
00035 {
00036
00037
00038
00039 inline const word& cellModel::name() const
00040 {
00041 return name_;
00042 }
00043
00044
00045 inline label cellModel::index() const
00046 {
00047 return index_;
00048 }
00049
00050
00051 inline label cellModel::nPoints() const
00052 {
00053 return nPoints_;
00054 }
00055
00056
00057 inline label cellModel::nEdges() const
00058 {
00059 return edges_.size();
00060 }
00061
00062
00063 inline label cellModel::nFaces() const
00064 {
00065 return faces_.size();
00066 }
00067
00068
00069
00070
00071 inline edgeList cellModel::edges(const labelList& pointLabels) const
00072 {
00073 edgeList e(edges_.size());
00074
00075
00076 forAll(edges_, edgeI)
00077 {
00078 e[edgeI] =
00079 edge
00080 (
00081 pointLabels[edges_[edgeI].start()],
00082 pointLabels[edges_[edgeI].end()]
00083 );
00084 }
00085
00086 return e;
00087 }
00088
00089
00090
00091 inline const faceList& cellModel::modelFaces() const
00092 {
00093 return faces_;
00094 }
00095
00096
00097
00098 inline faceList cellModel::faces(const labelList& pointLabels) const
00099 {
00100 faceList f(faces_.size());
00101
00102
00103 forAll(faces_, faceI)
00104 {
00105 const labelList& curModelLabels = faces_[faceI];
00106
00107 face& curFace = f[faceI];
00108
00109 curFace.setSize(curModelLabels.size());
00110
00111 forAll (curModelLabels, labelI)
00112 {
00113 curFace[labelI] = pointLabels[curModelLabels[labelI]];
00114 }
00115 }
00116
00117 return f;
00118 }
00119
00120
00121
00122
00123
00124 inline bool operator==(const cellModel& m1, const cellModel& m2)
00125 {
00126 return (&m1 == &m2);
00127 }
00128
00129
00130 inline bool operator!=(const cellModel& m1, const cellModel& m2)
00131 {
00132 return (&m1 != &m2);
00133 }
00134
00135
00136
00137
00138 }
00139
00140
Copyright © 2000-2009 OpenCFD Ltd