src/FieldLayout/CenteredFieldLayout.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 CENTERED_FIELD_LAYOUT_H
00012 #define CENTERED_FIELD_LAYOUT_H
00013 
00014 // include files
00015 #include "FieldLayout/FieldLayout.h"
00016 
00017 
00018 template<unsigned Dim, class Mesh, class Centering>
00019 class CenteredFieldLayout : public FieldLayout<Dim>
00020 {
00021 public:
00022   //---------------------------------------------------------------------------
00023   // Constructors from a mesh object only and parallel/serial specifiers.
00024   // If not doing this, user should be just using simple FieldLayout object, 
00025   // though no harm would be done in constructiong a CenteredFieldLayout with
00026   // Index/NDIndex arguments via the inherited constructors from FieldLayout.
00027   //---------------------------------------------------------------------------
00028 
00029   //---------------------------------------------------------------------------
00030   // These specify only a total number of vnodes, allowing the constructor
00031   // complete control on how to do the vnode partitioning of the index space:
00032   // Constructor for arbitrary dimension with parallel/serial specifier array:
00033 
00034   // This one also works if nothing except mesh is specified:
00035   CenteredFieldLayout(Mesh& mesh, 
00036                       e_dim_tag *p=0, 
00037                       int vnodes=-1);
00038 
00039   // Special constructor which uses a existing partition
00040   // particular from expde
00041 
00042 
00043   // Constructors for 1 ... 6 dimensions with parallel/serial specifiers:
00044   CenteredFieldLayout(Mesh& mesh, 
00045                       e_dim_tag p1, 
00046                       int vnodes=-1);
00047   CenteredFieldLayout(Mesh& mesh, 
00048                       e_dim_tag p1, e_dim_tag p2, 
00049                       int vnodes=-1);
00050   CenteredFieldLayout(Mesh& mesh, 
00051                       e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, 
00052                       int vnodes=-1);
00053   CenteredFieldLayout(Mesh& mesh, 
00054                       e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, e_dim_tag p4,
00055                       int vnodes=-1);
00056   CenteredFieldLayout(Mesh& mesh, 
00057                       e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, e_dim_tag p4,
00058                       e_dim_tag p5,
00059                       int vnodes=-1);
00060   CenteredFieldLayout(Mesh& mesh, 
00061                       e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, e_dim_tag p4,
00062                       e_dim_tag p5, e_dim_tag p6,
00063                       int vnodes=-1);
00064   //---------------------------------------------------------------------------
00065 
00066   //---------------------------------------------------------------------------
00067   // These specify both the total number of vnodes and the numbers of vnodes
00068   // along each dimension for the partitioning of the index space. Obviously
00069   // this restricts the number of vnodes to be a product of the numbers along
00070   // each dimension (the constructor implementation checks this):
00071 
00072   // Constructor for arbitrary dimension with parallel/serial specifier array:
00073   CenteredFieldLayout(Mesh& mesh, e_dim_tag *p, 
00074                       unsigned* vnodesAlongDirection, 
00075                       bool recurse=false,
00076                       int vnodes=-1);
00077   // Constructors for 1 ... 6 dimensions with parallel/serial specifiers:
00078   CenteredFieldLayout(Mesh& mesh,
00079                       e_dim_tag p1,
00080                       unsigned vnodes1,
00081                       bool recurse=false,
00082                       int vnodes=-1);
00083   CenteredFieldLayout(Mesh& mesh,
00084                       e_dim_tag p1, e_dim_tag p2,
00085                       unsigned vnodes1, unsigned vnodes2,
00086                       bool recurse=false,
00087                       int vnodes=-1);
00088   CenteredFieldLayout(Mesh& mesh,
00089                       e_dim_tag p1, e_dim_tag p2, e_dim_tag p3,
00090                       unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
00091                       bool recurse=false,
00092                       int vnodes=-1);
00093   CenteredFieldLayout(Mesh& mesh,
00094                       e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, 
00095                       e_dim_tag p4,
00096                       unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
00097                       unsigned vnodes4,
00098                       bool recurse=false,
00099                       int vnodes=-1);
00100   CenteredFieldLayout(Mesh& mesh,
00101                       e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, 
00102                       e_dim_tag p4, e_dim_tag p5,
00103                       unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
00104                       unsigned vnodes4, unsigned vnodes5,
00105                       bool recurse=false,
00106                       int vnodes=-1);
00107   CenteredFieldLayout(Mesh& mesh,
00108                       e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, 
00109                       e_dim_tag p4, e_dim_tag p5, e_dim_tag p6,
00110                       unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
00111                       unsigned vnodes4, unsigned vnodes5, unsigned vnodes6,
00112                       bool recurse=false,
00113                       int vnodes=-1);
00114   //---------------------------------------------------------------------------
00115 
00116   //---------------------------------------------------------------------------
00117   // A constructor a a completely user-specified partitioning of the
00118   // mesh space.
00119 
00120   CenteredFieldLayout(Mesh& mesh,
00121                       const NDIndex<Dim> *dombegin,
00122                       const NDIndex<Dim> *domend,
00123                       const int *nbegin,
00124                       const int *nend);
00125 };
00126 
00127 #include "FieldLayout/CenteredFieldLayout.cpp"
00128 
00129 #endif // CENTERED_FIELD_LAYOUT_H
00130 
00131 /***************************************************************************
00132  * $RCSfile: CenteredFieldLayout.h,v $   $Author: adelmann $
00133  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:27 $
00134  * IPPL_VERSION_ID: $Id: CenteredFieldLayout.h,v 1.1.1.1 2003/01/23 07:40:27 adelmann Exp $ 
00135  ***************************************************************************/

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