OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
CenteredFieldLayout.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 /***************************************************************************
3  *
4  * The IPPL Framework
5  *
6  *
7  * Visit http://people.web.psi.ch/adelmann/ for more details
8  *
9  ***************************************************************************/
10 
11 #ifndef CENTERED_FIELD_LAYOUT_H
12 #define CENTERED_FIELD_LAYOUT_H
13 
14 // include files
16 
17 
18 template<unsigned Dim, class Mesh, class Centering>
19 class CenteredFieldLayout : public FieldLayout<Dim>
20 {
21 public:
22  //---------------------------------------------------------------------------
23  // Constructors from a mesh object only and parallel/serial specifiers.
24  // If not doing this, user should be just using simple FieldLayout object,
25  // though no harm would be done in constructiong a CenteredFieldLayout with
26  // Index/NDIndex arguments via the inherited constructors from FieldLayout.
27  //---------------------------------------------------------------------------
28 
29  //---------------------------------------------------------------------------
30  // These specify only a total number of vnodes, allowing the constructor
31  // complete control on how to do the vnode partitioning of the index space:
32  // Constructor for arbitrary dimension with parallel/serial specifier array:
33 
34  // This one also works if nothing except mesh is specified:
36  e_dim_tag *p=0,
37  int vnodes=-1);
38 
39  // Special constructor which uses a existing partition
40  // particular from expde
41 
42 
43  // Constructors for 1 ... 6 dimensions with parallel/serial specifiers:
45  e_dim_tag p1,
46  int vnodes=-1);
48  e_dim_tag p1, e_dim_tag p2,
49  int vnodes=-1);
51  e_dim_tag p1, e_dim_tag p2, e_dim_tag p3,
52  int vnodes=-1);
54  e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, e_dim_tag p4,
55  int vnodes=-1);
57  e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, e_dim_tag p4,
58  e_dim_tag p5,
59  int vnodes=-1);
61  e_dim_tag p1, e_dim_tag p2, e_dim_tag p3, e_dim_tag p4,
62  e_dim_tag p5, e_dim_tag p6,
63  int vnodes=-1);
64  //---------------------------------------------------------------------------
65 
66  //---------------------------------------------------------------------------
67  // These specify both the total number of vnodes and the numbers of vnodes
68  // along each dimension for the partitioning of the index space. Obviously
69  // this restricts the number of vnodes to be a product of the numbers along
70  // each dimension (the constructor implementation checks this):
71 
72  // Constructor for arbitrary dimension with parallel/serial specifier array:
74  unsigned* vnodesAlongDirection,
75  bool recurse=false,
76  int vnodes=-1);
77  // Constructors for 1 ... 6 dimensions with parallel/serial specifiers:
79  e_dim_tag p1,
80  unsigned vnodes1,
81  bool recurse=false,
82  int vnodes=-1);
84  e_dim_tag p1, e_dim_tag p2,
85  unsigned vnodes1, unsigned vnodes2,
86  bool recurse=false,
87  int vnodes=-1);
89  e_dim_tag p1, e_dim_tag p2, e_dim_tag p3,
90  unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
91  bool recurse=false,
92  int vnodes=-1);
94  e_dim_tag p1, e_dim_tag p2, e_dim_tag p3,
95  e_dim_tag p4,
96  unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
97  unsigned vnodes4,
98  bool recurse=false,
99  int vnodes=-1);
101  e_dim_tag p1, e_dim_tag p2, e_dim_tag p3,
102  e_dim_tag p4, e_dim_tag p5,
103  unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
104  unsigned vnodes4, unsigned vnodes5,
105  bool recurse=false,
106  int vnodes=-1);
108  e_dim_tag p1, e_dim_tag p2, e_dim_tag p3,
109  e_dim_tag p4, e_dim_tag p5, e_dim_tag p6,
110  unsigned vnodes1, unsigned vnodes2, unsigned vnodes3,
111  unsigned vnodes4, unsigned vnodes5, unsigned vnodes6,
112  bool recurse=false,
113  int vnodes=-1);
114  //---------------------------------------------------------------------------
115 
116  //---------------------------------------------------------------------------
117  // A constructor a a completely user-specified partitioning of the
118  // mesh space.
119 
121  const NDIndex<Dim> *dombegin,
122  const NDIndex<Dim> *domend,
123  const int *nbegin,
124  const int *nend);
125 };
126 
128 
129 #endif // CENTERED_FIELD_LAYOUT_H
130 
131 /***************************************************************************
132  * $RCSfile: CenteredFieldLayout.h,v $ $Author: adelmann $
133  * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:27 $
134  * IPPL_VERSION_ID: $Id: CenteredFieldLayout.h,v 1.1.1.1 2003/01/23 07:40:27 adelmann Exp $
135  ***************************************************************************/
Definition: Mesh.h:35
CenteredFieldLayout(Mesh &mesh, e_dim_tag *p=0, int vnodes=-1)
e_dim_tag
Definition: FieldLayout.h:55