xc
ConvergenceTestTol.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 //ConvergenceTestTol.h
29 
30 #ifndef ConvergenceTestTol_h
31 #define ConvergenceTestTol_h
32 
33 #include <solution/analysis/convergenceTest/ConvergenceTest.h>
34 
35 namespace XC {
36 
40 //
42 //
45  {
46  protected:
47  double tol;
48 
49  int sendData(Communicator &);
50  int recvData(const Communicator &);
51  public:
52  // constructors
53  ConvergenceTestTol(CommandEntity *owr,int classTag);
54  ConvergenceTestTol(CommandEntity *owr,int classTag,double tol, int maxNumIter, int printFlag, int normType,int sz_norms= 1);
55 
56  void setTolerance(double newTol);
57  double getTolerance(void) const;
58  int sendSelf(Communicator &);
59  int recvSelf(const Communicator &);
60 
61  std::string getRatioMessage(const std::string &) const;
62  std::string getDispIncrMessage(void) const;
63  std::string getUnbalanceMessage(void) const;
64  std::string getEnergyProductMessage(void) const;
65  };
66 } // end of XC namespace
67 
68 #endif
Communication parameters between processes.
Definition: Communicator.h:66
void setTolerance(double newTol)
Sets the tolerance used in test() to be newTol.
Definition: ConvergenceTestTol.cc:53
int sendSelf(Communicator &)
Send the object.
Definition: ConvergenceTestTol.cc:77
double getTolerance(void) const
Gets the tolerance used in test().
Definition: ConvergenceTestTol.cc:57
std::string getRatioMessage(const std::string &) const
Display current ratio and tolerance.
Definition: ConvergenceTestTol.cc:110
ConvergenceTestTol(CommandEntity *owr, int classTag)
Constructor.
Definition: ConvergenceTestTol.cc:37
int recvSelf(const Communicator &)
Receive the object.
Definition: ConvergenceTestTol.cc:91
int sendData(Communicator &)
Send object members through the communicator argument.
Definition: ConvergenceTestTol.cc:62
std::string getUnbalanceMessage(void) const
Display current unbalance and tolerance.
Definition: ConvergenceTestTol.cc:130
Objet that can execute python scripts.
Definition: CommandEntity.h:40
Convergence test with tolerance threshold.
Definition: ConvergenceTestTol.h:44
convergence test.
Definition: ConvergenceTest.h:81
std::string getDispIncrMessage(void) const
Display current displacement increment and tolerance.
Definition: ConvergenceTestTol.cc:120
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
int printFlag
a flag indicating if to print on test
Definition: ConvergenceTest.h:88
std::string getEnergyProductMessage(void) const
Display current energy product and tolerance.
Definition: ConvergenceTestTol.cc:140
int maxNumIter
max number of iterations
Definition: ConvergenceTest.h:87
int recvData(const Communicator &)
Receives object members through the communicator argument.
Definition: ConvergenceTestTol.cc:70
double tol
the tol on the energy used to test for convergence
Definition: ConvergenceTestTol.h:47