00001
00002
00003
00004
00005
00006
00007
00008
00009 #ifndef AMROC_VISUALGRIDBASE_H
00010 #define AMROC_VISUALGRIDBASE_H
00011
00019 #include <string>
00020
00021 #include "IO/control-device.h"
00022 #include "BBox.h"
00023 #include "DAGHIO_hdf_ncsa.h"
00024 #include "EvaluatorBase.h"
00025
00032 class VisualGridBase : public controlable {
00033 public:
00034 VisualGridBase(EvaluatorBase* ev) : _RealTime(0.0), xlc_idummy(0),
00035 xlc_bbox_dummy(BBox::_empty_bbox), _Evaluator(ev), inputname(0) {}
00036
00037 virtual ~VisualGridBase() {}
00038
00039 virtual void register_at(ControlDevice& Ctrl,const std::string& prefix) {}
00040 virtual void register_at(ControlDevice& Ctrl) {
00041 register_at(Ctrl, ""); }
00042 virtual void init() {}
00043 virtual void update() {}
00044 virtual void finish() {}
00045 virtual int SetUp(int step, std::string** filenames, int Nfilenames) {
00046 TheEvaluator().SetUp(this);
00047 return 0;
00048 }
00049
00050 virtual int NCells() { return xlc_idummy; }
00051 virtual int NNodes() { return xlc_idummy; }
00052 virtual void SetBlocks(int blocks[]) {}
00053 virtual void SetGridCells(float xyz[][3]) {}
00054 virtual void SetGridNodes(float xyz[][3]) {}
00055 virtual void SetGridConns(int con[][8]) {}
00056 virtual void SetScalCells(int *key,float v[]) {}
00057 virtual void SetScalNodes(int *key,float v[]) {}
00058 virtual void VectNodes(int *key,float v[][3]) {}
00059 virtual void VectCells(int *key,float v[][3]) {}
00060 virtual int Size() const { return xlc_idummy; }
00061 virtual const int& MinLevel() const { return xlc_idummy; }
00062 virtual const int& MaxLevel() const { return xlc_idummy; }
00063 virtual const int& NLevels() const { return xlc_idummy; }
00064 virtual const int& RefineFactor(const int l) const { return xlc_idummy; }
00065 virtual const BBox& GlobalBBox() const { return xlc_bbox_dummy; }
00066 virtual const int& FKeys() const { return xlc_idummy; }
00067 virtual float64 RealTime() const { return _RealTime; }
00068
00069 int NKeys() const { return TheEvaluator().NKeys(); }
00070 char* TitleKeys() const { return TheEvaluator().TitleKeys(); }
00071 int* FunctionsKeys() const { return TheEvaluator().FunctionsKeys(); }
00072 int* KeyboardKeys() const { return TheEvaluator().KeyboardKeys(); }
00073 char* Title() const { return TheEvaluator().Title(); }
00074 float* Mvals() const { return TheEvaluator().Mvals(); }
00075
00076 virtual EvaluatorBase& TheEvaluator() const { return *_Evaluator; }
00077 virtual EvaluatorBase& TheEvaluator() { return *_Evaluator; }
00078 virtual void SetUpdateName(std::string* iname) { inputname = iname; }
00079 virtual std::string* UpdateName() { return inputname; }
00080 virtual std::string* UpdateName() const { return inputname; }
00081 protected:
00082 float64 _RealTime;
00083 int xlc_idummy;
00084 BBox xlc_bbox_dummy;
00085 private:
00086 EvaluatorBase* _Evaluator;
00087 std::string *inputname;
00088 };
00089
00090 #endif