PageRenderTime 115ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/opensees-websocket/SRC/analysis/analysis/SubdomainAnalysis.h

https://code.google.com/
C Header | 143 lines | 71 code | 32 blank | 40 comment | 0 complexity | dd8003e570977ce8dbd3deaf774ca2b9 MD5 | raw file
  1. /* ****************************************************************** **
  2. ** OpenSees - Open System for Earthquake Engineering Simulation **
  3. ** Pacific Earthquake Engineering Research Center **
  4. ** **
  5. ** **
  6. ** (C) Copyright 1999, The Regents of the University of California **
  7. ** All Rights Reserved. **
  8. ** **
  9. ** Commercial use of this program without express permission of the **
  10. ** University of California, Berkeley, is strictly prohibited. See **
  11. ** file 'COPYRIGHT' in main directory for information on usage and **
  12. ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
  13. ** **
  14. ** Developed by: **
  15. ** Frank McKenna (fmckenna@ce.berkeley.edu) **
  16. ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
  17. ** Filip C. Filippou (filippou@ce.berkeley.edu) **
  18. ** **
  19. ** ****************************************************************** */
  20. // $Revision: 1.2 $
  21. // $Date: 2009-08-25 22:34:49 $
  22. // $Source: /usr/local/cvs/OpenSees/SRC/analysis/analysis/SubdomainAnalysis.h,v $
  23. // File: ~/analysis/method/SubdomainAnalysis.h
  24. //
  25. // Written: fmk
  26. // Created: Tue Sept 17 16:34:47: 1996
  27. // Revision: A
  28. //
  29. // Description: This file contains the class definition for
  30. // SubdomainAnalysis. SubdomainAnalysis is a subclass
  31. // of AnalysisAnalysis, it is used when performing a domain decomposition
  32. // analysis. It provides methods which can be invoked by a subdomain to
  33. // perform the numerical computations required.
  34. //
  35. // What: "@(#) SubdomainAnalysis.h, revA"
  36. #ifndef SubdomainAnalysis_h
  37. #define SubdomainAnalysis_h
  38. #include <Analysis.h>
  39. #include <Matrix.h>
  40. #include <Vector.h>
  41. #include <MovableObject.h>
  42. class ConstraintHandler;
  43. class DOF_Numberer;
  44. class AnalysisModel;
  45. class IncrementalIntegrator;
  46. class LinearSOE;
  47. class DomainSolver;
  48. class DomainDecompAlgo;
  49. class Subdomain;
  50. class Vector;
  51. class SubdomainAnalysis: public Analysis, public MovableObject
  52. {
  53. public:
  54. SubdomainAnalysis(Subdomain &theDomain);
  55. SubdomainAnalysis(int classTag,
  56. Subdomain &theDomain);
  57. SubdomainAnalysis(Subdomain &theDomain,
  58. ConstraintHandler &theHandler,
  59. DOF_Numberer &theNumberer,
  60. AnalysisModel &theModel,
  61. DomainDecompAlgo &theSolnAlgo,
  62. IncrementalIntegrator &theIntegrator,
  63. LinearSOE &theSOE,
  64. DomainSolver &theSolver);
  65. virtual ~SubdomainAnalysis();
  66. virtual int analyze(void);
  67. virtual int domainChanged(void);
  68. virtual int getNumExternalEqn(void);
  69. virtual int getNumInternalEqn(void);
  70. virtual int newStep(double dT);
  71. virtual int computeInternalResponse(void);
  72. virtual int formTangent(void);
  73. virtual int formResidual(void);
  74. virtual int formTangVectProduct(Vector &force);
  75. virtual const Matrix &getTangent(void);
  76. virtual const Vector &getResidual(void);
  77. virtual const Vector &getTangVectProduct(void);
  78. virtual int sendSelf(int commitTag, Channel &theChannel);
  79. virtual int recvSelf(int commitTag, Channel &theChannel,
  80. FEM_ObjectBroker &theBroker);
  81. protected:
  82. Subdomain *getSubdomainPtr(void) const;
  83. ConstraintHandler *getConstraintHandlerPtr(void) const;
  84. DOF_Numberer *getDOF_NumbererPtr(void) const;
  85. AnalysisModel *getAnalysisModelPtr(void) const;
  86. DomainDecompAlgo *getDomainDecompAlgoPtr(void) const;
  87. IncrementalIntegrator *getIncrementalIntegratorPtr(void) const;
  88. LinearSOE *getLinSOEPtr(void) const;
  89. DomainSolver *getDomainSolverPtr(void) const;
  90. private:
  91. Subdomain *theSubdomain;
  92. ConstraintHandler *theHandler;
  93. DOF_Numberer *theNumberer;
  94. AnalysisModel *theModel;
  95. DomainDecompAlgo *theAlgorithm;
  96. IncrementalIntegrator *theIntegrator;
  97. LinearSOE *theSOE;
  98. DomainSolver *theSolver;
  99. Vector *theResidual;
  100. int numEqn;
  101. int numExtEqn;
  102. // the following 2 variables are used to allow formResidual()
  103. // and formTangVectProduct() to be called before formTangent()
  104. // - this must be allowed as typical elements will not have to fromTangent
  105. // before being asked to form Residual().
  106. bool tangFormed;
  107. int tangFormedCount; // saves the expense of computing formTangent()
  108. // for same state of Subdomain.
  109. int domainStamp;
  110. };
  111. #endif