00001 #ifndef __CSmoothShockFlow__ 00002 #define __CSmoothShockFlow__ 00003 00032 #include <stdio.h> 00033 #include <math.h> 00034 00035 #include "CImage.hpp" 00036 00037 #include "AbsCImageFlow.hpp" 00038 00039 class CSmoothShockFlow : public AbsCImageFlow 00040 { 00041 protected: 00042 00043 double PIinverse; 00044 double a; // allows smooth shocks with a>1.0 00045 00046 double theta; 00047 double thetaInv; 00048 00049 double rlambda; 00050 RComplex lambda; 00051 00052 public: 00053 00054 CSmoothShockFlow(double atheta=0.001, double ax=2.0, double rlambda=1.0) 00055 { 00056 a= ax; PIinverse= 1.0/(4.0*atan(1.0)); 00057 theta=atheta; thetaInv= 1.0/theta; lambda=RComplex(rlambda,theta,1); 00058 } 00059 virtual ~CSmoothShockFlow(){} 00060 00061 virtual RComplex flow(CImage& image, int x, int y); 00062 virtual RComplex flow(CImage& image0, CImage& imSmooth, int x, int y); 00063 00064 virtual void report(FILE* file){} 00065 }; 00066 00067 00068 #endif