xc
DomainDecompositionAnalysis.h
1 //----------------------------------------------------------------------------
2 // XC program; finite element analysis code
3 // for structural analysis and design.
4 //
5 // Copyright (C) Luis Claudio Pérez Tato
6 //
7 // This program derives from OpenSees <http://opensees.berkeley.edu>
8 // developed by the «Pacific earthquake engineering research center».
9 //
10 // Except for the restrictions that may arise from the copyright
11 // of the original program (see copyright_opensees.txt)
12 // XC is free software: you can redistribute it and/or modify
13 // it under the terms of the GNU General Public License as published by
14 // the Free Software Foundation, either version 3 of the License, or
15 // (at your option) any later version.
16 //
17 // This software is distributed in the hope that it will be useful, but
18 // WITHOUT ANY WARRANTY; without even the implied warranty of
19 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 // GNU General Public License for more details.
21 //
22 //
23 // You should have received a copy of the GNU General Public License
24 // along with this program.
25 // If not, see <http://www.gnu.org/licenses/>.
26 //----------------------------------------------------------------------------
27 /* ****************************************************************** **
28 ** OpenSees - Open System for Earthquake Engineering Simulation **
29 ** Pacific Earthquake Engineering Research Center **
30 ** **
31 ** **
32 ** (C) Copyright 1999, The Regents of the University of California **
33 ** All Rights Reserved. **
34 ** **
35 ** Commercial use of this program without express permission of the **
36 ** University of California, Berkeley, is strictly prohibited. See **
37 ** file 'COPYRIGHT' in main directory for information on usage and **
38 ** redistribution, and for a DISCLAIMER OF ALL WARRANTIES. **
39 ** **
40 ** Developed by: **
41 ** Frank McKenna (fmckenna@ce.berkeley.edu) **
42 ** Gregory L. Fenves (fenves@ce.berkeley.edu) **
43 ** Filip C. Filippou (filippou@ce.berkeley.edu) **
44 ** **
45 ** ****************************************************************** */
46 
47 // $Revision: 1.4 $
48 // $Date: 2005/11/29 23:36:47 $
49 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/analysis/DomainDecompositionAnalysis.h,v $
50 
51 
52 // Written: fmk
53 // Created: Tue Sept 17 16:34:47: 1996
54 // Revision: A
55 //
56 // Description: This file contains the class definition for
57 // DomainDecompositionAnalysis. DomainDecompositionAnalysis is a subclass
58 // of AnalysisAnalysis, it is used when performing a domain decomposition
59 // analysis. It provides methods which can be invoked by a subdomain to
60 // perform the numerical computations required.
61 //
62 // What: "@(#) DomainDecompositionAnalysis.h, revA"
63 
64 #ifndef DomainDecompositionAnalysis_h
65 #define DomainDecompositionAnalysis_h
66 
67 #include <solution/analysis/analysis/Analysis.h>
68 #include "utility/matrix/Vector.h"
69 #include <utility/actor/actor/MovableObject.h>
70 
71 namespace XC {
72 class Subdomain;
73  class Matrix;
74  class DomainSolver;
75 
77 //
91  {
92  private:
93  Subdomain *theSubdomain;
94  DomainSolver *theSolver;
95  Vector theResidual;
96  int numEqn;
97  int numExtEqn;
98 
99  // the following 2 variables are used to allow formResidual()
100  // and formTangVectProduct() to be called before formTangent()
101  // - this must be allowed as typical elements will not have to fromTangent
102  // before being asked to form Residual().
103  bool tangFormed;
104  int tangFormedCount;
105  protected:
106  int domainStamp;
108  inline Subdomain *getSubdomainPtr(void) const
109  { return theSubdomain; }
110 
111  void set_all_links(void);
112 
113  friend class ProcSolu;
114  friend class FEM_ObjectBroker;
116  DomainDecompositionAnalysis(Subdomain &theDomain,DomainSolver &theSolver,AnalysisAggregation *s= nullptr);
117  DomainDecompositionAnalysis(int classTag, Subdomain &theDomain,AnalysisAggregation *s= nullptr);
118  DomainDecompositionAnalysis(int classTag, Subdomain &theDomain,DomainSolver &theSolver,AnalysisAggregation *s);
119  Analysis *getCopy(void) const;
120  public:
121 
122  virtual void clearAll(void);
123  virtual int initialize(void);
124  virtual int domainChanged(void);
125 
126  // methods for non standard domain deomposition analysis
127  virtual bool doesIndependentAnalysis(void);
128  virtual int analyze(double dT);
129 
130  // methods for standard domain deomposition analysis
131  // that do some form of condensation to the tangent
132  virtual int getNumExternalEqn(void);
133  virtual int getNumInternalEqn(void);
134  virtual int newStep(double dT);
135  virtual int computeInternalResponse(void);
136  virtual int formTangent(void);
137  virtual int formResidual(void);
138  virtual int formTangVectProduct(Vector &force);
139  virtual const Matrix &getTangent(void);
140  virtual const Vector &getResidual(void);
141  virtual const Vector &getTangVectProduct(void);
142 
143  virtual const DomainSolver *getDomainSolver(void) const;
144  virtual DomainSolver *getDomainSolver(void);
145  virtual const Subdomain *getSubdomain(void) const;
146  virtual Subdomain *getSubdomain(void);
147 
148  virtual int sendSelf(CommParameters &);
149  virtual int recvSelf(const CommParameters &);
150 
151  // methods to change the analysis aggregates
152  virtual int setAlgorithm(EquiSolnAlgo &theAlgorithm);
153  virtual int setIntegrator(IncrementalIntegrator &theIntegrator);
154  virtual int setLinearSOE(LinearSOE &theSOE);
155  virtual int setConvergenceTest(ConvergenceTest &theTest);
156  };
157 
158 } // end of XC namespace
159 
160 #endif
161 
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
virtual int formTangVectProduct(Vector &force)
form the product of the condensed tangent matrix times the vector .
Definition: DomainDecompositionAnalysis.cpp:382
virtual const Vector & getResidual(void)
Returns the residual vector.
Definition: DomainDecompositionAnalysis.cpp:443
virtual int setIntegrator(IncrementalIntegrator &theIntegrator)
Sets the integrator to use in the analysis.
Definition: DomainDecompositionAnalysis.cpp:631
virtual int domainChanged(void)
Method used to inform the object that the domain has changed.
Definition: DomainDecompositionAnalysis.cpp:193
Float vector abstraction.
Definition: Vector.h:93
Domain enclosed in another domain.
Definition: Subdomain.h:101
virtual const Matrix & getTangent(void)
Return the tangent stiffness matrix.
Definition: DomainDecompositionAnalysis.cpp:417
Solution procedure for the finite element problem.
Definition: AnalysisAggregation.h:89
Linear system of equations.
Definition: LinearSOE.h:91
virtual void clearAll(void)
Clears all object members (constraint handler, analysis model,...).
Definition: DomainDecompositionAnalysis.cpp:157
Object that can move between processes.
Definition: MovableObject.h:99
virtual int sendSelf(CommParameters &)
Sends the object.
Definition: DomainDecompositionAnalysis.cpp:484
virtual const Vector & getTangVectProduct(void)
Returns the result of invoking getCondensedMatVect() on the solver.
Definition: DomainDecompositionAnalysis.cpp:469
Base class for the object that perform the analysis.
Definition: Analysis.h:116
virtual int setAlgorithm(EquiSolnAlgo &theAlgorithm)
Sets the solution algorithm to use in the analysis.
Definition: DomainDecompositionAnalysis.cpp:622
FEM_ObjectBroker is is an object broker class for the finite element method.
Definition: FEM_ObjectBroker.h:145
DomainDecompositionAnalysis(Subdomain &theDomain, AnalysisAggregation *s=nullptr)
Constructor.
Definition: DomainDecompositionAnalysis.cpp:100
virtual int setConvergenceTest(ConvergenceTest &theTest)
Sets the convergence test to use in the analysis.
Definition: DomainDecompositionAnalysis.cpp:650
Subdomain * getSubdomainPtr(void) const
Returns a pointer to the subdomain.
Definition: DomainDecompositionAnalysis.h:108
virtual int recvSelf(const CommParameters &)
Receives the object.
Definition: DomainDecompositionAnalysis.cpp:521
Used when performing a domain decomposition analysis.
Definition: DomainDecompositionAnalysis.h:90
virtual int setLinearSOE(LinearSOE &theSOE)
Sets the system of equations to use in the analysis.
Definition: DomainDecompositionAnalysis.cpp:641
IncrementalIntegrator is an algorithmic class for setting up the finite element equations in an incre...
Definition: IncrementalIntegrator.h:96
EquiSolnAlgo is an abstract base class, i.e.
Definition: EquiSolnAlgo.h:88
Solution procedure for the finite element problem.
Definition: ProcSolu.h:56
convergence test.
Definition: ConvergenceTest.h:80
virtual int formTangent(void)
Assembles the tangent stiffness matrix.
Definition: DomainDecompositionAnalysis.cpp:294
virtual const DomainSolver * getDomainSolver(void) const
Returns a pointer to the DomainSolver associated with this object.
Definition: DomainDecompositionAnalysis.cpp:174
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
virtual int computeInternalResponse(void)
A method which invokes solveCurrentStep() on theAlgorithm.
Definition: DomainDecompositionAnalysis.cpp:274
Communication parameters between processes.
Definition: CommParameters.h:65
Matrix of floats.
Definition: Matrix.h:108
virtual int getNumInternalEqn(void)
Returns the number of internal equations.
Definition: DomainDecompositionAnalysis.cpp:266
used to solve a system of equations and to do static condensation operations on the linear system of ...
Definition: DomainSolver.h:82
Analysis * getCopy(void) const
Virtual constructor.
Definition: DomainDecompositionAnalysis.cpp:153
void set_all_links(void)
Sets los pointers tol DomainDecompSolutionAlgorithm y al subdomain.
Definition: DomainDecompositionAnalysis.cpp:85
virtual const Subdomain * getSubdomain(void) const
Returns a pointer to the subdomain.
Definition: DomainDecompositionAnalysis.cpp:182
virtual int getNumExternalEqn(void)
Returns the number of external equations.
Definition: DomainDecompositionAnalysis.cpp:262
virtual int formResidual(void)
Assembles the residuial vector.
Definition: DomainDecompositionAnalysis.cpp:341
virtual int analyze(double dT)
Performs the analysis.
Definition: DomainDecompositionAnalysis.cpp:166