OPAL (Object Oriented Parallel Accelerator Library)  2.2.0
OPAL
Rnode.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 RNODE_H
12 #define RNODE_H
13 
14 /***********************************************************************
15  * Rnodes really have very little information.
16  * They know the region of the Rnode, the physical node it resides on,
17  * and the offset (if any) for the node if it is a periodic image of
18  * the 'real' Rnode.
19  ***********************************************************************/
20 
21 // include files
22 #include "Region/NDRegion.h"
23 #include "AppTypes/Vektor.h"
24 
25 // forward declarations
26 template <unsigned Dim> class NDIndex;
27 
28 
29 template<class T,unsigned Dim>
30 class Rnode {
31 
32 public:
33  // constructors
34  Rnode(const NDRegion<T,Dim>& domain, const Vektor<T,Dim>& offset, int node)
35  : Domain(domain), Offset(offset), Node(node) {}
36  Rnode(const NDRegion<T,Dim>& domain, int node)
37  : Domain(domain), Node(node) {}
38  Rnode(const NDIndex<Dim>& domain, const Vektor<T,Dim>& offset, int node)
39  : Domain(domain), Offset(offset), Node(node) {}
40  Rnode(const NDIndex<Dim>& domain, int node)
41  : Domain(domain), Node(node) {}
42 
43  // operator=
45  Domain = r.Domain;
46  Offset = r.Offset;
47  Node = r.Node;
48  return *this;
49  }
50 
51  // query functions
52  int getNode() { return Node; }
53  const NDRegion<T,Dim>& getDomain() { return Domain; }
54  const Vektor<T,Dim>& getOffset() { return Offset; }
55 
56 private:
59  int Node;
60 };
61 
62 #endif // RNODE_H
63 
64 /***************************************************************************
65  * $RCSfile: Rnode.h,v $ $Author: adelmann $
66  * $Revision: 1.1.1.1 $ $Date: 2003/01/23 07:40:32 $
67  * IPPL_VERSION_ID: $Id: Rnode.h,v 1.1.1.1 2003/01/23 07:40:32 adelmann Exp $
68  ***************************************************************************/
const NDRegion< T, Dim > & getDomain()
Definition: Rnode.h:53
const Vektor< T, Dim > & getOffset()
Definition: Rnode.h:54
Definition: Rnode.h:30
Definition: Offset.h:66
int getNode()
Definition: Rnode.h:52
Rnode(const NDIndex< Dim > &domain, const Vektor< T, Dim > &offset, int node)
Definition: Rnode.h:38
Vektor< T, Dim > Offset
Definition: Rnode.h:58
Rnode< T, Dim > & operator=(const Rnode< T, Dim > &r)
Definition: Rnode.h:44
int Node
Definition: Rnode.h:59
Rnode(const NDIndex< Dim > &domain, int node)
Definition: Rnode.h:40
NDRegion< T, Dim > Domain
Definition: Rnode.h:57
Rnode(const NDRegion< T, Dim > &domain, int node)
Definition: Rnode.h:36
Rnode(const NDRegion< T, Dim > &domain, const Vektor< T, Dim > &offset, int node)
Definition: Rnode.h:34