Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members

src/DataSource/ACLVISFieldDataSource.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 ACLVIS_FIELD_DATA_SOURCE_H
00012 #define ACLVIS_FIELD_DATA_SOURCE_H
00013 
00014 /***********************************************************************
00015  * 
00016  * class ACLVISFieldDataSource
00017  *
00018  * ACLVISFieldDataSource is a specific version of FieldDataSource which takes
00019  * the data for a given Field and formats it properly for connection to the
00020  * ACL visualization code.  The initial version
00021  * collects all the data onto node 0, and then formats it for ACLVIS use.
00022  * Future versions will properly redistribute the data based on
00023  * the needs of the recipient.
00024  *
00025  ***********************************************************************/
00026 
00027 // include files
00028 #include "DataSource/FieldDataSource.h"
00029 
00030 
00031 // forward declarations
00032 class ACLVISDataConnect;
00033 class ReadFieldTool;
00034 
00035 
00036 template<class T, unsigned Dim, class M, class C>
00037 class ACLVISFieldDataSource : public FieldDataSource<T,Dim,M,C> {
00038 
00039 public:
00040   // constructor: the name, the connection, the transfer method,
00041   // the field to connect, and the parent node.
00042   ACLVISFieldDataSource(const char *, DataConnect *, int, Field<T,Dim,M,C>&);
00043 
00044   // destructor
00045   virtual ~ACLVISFieldDataSource();
00046 
00047   //
00048   // virtual function interface.
00049   //
00050 
00051   // Update the object, that is, make sure the receiver of the data has a
00052   // current and consistent snapshot of the current state.  Return success.
00053   virtual bool update();
00054 
00055   // Indicate to the receiver that we're allowing them time to manipulate the
00056   // data (e.g., for a viz program, to rotate it, change representation, etc.)
00057   // This should only return when the manipulation is done.
00058   virtual void interact(const char * = 0);
00059 
00060 protected:
00061   // copy the data out of the given LField iterator (which is occupying the
00062   // given domain) and into the ACLVIS structure
00063   virtual void insert_data(const NDIndex<Dim>&,CompressedBrickIterator<T,Dim>);
00064 
00065 private:
00066   // the ACLVIS data structure used to hold the data
00067   ReadFieldTool *LocalData;
00068 
00069   // recast of DataConnect to ACL-specific object
00070   char *object_name;
00071   ACLVISDataConnect *ACLVISConnection;
00072 
00073   // a function to set the mesh characteristics of the ReadFieldTool
00074   void set_mesh(Field<T,Dim,M,C>&);
00075 };
00076 
00077 #include "DataSource/ACLVISFieldDataSource.cpp"
00078 
00079 #endif // ACLVIS_FIELD_DATA_SOURCE_H
00080 
00081 /***************************************************************************
00082  * $RCSfile: ACLVISFieldDataSource.h,v $   $Author: adelmann $
00083  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:24 $
00084  * IPPL_VERSION_ID: $Id: ACLVISFieldDataSource.h,v 1.1.1.1 2003/01/23 07:40:24 adelmann Exp $ 
00085  ***************************************************************************/

Generated on Fri Nov 2 01:25:55 2007 for IPPL by doxygen 1.3.5