src/Meshes/CartesianCentering.h

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 /***************************************************************************
00003  *
00004  * The IPPL Framework
00005  * 
00006  *
00007  * Visit http://people.web.psi.ch/adelmann/ for more details
00008  *
00009  ***************************************************************************/
00010 
00011 // CartesianCentering.h
00012 // CenteringEnum enumeration, CartesianCentering and related classes (all
00013 // static). These represent all types of centering of Field's on Cartesian and
00014 // UniformCartesian meshes. See also Centering.[h,cpp] for backwards-compatible
00015 // centering classes Cell and Vert (which are still used as defaults for some
00016 // other classes parameterized on centering, and which are different than
00017 // things like CommonCartesianCenterings::allCell here because they are not
00018 // parameterized at all).
00019 
00020 #ifndef CARTESIAN_CENTERING_H
00021 #define CARTESIAN_CENTERING_H
00022 
00023 // include files
00024 #ifdef IPPL_USE_STANDARD_HEADERS
00025 #include <iostream>
00026 using namespace std;
00027 #else
00028 #include <iostream.h>
00029 #endif
00030 
00031 // Enumeration of basic 1D (one-component) centering types:
00032 // May add to this when unstructured comes in, and it means something to
00033 // simply say FACE or EDGE centering (for cartesian meshes, face and edge
00034 // centerings are a combination of CELL and VERTEX along directions):
00035 enum CenteringEnum {CELL=0, VERTEX=1, VERT=1};
00036 extern char* CenteringEnum_Names[2];
00037 
00038 // Primary class for canned and user-defined cartesian centerings:
00039 template<const CenteringEnum* CE, unsigned Dim, unsigned NComponents=1U>
00040 class CartesianCentering
00041 {
00042 public:
00043   static void print_Centerings(ostream&);  // Print function
00044   static char* CenteringName;
00045 };
00046 template <const CenteringEnum* CE, unsigned Dim, unsigned NComponents>
00047 void CartesianCentering<CE,Dim,NComponents>::
00048 print_Centerings(ostream& out)
00049 {
00050   int i,j;
00051 #ifndef __MWERKS__
00052   // Crude workaround for a serious CW4 bug; is this caused by the default
00053   // template parameter value for NComponents?
00054   out << CenteringName << endl;
00055 #endif // __MWERKS__
00056   out << "Dim = " << Dim << " ; NComponents = " << NComponents << endl;
00057   for (i=0;i<Dim;i++) {
00058     for (j=0;j<NComponents;j++) {
00059       out << "centering[dim=" << i << "][component=" << j << "] = "
00060           << CenteringEnum_Names[CE[j+i*NComponents]] << endl;
00061     }
00062   }
00063 }
00064 
00065 // Define some common CenteringEnum arrays for (logically) cartesian meshes.
00066 // (Use CartesianCenterings with your own CenteringEnum* for those not 
00067 // appearing here.)
00068 // Typically, you'll want to use the CommonCartesianCenterings class's
00069 // specializations in your actual code where you specify a centering parameter
00070 // for a Field you're declaring (see CommonCartesianCenterings class below)
00071 
00072 // N.B.: the name "CCCEnums" is a shortened form of the original name for this
00073 // class, "CommonCartesianCenteringEnums"
00074 
00075 template<unsigned Dim, unsigned NComponents=1U, unsigned Direction=0U>
00076 struct CCCEnums
00077 {
00078   // CenteringEnum arrays Classes with simple, descriptive names
00079   //---------------------------------------------------------------------
00080   // All components of Field cell-centered in all directions:
00081   //  static CenteringEnum allCell[NComponents*Dim];
00082   // All components of Field vertex-centered in all directions:
00083   //  static CenteringEnum allVertex[NComponents*Dim];
00084   // All components of Field face-centered in specified direction (meaning
00085   // vertex centered in that direction, cell-centered in others):
00086   //  static CenteringEnum allFace[NComponents*Dim];
00087   // All components of Field edge-centered along specified direction (cell
00088   // centered in that direction, vertex-centered in others):
00089   //  static CenteringEnum allEdge[NComponents*Dim];
00090   // Each vector component of Field face-centered in the corresponding
00091   // direction:
00092   //  static CenteringEnum vectorFace[NComponents*Dim];
00093   // Each vector component of Field edge-centered along the corresponding
00094   // direction:
00095   //  static CenteringEnum vectorEdge[NComponents*Dim];
00096   //---------------------------------------------------------------------
00097 };
00098 
00099 //***************CommonCartesianCenteringEnum Specializations******************
00100 
00101 //11111111111111111111111111111111111111111111111111111111111111111111111111111
00102 // 1D fields
00103 //11111111111111111111111111111111111111111111111111111111111111111111111111111
00104 
00105 // 1D field of scalars (or 1D vectors, or 1D tensors, or 1D sym. tensors)
00106 template<>
00107 struct CCCEnums<1U,1U,0U> {
00108   static CenteringEnum allCell[1U*1U];
00109   static CenteringEnum allVertex[1U*1U];
00110   // Componentwise centering along/perpendicular to component direction:
00111   static CenteringEnum vectorFace[1U*1U];
00112   static CenteringEnum vectorEdge[1U*1U];
00113   // Face/Edge centering perpendicular to/along direction 0:
00114   static CenteringEnum allFace[1U*1U];
00115   static CenteringEnum allEdge[1U*1U];
00116 };
00117 
00118 
00119 //22222222222222222222222222222222222222222222222222222222222222222222222222222
00120 // 2D fields
00121 //22222222222222222222222222222222222222222222222222222222222222222222222222222
00122 
00123 // 2D field of scalars (or 1D vectors, or 1D tensors, or 1D sym. tensors)
00124 template<>
00125 struct CCCEnums<2U,1U,0U> {
00126   static CenteringEnum allCell[2U*1U];
00127   static CenteringEnum allVertex[2U*1U];
00128   // Face/Edge centering perpendicular to/along direction 0:
00129   static CenteringEnum allFace[2U*1U];
00130   static CenteringEnum allEdge[2U*1U];
00131 };
00132 template<>
00133 struct CCCEnums<2U,1U,1U> {
00134   // Face/Edge centering perpendicular to/along direction 1:
00135   static CenteringEnum allFace[2U*1U];
00136   static CenteringEnum allEdge[2U*1U];
00137 };
00138 
00139 // 2D field of 2D vectors:
00140 template<>
00141 struct CCCEnums<2U,2U,0U> {
00142   static CenteringEnum allCell[2U*2U];
00143   static CenteringEnum allVertex[2U*2U];
00144   // Componentwise centering along/perpendicular to component direction:
00145   static CenteringEnum vectorFace[2U*2U];
00146   static CenteringEnum vectorEdge[2U*2U];
00147   // Face/Edge centering perpendicular to/along direction 0:
00148   static CenteringEnum allFace[2U*2U];
00149   static CenteringEnum allEdge[2U*2U];
00150 };
00151 template<>
00152 struct CCCEnums<2U,2U,1U> {
00153   // Face/Edge centering perpendicular to/along direction 1:
00154   static CenteringEnum allFace[2U*2U];
00155   static CenteringEnum allEdge[2U*2U];
00156 };
00157 
00158 // 2D field of 2D tensors:
00159 template<>
00160 struct CCCEnums<2U,4U,0U> {
00161   static CenteringEnum allCell[4U*2U];
00162   static CenteringEnum allVertex[4U*2U];
00163   // Face/Edge centering perpendicular to/along direction 0:
00164   static CenteringEnum allFace[2U*4U];
00165   static CenteringEnum allEdge[2U*4U];
00166 };
00167 template<>
00168 struct CCCEnums<2U,4U,1U> {
00169   // Face/Edge centering perpendicular to/along direction 1:
00170   static CenteringEnum allFace[2U*4U];
00171   static CenteringEnum allEdge[2U*4U];
00172 };
00173 
00174 // 2D field of 2D symmetric tensors:
00175 template<>
00176 struct CCCEnums<2U,3U,0U> {
00177   static CenteringEnum allCell[2U*3U];
00178   static CenteringEnum allVertex[2U*3U];
00179   // Face/Edge centering perpendicular to/along direction 0:
00180   static CenteringEnum allFace[2U*3U];
00181   static CenteringEnum allEdge[2U*3U];
00182 };
00183 template<>
00184 struct CCCEnums<2U,3U,1U> {
00185   // Face/Edge centering perpendicular to/along direction 1:
00186   static CenteringEnum allFace[2U*3U];
00187   static CenteringEnum allEdge[2U*3U];
00188 };
00189 
00190 
00191 //33333333333333333333333333333333333333333333333333333333333333333333333333333
00192 // 3D fields
00193 //33333333333333333333333333333333333333333333333333333333333333333333333333333
00194 
00195 // 3D field of scalars (or 1D vectors, or 1D tensors, or 1D sym. tensors)
00196 template<>
00197 struct CCCEnums<3U,1U,0U> {
00198   static CenteringEnum allCell[3U*1U];
00199   static CenteringEnum allVertex[3U*1U];
00200   // Face/Edge centering perpendicular to/along direction 0:
00201   static CenteringEnum allFace[3U*1U];
00202   static CenteringEnum allEdge[3U*1U];
00203 };
00204 template<>
00205 struct CCCEnums<3U,1U,1U> {
00206   // Face/Edge centering perpendicular to/along direction 1:
00207   static CenteringEnum allFace[3U*1U];
00208   static CenteringEnum allEdge[3U*1U];
00209 };
00210 template<>
00211 struct CCCEnums<3U,1U,2U> {
00212   // Face/Edge centering perpendicular to/along direction 2:
00213   static CenteringEnum allFace[3U*1U];
00214   static CenteringEnum allEdge[3U*1U];
00215 };
00216 
00217 // 3D field of 2D vectors:
00218 template<>
00219 struct CCCEnums<3U,2U,0U> {
00220   static CenteringEnum allCell[3U*2U];
00221   static CenteringEnum allVertex[3U*2U];
00222   // Face/Edge centering perpendicular to/along direction 0:
00223   static CenteringEnum allFace[3U*2U];
00224   static CenteringEnum allEdge[3U*2U];
00225 };
00226 template<>
00227 struct CCCEnums<3U,2U,1U> {
00228   // Face/Edge centering perpendicular to/along direction 1:
00229   static CenteringEnum allFace[3U*2U];
00230   static CenteringEnum allEdge[3U*2U];
00231 };
00232 template<>
00233 struct CCCEnums<3U,2U,2U> {
00234   // Face/Edge centering perpendicular to/along direction 2:
00235   static CenteringEnum allFace[3U*2U];
00236   static CenteringEnum allEdge[3U*2U];
00237 };
00238 
00239 // 3D field of 3D vectors:
00240 template<>
00241 struct CCCEnums<3U,3U,0U> {
00242   static CenteringEnum allCell[3U*3U];
00243   static CenteringEnum allVertex[3U*3U];
00244   // Componentwise centering along/perpendicular to component direction:
00245   static CenteringEnum vectorFace[3U*3U];
00246   static CenteringEnum vectorEdge[3U*3U];
00247   // Face/Edge centering perpendicular to/along direction 0:
00248   static CenteringEnum allFace[3U*3U];
00249   static CenteringEnum allEdge[3U*3U];
00250 };
00251 template<>
00252 struct CCCEnums<3U,3U,1U> {
00253   // Face/Edge centering perpendicular to/along direction 1:
00254   static CenteringEnum allFace[3U*3U];
00255   static CenteringEnum allEdge[3U*3U];
00256 };
00257 template<>
00258 struct CCCEnums<3U,3U,2U> {
00259   // Face/Edge centering perpendicular to/along direction 2:
00260   static CenteringEnum allFace[3U*3U];
00261   static CenteringEnum allEdge[3U*3U];
00262 };
00263 
00264 // 3D field of 3D tensors:
00265 template<>
00266 struct CCCEnums<3U,9U,0U> {
00267   static CenteringEnum allCell[3U*9U];
00268   static CenteringEnum allVertex[3U*9U];
00269   // Face/Edge centering perpendicular to/along direction 0:
00270   static CenteringEnum allFace[3U*9U];
00271   static CenteringEnum allEdge[3U*9U];
00272 };
00273 template<>
00274 struct CCCEnums<3U,9U,1U> {
00275   // Face/Edge centering perpendicular to/along direction 1:
00276   static CenteringEnum allFace[3U*9U];
00277   static CenteringEnum allEdge[3U*9U];
00278 };
00279 template<>
00280 struct CCCEnums<3U,9U,2U> {
00281   // Face/Edge centering perpendicular to/along direction 2:
00282   static CenteringEnum allFace[3U*9U];
00283   static CenteringEnum allEdge[3U*9U];
00284 };
00285 
00286 // 3D field of 3D symmetric tensors:
00287 template<>
00288 struct CCCEnums<3U,6U,0U> {
00289   static CenteringEnum allCell[3U*6U];
00290   static CenteringEnum allVertex[3U*6U];
00291   // Face/Edge centering perpendicular to/along direction 0:
00292   static CenteringEnum allFace[3U*6U];
00293   static CenteringEnum allEdge[3U*6U];
00294 };
00295 template<>
00296 struct CCCEnums<3U,6U,1U> {
00297   // Face/Edge centering perpendicular to/along direction 1:
00298   static CenteringEnum allFace[3U*6U];
00299   static CenteringEnum allEdge[3U*6U];
00300 };
00301 template<>
00302 struct CCCEnums<3U,6U,2U> {
00303   // Face/Edge centering perpendicular to/along direction 2:
00304   static CenteringEnum allFace[3U*6U];
00305   static CenteringEnum allEdge[3U*6U];
00306 };
00307 
00308 
00309 
00310 //-----------------------------------------------------------------------------
00311 
00312 // Wrapper classes that wrap CCCEnums classes into CartesianCenterings classes;
00313 // the canned typedefs in the canned specializations of these below are what
00314 // the user will likely use.
00315 
00316 template<unsigned Dim, unsigned NComponents=1U, unsigned Direction=0U>
00317 struct CommonCartesianCenterings
00318 {
00319   //public:
00320   //  typedef CartesianCentering<CCCEnums<Dim,NComponents,
00321   //Direction>::allCell, Dim, NComponents> allCell;
00322   //typedef CartesianCentering<CCCEnums<Dim,NComponents,
00323   //Direction>::allVertex, Dim, NComponents> allVertex;
00324   //typedef CartesianCentering<CCCEnums<Dim,NComponents,
00325   //Direction>::allFace, Dim, NComponents> allFace;
00326   //typedef CartesianCentering<CCCEnums<Dim,NComponents,
00327   //Direction>::allEdge, Dim, NComponents> allEdge;
00328   //typedef CartesianCentering<CCCEnums<Dim,NComponents,
00329   //Direction>::vectorFace, Dim, NComponents> vectorFace;
00330   //typedef CartesianCentering<CCCEnums<Dim,NComponents,
00331   //Direction>::vectorEdge, Dim, NComponents> vectorEdge;
00332 };
00333 
00334 //**********CommonCartesianCententerings specializations, typedefs*************
00335 
00336 
00337 //11111111111111111111111111111111111111111111111111111111111111111111111111111
00338 // 1D fields
00339 //11111111111111111111111111111111111111111111111111111111111111111111111111111
00340 
00341 // 1D field of scalars (or 1D vectors, or 1D tensors, or 1D sym. tensors)
00342 template<>
00343 struct CommonCartesianCenterings<1U,1U,0U>
00344 {
00345   typedef CartesianCentering<CCCEnums<1U,1U,0U>::allCell,1U,1U>   allCell;
00346   typedef CartesianCentering<CCCEnums<1U,1U,0U>::allVertex,1U,1U> allVertex;
00347   // Componentwise centering along/perpendicular to component direction:
00348   typedef CartesianCentering<CCCEnums<1U,1U,0U>::vectorFace,1U,1U> vectorFace;
00349   typedef CartesianCentering<CCCEnums<1U,1U,0U>::vectorEdge,1U,1U> vectorEdge;
00350   // Face/Edge centering perpendicular to/along direction 0:
00351   typedef CartesianCentering<CCCEnums<1U,1U,0U>::allFace,1U,1U> allFace;
00352   typedef CartesianCentering<CCCEnums<1U,1U,0U>::allEdge,1U,1U> allEdge;
00353 };
00354 
00355 
00356 //22222222222222222222222222222222222222222222222222222222222222222222222222222
00357 // 2D fields
00358 //22222222222222222222222222222222222222222222222222222222222222222222222222222
00359 
00360 // 2D field of scalars (or 1D vectors, or 1D tensors, or 1D sym. tensors)
00361 template<>
00362 struct CommonCartesianCenterings<2U,1U,0U>
00363 {
00364   typedef CartesianCentering<CCCEnums<2U,1U,0U>::allCell,2U,1U>   allCell;
00365   typedef CartesianCentering<CCCEnums<2U,1U,0U>::allVertex,2U,1U> allVertex;
00366   // Face/Edge centering perpendicular to/along direction 0:
00367   typedef CartesianCentering<CCCEnums<2U,1U,0U>::allFace,2U,1U> allFace;
00368   typedef CartesianCentering<CCCEnums<2U,1U,0U>::allEdge,2U,1U> allEdge;
00369 };
00370 template<>
00371 struct CommonCartesianCenterings<2U,1U,1U> {
00372   // Face/Edge centering perpendicular to/along direction 1:
00373   typedef CartesianCentering<CCCEnums<2U,1U,1U>::allFace,2U,1U> allFace;
00374   typedef CartesianCentering<CCCEnums<2U,1U,1U>::allEdge,2U,1U> allEdge;
00375 };
00376 
00377 // 2D field of 2D vectors:
00378 template<>
00379 struct CommonCartesianCenterings<2U,2U,0U>
00380 {
00381   typedef CartesianCentering<CCCEnums<2U,2U,0U>::allCell,2U,2U>   allCell;
00382   typedef CartesianCentering<CCCEnums<2U,2U,0U>::allVertex,2U,2U> allVertex;
00383   // Componentwise centering along/perpendicular to component direction:
00384   typedef CartesianCentering<CCCEnums<2U,2U,0U>::vectorFace,2U,2U> vectorFace;
00385   typedef CartesianCentering<CCCEnums<2U,2U,0U>::vectorEdge,2U,2U> vectorEdge;
00386   // Face/Edge centering perpendicular to/along direction 0:
00387   typedef CartesianCentering<CCCEnums<2U,2U,0U>::allFace,2U,2U> allFace;
00388   typedef CartesianCentering<CCCEnums<2U,2U,0U>::allEdge,2U,2U> allEdge;
00389 };
00390 template<>
00391 struct CommonCartesianCenterings<2U,2U,1U>
00392 {
00393   // Face/Edge centering perpendicular to/along direction 1:
00394   typedef CartesianCentering<CCCEnums<2U,2U,1U>::allFace,2U,2U> allFace;
00395   typedef CartesianCentering<CCCEnums<2U,2U,1U>::allEdge,2U,2U> allEdge;
00396 };
00397 
00398 // 2D field of 2D tensors:
00399 template<>
00400 struct CommonCartesianCenterings<2U,4U,0U>
00401 {
00402   typedef CartesianCentering<CCCEnums<2U,4U,0U>::allCell,2U,4U>   allCell;
00403   typedef CartesianCentering<CCCEnums<2U,4U,0U>::allVertex,2U,4U> allVertex;
00404   // Face/Edge centering perpendicular to/along direction 0:
00405   typedef CartesianCentering<CCCEnums<2U,4U,0U>::allFace,2U,4U> allFace;
00406   typedef CartesianCentering<CCCEnums<2U,4U,0U>::allEdge,2U,4U> allEdge;
00407 };
00408 template<>
00409 struct CommonCartesianCenterings<2U,4U,1U>
00410 {
00411   // Face/Edge centering perpendicular to/along direction 1:
00412   typedef CartesianCentering<CCCEnums<2U,4U,1U>::allFace,2U,4U> allFace;
00413   typedef CartesianCentering<CCCEnums<2U,4U,1U>::allEdge,2U,4U> allEdge;
00414 };
00415 
00416 // 2D field of 2D symmetric tensors:
00417 template<>
00418 struct CommonCartesianCenterings<2U,3U,0U>
00419 {
00420   typedef CartesianCentering<CCCEnums<2U,3U,0U>::allCell,2U,3U>   allCell;
00421   typedef CartesianCentering<CCCEnums<2U,3U,0U>::allVertex,2U,3U> allVertex;
00422   // Face/Edge centering perpendicular to/along direction 0:
00423   typedef CartesianCentering<CCCEnums<2U,3U,0U>::allFace,2U,3U> allFace;
00424   typedef CartesianCentering<CCCEnums<2U,3U,0U>::allEdge,2U,3U> allEdge;
00425 };
00426 template<>
00427 struct CommonCartesianCenterings<2U,3U,1U>
00428 {
00429   // Face/Edge centering perpendicular to/along direction 1:
00430   typedef CartesianCentering<CCCEnums<2U,3U,1U>::allFace,2U,3U> allFace;
00431   typedef CartesianCentering<CCCEnums<2U,3U,1U>::allEdge,2U,3U> allEdge;
00432 };
00433 
00434 
00435 //33333333333333333333333333333333333333333333333333333333333333333333333333333
00436 // 3D fields
00437 //33333333333333333333333333333333333333333333333333333333333333333333333333333
00438 
00439 // 3D field of scalars (or 1D vectors, or 1D tensors, or 1D sym. tensors)
00440 template<>
00441 struct CommonCartesianCenterings<3U,1U,0U>
00442 {
00443   typedef CartesianCentering<CCCEnums<3U,1U,0U>::allCell,3U,1U>   allCell;
00444   typedef CartesianCentering<CCCEnums<3U,1U,0U>::allVertex,3U,1U> allVertex;
00445   // Face/Edge centering perpendicular to/along direction 0:
00446   typedef CartesianCentering<CCCEnums<3U,1U,0U>::allFace,3U,1U> allFace;
00447   typedef CartesianCentering<CCCEnums<3U,1U,0U>::allEdge,3U,1U> allEdge;
00448 };
00449 template<>
00450 struct CommonCartesianCenterings<3U,1U,1U>
00451 {
00452   // Face/Edge centering perpendicular to/along direction 1:
00453   typedef CartesianCentering<CCCEnums<3U,1U,1U>::allFace,3U,1U> allFace;
00454   typedef CartesianCentering<CCCEnums<3U,1U,1U>::allEdge,3U,1U> allEdge;
00455 };
00456 template<>
00457 struct CommonCartesianCenterings<3U,1U,2U>
00458 {
00459   // Face/Edge centering perpendicular to/along direction 2:
00460   typedef CartesianCentering<CCCEnums<3U,1U,2U>::allFace,3U,1U> allFace;
00461   typedef CartesianCentering<CCCEnums<3U,1U,2U>::allEdge,3U,1U> allEdge;
00462 };
00463 
00464 // 3D field of 2D vectors:
00465 template<>
00466 struct CommonCartesianCenterings<3U,2U,0U>
00467 {
00468   typedef CartesianCentering<CCCEnums<3U,2U,0U>::allCell,3U,2U> allCell;
00469   typedef CartesianCentering<CCCEnums<3U,2U,0U>::allVertex,3U,2U> allVertex;
00470   // Face/Edge centering perpendicular to/along direction 0:
00471   typedef CartesianCentering<CCCEnums<3U,2U,0U>::allFace,3U,2U> allFace;
00472   typedef CartesianCentering<CCCEnums<3U,2U,0U>::allEdge,3U,2U> allEdge;
00473 };
00474 template<>
00475 struct CommonCartesianCenterings<3U,2U,1U>
00476 {
00477   // Face/Edge centering perpendicular to/along direction 1:
00478   typedef CartesianCentering<CCCEnums<3U,2U,1U>::allFace,3U,2U> allFace;
00479   typedef CartesianCentering<CCCEnums<3U,2U,1U>::allEdge,3U,2U> allEdge;
00480 };
00481 template<>
00482 struct CommonCartesianCenterings<3U,2U,2U>
00483 {
00484   // Face/Edge centering perpendicular to/along direction 2:
00485   typedef CartesianCentering<CCCEnums<3U,2U,2U>::allFace,3U,2U> allFace;
00486   typedef CartesianCentering<CCCEnums<3U,2U,2U>::allEdge,3U,2U> allEdge;
00487 };
00488 
00489 // 3D field of 3D vectors:
00490 template<>
00491 struct CommonCartesianCenterings<3U,3U,0U>
00492 {
00493   typedef CartesianCentering<CCCEnums<3U,3U,0U>::allCell,3U,3U> allCell;
00494   typedef CartesianCentering<CCCEnums<3U,3U,0U>::allVertex,3U,3U> allVertex;
00495   // Componentwise centering along/perpendicular to component direction:
00496   typedef CartesianCentering<CCCEnums<3U,3U,0U>::vectorFace,3U,3U> vectorFace;
00497   typedef CartesianCentering<CCCEnums<3U,3U,0U>::vectorEdge,3U,3U> vectorEdge;
00498   // Face/Edge centering perpendicular to/along direction 0:
00499   typedef CartesianCentering<CCCEnums<3U,3U,0U>::allFace,3U,3U> allFace;
00500   typedef CartesianCentering<CCCEnums<3U,3U,0U>::allEdge,3U,3U> allEdge;
00501 };
00502 template<>
00503 struct CommonCartesianCenterings<3U,3U,1U>
00504 {
00505   // Face/Edge centering perpendicular to/along direction 1:
00506   typedef CartesianCentering<CCCEnums<3U,3U,1U>::allFace,3U,3U> allFace;
00507   typedef CartesianCentering<CCCEnums<3U,3U,1U>::allEdge,3U,3U> allEdge;
00508 };
00509 template<>
00510 struct CommonCartesianCenterings<3U,3U,2U>
00511 {
00512   // Face/Edge centering perpendicular to/along direction 2:
00513   typedef CartesianCentering<CCCEnums<3U,3U,2U>::allFace,3U,3U> allFace;
00514   typedef CartesianCentering<CCCEnums<3U,3U,2U>::allEdge,3U,3U> allEdge;
00515 };
00516 
00517 
00518 // 3D field of 3D tensors:
00519 template<>
00520 struct CommonCartesianCenterings<3U,9U,0U>
00521 {
00522   typedef CartesianCentering<CCCEnums<3U,9U,0U>::allCell,3U,9U>  allCell;
00523   typedef CartesianCentering<CCCEnums<3U,9U,0U>::allVertex,3U,9U> allVertex;
00524   // Face/Edge centering perpendicular to/along direction 0:
00525   typedef CartesianCentering<CCCEnums<3U,9U,0U>::allFace,3U,9U> allFace;
00526   typedef CartesianCentering<CCCEnums<3U,9U,0U>::allEdge,3U,9U> allEdge;
00527 };
00528 template<>
00529 struct CommonCartesianCenterings<3U,9U,1U>
00530 {
00531   // Face/Edge centering perpendicular to/along direction 1:
00532   typedef CartesianCentering<CCCEnums<3U,9U,1U>::allFace,3U,9U> allFace;
00533   typedef CartesianCentering<CCCEnums<3U,9U,1U>::allEdge,3U,9U> allEdge;
00534 };
00535 template<>
00536 struct CommonCartesianCenterings<3U,9U,2U>
00537 {
00538   // Face/Edge centering perpendicular to/along direction 2:
00539   typedef CartesianCentering<CCCEnums<3U,9U,2U>::allFace,3U,9U> allFace;
00540   typedef CartesianCentering<CCCEnums<3U,9U,2U>::allEdge,3U,9U> allEdge;
00541 };
00542 
00543 // 3D field of 3D symmetric tensors:
00544 template<>
00545 struct CommonCartesianCenterings<3U,6U,0U>
00546 {
00547   typedef CartesianCentering<CCCEnums<3U,6U,0U>::allCell,3U,6U> allCell;
00548   typedef CartesianCentering<CCCEnums<3U,6U,0U>::allVertex,3U,6U> allVertex;
00549   // Face/Edge centering perpendicular to/along direction 0:
00550   typedef CartesianCentering<CCCEnums<3U,6U,0U>::allFace,3U,6U> allFace;
00551   typedef CartesianCentering<CCCEnums<3U,6U,0U>::allEdge,3U,6U> allEdge;
00552 };
00553 template<>
00554 struct CommonCartesianCenterings<3U,6U,1U>
00555 {
00556   // Face/Edge centering perpendicular to/along direction 1:
00557   typedef CartesianCentering<CCCEnums<3U,6U,1U>::allFace,3U,6U> allFace;
00558   typedef CartesianCentering<CCCEnums<3U,6U,1U>::allEdge,3U,6U> allEdge;
00559 };
00560 template<>
00561 struct CommonCartesianCenterings<3U,6U,2U>
00562 {
00563   // Face/Edge centering perpendicular to/along direction 2:
00564   typedef CartesianCentering<CCCEnums<3U,6U,2U>::allFace,3U,6U> allFace;
00565   typedef CartesianCentering<CCCEnums<3U,6U,2U>::allEdge,3U,6U> allEdge;
00566 };
00567 
00568 #include "Meshes/CartesianCentering.cpp"
00569 
00570 #endif // CARTESIAN_CENTERING_H
00571 
00572 /***************************************************************************
00573  * $RCSfile: CartesianCentering.h,v $   $Author: adelmann $
00574  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:28 $
00575  * IPPL_VERSION_ID: $Id: CartesianCentering.h,v 1.1.1.1 2003/01/23 07:40:28 adelmann Exp $ 
00576  ***************************************************************************/

Generated on Mon Jan 16 13:23:51 2006 for IPPL by  doxygen 1.4.6