Blockstructured Adaptive Mesh Refinement in object-oriented C++
00001 #ifndef AMROC_EXACT_SOLUTION_H 00002 #define AMROC_EXACT_SOLUTION_H 00003 00011 #include "ExactSolutionInterface.h" 00012 00013 #ifndef ExactSolutionName 00014 #define ExactSolution(dim) name2(ExactSolution,dim) 00015 #define ExactSolutionName 00016 #endif 00017 00024 template <class VectorType> 00025 class ExactSolution(DIM) : public ExactSolutionInterface(DIM)<VectorType> { 00026 typedef GridData(DIM)<VectorType> vec_grid_data_type; 00027 public: 00028 ExactSolution(DIM)(const int gh) : 00029 _Equations(VectorType::Length()), _Ghosts(gh) { 00030 _Hierarchy = (GridHierarchy*) 0; 00031 } 00032 00033 virtual void SetGrid(vec_grid_data_type& gd, double t, DCoords& dx) {} 00034 00035 inline void SetGridHierarchy(GridHierarchy* gh) { _Hierarchy = gh; } 00036 inline GridHierarchy& GH() { return *_Hierarchy; } 00037 inline const GridHierarchy& GH() const { return *_Hierarchy; } 00038 00039 inline const int& NEquations() const { return _Equations; } 00040 inline const int& NGhosts() const { return _Ghosts; } 00041 00042 protected: 00043 int _Equations; 00044 int _Ghosts; 00045 GridHierarchy* _Hierarchy; 00046 }; 00047 00048 00049 #endif
Quickstart Users Guide Programmers Reference Installation Examples Download
AMROC Main Home Contactlast update: 06/01/04