xc
DomainDecompositionAnalysis.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.4 $
49 // $Date: 2005/11/29 23:36:47 $
50 // $Source: /usr/local/cvs/OpenSees/SRC/analysis/analysis/DomainDecompositionAnalysis.h,v $
51 
52 
53 // Written: fmk
54 // Created: Tue Sept 17 16:34:47: 1996
55 // Revision: A
56 //
57 // Description: This file contains the class definition for
58 // DomainDecompositionAnalysis. DomainDecompositionAnalysis is a subclass
59 // of AnalysisAnalysis, it is used when performing a domain decomposition
60 // analysis. It provides methods which can be invoked by a subdomain to
61 // perform the numerical computations required.
62 //
63 // What: "@(#) DomainDecompositionAnalysis.h, revA"
64 
65 #ifndef DomainDecompositionAnalysis_h
66 #define DomainDecompositionAnalysis_h
67 
68 #include <solution/analysis/analysis/Analysis.h>
69 #include "utility/matrix/Vector.h"
70 #include <utility/actor/actor/MovableObject.h>
71 
72 namespace XC {
73 class Subdomain;
74  class Matrix;
75  class DomainSolver;
76 
78 //
92  {
93  private:
94  Subdomain *theSubdomain;
95  DomainSolver *theSolver;
96  Vector theResidual;
97  int numEqn;
98  int numExtEqn;
99 
100  // the following 2 variables are used to allow formResidual()
101  // and formTangVectProduct() to be called before formTangent()
102  // - this must be allowed as typical elements will not have to fromTangent
103  // before being asked to form Residual().
104  bool tangFormed;
105  int tangFormedCount;
106  protected:
107  int domainStamp;
109  inline Subdomain *getSubdomainPtr(void) const
110  { return theSubdomain; }
111 
112  void set_all_links(void);
113 
114  friend class SolutionProcedure;
115  friend class FEM_ObjectBroker;
117  DomainDecompositionAnalysis(Subdomain &theDomain,DomainSolver &theSolver,SolutionStrategy *s= nullptr);
118  DomainDecompositionAnalysis(int classTag, Subdomain &theDomain,SolutionStrategy *s= nullptr);
119  DomainDecompositionAnalysis(int classTag, Subdomain &theDomain,DomainSolver &theSolver,SolutionStrategy *s);
120  Analysis *getCopy(void) const;
121  public:
122 
123  virtual void clearAll(void);
124  virtual int initialize(void);
125  virtual int domainChanged(void);
126 
127  // methods for non standard domain decomposition analysis
128  virtual bool doesIndependentAnalysis(void);
129  virtual int analyze(double dT);
130 
131  // methods for standard domain decomposition analysis
132  // that do some form of condensation to the tangent
133  virtual int getNumExternalEqn(void);
134  virtual int getNumInternalEqn(void);
135  virtual int newStep(double dT);
136  virtual int computeInternalResponse(void);
137  virtual int formTangent(void);
138  virtual int formResidual(void);
139  virtual int formTangVectProduct(Vector &force);
140  virtual const Matrix &getTangent(void);
141  virtual const Vector &getResidual(void);
142  virtual const Vector &getTangVectProduct(void);
143 
144  virtual const DomainSolver *getDomainSolver(void) const;
145  virtual DomainSolver *getDomainSolver(void);
146  virtual const Subdomain *getSubdomain(void) const;
147  virtual Subdomain *getSubdomain(void);
148 
149  virtual int sendSelf(Communicator &);
150  virtual int recvSelf(const Communicator &);
151 
152  // methods to change the analysis aggregates
153  virtual int setAlgorithm(EquiSolnAlgo &theAlgorithm);
154  virtual int setIntegrator(IncrementalIntegrator &theIntegrator);
155  virtual int setLinearSOE(LinearSOE &theSOE);
156  virtual int setConvergenceTest(ConvergenceTest &theTest);
157  };
158 
159 } // end of XC namespace
160 
161 #endif
162 
163 
164 
165 
166 
167 
168 
169 
170 
171 
172 
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:94
Domain enclosed in another domain.
Definition: Subdomain.h:102
virtual const Matrix & getTangent(void)
Return the tangent stiffness matrix.
Definition: DomainDecompositionAnalysis.cpp:417
Communication parameters between processes.
Definition: Communicator.h:66
Linear system of equations.
Definition: LinearSOE.h:92
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:100
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:117
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:151
virtual int setConvergenceTest(ConvergenceTest &theTest)
Sets the convergence test to use in the analysis.
Definition: DomainDecompositionAnalysis.cpp:650
DomainDecompositionAnalysis(Subdomain &theDomain, SolutionStrategy *s=nullptr)
Constructor.
Definition: DomainDecompositionAnalysis.cpp:100
virtual int sendSelf(Communicator &)
Sends the object.
Definition: DomainDecompositionAnalysis.cpp:484
Subdomain * getSubdomainPtr(void) const
Returns a pointer to the subdomain.
Definition: DomainDecompositionAnalysis.h:109
Used when performing a domain decomposition analysis.
Definition: DomainDecompositionAnalysis.h:91
Solution procedure for the finite element problem.
Definition: SolutionProcedure.h:57
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:100
Base class for solution algorithms.
Definition: EquiSolnAlgo.h:91
convergence test.
Definition: ConvergenceTest.h:81
Solution strategy for the finite element problem.
Definition: SolutionStrategy.h:94
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
virtual int recvSelf(const Communicator &)
Receives the object.
Definition: DomainDecompositionAnalysis.cpp:521
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
virtual int computeInternalResponse(void)
A method which invokes solveCurrentStep() on theAlgorithm.
Definition: DomainDecompositionAnalysis.cpp:274
Matrix of floats.
Definition: Matrix.h:111
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:83
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