Diffpack Documentation

(Functionality not available, requires installation of an additional Diffpack Toolbox)


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

NonLinMGtools.h

Go to the documentation of this file.
00001 
00005 class NonLinMGtools: public MLSolverUDC
00006 
00007 {
00008 protected:
00009   NonLinEqSolverUDC* udc;
00010   FEM*               fem;
00011   int no_of_grids;
00012   String description;
00013   int current_grid_level; 
00014   int ndpn; 
00015   bool structure_inited;
00016   bool use_lineq_mat;
00017   static bool usefieldcollector;
00018   bool coarsesolver; 
00019   int  pre_smooth;
00020   int  post_smooth;
00021 
00022   VecSimplest(Handle(Proj))              proj;
00023   VecSimplest(Handle(DegFreeFE))          dof;
00024   
00025   
00026   VecSimplest(Handle(NonLinEqSolver_prm)) nlsolver_prm;
00027   VecSimplest(Handle(NonLinEqSolver))     nlsolver;
00028   VecSimplest(Handle(LinEqAdmFE))         lineq;
00029   VecSimplest(Handle(LinEqVector))        nonlin_solution;
00030   VecSimplest(Handle(LinEqVector))        linear_solution;
00031   VecSimplest(Handle(LinEqVector))        linear_rhs;
00032   
00033   
00034   Handle(NonLinEqSolver)                  mlnlsolver;
00035   Handle(NonLinEqSolver_prm)              mlnlsolver_prm;
00036   Handle(LinEqVector)                     ddnonlin_solution;
00037   Handle(LinEqVector)                     ddlinear_solution;
00038   Handle(MLSolver)                        mlsolver;
00039   Handle(MLSolver_prm)                    mlsolver_prm;
00040   Handle(Proj_prm)                        proj_prm;
00041   
00042 public:
00043   Handle(GridCollector)                   gridcoll;
00044   Handle(FieldCollector)                  fieldcoll;
00045   VecSimplest(Handle(FieldFE))            field;
00046 
00047   NonLinMGtools(){}
00048   NonLinMGtools(NonLinEqSolverUDC& udc_, 
00049                 const char* description_ = "NonLinMGtools");
00050   NonLinMGtools(NonLinEqSolverUDC& udc_, GridCollector& gridcoll_, 
00051                 const char* descrition_ = "NonLinMGtools");
00052   NonLinMGtools(NonLinEqSolverUDC& udc_, FieldCollector& fieldcoll_, 
00053                 const char* description = "NonLinMGtools");
00054   virtual ~NonLinMGtools(){}
00055 
00056   void attach (Proj& proj, int space);
00057   void attach (DegFreeFE& dof_, int space);
00058   void attach (MLSolver_prm& dd_prm);
00059   void attachFEM (FEM& fem_) { fem = & fem_;}
00060   void attachNonLinEqSolverUDC (NonLinEqSolverUDC& udc_) { udc = &udc_; }
00061   void attachNonLinMLSolution (LinEqVector& lv);
00062 
00063   MLSolver&       getMLSolver() {return mlsolver();}
00064   Proj&           getProj(int i) { return proj (i ();) }
00065   DegFreeFE&      getDof( int i ) { return dof(i ();) }
00066   GridFE&         getGrid( int i) { return gridcoll->getGrid(i); }
00067   MLSolver_prm&   getMLSolver_prm();
00068   LinEqAdmFE&     getLinEqAdmFE(int i) {return lineq(i ();) }
00069   NonLinEqSolver& getNonLinMLSolver() { return *mlnlsolver; }
00070   NonLinEqSolver& getNonLinEqSolver(int i) { return nlsolver(i ();) }
00071   int             getCurrentGridLevel() {return current_grid_level;}
00072   LinEqVector&    getNonLinSolution() { return *ddnonlin_solution; }
00073   LinEqVector&    getNonLinSmootherSolution( int i ) {return nonlin_solution(i ();) }
00074   LinEqVector&    getLinSmootherSolution( int i ) {return linear_solution(i ();) }
00075   LinEqVector&    getLinRhs( int i ) {return linear_rhs(i ();) }
00076   FieldFE&        getField( int i) { return field(i ();) }
00077   void init();
00078   void initStructure();
00079   void initFieldCollector(MenuSystem& menu);
00080 
00081   
00082   virtual SpaceId getNoOfSpaces() const;         
00083   virtual bool solveSubSystem (LinEqVector& b, LinEqVector& x,
00084                                SpaceId space, StartVectorMode start,
00085                                MLSolverMode mode=SUBSPACE);
00086   
00087   virtual void residual (LinEqVector& b, LinEqVector& x, LinEqVector& r, 
00088                          SpaceId space);
00089   
00090   virtual bool transfer (const LinEqVector& fv, SpaceId fi,
00091                          LinEqVector& tv, SpaceId ti,
00092                          bool add_to_t= false, MLTransferMode=TRANSFER);
00093 
00094   virtual void matVec (const LinEqVector& f, LinEqVector& x, SpaceId space);
00095   virtual int  getWorkTransfer (SpaceId fi, SpaceId ti,
00096                                 const PrecondWork work_tp) const;
00097   virtual real getStorageTransfer (SpaceId fi, SpaceId ti) const;
00098   virtual int  getWorkSolve (SpaceId space, const PrecondWork work_tp)
00099     const;
00100   virtual real getStorageSolve (SpaceId space) const;
00101   virtual String comment ();
00102   virtual void print (Os os, int level=1);
00103 
00104   virtual void scan   (MenuSystem& menu);
00105   static void defineStatic (MenuSystem& menu, int level = MAIN);
00106   static void setGridTypeStatic(GRIDTYPE grid_type_);
00107   static void useFieldCollector (bool use_field_collector_, 
00108                                  int no_fields_on_each_grid_);
00109   void define (MenuSystem& menu, int level = MAIN );
00110   bool ok(int level = 1);
00111 };
00112 
00113 

Copyright © 2003 inuTech GmbH. All rights reserved.