src/Region/Rnode.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 RNODE_H
00012 #define RNODE_H
00013 
00014 /***********************************************************************
00015  * Rnodes really have very little information.
00016  * They know the region of the Rnode, the physical node it resides on,
00017  * and the offset (if any) for the node if it is a periodic image of
00018  * the 'real' Rnode.
00019  ***********************************************************************/
00020 
00021 // include files
00022 #include "Region/NDRegion.h"
00023 #include "AppTypes/Vektor.h"
00024 
00025 // forward declarations
00026 template <unsigned Dim> class NDIndex;
00027 
00028 
00029 template<class T,unsigned Dim>
00030 class Rnode {
00031 
00032 public: 
00033   // constructors
00034   Rnode(const NDRegion<T,Dim>& domain, const Vektor<T,Dim>& offset, int node)
00035     : Domain(domain), Offset(offset), Node(node) {}
00036   Rnode(const NDRegion<T,Dim>& domain, int node)
00037     : Domain(domain), Node(node) {}
00038   Rnode(const NDIndex<Dim>& domain, const Vektor<T,Dim>& offset, int node)
00039     : Domain(domain), Offset(offset), Node(node) {}
00040   Rnode(const NDIndex<Dim>& domain, int node)
00041     : Domain(domain), Node(node) {}
00042 
00043   // operator=
00044   Rnode<T,Dim>& operator=(const Rnode<T,Dim>& r) {
00045     Domain = r.Domain;
00046     Offset = r.Offset;
00047     Node   = r.Node;
00048     return *this;
00049   }
00050 
00051   // query functions
00052   int getNode() { return Node; }
00053   const NDRegion<T,Dim>& getDomain() { return Domain; }
00054   const Vektor<T,Dim>& getOffset() { return Offset; }
00055   
00056 private:
00057   NDRegion<T,Dim> Domain;
00058   Vektor<T,Dim>   Offset;
00059   int Node;
00060 };
00061 
00062 #endif // RNODE_H
00063 
00064 /***************************************************************************
00065  * $RCSfile: Rnode.h,v $   $Author: adelmann $
00066  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:32 $
00067  * IPPL_VERSION_ID: $Id: Rnode.h,v 1.1.1.1 2003/01/23 07:40:32 adelmann Exp $ 
00068  ***************************************************************************/

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