PlayaGhostView.hpp
Go to the documentation of this file.
00001 /* @HEADER@ */
00002 //   
00003 /* @HEADER@ */
00004 
00005 #ifndef PLAYA_GHOST_VIEW_HPP
00006 #define PLAYA_GHOST_VIEW_HPP
00007 
00008 #include "PlayaVectorDecl.hpp"
00009 
00010 namespace Playa
00011 {
00012   using namespace Teuchos;
00013 
00014   /**
00015    * GhostView is an interface for read-only views
00016    * of vector elements including selected
00017    * off-processor elements. GhostView has no standard constructor; subclasses
00018    * should be constructed using the importView() method of GhostImporter.
00019    */
00020   template <class Scalar>
00021   class GhostView : public Printable
00022   {
00023   public:
00024     /** Virtual dtor */
00025     virtual ~GhostView(){;}
00026     
00027     /** Indicate whether the value at the given global index is accessible
00028      * in this view. */
00029     virtual bool isAccessible(int globalIndex) const = 0 ;
00030 
00031     
00032     /** */
00033     virtual const double& getElement(int globalIndex) const = 0 ;
00034     
00035     /** */
00036     virtual void getElements(const int* globalIndices, int numElems,
00037       Teuchos::Array<double>& elems) const = 0 ;
00038     
00039     /**  */
00040     virtual void print(std::ostream& os) const = 0 ;
00041 
00042   private:
00043   };
00044 
00045 }
00046 
00047 #endif

Site Contact