Blockstructured Adaptive Mesh Refinement in object-oriented C++
00001 #ifndef AMROC_CLP_TSSRCINTEGRATORBASE_H 00002 #define AMROC_CLP_TSSRCINTEGRATORBASE_H 00003 00011 #include "TSSrcIntegrator.h" 00012 00013 #ifndef ClpTSSrcIntegratorBaseName 00014 #define ClpTSSrcIntegratorBase(dim) name2(ClpTSSrcIntegratorBase,dim) 00015 #define ClpTSSrcIntegratorBaseName 00016 #endif 00017 00024 template <class VectorType, class AuxVectorType> 00025 class ClpTSSrcIntegratorBase(DIM) : public TSSrcIntegrator(DIM)<VectorType> { 00026 typedef typename VectorType::InternalDataType DataType; 00027 00028 public: 00029 ClpTSSrcIntegratorBase(DIM)(const int gh) : TSSrcIntegrator(DIM)<VectorType>(gh) {} 00030 00031 virtual void register_at(ControlDevice& Ctrl,const string& prefix) { 00032 ControlDevice LocCtrl = Ctrl.getSubDevice(prefix+"ClpTSSrcIntegrator"); 00033 if (_TimeIntegrator) 00034 TimeIntegrator().register_at(LocCtrl,prefix); 00035 if (_TimeIntegrator && _SrcTerm) 00036 SrcTerm().register_at(LocCtrl,prefix); 00037 } 00038 virtual void register_at(ControlDevice& Ctrl) { 00039 register_at(Ctrl, ""); 00040 } 00041 00042 inline void SetAuxArray(DataType* a, int naux) { aux = a; NAux = naux; } 00043 00044 void DimExtBBox(const BBox& bb, int mx[], int ibx[]) { 00045 for (int d=0; d<DIM; d++) 00046 if (bb.extents(d)-2*NGhosts()<1) 00047 { mx[d] = bb.extents(d); ibx[d] = 0; } 00048 else 00049 { mx[d] = bb.extents(d)-2*NGhosts(); ibx[d] = 1; } 00050 } 00051 00052 protected: 00053 DataType *aux; 00054 int NAux; 00055 }; 00056 00057 00058 #endif
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04