Main Page | User's Guide | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

baseclass.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_INITIALIZER_BASECLASS_HXX
00021 
00022 
00023 #include "../errors.cxx"
00024 #include <stdio.h>
00025 
00026 
00027 namespace Multivac
00028 {
00029 
00030 
00032   // CINITIALIZER //
00034 
00036 
00041   template <class T>
00042   class CInitializer
00043   {
00044 
00045 
00046     /**************
00047      * ATTRIBUTES *
00048      **************/
00049 
00050   protected:
00051 
00053     Curve<T> Front;
00054 
00057     int LastCurveUpdate;
00060     int LastCurveUpdateForDisplay;
00061 
00062 
00063     /*****************************
00064      * CONSTRUCTORS & DESTRUCTOR *
00065      *****************************/
00066 
00067   public:
00068 
00069     CInitializer()  throw();
00070 
00071     virtual ~CInitializer()  throw();
00072 
00073 
00074     /***********
00075      * METHODS *
00076      ***********/
00077 
00078   public:
00079 
00080     virtual bool IsNarrowBand() const = 0;
00081     virtual bool IsFastMarching() const = 0;
00082   
00083     virtual void FirstInitMesh(CMesh<T>& Mesh) const = 0;
00084     virtual void FirstInitInitialCurve(CMesh<T>& Mesh,
00085                                        CInitialCurve<T>& InitialCurve) const
00086       = 0;
00087     virtual void FirstInitPhiAndF(CMesh<T>& Mesh,
00088                                   CInitialCurve<T>& InitialCurve,
00089                                   CLevelSet<T>& Phi, CSpeedFunction<T>& F,
00090                                   CUpdater<T>& Updater) = 0;
00091 
00092     virtual void InitMesh(int iter, CMesh<T>& Mesh, CLevelSet<T>& Phi,
00093                           CSpeedFunction<T>& F, CUpdater<T>& Updater,
00094                           T CurrentTime) const = 0;
00095     virtual void InitPhiAndF(int iter, CMesh<T>& Mesh, CLevelSet<T>& Phi,
00096                              CSpeedFunction<T>& F, CUpdater<T>& Updater,
00097                              T CurrentTime) = 0;
00098 
00099     virtual void BuildCurveForDisplay(int iter, CMesh<T>& Mesh,
00100                                       CLevelSet<T>& Phi) = 0;
00101 
00102     Curve<T>& GetFront();
00103 
00104     virtual void Save(string CurvesFile, string CurveLengthsFile);
00105 
00106   };  // CInitializer.
00107 
00108 
00109 }  //  namespace Multivac.
00110 
00111 
00112 #define FILE_INITIALIZER_BASECLASS_HXX
00113 #endif

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