Main Page | User's guide | Class Hierarchy | Class List | File List | Class Members

firemodel.hxx

00001 // Copyright (C) 2002-2004 Vivien Mallet
00002 //
00003 // This file is part of Multivac library.
00004 // Multivac library provides front-tracking algorithms.
00005 // 
00006 // Multivac is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License as published by
00008 // the Free Software Foundation; either version 2 of the License, or
00009 // (at your option) any later version.
00010 // 
00011 // Multivac is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License (file "license") for more details.
00015 //
00016 // For more information, please see the Multivac home page:
00017 //     http://spacetown.free.fr/fronts/
00018 
00019 
00020 #ifndef FILE_SPEEDFUNCTIONS_FIREMODEL_HXX
00021 
00022 
00023 #include "../errors.cxx"
00024 #include <stdio.h>
00025 
00026 
00027 namespace Multivac
00028 {
00029 
00030 
00032   // CFIREMODEL //
00034 
00036 
00049   template <class T>
00050   class CFireModel: public CSpeedFunction<T>
00051   {
00052 
00053 
00054     /**************
00055      * ATTRIBUTES *
00056      **************/
00057 
00058   protected:
00059 
00061     T U;
00062 
00064     T m;
00066     T c_1;
00067 
00069     T epsilon_0;
00071     T a;
00073     T b;
00075     T epsilon_1;
00076 
00077 
00078     /*****************************
00079      * CONSTRUCTORS & DESTRUCTOR *
00080      *****************************/
00081 
00082   public:
00083 
00084     CFireModel()  throw();
00085     CFireModel(T U_, T m_, T c_1_, T epsilon_0_,
00086                T a_, T b_, T epsilon_1_)  throw();
00087 
00088     ~CFireModel()  throw();
00089 
00090 
00091     /***********
00092      * METHODS *
00093      ***********/
00094 
00095   public:
00096   
00097     virtual void Init(CMesh<T>& Mesh);
00098 
00099     virtual inline T operator() (T x, T y, T time) const;
00100     virtual inline T operator() (T x, T y, T time,
00101                                  T nx, T ny, T curvature) const;
00102 
00103     virtual T GetMaxF1(T Xmin, T Xmax, T Ymin, T Ymax, T norm2) const;
00104     virtual T GetMaxF2(T Xmin, T Xmax, T Ymin, T Ymax, T norm2) const;
00105 
00106     virtual T GetDerivatives(T x, T y, T nx, T ny, T t,
00107                              T& dFdp, T& dFdx, T& dFdy,
00108                              T& dFdnx, T& dFdny) const;
00109     virtual T Get2ndDerivatives(T x, T y, T nx, T ny, T t,
00110                                 T& dFdpdp, T& dFdpdx, T& dFdpdy,
00111                                 T& dFdpdnx, T& dFdpdny,
00112                                 T& dFdxdx, T& dFdxdy,
00113                                 T& dFdxdnx, T& dFdxdny,
00114                                 T& dFdydy, T& dFdydnx,
00115                                 T& dFdydny, T& dFdnxdnx,
00116                                 T& dFdnxdny, T& dFdnydny) const;
00117 
00118     // For optimization.
00119     void SetRate(T new_parameter)
00120     {
00121       U = new_parameter;
00122     }
00123 
00124   private:
00125     
00126     T Model(T, T, T) const;
00127 
00128   };  // CFireModel.
00129 
00130 
00131 }  // namespace Multivac.
00132 
00133 
00134 #define FILE_MESHES_FIREMODEL_HXX
00135 #endif

Generated on Mon Apr 19 01:59:14 2004 for Multivac by doxygen 1.3.6-20040222