Diffpack Documentation


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

NonLinEqSolvers.h

Go to the documentation of this file.
00001 
00005 class NonLinEqSolvers : public HandleId 
00006 
00007 {
00008 protected:
00009 
00010   VecSimplest(Handle(NonLinEqSolver)) nlsolver;
00011   Handle(NonLinEqSolvers_prm)         nlsolver_prm;
00012 
00013   int  current;           
00014   real eps;
00015   int  total_niter;       
00016 
00017 public:
00018 
00019   bool continuation_stop; 
00020 
00021   NonLinEqSolvers (NonLinEqSolvers_prm& parameters);
00022 
00023   bool redim (NonLinEqSolvers_prm& parameters);  
00024 
00025         NonLinEqSolver& operator () (int i)       
00026         { return nlsolver(i).getRef(); }
00027   const NonLinEqSolver& operator () (int i) const 
00028         {return nlsolver(i).getRef();}
00029   NonLinEqSolver& currentSolver () { return nlsolver(current).getRef(); }
00030   
00031   void setCurrentSolver (int i) { current = i; }  
00032   int  getCurrentSolver() const { return current; }
00033   bool converged ();
00034   real getEps() const { return eps; }
00035   int  getTotalNoIter() const { return total_niter; }
00036 
00037   void attachUserCode  (NonLinEqSolverUDC& user_code);
00038 
00039   void attachNonLinSol (LinEqVector & nonlinear_solution);
00040   void attachNonLinSol (Vector(NUMT)& nonlinear_solution);
00041   void attachLinSol    (LinEqVector & linear_subproblem_solution);
00042   void attachLinSol    (Vector(NUMT)& linear_subproblem_solution);
00043 
00044   
00045   void attachResidual  (LinEqVector & residual);        
00046   void attachResidual  (Vector(NUMT)& residual);
00047   void attachMatrix    (LinEqMatrix & coeff_matrix);    
00048   void attachMatrix    (Matrix(NUMT)& coeff_matrix); 
00049 
00050   bool solve ();
00051   void initSingleStep ();
00052   bool singleStep () { return nlsolver(current)->singleStep(); }
00053 
00054   
00055   void plotEps (CurvePlotFile& file);
00056   void plotResidualNorm (CurvePlotFile& file);
00057 
00058   static void writeHeadings (StringList& headings);
00059   void writeResults  (StringList& results);
00060   void writeExtendedResults (MultipleReporter& rep, VerbosityLevel level,
00061                              CurvePlotFile& cplotfile);
00062 
00063   NonLinEqSolvers ();  
00064 };
00065 
00066 

Copyright © 2003 inuTech GmbH. All rights reserved.