00001 #ifndef __SmoothShockFlow__ 00002 #define __SmoothShockFlow__ 00003 00032 #include <stdio.h> 00033 #include <math.h> 00034 00035 #include "RImage.hpp" 00036 00037 #include "AbsRImageFlow.hpp" 00038 00039 class SmoothShockFlow : public AbsRImageFlow 00040 { 00041 protected: 00042 00043 double PIinverse; 00044 double a; // allows smooth shocks with a>1.0 00045 00046 double t; 00047 00048 public: 00049 00050 SmoothShockFlow(double ax=2.0) 00051 {a= ax; PIinverse= 1.0/(4.0*atan(1.0)); t=1.0;} 00052 virtual ~SmoothShockFlow(){} 00053 00054 virtual void setTime(int atime){t= atime;} 00055 virtual double getTime(){return t;} 00056 00057 virtual double flow(RImage& image, int x, int y); 00058 virtual double flow(RImage& image0, RImage& imSmooth, int x, int y); 00059 00060 virtual void report(FILE* file){} 00061 }; 00062 00063 00064 #endif