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
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046 #ifndef syncTools_H
00047 #define syncTools_H
00048
00049 #include "UList.H"
00050 #include "Pstream.H"
00051 #include "tensorField.H"
00052 #include "PackedList.H"
00053
00054
00055
00056 namespace Foam
00057 {
00058
00059
00060 label transform(const tensor&, const label val);
00061
00062 class polyBoundaryMesh;
00063 class polyMesh;
00064 class coupledPolyPatch;
00065
00066
00067
00068
00069
00070 class syncTools
00071 {
00072
00073
00074
00075 static bool hasCouples(const polyBoundaryMesh&);
00076
00077
00078 static void checkTransform(const coupledPolyPatch&, const bool);
00079
00080
00081 static label transform(const tensor&, const label i)
00082 {
00083 return i;
00084 }
00085
00086
00087
00088 template <class T>
00089 static void transformList(const tensorField&, UList<T>&);
00090
00091
00092
00093 template <class T>
00094 static void separateList(const vectorField&, UList<T>&);
00095
00096
00097 public:
00098
00099
00100
00101
00102
00103 template <class T, class CombineOp>
00104 static void syncPointList
00105 (
00106 const polyMesh&,
00107 UList<T>&,
00108 const CombineOp& bop,
00109 const T& nullValue,
00110 const bool applySeparation
00111 );
00112
00113
00114
00115 template <class T, class CombineOp>
00116 static void syncPointList
00117 (
00118 const polyMesh&,
00119 const labelList& meshPoints,
00120 UList<T>&,
00121 const CombineOp& bop,
00122 const T& nullValue,
00123 const bool applySeparation
00124 );
00125
00126
00127
00128 template <class T, class CombineOp>
00129 static void syncEdgeList
00130 (
00131 const polyMesh&,
00132 UList<T>&,
00133 const CombineOp& bop,
00134 const T& nullValue,
00135 const bool applySeparation
00136 );
00137
00138
00139
00140
00141 template <class T, class CombineOp>
00142 static void syncBoundaryFaceList
00143 (
00144 const polyMesh&,
00145 UList<T>&,
00146 const CombineOp& bop,
00147 const bool applySeparation
00148 );
00149
00150
00151
00152
00153 template <class T, class CombineOp>
00154 static void syncFaceList
00155 (
00156 const polyMesh&,
00157 UList<T>&,
00158 const CombineOp& bop,
00159 const bool applySeparation
00160 );
00161
00162
00163
00164 template <class T>
00165 static void swapBoundaryFaceList
00166 (
00167 const polyMesh&,
00168 UList<T>&,
00169 const bool applySeparation
00170 );
00171
00172
00173
00174 template <class T>
00175 static void swapFaceList
00176 (
00177 const polyMesh&,
00178 UList<T>&,
00179 const bool applySeparation
00180 );
00181
00182
00183 static PackedList<1> getMasterPoints(const polyMesh&);
00184
00185
00186 static PackedList<1> getMasterEdges(const polyMesh&);
00187
00188
00189 };
00190
00191
00192 template <>
00193 inline void syncTools::transformList(const tensorField&, UList<label>&)
00194 {}
00195
00196 template <>
00197 inline void syncTools::transformList(const tensorField&, UList<scalar>&)
00198 {}
00199
00200 template <>
00201 void syncTools::separateList(const vectorField&, UList<vector>&);
00202
00203 template <class T>
00204 List<T> transform(const tensor& rotTensor, UList<T>& field);
00205
00206
00207
00208 }
00209
00210
00211
00212 #ifdef NoRepository
00213 # include "syncToolsTemplates.C"
00214 #endif
00215
00216
00217
00218 #endif
00219
00220
Copyright © 2000-2007 OpenCFD Ltd