XC Open source finite element analysis program
SoluMethod.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 //SoluMethod.h
28 
29 #ifndef SOLUMETHOD_H
30 #define SOLUMETHOD_H
31 
32 #include "xc_utils/src/nucleo/EntCmd.h"
33 #include "utility/handler/DataOutputHandler.h"
34 
35 namespace XC {
36 
37 class Domain;
38 
39 class AnalysisModel;
40 class ConstraintHandler;
41 class DOF_Numberer;
42 
43 class SolutionAlgorithm;
44 class EigenAlgorithm;
45 class EquiSolnAlgo;
46 class DomainDecompAlgo;
47 
48 class Integrator;
49 class IncrementalIntegrator;
50 class EigenIntegrator;
51 class LinearBucklingIntegrator;
52 class TransientIntegrator;
53 class StaticIntegrator;
54 
55 class SystemOfEqn;
56 class LinearSOE;
57 class EigenSOE;
58 
59 class ConvergenceTest;
60 class ModelWrapper;
61 
62 class Analysis;
63 
64 class FEM_ObjectBroker;
65 class ID;
66 
75 // - Convergence test.
76 class SoluMethod: public EntCmd
77  {
78  ModelWrapper *base;
79  SolutionAlgorithm *theSolnAlgo;
80  Integrator *theIntegrator;
81  SystemOfEqn *theSOE;
82  ConvergenceTest *theTest;
83 
84  Analysis *getAnalysis(void);
85  const Analysis *getAnalysis(void) const;
86  protected:
87  friend class ProblemaEF;
88  void libera_soln_algo(void);
89  bool alloc_soln_algo(const std::string &);
90  void copia_soln_algo(SolutionAlgorithm *);
91 
92  void libera_integrator(void);
93  bool alloc_integrator(const std::string &,const Vector &);
94  void copia_integrator(Integrator *);
95 
96  void libera_system_of_equations(void);
97  bool alloc_system_of_equations(const std::string &,AnalysisModel *);
98  void copia_system_of_equations(SystemOfEqn *);
99 
100  void libera_conv_test(void);
101  bool alloc_conv_test(const std::string &);
102  void copia_conv_test(ConvergenceTest *);
103 
104  void libera(void);
105  void copia(const SoluMethod &);
106 
107  public:
108  SoluMethod(Analysis *a= nullptr,ModelWrapper *b= nullptr);
109  SoluMethod(const SoluMethod &);
110  SoluMethod &operator=(const SoluMethod &);
111  ~SoluMethod(void);
112 
113  inline ModelWrapper *getModelWrapperPtr(void)
114  { return base; }
115  Domain *getDomainPtr(void);
116  const Domain *getDomainPtr(void) const;
118  DOF_Numberer *getDOF_NumbererPtr(void) const;
119  AnalysisModel *getAnalysisModelPtr(void) const;
120 
121  LinearSOE *getLinearSOEPtr(void);
122  const LinearSOE *getLinearSOEPtr(void) const;
123  EigenSOE *getEigenSOEPtr(void);
124  const EigenSOE *getEigenSOEPtr(void) const;
125  Integrator &newIntegrator(const std::string &, const Vector &);
126 
129  { return theIntegrator; }
130  inline const Integrator *getIntegratorPtr(void) const
131  { return theIntegrator; }
137  SystemOfEqn &newSystemOfEqn(const std::string &);
138 
141  { return theSolnAlgo; }
142  inline const SolutionAlgorithm *getSolutionAlgorithmPtr(void) const
143  { return theSolnAlgo; }
147  SolutionAlgorithm &newSolutionAlgorithm(const std::string &);
148 
150  const ConvergenceTest *getConvergenceTestPtr(void) const;
151  ConvergenceTest &newConvergenceTest(const std::string &);
152 
153  virtual const DomainSolver *getDomainSolverPtr(void) const;
154  virtual DomainSolver *getDomainSolverPtr(void);
155  virtual const Subdomain *getSubdomainPtr(void) const;
156  virtual Subdomain *getSubdomainPtr(void);
157 
158  int setLinearSOE(LinearSOE &theSOE);
159  int setEigenSOE(EigenSOE &theSOE);
160  int setIntegrator(Integrator &theNewIntegrator);
161  int setAlgorithm(SolutionAlgorithm &theNewAlgorithm);
162  int setConvergenceTest(ConvergenceTest &theNewTest);
163 
164  void brokeDDLinearSOE(const CommParameters &,const ID &);
165  void brokeLinearSOE(const CommParameters &,const ID &);
166 
167  void brokeIncrementalIntegrator(const CommParameters &,const ID &);
168  void brokeStaticIntegrator(const CommParameters &,const ID &);
169  void brokeTransientIntegrator(const CommParameters &,const ID &);
170 
171  void brokeDomainDecompAlgo(const CommParameters &,const ID &);
172  void brokeEquiSolnAlgo(const CommParameters &,const ID &);
173  bool CheckPointers(void);
174  void revertToStart(void);
175 
176  void clearAll(void);
177  };
178 
179 } // end of XC namespace
180 
181 #endif
SoluMethod & operator=(const SoluMethod &)
Assignment operator.
Definition: SoluMethod.cc:458
SolutionAlgorithm * getSolutionAlgorithmPtr(void)
Returns a pointer to the solution algorithm.
Definition: SoluMethod.h:140
Base class for static integrators.
Definition: StaticIntegrator.h:83
Base class for DOF numbererers.
Definition: DOF_Numberer.h:84
IncrementalIntegrator is an algorithmic class for setting up the finite element equations in an incre...
Definition: IncrementalIntegrator.h:87
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
EigenAlgorithm * getEigenSolutionAlgorithmPtr(void)
Returns, if possible, a pointer al solution algorithm del sistema de eigenvalues, otherwise it return...
Definition: SoluMethod.cc:645
EquiSolnAlgo is an abstract base class, i.e. no objects of it&#39;s type can be created. Its subclasses deifine the sequence of operations to be performed in the analysis by static equilibrium of a finite element model.
Definition: EquiSolnAlgo.h:85
Solution algorithm for eigenproblem.
Definition: EigenAlgorithm.h:83
virtual const DomainSolver * getDomainSolverPtr(void) const
Returns a pointer to the DomainSolver.
Definition: SoluMethod.cc:504
Definition: Vector.h:82
Clase Base para los objetos que realizan the analysis.
Definition: Analysis.h:109
IncrementalIntegrator * getIncrementalIntegratorPtr(void)
Returns, if possible, a pointer al integrator incremental otherwise it returns nullptr.
Definition: SoluMethod.cc:599
DOF_Numberer * getDOF_NumbererPtr(void) const
Returns a pointer to the renumerador.
Definition: SoluMethod.cc:545
Solution procedure for the finite element problem. The solution procedure is definde by specifiying: ...
Definition: SoluMethod.h:76
used to solve a system of equations and to do static condensation operations on the linear system of ...
Definition: DomainSolver.h:79
ConstraintHandler * getConstraintHandlerPtr(void)
Returns a pointer to the manejador de coacciones.
Definition: SoluMethod.cc:536
SolutionAlgorithm & newSolutionAlgorithm(const std::string &)
Creates a new solution algorithm with the name being passed as parameter.
Definition: SoluMethod.cc:118
Base class for eigenproblem systems of equations.
Definition: EigenSOE.h:63
ConvergenceTest * getConvergenceTestPtr(void)
Returns a pointer to the convergence test.
Definition: SoluMethod.cc:674
EigenSOE * getEigenSOEPtr(void)
Returns a pointer to the system of equations de eigenvalues.
Definition: SoluMethod.cc:581
convergence test.
Definition: ConvergenceTest.h:75
Domain * getDomainPtr(void)
Returns a pointer to the domain.
Definition: SoluMethod.cc:483
int setLinearSOE(LinearSOE &theSOE)
Sets the linear system of equations to use in the analysis.
Definition: SoluMethod.cc:682
SystemOfEqn & newSystemOfEqn(const std::string &)
Sets the system of equations type to use.
Definition: SoluMethod.cc:350
int setEigenSOE(EigenSOE &theSOE)
Sets the eigenSOE to use in the analysis.
Definition: SoluMethod.cc:689
bool CheckPointers(void)
Verifica que los pointers no sean nulos.
Definition: SoluMethod.cc:759
virtual const Subdomain * getSubdomainPtr(void) const
Returns a pointer to the subdomain.
Definition: SoluMethod.cc:520
ConvergenceTest & newConvergenceTest(const std::string &)
Sets convergence test to use.
Definition: SoluMethod.cc:413
Base class for eigenproblem integrators.
Definition: EigenIntegrator.h:85
void revertToStart(void)
Returns the modelo a su estado original.
Definition: SoluMethod.cc:789
System of equations base class.
Definition: SystemOfEqn.h:84
Definition: ID.h:77
AnalysisModel * getAnalysisModelPtr(void) const
Returns a pointer to the analysis model.
Definition: SoluMethod.cc:553
Finite element problem.
Definition: ProblemaEF.h:84
Definition: Subdomain.h:87
LinearBucklingIntegrator is an algorithmic class for setting up the finite element equations for a li...
Definition: LinearBucklingIntegrator.h:47
EigenIntegrator * getEigenIntegratorPtr(void)
Returns, if possible, a pointer al EigenIntegrator otherwise it returns nullptr.
Definition: SoluMethod.cc:608
~SoluMethod(void)
Destructor.
Definition: SoluMethod.cc:470
int setIntegrator(Integrator &theNewIntegrator)
Sets the integrator to use in the analysis.
Definition: SoluMethod.cc:696
Wrapper for the finite element model "seen" from the solver. The model wrapper is definied by: ...
Definition: ModelWrapper.h:55
StaticIntegrator * getStaticIntegratorPtr(void)
Returns, if possible, a pointer al StaticIntegrator otherwise it returns nullptr. ...
Definition: SoluMethod.cc:635
LinearBucklingIntegrator * getLinearBucklingIntegratorPtr(void)
Returns, if possible, a pointer al LinearBucklingIntegrator otherwise it returns nullptr.
Definition: SoluMethod.cc:617
Linea system of equations. This is the class definition for LinearSOE. LinearSOE is an abstract base ...
Definition: LinearSOE.h:86
TransientIntegrator * getTransientIntegratorPtr(void)
Returns, if possible, a pointer al EigenIntegrator otherwise it returns nullptr.
Definition: SoluMethod.cc:626
Los objetos de esta clase, dan acceso a los objetos FE_Element y DOF_Group creados por el Constraint ...
Definition: AnalysisModel.h:113
ConstraintHandlers enforce the single and multi freedom constraints that exist in the domain by creat...
Definition: ConstraintHandler.h:94
SoluMethod(Analysis *a=nullptr, ModelWrapper *b=nullptr)
Default constructor.
Definition: SoluMethod.cc:437
Communication parameters between processes.
Definition: CommParameters.h:65
DomainDecompAlgo * getDomainDecompSolutionAlgorithmPtr(void)
Returns, if possible, a pointer al solution algorithm DomainDecomp , otherwise it returns nullptr...
Definition: SoluMethod.cc:665
================================================================================
Definition: ContinuaReprComponent.h:34
Solution algorithm for domain decomposition.
Definition: DomainDecompAlgo.h:83
int setConvergenceTest(ConvergenceTest &theNewTest)
Sets the convergence test to use in the analysis.
Definition: SoluMethod.cc:710
Base class for solution algorithms.
Definition: SolutionAlgorithm.h:86
Base class for the object that performs the integration of physical properties over the domain to for...
Definition: Integrator.h:91
EquiSolnAlgo * getEquiSolutionAlgorithmPtr(void)
Returns, if possible, a pointer to the system of equations solution algorithm, otherwise it returns n...
Definition: SoluMethod.cc:655
Base class for dynamic equations of motion integrators.
Definition: TransientIntegrator.h:84
LinearSOE * getLinearSOEPtr(void)
Returns a pointer to the linear system of equations.
Definition: SoluMethod.cc:563
Integrator & newIntegrator(const std::string &, const Vector &)
Defines a new integrator.
Definition: SoluMethod.cc:263
int setAlgorithm(SolutionAlgorithm &theNewAlgorithm)
Sets the solution algorithm to use in the analysis.
Definition: SoluMethod.cc:703
Integrator * getIntegratorPtr(void)
Returns a pointer to the integrator.
Definition: SoluMethod.h:128