CTestFixedNumIter.hGo to the documentation of this file.00001 /* ****************************************************************** ** 00002 ** OpenSees - Open System for Earthquake Engineering Simulation ** 00003 ** Pacific Earthquake Engineering Research Center ** 00004 ** ** 00005 ** ** 00006 ** (C) Copyright 1999, The Regents of the University of California ** 00007 ** All Rights Reserved. ** 00008 ** ** 00009 ** Commercial use of this program without express permission of the ** 00010 ** University of California, Berkeley, is strictly prohibited. See ** 00011 ** file 'COPYRIGHT' in main directory for information on usage and ** 00012 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. ** 00013 ** ** 00014 ** Developed by: ** 00015 ** Frank McKenna (fmckenna@ce.berkeley.edu) ** 00016 ** Gregory L. Fenves (fenves@ce.berkeley.edu) ** 00017 ** Filip C. Filippou (filippou@ce.berkeley.edu) ** 00018 ** ** 00019 ** ****************************************************************** */ 00020 00021 // $Revision: 1.1 $ 00022 // $Date: 2005/12/15 00:13:51 $ 00023 // $Source: /usr/local/cvs/OpenSees/SRC/convergenceTest/CTestFixedNumIter.h,v $ 00024 00025 // Written: Andreas Schellenberg (andreas.schellenberg@gmx.net) 00026 // Created: 09/05 00027 // Revision: A 00028 00029 // Purpose: This file contains the class definition for CTestFixedNumIter. 00030 // A CTestFixedNumIter object performs a fixed number of iterations without 00031 // testing for convergence. This test is useful for hybrid simulation where 00032 // the residual error is corrected for. 00033 00034 #ifndef CTestFixedNumIter_h 00035 #define CTestFixedNumIter_h 00036 00037 #include <ConvergenceTest.h> 00038 #include <bool.h> 00039 class EquiSolnAlgo; 00040 class LinearSOE; 00041 00042 00043 class CTestFixedNumIter: public ConvergenceTest 00044 { 00045 public: 00046 // constructors 00047 CTestFixedNumIter(); 00048 CTestFixedNumIter(int maxNumIter, int printFlag, int normType=2); 00049 00050 // destructor 00051 ~CTestFixedNumIter(); 00052 00053 ConvergenceTest *getCopy(int iterations); 00054 00055 int setEquiSolnAlgo(EquiSolnAlgo &theAlgo); 00056 00057 int test(void); 00058 int start(void); 00059 00060 int getNumTests(void); 00061 int getMaxNumTests(void); 00062 double getRatioNumToMax(void); 00063 const Vector &getNorms(void); 00064 00065 int sendSelf(int commitTag, Channel &theChannel); 00066 int recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker); 00067 00068 protected: 00069 00070 private: 00071 LinearSOE *theSOE; 00072 00073 int maxNumIter; // max number of iterations 00074 int currentIter; // number of times test() has been invokes since last start() 00075 int printFlag; // a flag indicating if to print on test 00076 int nType; // type of norm to use (1-norm, 2-norm, p-norm, max-norm) 00077 00078 Vector norms; // vector to hold the norms 00079 }; 00080 00081 #endif |