xc
SubdomainAnalysis.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 /* ****************************************************************** **
29 ** OpenSees - Open System for Earthquake Engineering Simulation **
30 ** Pacific Earthquake Engineering Research Center **
31 ** **
32 ** **
33 ** (C) Copyright 1999, The Regents of the University of California **
34 ** All Rights Reserved. **
35 ** **
36 ** Commercial use of this program without express permission of the **
37 ** University of California, Berkeley, is strictly prohibited. See **
38 ** file 'COPYRIGHT' in main directory for information on usage and **
39 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
40 ** **
41 ** Developed by: **
42 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
43 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
44 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
45 ** **
46 ** ****************************************************************** */
47 
48 // $Revision: 1.1 $
49 // $Date: 2005/12/01 00:07:57 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/analysis/SubdomainAnalysis.h,v $
51 
52 
53 // File: ~/analysis/method/SubdomainAnalysis.h
54 //
55 // Written: fmk
56 // Created: Tue Sept 17 16:34:47: 1996
57 // Revision: A
58 //
59 // Description: This file contains the class definition for
60 // SubdomainAnalysis. SubdomainAnalysis is a subclass
61 // of AnalysisAnalysis, it is used when performing a domain decomposition
62 // analysis. It provides methods which can be invoked by a subdomain to
63 // perform the numerical computations required.
64 //
65 // What: "@(#) SubdomainAnalysis.h, revA"
66 
67 #ifndef SubdomainAnalysis_h
68 #define SubdomainAnalysis_h
69 
70 #include <solution/analysis/analysis/Analysis.h>
71 #include <utility/actor/actor/MovableObject.h>
72 
73 namespace XC {
74 class Subdomain;
75 class Vector;
76 
78 //
84  {
85  private:
86  Subdomain *theSubdomain;
87  DomainSolver *theSolver;
88  Vector *theResidual;
89  int numEqn;
90  int numExtEqn;
91 
92  // the following 2 variables are used to allow formResidual()
93  // and formTangVectProduct() to be called before formTangent()
94  // - this must be allowed as typical elements will not have to fromTangent
95  // before being asked to form Residual().
96  bool tangFormed;
97  int tangFormedCount; // saves the expense of computing formTangent()
98  // for same state of Subdomain.
99  int domainStamp;
100  protected:
101  Subdomain *getSubdomainPtr(void) const;
102  DomainSolver *getDomainSolverPtr(void) const;
103  friend class SolutionProcedure;
104  SubdomainAnalysis(Subdomain &theDomain);
105 
106  SubdomainAnalysis(int classTag, Subdomain &theDomain);
107 
108  SubdomainAnalysis(Subdomain &theDomain,
109  ConstraintHandler &theHandler,
110  DOF_Numberer &theNumberer,
111  AnalysisModel &theModel,
112  DomainDecompAlgo &theSolnAlgo,
113  IncrementalIntegrator &theIntegrator,
114  LinearSOE &theSOE,
115  DomainSolver &theSolver);
116  Analysis *getCopy(void) const;
117  public:
118 
119  virtual ~SubdomainAnalysis();
120 
121  virtual int analyze(void);
122  virtual int domainChanged(void);
123 
124  virtual int getNumExternalEqn(void);
125  virtual int getNumInternalEqn(void);
126  virtual int newStep(double dT);
127  virtual int computeInternalResponse(void);
128  virtual int formTangent(void);
129  virtual int formResidual(void);
130  virtual int formTangVectProduct(Vector &force);
131  virtual const Matrix &getTangent(void);
132  virtual const Vector &getResidual(void);
133  virtual const Vector &getTangVectProduct(void);
134 
135  virtual int sendSelf(Communicator &);
136  virtual int recvSelf(const Communicator &);
137  };
138 
141  { return new SubdomainAnalysis(*this); }
142 } // end of XC namespace
143 
144 #endif
145 
146 
147 
148 
149 
150 
151 
152 
153 
154 
155 
Base class for DOF numbererers.
Definition: DOF_Numberer.h:94
Float vector abstraction.
Definition: Vector.h:94
Domain enclosed in another domain.
Definition: Subdomain.h:102
ConstraintHandlers enforce the single and multi freedom constraints that exist in the domain by creat...
Definition: ConstraintHandler.h:93
Communication parameters between processes.
Definition: Communicator.h:66
Linear system of equations.
Definition: LinearSOE.h:92
Object that can move between processes.
Definition: MovableObject.h:100
Base class for the object that perform the analysis.
Definition: Analysis.h:117
Solution algorithm for domain decomposition analysis.
Definition: DomainDecompAlgo.h:89
SubdomainAnalysis is a subclass of AnalysisAnalysis, it is used when performing a domain decompositio...
Definition: SubdomainAnalysis.h:83
Solution procedure for the finite element problem.
Definition: SolutionProcedure.h:57
Container for FE_Element and DOF_Group objects created by the constraint handler. ...
Definition: AnalysisModel.h:134
virtual int sendSelf(Communicator &)
Send the object.
IncrementalIntegrator is an algorithmic class for setting up the finite element equations in an incre...
Definition: IncrementalIntegrator.h:100
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual int recvSelf(const Communicator &)
Receive the object.
Analysis * getCopy(void) const
Virtual constructor.
Definition: SubdomainAnalysis.h:140
Matrix of floats.
Definition: Matrix.h:111
used to solve a system of equations and to do static condensation operations on the linear system of ...
Definition: DomainSolver.h:83