Main Page | User's Guide | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | 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 
00050   template <class T>
00051   class CFireModel: public CSpeedFunction<T>
00052   {
00053 
00054 
00055     /**************
00056      * ATTRIBUTES *
00057      **************/
00058 
00059   protected:
00060 
00062     T U;
00063 
00065     T m;
00067     T c_1;
00068 
00070     T epsilon_0;
00072     T a;
00074     T b;
00076     T epsilon_1;
00077 
00078 
00079     /*****************************
00080      * CONSTRUCTORS & DESTRUCTOR *
00081      *****************************/
00082 
00083   public:
00084 
00085     CFireModel()  throw();
00086     CFireModel(T U_, T m_, T c_1_, T epsilon_0_,
00087                T a_, T b_, T epsilon_1_)  throw();
00088 
00089     ~CFireModel()  throw();
00090 
00091 
00092     /***********
00093      * METHODS *
00094      ***********/
00095 
00096   public:
00097   
00098     virtual void Init(CMesh<T>& Mesh);
00099 
00100     virtual inline T operator() (T x, T y, T time) const;
00101     virtual inline T operator() (T x, T y, T time,
00102                                  T nx, T ny, T curvature) const;
00103 
00104     virtual T GetMaxF1(T Xmin, T Xmax, T Ymin, T Ymax, T norm2) const;
00105     virtual T GetMaxF2(T Xmin, T Xmax, T Ymin, T Ymax, T norm2) const;
00106 
00107     virtual T GetDerivatives(T x, T y, T nx, T ny, T t,
00108                              T& dFdp, T& dFdx, T& dFdy,
00109                              T& dFdnx, T& dFdny) const;
00110     virtual T Get2ndDerivatives(T x, T y, T nx, T ny, T t,
00111                                 T& dFdpdp, T& dFdpdx, T& dFdpdy,
00112                                 T& dFdpdnx, T& dFdpdny,
00113                                 T& dFdxdx, T& dFdxdy,
00114                                 T& dFdxdnx, T& dFdxdny,
00115                                 T& dFdydy, T& dFdydnx,
00116                                 T& dFdydny, T& dFdnxdnx,
00117                                 T& dFdnxdny, T& dFdnydny) const;
00118 
00119     // For optimization.
00120     void SetRate(T new_parameter)
00121     {
00122       U = new_parameter;
00123     }
00124 
00125   private:
00126     
00127     T Model(T, T, T) const;
00128 
00129   };  // CFireModel.
00130 
00131 
00132 }  // namespace Multivac.
00133 
00134 
00135 #define FILE_MESHES_FIREMODEL_HXX
00136 #endif

Generated on Sun Jan 16 23:37:58 2005 for Multivac by  doxygen 1.4.0