src/Meshes/Cartesian.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 #ifndef CARTESIAN_H
00012 #define CARTESIAN_H
00013 
00014 // Cartesian.h
00015 // Cartesian class - represents non-uniform-spacing cartesian meshes.
00016 
00017 // include files
00018 #include "Meshes/Mesh.h"
00019 #include "Meshes/Centering.h"
00020 #include "Meshes/CartesianCentering.h"
00021 #include "AppTypes/Vektor.h"
00022 
00023 #ifdef IPPL_STDSTL
00024 #include <map>
00025 using std::map;
00026 #else
00027 #include <map.h>
00028 #endif // IPPL_STDSTL
00029 
00030 // forward declarations
00031 template<class T, unsigned D> class BareField;
00032 template<class T, unsigned D, class M, class C> class Field;
00033 template <unsigned Dim, class MFLOAT> class Cartesian;
00034 template <unsigned Dim, class MFLOAT>
00035 ostream& operator<<(ostream&, const Cartesian<Dim,MFLOAT>&);
00036 
00037 template <unsigned Dim, class MFLOAT=double>
00038 class Cartesian : public Mesh<Dim>
00039 {
00040 public: 
00041   //# public typedefs
00042   typedef Cell DefaultCentering;
00043   typedef MFLOAT MeshValue_t;
00044   typedef Vektor<MFLOAT,Dim> MeshVektor_t;
00045 
00046   // Default constructor (use initialize() to make valid)
00047   Cartesian()
00048   {
00049     hasSpacingFields = false;
00050   };  
00051   // Destructor
00052   ~Cartesian()
00053   {
00054     if (hasSpacingFields) {
00055       delete VertSpacings;
00056       delete CellSpacings;
00057       delete FlVert;
00058       delete FlCell;
00059     }
00060   }; 
00061 
00062   // Non-default constructors
00063   Cartesian(const NDIndex<Dim>& ndi);
00064   Cartesian(const Index& I);
00065   Cartesian(const Index& I, const Index& J);
00066   Cartesian(const Index& I, const Index& J, const Index& K);
00067   // These also take a MFLOAT** specifying the mesh spacings:
00068   Cartesian(const NDIndex<Dim>& ndi, MFLOAT** const delX);
00069   Cartesian(const Index& I, MFLOAT** const delX);
00070   Cartesian(const Index& I, const Index& J, MFLOAT** const delX);
00071   Cartesian(const Index& I, const Index& J, const Index& K,
00072             MFLOAT** const delX);
00073   // These further take a Vektor<MFLOAT,Dim>& specifying the origin:
00074   Cartesian(const NDIndex<Dim>& ndi, MFLOAT** const delX,
00075             const Vektor<MFLOAT,Dim>& orig);
00076   Cartesian(const Index& I, MFLOAT** const delX,
00077             const Vektor<MFLOAT,Dim>& orig);
00078   Cartesian(const Index& I, const Index& J, MFLOAT** const delX,
00079             const Vektor<MFLOAT,Dim>& orig);
00080   Cartesian(const Index& I, const Index& J, const Index& K,
00081             MFLOAT** const delX, const Vektor<MFLOAT,Dim>& orig);
00082   // These further take a MeshBC_E array specifying mesh boundary conditions.
00083   Cartesian(const NDIndex<Dim>& ndi, MFLOAT** const delX,
00084             const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
00085   Cartesian(const Index& I, MFLOAT** const delX,
00086             const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
00087   Cartesian(const Index& I, const Index& J, MFLOAT** const delX,
00088             const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
00089   Cartesian(const Index& I, const Index& J, const Index& K,
00090             MFLOAT** const delX, const Vektor<MFLOAT,Dim>& orig,
00091             MeshBC_E* const mbc);
00092 
00093   // initialize functions
00094   void initialize(const NDIndex<Dim>& ndi);
00095   void initialize(const Index& I);
00096   void initialize(const Index& I, const Index& J);
00097   void initialize(const Index& I, const Index& J, const Index& K);
00098   // These also take a MFLOAT** specifying the mesh spacings:
00099   void initialize(const NDIndex<Dim>& ndi, MFLOAT** const delX);
00100   void initialize(const Index& I, MFLOAT** const delX);
00101   void initialize(const Index& I, const Index& J, MFLOAT** const delX);
00102   void initialize(const Index& I, const Index& J, const Index& K,
00103                   MFLOAT** const delX);
00104   // These further take a Vektor<MFLOAT,Dim>& specifying the origin:
00105   void initialize(const NDIndex<Dim>& ndi, MFLOAT** const delX,
00106                   const Vektor<MFLOAT,Dim>& orig);
00107   void initialize(const Index& I, MFLOAT** const delX,
00108                   const Vektor<MFLOAT,Dim>& orig);
00109   void initialize(const Index& I, const Index& J, MFLOAT** const delX,
00110                   const Vektor<MFLOAT,Dim>& orig);
00111   void initialize(const Index& I, const Index& J, const Index& K,
00112                   MFLOAT** const delX, const Vektor<MFLOAT,Dim>& orig);
00113   // These further take a MeshBC_E array specifying mesh boundary conditions.
00114   void initialize(const NDIndex<Dim>& ndi, MFLOAT** const delX,
00115                   const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
00116   void initialize(const Index& I, MFLOAT** const delX,
00117                   const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
00118   void initialize(const Index& I, const Index& J, MFLOAT** const delX,
00119                   const Vektor<MFLOAT,Dim>& orig, MeshBC_E* const mbc);
00120   void initialize(const Index& I, const Index& J, const Index& K,
00121                   MFLOAT** const delX, const Vektor<MFLOAT,Dim>& orig,
00122                   MeshBC_E* const mbc);
00123 
00124 private:
00125   // Private member data:
00126   // Vert-vert spacings along each axis - including guard cells; use STL map:
00127   map<int,MFLOAT> meshSpacing[Dim];
00128   // Vertex positions along each axis - including guard cells; use STL map:
00129   map<int,MFLOAT> meshPosition[Dim];
00130   Vektor<MFLOAT,Dim> origin; // Origin of mesh coordinates (vertices)
00131   MeshBC_E MeshBC[2*Dim];    // Mesh boundary conditions
00132   FieldLayout<Dim>* FlCell;  // Layouts for BareField* CellSpacings
00133   FieldLayout<Dim>* FlVert;  // Layouts for BareField* VertSpacings
00134 
00135   // Private member functions:
00136   void updateMeshSpacingGuards(int face);// Update guard layers in meshSpacings
00137   void setup(); // Private function doing tasks common to all constructors.
00138 
00139   // Set only the derivative constants, using pre-set spacings:
00140   void set_Dvc();
00141 
00142 
00143 public: 
00144 
00145   // Public member data:
00146   unsigned gridSizes[Dim];            // Sizes (number of vertices)
00147   Vektor<MFLOAT,Dim> Dvc[1<<Dim];     // Constants for derivatives.
00148   bool hasSpacingFields;              // Flags allocation of the following:
00149   BareField<Vektor<MFLOAT,Dim>,Dim>* VertSpacings;
00150   BareField<Vektor<MFLOAT,Dim>,Dim>* CellSpacings;
00151 
00152   // Public member functions:
00153 
00154   // Create BareField's of vertex and cell spacings; allow for specifying 
00155   // layouts via the FieldLayout e_dim_tag and vnodes parameters (these
00156   // get passed in to construct the FieldLayout used to construct the
00157   // BareField's).
00158   void storeSpacingFields(); // Default; will have default layout
00159   // Special cases for 1-3 dimensions, ala FieldLayout ctors:
00160   void storeSpacingFields(e_dim_tag p1, int vnodes=-1);
00161   void storeSpacingFields(e_dim_tag p1, e_dim_tag p2, int vnodes=-1);
00162   void storeSpacingFields(e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, 
00163                           int vnodes=-1);
00164   // Next we have one for arbitrary dimension, ala FieldLayout ctor:
00165   // All the others call this one internally:
00166   void storeSpacingFields(e_dim_tag *p, int vnodes=-1);
00167 
00168   // These specify both the total number of vnodes and the numbers of vnodes
00169   // along each dimension for the partitioning of the index space. Obviously
00170   // this restricts the number of vnodes to be a product of the numbers along
00171   // each dimension (the constructor implementation checks this): Special
00172   // cases for 1-3 dimensions, ala FieldLayout ctors (see FieldLayout.h for
00173   // more relevant comments, including definition of recurse):
00174   void storeSpacingFields(e_dim_tag p1,
00175                           unsigned vnodes1,
00176                           bool recurse=false,
00177                           int vnodes=-1);
00178   void storeSpacingFields(e_dim_tag p1, e_dim_tag p2,
00179                           unsigned vnodes1, unsigned vnodes2,
00180                           bool recurse=false,int vnodes=-1);
00181   void storeSpacingFields(e_dim_tag p1, e_dim_tag p2, e_dim_tag p3,
00182                           unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
00183                           bool recurse=false, int vnodes=-1);
00184   // Next we have one for arbitrary dimension, ala FieldLayout ctor:
00185   // All the others call this one internally:
00186   void storeSpacingFields(e_dim_tag *p, 
00187                           unsigned* vnodesPerDirection, 
00188                           bool recurse=false, int vnodes=-1);
00189 
00190   // Accessor functions for member data:
00191   // Get the origin of mesh vertex positions:
00192   Vektor<MFLOAT,Dim> get_origin() const;
00193   // Get the spacings of mesh vertex positions along specified direction:
00194   void get_meshSpacing(unsigned d, MFLOAT* spacings) const;
00195   //leak  MFLOAT* get_meshSpacing(unsigned d) const;
00196   // Get mesh boundary conditions:
00197   MeshBC_E get_MeshBC(unsigned face) const; // One face at a time
00198   MeshBC_E* get_MeshBC() const;             // All faces at once
00199 
00200   // Set functions for member data:
00201   // Set the origin of mesh vertex positions:
00202   void set_origin(const Vektor<MFLOAT,Dim>& o); 
00203   // Set the spacings of mesh vertex positions and Dvc:
00204   void set_meshSpacing(MFLOAT** const del);
00205   // Set up mesh boundary conditions:
00206   // Face specifies the mesh face, following usual numbering convention.
00207   // MeshBC_E "type" specifies the kind of BC reflective/periodic/none.
00208   void set_MeshBC(unsigned face, MeshBC_E meshBCType); // One face at a time
00209   void set_MeshBC(MeshBC_E* meshBCTypes);              // All faces at once
00210 
00211   // Formatted output of Cartesian object:
00212   void print(ostream&);
00213 
00214   //----Other Cartesian methods:-----------------------------------------------
00215   // Volume of single cell indexed by input NDIndex;
00216   MFLOAT getCellVolume(const NDIndex<Dim>&) const;
00217   // Field of volumes of all cells:
00218   Field<MFLOAT,Dim,Cartesian<Dim,MFLOAT>,Cell>&
00219   getCellVolumeField(Field<MFLOAT,Dim,Cartesian<Dim,MFLOAT>,Cell>&) const;
00220   // Volume of range of cells bounded by verticies specified by input NDIndex:
00221   MFLOAT getVertRangeVolume(const NDIndex<Dim>&) const;
00222   // Volume of range of cells spanned by input NDIndex (index of cells):
00223   MFLOAT getCellRangeVolume(const NDIndex<Dim>&) const;
00224   // Nearest vertex index to (x,y,z):
00225   NDIndex<Dim> getNearestVertex(const Vektor<MFLOAT,Dim>&) const;
00226   // Nearest vertex index with all vertex coordinates below (x,y,z):
00227   NDIndex<Dim> getVertexBelow(const Vektor<MFLOAT,Dim>&) const;
00228   // NDIndex for cell in cell-ctrd Field containing the point (x,y,z):
00229   NDIndex<Dim> getCellContaining(const Vektor<MFLOAT,Dim>& x) const
00230   {
00231     return getVertexBelow(x); // I think these functions are identical. -tjw
00232   }
00233   // (x,y,z) coordinates of indexed vertex:
00234   Vektor<MFLOAT,Dim> getVertexPosition(const NDIndex<Dim>&) const;
00235   // Field of (x,y,z) coordinates of all vertices:
00236   Field<Vektor<MFLOAT,Dim>,Dim,Cartesian<Dim,MFLOAT>,Vert>& 
00237   getVertexPositionField(Field<Vektor<MFLOAT,Dim>,Dim,
00238                          Cartesian<Dim,MFLOAT>,Vert>& ) const;
00239   // (x,y,z) coordinates of indexed cell:
00240   Vektor<MFLOAT,Dim> getCellPosition(const NDIndex<Dim>&) const;
00241   // Field of (x,y,z) coordinates of all cells:
00242   Field<Vektor<MFLOAT,Dim>,Dim,Cartesian<Dim,MFLOAT>,Cell>& 
00243   getCellPositionField(Field<Vektor<MFLOAT,Dim>,Dim,
00244                        Cartesian<Dim,MFLOAT>,Cell>& ) const;
00245   // Vertex-vertex grid spacing of indexed cell:
00246   Vektor<MFLOAT,Dim> getDeltaVertex(const NDIndex<Dim>&) const;
00247   // Field of vertex-vertex grid spacings of all cells:
00248   Field<Vektor<MFLOAT,Dim>,Dim,Cartesian<Dim,MFLOAT>,Cell>&
00249   getDeltaVertexField(Field<Vektor<MFLOAT,Dim>,Dim,
00250                       Cartesian<Dim,MFLOAT>,Cell>& ) const;
00251   // Cell-cell grid spacing of indexed vertex:
00252   Vektor<MFLOAT,Dim> getDeltaCell(const NDIndex<Dim>&) const;
00253   // Field of cell-cell grid spacings of all vertices:
00254   Field<Vektor<MFLOAT,Dim>,Dim,Cartesian<Dim,MFLOAT>,Vert>&
00255   getDeltaCellField(Field<Vektor<MFLOAT,Dim>,Dim,
00256                     Cartesian<Dim,MFLOAT>,Vert>& ) const;
00257   // Array of surface normals to cells adjoining indexed cell:
00258   Vektor<MFLOAT,Dim>* getSurfaceNormals(const NDIndex<Dim>&) const;
00259   // Array of (pointers to) Fields of surface normals to all cells:
00260   void getSurfaceNormalFields(Field<Vektor<MFLOAT,Dim>,Dim,
00261                               Cartesian<Dim,MFLOAT>,Cell>** ) const;
00262   // Similar functions, but specify the surface normal to a single face, using
00263   // the following numbering convention: 0 means low face of 1st dim, 1 means
00264   // high face of 1st dim, 2 means low face of 2nd dim, 3 means high face of 
00265   // 2nd dim, and so on:
00266   Vektor<MFLOAT,Dim> getSurfaceNormal(const NDIndex<Dim>&, unsigned) const;
00267   Field<Vektor<MFLOAT,Dim>,Dim,Cartesian<Dim,MFLOAT>,Cell>& 
00268   getSurfaceNormalField(Field<Vektor<MFLOAT,Dim>,Dim,
00269                         Cartesian<Dim,MFLOAT>,Cell>&, unsigned) const;
00270 
00271 };
00272 
00273 // I/O
00274 
00275 // Stream formatted output of Cartesian object:
00276 template< unsigned Dim, class MFLOAT >
00277 inline
00278 ostream& operator<<(ostream& out, const Cartesian<Dim,MFLOAT>& mesh)
00279 {
00280   Cartesian<Dim,MFLOAT>& ncmesh = const_cast<Cartesian<Dim,MFLOAT>&>(mesh);
00281   ncmesh.print(out);
00282   return out;
00283 }
00284 
00285 //*****************************************************************************
00286 // Stuff taken from old Cartesian.h, modified for new nonuniform Cartesian:
00287 //*****************************************************************************
00288 
00289 #ifndef CARTESIAN_STENCIL_SETUP_H
00290 #include "Meshes/CartesianStencilSetup.h"
00291 #endif
00292 
00293 //----------------------------------------------------------------------
00294 //
00295 //
00296 // Definitions of stencils.
00297 //
00298 // For each one we have first we have the user level function that takes 
00299 // a Field argument and returns an expression template.  
00300 // This is the thing the user code sees.
00301 // These could use some asserts to make sure the Fields have 
00302 // enough guard cells.
00303 //
00304 // Then we have the 'apply' function that gets used in the inner loop
00305 // when evaluating the expression.  This would be better done as a
00306 // member function of the tags above, but that would require member
00307 // function templates, which we are holding off on for now.
00308 //
00309 //----------------------------------------------------------------------
00310 
00311 //----------------------------------------------------------------------
00312 //
00313 // Divergence Vert->Cell
00314 //
00315 // First is the user function for any dimension and element types.
00316 // it returns a unary element type.
00317 //
00318 //----------------------------------------------------------------------
00319 
00320 #ifdef UNDEFINED
00321 //
00322 // T1: The element type for the Field
00323 // T2: The data type for the Cartesian mesh (for storing spacings, etc.)
00324 // Dim: the dimension of the Field and the Mesh.
00325 //
00326 template<class T1, class T2, unsigned Dim>
00327 // Return a PETE_Expr wrapper on a StencilElem.
00328 inline PETE_Expr<StencilElem<
00329   // The iterator for the expression element
00330   Field<T1,Dim,Cartesian<Dim,T2>,Vert>::iterator,
00331   // The operator for the expression element.
00332   CenteredDivergence<Dim,Cartesian<Dim,T2>,Vert,Cell>
00333 > >
00334 Div( Field< T1 , Dim , Cartesian<Dim,T2> , Vert >& x)
00335 {
00336   // Some typedefs to make the return expression easier.
00337   typedef Field<T1,Dim,Cartesian<Dim,T2>,Vert>::iterator A;
00338   typedef CenteredDivergence<Dim,Cartesian<Dim,T2>,Vert,Cell> Op_t;
00339   typedef StencilElem<A,Op_t> Elem_t;
00340   // Return the expression element.
00341   return PETE_Expr<Elem_t>( Elem_t(x.begin() ) );
00342 }
00343 
00344 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00345 // NOTE: this all doesn't work now because the mesh classes are 
00346 // no longer static, so things like Mesh::Dvc are wrong. For new Cartesian
00347 // class, rather than this UniformCartesian class, Dvc is also now an array
00348 // of arrays instead of just an array. Steve K. says he will rework all this
00349 // later. For now, the non-stencil-expression version of Div(), etc. 
00350 // are okay. Comment out everything between "REIMPLEMENT..."
00351 // --Tim Williams 2/25/97
00352 //+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
00353 
00354 /* REIMPLEMENT THIS LATER (BEGIN COMMENTED-OUT REGION)
00355 //----------------------------------------------------------------------
00356 //
00357 // Next are the elementwise 'apply' functions for Vert->Cell.
00358 // These need to be specialized on dimension, but they are still
00359 // for arbitrary element type.
00360 //
00361 // For each of these:
00362 //
00363 // A: The iterator type.
00364 // a: The instance of the iterator being passed in.
00365 // T2: The base type for the Mesh data.
00366 //
00367 //----------------------------------------------------------------------
00368 
00369 template<class A, class T2>
00370 inline
00371 UnaryReturn<Divergence<1>, A::return_type>::type
00372 apply(CenteredDivergence<1,Cartesian<1,T2>,Vert,Cell>, A a, int i,int,int)
00373 {
00374   typedef Cartesian<1,T2> Mesh;
00375   return
00376     dot(a.offset( i ),Mesh::Dvc[0]) +
00377     dot(a.offset(i+1),Mesh::Dvc[1]);
00378 }
00379 
00380 template<class A, class T2>
00381 inline
00382 UnaryReturn<Divergence<2>, A::return_type>::type
00383 apply(CenteredDivergence<2,Cartesian<2,T2>,Vert,Cell>, A a, int i,int j,int)
00384 {
00385   typedef Cartesian<2,T2> Mesh;
00386   return
00387     dot(a.offset( i , j ),Mesh::Dvc[0]) +
00388     dot(a.offset(i+1, j ),Mesh::Dvc[1]) +
00389     dot(a.offset( i ,j+1),Mesh::Dvc[2]) +
00390     dot(a.offset(i+1,j+1),Mesh::Dvc[3]);
00391 }
00392 
00393 template<class A, class T2>
00394 inline
00395 UnaryReturn<Divergence<3>, A::return_type>::type
00396 apply(CenteredDivergence<3,Cartesian<3,T2>,Vert,Cell>, A a, int i,int j,int k)
00397 {
00398   typedef Cartesian<3,T2> Mesh;
00399   return
00400     dot(a.offset( i , j , k ),Mesh::Dvc[0]) +
00401     dot(a.offset(i+1, j , k ),Mesh::Dvc[1]) +
00402     dot(a.offset( i ,j+1, k ),Mesh::Dvc[2]) +
00403     dot(a.offset(i+1,j+1, k ),Mesh::Dvc[3]) +
00404     dot(a.offset( i , j ,k+1),Mesh::Dvc[4]) +
00405     dot(a.offset(i+1, j ,k+1),Mesh::Dvc[5]) +
00406     dot(a.offset( i ,j+1,k+1),Mesh::Dvc[6]) +
00407     dot(a.offset(i+1,j+1,k+1),Mesh::Dvc[7]);
00408 }
00409 
00410 //----------------------------------------------------------------------
00411 //
00412 // Divergence Cell->Vert
00413 //
00414 // First is the user function for any dimension and element types.
00415 // it returns a stencil element type.
00416 //
00417 //----------------------------------------------------------------------
00418 
00419 //
00420 // T1: The element type for the Field.
00421 // T2: The base type for the mesh.
00422 // Dim: The dimension of the Field and the mesh.
00423 //
00424 template<class T1, class T2, unsigned Dim>
00425 // Return a PETE_Expr wrapped around a StencilElem.
00426 inline PETE_Expr<StencilElem<
00427   // The iterator for the expression.
00428   Field<T1,Dim,Cartesian<Dim,T2>,Cell>::iterator,
00429   // The operator tag.
00430   CenteredDivergence<Dim,Cartesian<Dim,T2>,Cell,Vert>
00431 > >
00432 // The function signature is way down here.
00433 Div( Field< T1 , Dim , Cartesian<Dim,T2> , Cell >& x)
00434 {
00435   // Some typedefs to make this a little easier to read.
00436   typedef CenteredDivergence<Dim,Cartesian<Dim,T2>,Cell,Vert> Op_t;
00437   typedef Field<T1,Dim,Cartesian<Dim,T2>,Cell>::iterator A;
00438   typedef StencilElem<A,Op_t> Elem_t;
00439   // Build and return the expression element.
00440   return PETE_Expr<Elem_t>( Elem_t(x.begin() ) );
00441 }
00442 
00443 //----------------------------------------------------------------------
00444 //
00445 // Next are the elementwise 'apply' functions for Cell->Vert.
00446 // These need to be specialized on dimension, but they are still
00447 // for arbitrary element type.
00448 //
00449 // For each of these:
00450 //
00451 // A: The iterator type.
00452 // a: The instance of the iterator being passed in.
00453 // T2: The base type for the Mesh data.
00454 //
00455 //----------------------------------------------------------------------
00456 
00457 template<class A, class T2>
00458 inline
00459 UnaryReturn<Divergence<1>, A::return_type>::type
00460 apply(CenteredDivergence<1,Cartesian<1,T2>,Cell,Vert>, A a)
00461 {
00462   typedef Cartesian<1,T2> Mesh;
00463   return
00464     dot(a.offset(-1),Mesh::Dvc[0]) +
00465     dot(a.offset( 0),Mesh::Dvc[1]);
00466 }
00467 
00468 template<class A, class T2>
00469 inline
00470 UnaryReturn<Divergence<1>, A::return_type>::type
00471 apply(CenteredDivergence<1,Cartesian<1,T2>,Cell,Vert>, A a,int i,int,int)
00472 {
00473   typedef Cartesian<1,T2> Mesh;
00474   return
00475     dot(a.offset(i-1),Mesh::Dvc[0]) +
00476     dot(a.offset( i ),Mesh::Dvc[1]);
00477 }
00478 
00479 template<class A, class T2>
00480 inline
00481 UnaryReturn<Divergence<2>, A::return_type>::type
00482 apply(CenteredDivergence<2,Cartesian<2,T2>,Cell,Vert>, A a, int i,int j,int)
00483 {
00484   typedef Cartesian<2,T2> Mesh;
00485   return
00486     dot(a.offset(i-1,j-1),Mesh::Dvc[0]) +
00487     dot(a.offset( i ,j-1),Mesh::Dvc[1]) +
00488     dot(a.offset(i-1, j ),Mesh::Dvc[2]) +
00489     dot(a.offset( i , j ),Mesh::Dvc[3]);
00490 }
00491 
00492 template<class A, class T2>
00493 inline
00494 UnaryReturn<Divergence<3>, A::return_type>::type
00495 apply(CenteredDivergence<3,Cartesian<3,T2>,Cell,Vert>, A a, int i,int j,int k)
00496 {
00497   typedef Cartesian<3,T2> Mesh;
00498   return
00499     dot(a.offset(i-1,j-1,k-1),Mesh::Dvc[0]) +
00500     dot(a.offset( i ,j-1,k-1),Mesh::Dvc[1]) +
00501     dot(a.offset(i-1, j ,k-1),Mesh::Dvc[2]) +
00502     dot(a.offset( i , j ,k-1),Mesh::Dvc[3]) +
00503     dot(a.offset(i-1,j-1, k ),Mesh::Dvc[4]) +
00504     dot(a.offset( i ,j-1, k ),Mesh::Dvc[5]) +
00505     dot(a.offset(i-1, j , k ),Mesh::Dvc[6]) +
00506     dot(a.offset( i , j , k ),Mesh::Dvc[7]);
00507 }
00508 REIMPLEMENT THIS LATER (BEGIN COMMENTED-OUT END) */
00509 #endif
00510 
00512 //
00513 // Here are the old style definitions.
00514 //
00516 
00517 //----------------------------------------------------------------------
00518 // Divergence Vektor/Vert -> Scalar/Cell
00519 //----------------------------------------------------------------------
00520 template < class T, class MFLOAT >
00521 Field<T,1U,Cartesian<1U,MFLOAT>,Cell>& 
00522 Div(Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& x, 
00523     Field<T,1U,Cartesian<1U,MFLOAT>,Cell>& r);
00524 //----------------------------------------------------------------------
00525 template < class T, class MFLOAT >
00526 Field<T,2U,Cartesian<2U,MFLOAT>,Cell>& 
00527 Div(Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& x, 
00528     Field<T,2U,Cartesian<2U,MFLOAT>,Cell>& r);
00529 //----------------------------------------------------------------------
00530 template < class T, class MFLOAT >
00531 Field<T,3U,Cartesian<3U,MFLOAT>,Cell>& 
00532 Div(Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& x, 
00533     Field<T,3U,Cartesian<3U,MFLOAT>,Cell>& r);
00534 //----------------------------------------------------------------------
00535 // Divergence Vektor/Cell -> Scalar/Vert
00536 //----------------------------------------------------------------------
00537 template < class T, class MFLOAT >
00538 Field<T,1U,Cartesian<1U,MFLOAT>,Vert>& 
00539 Div(Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& x, 
00540     Field<T,1U,Cartesian<1U,MFLOAT>,Vert>& r);
00541 //----------------------------------------------------------------------
00542 template < class T, class MFLOAT >
00543 Field<T,2U,Cartesian<2U,MFLOAT>,Vert>& 
00544 Div(Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& x, 
00545     Field<T,2U,Cartesian<2U,MFLOAT>,Vert>& r);
00546 //----------------------------------------------------------------------
00547 template < class T, class MFLOAT >
00548 Field<T,3U,Cartesian<3U,MFLOAT>,Vert>& 
00549 Div(Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& x, 
00550     Field<T,3U,Cartesian<3U,MFLOAT>,Vert>& r);
00551 
00552 //----------------------------------------------------------------------
00553 // Divergence Vektor/Vert -> Scalar/Vert
00554 //----------------------------------------------------------------------
00555 template < class T, class MFLOAT >
00556 Field<T,1U,Cartesian<1U,MFLOAT>,Vert>& 
00557 Div(Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& x, 
00558     Field<T,1U,Cartesian<1U,MFLOAT>,Vert>& r);
00559 //----------------------------------------------------------------------
00560 template < class T, class MFLOAT >
00561 Field<T,2U,Cartesian<2U,MFLOAT>,Vert>& 
00562 Div(Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& x, 
00563     Field<T,2U,Cartesian<2U,MFLOAT>,Vert>& r);
00564 //----------------------------------------------------------------------
00565 template < class T, class MFLOAT >
00566 Field<T,3U,Cartesian<3U,MFLOAT>,Vert>& 
00567 Div(Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& x, 
00568     Field<T,3U,Cartesian<3U,MFLOAT>,Vert>& r);
00569 //----------------------------------------------------------------------
00570 // Divergence Vektor/Cell -> Scalar/Cell
00571 //----------------------------------------------------------------------
00572 template < class T, class MFLOAT >
00573 Field<T,1U,Cartesian<1U,MFLOAT>,Cell>& 
00574 Div(Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& x, 
00575     Field<T,1U,Cartesian<1U,MFLOAT>,Cell>& r);
00576 //----------------------------------------------------------------------
00577 template < class T, class MFLOAT >
00578 Field<T,2U,Cartesian<2U,MFLOAT>,Cell>& 
00579 Div(Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& x, 
00580     Field<T,2U,Cartesian<2U,MFLOAT>,Cell>& r);
00581 //----------------------------------------------------------------------
00582 template < class T, class MFLOAT >
00583 Field<T,3U,Cartesian<3U,MFLOAT>,Cell>& 
00584 Div(Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& x, 
00585     Field<T,3U,Cartesian<3U,MFLOAT>,Cell>& r);
00586 //----------------------------------------------------------------------
00587 // Divergence Tenzor/Vert -> Vektor/Cell
00588 //----------------------------------------------------------------------
00589 template < class T, class MFLOAT >
00590 Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& 
00591 Div(Field<Tenzor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& x, 
00592     Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& r);
00593 //----------------------------------------------------------------------
00594 template < class T, class MFLOAT >
00595 Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& 
00596 Div(Field<Tenzor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& x, 
00597     Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& r);
00598 //----------------------------------------------------------------------
00599 template < class T, class MFLOAT >
00600 Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& 
00601 Div(Field<Tenzor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& x, 
00602     Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& r);
00603 //----------------------------------------------------------------------
00604 // Divergence SymTenzor/Vert -> Vektor/Cell
00605 //----------------------------------------------------------------------
00606 template < class T, class MFLOAT >
00607 Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& 
00608 Div(Field<SymTenzor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& x, 
00609     Field<Vektor<T,1U>,1U,Cartesian<2U,MFLOAT>,Cell>& r);
00610 //----------------------------------------------------------------------
00611 template < class T, class MFLOAT >
00612 Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& 
00613 Div(Field<SymTenzor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& x, 
00614     Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& r);
00615 //----------------------------------------------------------------------
00616 template < class T, class MFLOAT >
00617 Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& 
00618 Div(Field<SymTenzor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& x, 
00619     Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& r);
00620 //----------------------------------------------------------------------
00621 // Divergence Tenzor/Cell -> Vektor/Vert
00622 //----------------------------------------------------------------------
00623 template < class T, class MFLOAT >
00624 Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& 
00625 Div(Field<Tenzor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& x, 
00626     Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& r);
00627 //----------------------------------------------------------------------
00628 template < class T, class MFLOAT >
00629 Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& 
00630 Div(Field<Tenzor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& x, 
00631     Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& r);
00632 //----------------------------------------------------------------------
00633 template < class T, class MFLOAT >
00634 Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& 
00635 Div(Field<Tenzor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& x, 
00636     Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& r);
00637 //----------------------------------------------------------------------
00638 // Divergence SymTenzor/Cell -> Vektor/Vert
00639 //----------------------------------------------------------------------
00640 template < class T, class MFLOAT >
00641 Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& 
00642 Div(Field<SymTenzor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& x, 
00643     Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& r);
00644 //----------------------------------------------------------------------
00645 template < class T, class MFLOAT >
00646 Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& 
00647 Div(Field<SymTenzor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& x, 
00648     Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& r);
00649 //----------------------------------------------------------------------
00650 template < class T, class MFLOAT >
00651 Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& 
00652 Div(Field<SymTenzor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& x, 
00653     Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& r);
00654 
00655 
00656 //----------------------------------------------------------------------
00657 // Grad Scalar/Vert -> Vektor/Cell
00658 //----------------------------------------------------------------------
00659 template < class T, class MFLOAT >
00660 Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& 
00661 Grad(Field<T,1U,Cartesian<1U,MFLOAT>,Vert>& x, 
00662      Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& r);
00663 //----------------------------------------------------------------------
00664 template < class T, class MFLOAT >
00665 Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& 
00666 Grad(Field<T,2U,Cartesian<2U,MFLOAT>,Vert>& x, 
00667      Field<Vektor<T,2u>,2U,Cartesian<2U,MFLOAT>,Cell>& r);
00668 //----------------------------------------------------------------------
00669 template < class T, class MFLOAT >
00670 Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& 
00671 Grad(Field<T,3U,Cartesian<3U,MFLOAT>,Vert>& x, 
00672      Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& r);
00673 //----------------------------------------------------------------------
00674 // Grad Scalar/Cell -> Vektor/Vert
00675 //----------------------------------------------------------------------
00676 template < class T, class MFLOAT >
00677 Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& 
00678 Grad(Field<T,1U,Cartesian<1U,MFLOAT>,Cell>& x, 
00679      Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& r);
00680 //----------------------------------------------------------------------
00681 template < class T, class MFLOAT >
00682 Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& 
00683 Grad(Field<T,2U,Cartesian<2U,MFLOAT>,Cell>& x, 
00684      Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& r);
00685 //----------------------------------------------------------------------
00686 template < class T, class MFLOAT >
00687 Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& 
00688 Grad(Field<T,3U,Cartesian<3U,MFLOAT>,Cell>& x, 
00689      Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& r);
00690 
00691 //----------------------------------------------------------------------
00692 // Grad Scalar/Vert -> Vektor/Vert
00693 //----------------------------------------------------------------------
00694 template < class T, class MFLOAT >
00695 Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& 
00696 Grad(Field<T,1U,Cartesian<1U,MFLOAT>,Vert>& x, 
00697      Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& r);
00698 //----------------------------------------------------------------------
00699 template < class T, class MFLOAT >
00700 Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& 
00701 Grad(Field<T,2U,Cartesian<2U,MFLOAT>,Vert>& x, 
00702      Field<Vektor<T,2u>,2U,Cartesian<2U,MFLOAT>,Vert>& r);
00703 //----------------------------------------------------------------------
00704 template < class T, class MFLOAT >
00705 Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& 
00706 Grad(Field<T,3U,Cartesian<3U,MFLOAT>,Vert>& x, 
00707      Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& r);
00708 //----------------------------------------------------------------------
00709 // Grad Scalar/Cell -> Vektor/Cell
00710 //----------------------------------------------------------------------
00711 template < class T, class MFLOAT >
00712 Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& 
00713 Grad(Field<T,1U,Cartesian<1U,MFLOAT>,Cell>& x, 
00714      Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& r);
00715 //----------------------------------------------------------------------
00716 template < class T, class MFLOAT >
00717 Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& 
00718 Grad(Field<T,2U,Cartesian<2U,MFLOAT>,Cell>& x, 
00719      Field<Vektor<T,2u>,2U,Cartesian<2U,MFLOAT>,Cell>& r);
00720 //----------------------------------------------------------------------
00721 template < class T, class MFLOAT >
00722 Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& 
00723 Grad(Field<T,3U,Cartesian<3U,MFLOAT>,Cell>& x, 
00724      Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& r);
00725 //----------------------------------------------------------------------
00726 // Grad Vektor/Vert -> Tenzor/Cell
00727 //----------------------------------------------------------------------
00728 template < class T, class MFLOAT >
00729 Field<Tenzor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& 
00730 Grad(Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& x, 
00731      Field<Tenzor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& r);
00732 //----------------------------------------------------------------------
00733 template < class T, class MFLOAT >
00734 Field<Tenzor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& 
00735 Grad(Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& x, 
00736      Field<Tenzor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& r);
00737 //----------------------------------------------------------------------
00738 template < class T, class MFLOAT >
00739 Field<Tenzor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& 
00740 Grad(Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& x, 
00741      Field<Tenzor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& r);
00742 //----------------------------------------------------------------------
00743 // Grad Vektor/Cell -> Tenzor/Vert
00744 //----------------------------------------------------------------------
00745 template < class T, class MFLOAT >
00746 Field<Tenzor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& 
00747 Grad(Field<Vektor<T,1U>,1U,Cartesian<1U,MFLOAT>,Cell>& x, 
00748      Field<Tenzor<T,1U>,1U,Cartesian<1U,MFLOAT>,Vert>& r);
00749 //----------------------------------------------------------------------
00750 template < class T, class MFLOAT >
00751 Field<Tenzor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& 
00752 Grad(Field<Vektor<T,2U>,2U,Cartesian<2U,MFLOAT>,Cell>& x, 
00753      Field<Tenzor<T,2U>,2U,Cartesian<2U,MFLOAT>,Vert>& r);
00754 //----------------------------------------------------------------------
00755 template < class T, class MFLOAT >
00756 Field<Tenzor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& 
00757 Grad(Field<Vektor<T,3U>,3U,Cartesian<3U,MFLOAT>,Cell>& x, 
00758      Field<Tenzor<T,3U>,3U,Cartesian<3U,MFLOAT>,Vert>& r);
00759 
00760 
00761 //----------------------------------------------------------------------
00762 // Weighted average Cell to Vert
00763 //----------------------------------------------------------------------
00764 template < class T1, class T2, class MFLOAT >
00765 Field<T1,1U,Cartesian<1U,MFLOAT>,Vert>& 
00766 Average(Field<T1,1U,Cartesian<1U,MFLOAT>,Cell>& x, 
00767         Field<T2,1U,Cartesian<1U,MFLOAT>,Cell>& w, 
00768         Field<T1,1U,Cartesian<1U,MFLOAT>,Vert>& r) ;
00769 //----------------------------------------------------------------------
00770 template < class T1, class T2, class MFLOAT >
00771 Field<T1,2U,Cartesian<2U,MFLOAT>,Vert>& 
00772 Average(Field<T1,2U,Cartesian<2U,MFLOAT>,Cell>& x, 
00773         Field<T2,2U,Cartesian<2U,MFLOAT>,Cell>& w, 
00774         Field<T1,2U,Cartesian<2U,MFLOAT>,Vert>& r);
00775 //----------------------------------------------------------------------
00776 template < class T1, class T2, class MFLOAT >
00777 Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& 
00778 Average(Field<T1,3U,Cartesian<3U,MFLOAT>,Cell>& x, 
00779         Field<T2,3U,Cartesian<3U,MFLOAT>,Cell>& w, 
00780         Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& r);
00781 
00782 //----------------------------------------------------------------------
00783 // Weighted average Vert to Cell
00784 //----------------------------------------------------------------------
00785 template < class T1, class T2, class MFLOAT >
00786 Field<T1,1U,Cartesian<1U,MFLOAT>,Cell>& 
00787 Average(Field<T1,1U,Cartesian<1U,MFLOAT>,Vert>& x, 
00788         Field<T2,1U,Cartesian<1U,MFLOAT>,Vert>& w, 
00789         Field<T1,1U,Cartesian<1U,MFLOAT>,Cell>& r) ;
00790 //----------------------------------------------------------------------
00791 template < class T1, class T2, class MFLOAT >
00792 Field<T1,2U,Cartesian<2U,MFLOAT>,Cell>& 
00793 Average(Field<T1,2U,Cartesian<2U,MFLOAT>,Vert>& x, 
00794         Field<T2,2U,Cartesian<2U,MFLOAT>,Vert>& w, 
00795         Field<T1,2U,Cartesian<2U,MFLOAT>,Cell>& r);
00796 //----------------------------------------------------------------------
00797 template < class T1, class T2, class MFLOAT >
00798 Field<T1,3U,Cartesian<3U,MFLOAT>,Cell>& 
00799 Average(Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& x, 
00800         Field<T2,3U,Cartesian<3U,MFLOAT>,Vert>& w, 
00801         Field<T1,3U,Cartesian<3U,MFLOAT>,Cell>& r);
00802 
00803 //----------------------------------------------------------------------
00804 
00805 //----------------------------------------------------------------------
00806 // Unweighted average Cell to Vert
00807 //----------------------------------------------------------------------
00808 template < class T1, class MFLOAT >
00809 Field<T1,1U,Cartesian<1U,MFLOAT>,Vert>& 
00810 Average(Field<T1,1U,Cartesian<1U,MFLOAT>,Cell>& x, 
00811         Field<T1,1U,Cartesian<1U,MFLOAT>,Vert>& r) ;
00812 //----------------------------------------------------------------------
00813 template < class T1, class MFLOAT >
00814 Field<T1,2U,Cartesian<2U,MFLOAT>,Vert>& 
00815 Average(Field<T1,2U,Cartesian<2U,MFLOAT>,Cell>& x, 
00816         Field<T1,2U,Cartesian<2U,MFLOAT>,Vert>& r);
00817 //----------------------------------------------------------------------
00818 template < class T1, class MFLOAT >
00819 Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& 
00820 Average(Field<T1,3U,Cartesian<3U,MFLOAT>,Cell>& x, 
00821         Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& r);
00822 
00823 //----------------------------------------------------------------------
00824 // Unweighted average Vert to Cell
00825 //----------------------------------------------------------------------
00826 template < class T1, class MFLOAT >
00827 Field<T1,1U,Cartesian<1U,MFLOAT>,Cell>& 
00828 Average(Field<T1,1U,Cartesian<1U,MFLOAT>,Vert>& x, 
00829         Field<T1,1U,Cartesian<1U,MFLOAT>,Cell>& r) ;
00830 //----------------------------------------------------------------------
00831 template < class T1, class MFLOAT >
00832 Field<T1,2U,Cartesian<2U,MFLOAT>,Cell>& 
00833 Average(Field<T1,2U,Cartesian<2U,MFLOAT>,Vert>& x, 
00834         Field<T1,2U,Cartesian<2U,MFLOAT>,Cell>& r);
00835 //----------------------------------------------------------------------
00836 template < class T1, class MFLOAT >
00837 Field<T1,3U,Cartesian<3U,MFLOAT>,Cell>& 
00838 Average(Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& x, 
00839         Field<T1,3U,Cartesian<3U,MFLOAT>,Cell>& r);
00840 
00841 //----------------------------------------------------------------------
00842 
00843 #include "Meshes/Cartesian.cpp"
00844 
00845 #endif // CARTESIAN_H
00846 
00847 /***************************************************************************
00848  * $RCSfile: Cartesian.h,v $   $Author: adelmann $
00849  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:28 $
00850  * IPPL_VERSION_ID: $Id: Cartesian.h,v 1.1.1.1 2003/01/23 07:40:28 adelmann Exp $ 
00851  ***************************************************************************/

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