ESyS-Particle  4.0.1
FractalFriction.h
00001 
00002 //                                                         //
00003 // Copyright (c) 2003-2011 by The University of Queensland //
00004 // Earth Systems Science Computational Centre (ESSCC)      //
00005 // http://www.uq.edu.au/esscc                              //
00006 //                                                         //
00007 // Primary Business: Brisbane, Queensland, Australia       //
00008 // Licensed under the Open Software License version 3.0    //
00009 // http://www.opensource.org/licenses/osl-3.0.php          //
00010 //                                                         //
00012 
00013 #ifndef __FRACTALFRICTION_H
00014 #define __FRACTALFRICTION_H
00015 
00016 // -- project includes --
00017 #include "Model/FrictionInteraction.h"
00018 
00019 #include <boost/shared_ptr.hpp>
00020 
00025 class FractalFrictionIGP : public AIGParam
00026 {
00027 public:
00028   virtual std::string getTypeString() const {return "FractalFriction";}
00029   
00030   void setTimeStepSize(double timeStepSize)
00031   {
00032     this->dt = timeStepSize;
00033   }
00034   
00035   double k;
00036   double mu_0;
00037   double k_s;
00038   double dt;
00039   boost::shared_ptr<double> mu;          
00040   double x0,y0,dx,dy;  
00041   int nx,ny;           
00042 
00043   FractalFrictionIGP();
00044   FractalFrictionIGP(const FractalFrictionIGP &);
00045   ~FractalFrictionIGP();
00046   
00047   FractalFrictionIGP &operator=(const FractalFrictionIGP &);
00048 };
00049 
00054 class CFractalFriction : public CFrictionInteraction
00055 {
00056  public: // types
00057   typedef FractalFrictionIGP ParameterType;
00058 
00059   typedef double (CFractalFriction::* ScalarFieldFunction)() const; 
00060   typedef Vec3 (CFractalFriction::* VectorFieldFunction)() const; 
00061         typedef pair<bool,double> (CFractalFriction::* CheckedScalarFieldFunction)() const;
00062  private:
00063 
00064  public:
00065   CFractalFriction();
00066   CFractalFriction(CParticle*,CParticle*,const FractalFrictionIGP&);
00067   virtual ~CFractalFriction();
00068   
00069   static string getType() {return "FractalFriction";};
00070   
00071   static ScalarFieldFunction getScalarFieldFunction(const string&);
00072   static VectorFieldFunction getVectorFieldFunction(const string&);
00073   static CheckedScalarFieldFunction getCheckedScalarFieldFunction(const string&);
00074   friend ostream& operator<<(ostream&,const CFractalFriction&);
00075   friend class TML_PackedMessageInterface;
00076 };
00077 
00078 #endif //__FRACTALFRICTION_H