basicdiscretization.h

Go to the documentation of this file.
00001 #ifndef  __BasicDiscretization_h
00002 #define  __BasicDiscretization_h
00003 
00004 
00005 #include  "discretizationinterface.h"
00006 #include  "feminterface.h"
00007 #include  "integratorinterface.h"
00008 
00009 namespace Gascoigne
00010 {
00011 
00016 
00020 
00021 class BasicDiscretization : public DiscretizationInterface
00022 {
00023  private:
00024    const MeshInterface*  __MP;
00025    mutable DataContainer __q;
00026   
00027  protected:
00028    mutable EntryMatrix __E;
00029    mutable LocalVector __F;
00030    mutable LocalVector __U;
00031 
00032    mutable LocalData           __QN;
00033    mutable LocalData           __QC;
00034    mutable LocalParameterData  __QP;
00035    
00036    virtual const DataContainer& GetDataContainer() const {return __q;}
00037    virtual void SetDataContainer(const DataContainer& q) const {__q = q;}
00038 
00039    virtual const MeshInterface* GetMesh() const { assert(__MP); return __MP;}
00040 
00041    virtual void GlobalToGlobalData() const;
00042    virtual void GlobalToLocal(LocalVector& U, const GlobalVector& u, int iq) const {
00043      GlobalToLocalSingle(U,u,iq);
00044      GlobalToLocalData(iq);
00045    }
00046    virtual void GlobalToLocalData(int iq) const;
00047    virtual void GlobalToLocalSingle(LocalVector& U, const GlobalVector& u, int iq) const;
00048    virtual void GlobalToLocalCell(LocalVector& U, const GlobalVector& u, int iq) const;
00049 
00050    virtual void LocalToGlobal(GlobalVector& f, const LocalVector& F, int iq, double s) const;
00051    virtual void LocalToGlobal(MatrixInterface& A, EntryMatrix& E, int iq, double s) const;
00052 
00053    virtual IntVector GetLocalIndices(int iq) const=0;
00054 
00055  public:
00056    //
00058    //
00059    BasicDiscretization();
00060    ~BasicDiscretization();
00061    
00062    void BasicInit(const ParamFile* pf) {}
00063    void ReInit   (const MeshInterface* MP) {__MP=MP;}
00064    
00065    virtual void AddNodeVector(const std::string& name, const GlobalVector* q) const {
00066      __q.AddNodeVector(name,q);
00067    }
00068    virtual void DeleteNodeVector(const std::string& name) const {
00069      __q.DeleteNodeVector(name);
00070    }
00071    virtual void AddCellVector(const std::string& name, const GlobalVector* q) const {
00072      __q.AddCellVector(name,q);
00073    }
00074    virtual void DeleteCellVector(const std::string& name) const {
00075      __q.DeleteCellVector(name);
00076    }
00077    virtual void AddParameterVector(const std::string& name, const GlobalParameterVector* q) const {
00078      __q.AddParameterVector(name,q);
00079    }
00080    virtual void DeleteParameterVector(const std::string& name) const {
00081      __q.DeleteParameterVector(name);
00082    }
00083 
00084    void HNAverageData() const;
00085    void HNZeroData   () const;
00086 };
00087 }
00088 
00089 #endif

Generated on Thu Sep 14 10:34:35 2006 for Gascoigne by  doxygen 1.4.7