xc
AnalysisAggregation.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 //AnalysisAggregation.h
28 
29 #ifndef ANALYSISAGGREGATION_H
30 #define ANALYSISAGGREGATION_H
31 
32 #include "xc_utils/src/kernel/CommandEntity.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 
89 class AnalysisAggregation: public CommandEntity
90  {
91  ModelWrapper *base;
92  SolutionAlgorithm *theSolnAlgo;
93  Integrator *theIntegrator;
94  SystemOfEqn *theSOE;
95  ConvergenceTest *theTest;
96 
97  Analysis *getAnalysis(void);
98  const Analysis *getAnalysis(void) const;
99  protected:
100  friend class FEProblem;
101  void free_soln_algo(void);
102  bool alloc_soln_algo(const std::string &);
104 
105  void free_integrator(void);
106  bool alloc_integrator(const std::string &,const Vector &);
107  void copy_integrator(Integrator *);
108 
109  void free_system_of_equations(void);
110  bool alloc_system_of_equations(const std::string &,AnalysisModel *);
112 
113  void free_conv_test(void);
114  bool alloc_conv_test(const std::string &);
115  void copy_conv_test(ConvergenceTest *);
116 
117  void free_mem(void);
118  void copy(const AnalysisAggregation &);
119 
120  public:
121  AnalysisAggregation(Analysis *a= nullptr,ModelWrapper *b= nullptr);
124  ~AnalysisAggregation(void);
125 
126  inline ModelWrapper *getModelWrapperPtr(void)
127  { return base; }
128  Domain *getDomainPtr(void);
129  const Domain *getDomainPtr(void) const;
131  DOF_Numberer *getDOF_NumbererPtr(void) const;
132  AnalysisModel *getAnalysisModelPtr(void) const;
133 
134  LinearSOE *getLinearSOEPtr(void);
135  const LinearSOE *getLinearSOEPtr(void) const;
136  EigenSOE *getEigenSOEPtr(void);
137  const EigenSOE *getEigenSOEPtr(void) const;
138  Integrator &newIntegrator(const std::string &, const Vector &);
139 
142  { return theIntegrator; }
143  inline const Integrator *getIntegratorPtr(void) const
144  { return theIntegrator; }
148  TransientIntegrator *getTransientIntegratorPtr(void);
150  SystemOfEqn &newSystemOfEqn(const std::string &);
151 
154  { return theSolnAlgo; }
155  inline const SolutionAlgorithm *getSolutionAlgorithmPtr(void) const
156  { return theSolnAlgo; }
160  SolutionAlgorithm &newSolutionAlgorithm(const std::string &);
161 
163  const ConvergenceTest *getConvergenceTestPtr(void) const;
164  ConvergenceTest &newConvergenceTest(const std::string &);
165 
166  virtual const DomainSolver *getDomainSolverPtr(void) const;
167  virtual DomainSolver *getDomainSolverPtr(void);
168  virtual const Subdomain *getSubdomainPtr(void) const;
169  virtual Subdomain *getSubdomainPtr(void);
170 
171  int setLinearSOE(LinearSOE &theSOE);
172  int setEigenSOE(EigenSOE &theSOE);
173  int setIntegrator(Integrator &theNewIntegrator);
174  int setAlgorithm(SolutionAlgorithm &theNewAlgorithm);
175  int setConvergenceTest(ConvergenceTest &theNewTest);
176 
177  void brokeDDLinearSOE(const CommParameters &,const ID &);
178  void brokeLinearSOE(const CommParameters &,const ID &);
179 
180  void brokeIncrementalIntegrator(const CommParameters &,const ID &);
181  void brokeStaticIntegrator(const CommParameters &,const ID &);
182  void brokeTransientIntegrator(const CommParameters &,const ID &);
183 
184  void brokeDomainDecompAlgo(const CommParameters &,const ID &);
185  void brokeEquiSolnAlgo(const CommParameters &,const ID &);
186  bool CheckPointers(void);
187  void revertToStart(void);
188 
189  void clearAll(void);
190  };
191 
192 } // end of XC namespace
193 
194 #endif
EigenSOE * getEigenSOEPtr(void)
Returns a pointer to the system of equations de eigenvalues.
Definition: AnalysisAggregation.cc:609
{staticFormTaylor} {equation}
Definition: StaticIntegrator.h:137
Base class for DOF numbererers.
Definition: DOF_Numberer.h:93
Float vector abstraction.
Definition: Vector.h:93
Domain enclosed in another domain.
Definition: Subdomain.h:101
Base class for solution algorithms.
Definition: SolutionAlgorithm.h:90
int setEigenSOE(EigenSOE &theSOE)
Sets the eigenSOE to use in the analysis.
Definition: AnalysisAggregation.cc:735
Solution procedure for the finite element problem.
Definition: AnalysisAggregation.h:89
ConstraintHandlers enforce the single and multi freedom constraints that exist in the domain by creat...
Definition: ConstraintHandler.h:92
Base class for eigenproblem systems of equations.
Definition: EigenSOE.h:63
StaticIntegrator * getStaticIntegratorPtr(void)
Returns, if possible, a pointer to the static integrator otherwise it returns nullptr.
Definition: AnalysisAggregation.cc:676
Linear system of equations.
Definition: LinearSOE.h:91
int setLinearSOE(LinearSOE &theSOE)
Sets the linear system of equations to use in the analysis.
Definition: AnalysisAggregation.cc:728
DomainDecompAlgo * getDomainDecompSolutionAlgorithmPtr(void)
Returns, if possible, a pointer al solution algorithm DomainDecomp , otherwise it returns nullptr...
Definition: AnalysisAggregation.cc:709
void copy_system_of_equations(SystemOfEqn *)
To change the linear system of equation object between analysis.
Definition: AnalysisAggregation.cc:357
DOF_Numberer * getDOF_NumbererPtr(void) const
Returns a pointer to the numberer.
Definition: AnalysisAggregation.cc:569
Base class for the object that perform the analysis.
Definition: Analysis.h:116
Solution algorithm for domain decomposition analysis.
Definition: DomainDecompAlgo.h:88
EquiSolnAlgo * getEquiSolutionAlgorithmPtr(void)
Returns, if possible, a pointer to the system of equations solution algorithm, otherwise it returns n...
Definition: AnalysisAggregation.cc:698
Vector of integers.
Definition: ID.h:93
ConvergenceTest * getConvergenceTestPtr(void)
Returns a pointer to the convergence test.
Definition: AnalysisAggregation.cc:720
Integrator & newIntegrator(const std::string &, const Vector &)
Defines a new integrator.
Definition: AnalysisAggregation.cc:277
LinearBucklingIntegrator is an algorithmic class for setting up the finite element equations for a li...
Definition: LinearBucklingIntegrator.h:47
LinearSOE * getLinearSOEPtr(void)
Returns a pointer to the linear system of equations.
Definition: AnalysisAggregation.cc:587
AnalysisModel * getAnalysisModelPtr(void) const
Returns a pointer to the analysis model.
Definition: AnalysisAggregation.cc:577
TransientIntegrator * getTransientIntegratorPtr(void)
Returns, if possible, a pointer to the transient integrator otherwise it returns nullptr.
Definition: AnalysisAggregation.cc:665
void copy_soln_algo(SolutionAlgorithm *)
To change the algorithm between analysis.
Definition: AnalysisAggregation.cc:111
Wrapper for the finite element model "as seen" from the solver.
Definition: ModelWrapper.h:58
LinearBucklingIntegrator * getLinearBucklingIntegratorPtr(void)
Returns, if possible, a pointer to the linear buckling integrator otherwise it returns nullptr...
Definition: AnalysisAggregation.cc:654
System of equations base class.
Definition: SystemOfEqn.h:89
Container for FE_Element and DOF_Group objects created by the constraint handler. ...
Definition: AnalysisModel.h:133
void copy_integrator(Integrator *)
To change the integration scheme between analysis.
Definition: AnalysisAggregation.cc:263
AnalysisAggregation(Analysis *a=nullptr, ModelWrapper *b=nullptr)
Default constructor.
Definition: AnalysisAggregation.cc:461
int setIntegrator(Integrator &theNewIntegrator)
Sets the integrator to use in the analysis.
Definition: AnalysisAggregation.cc:743
Solution algorithm for eigenproblem.
Definition: EigenAlgorithm.h:83
int setConvergenceTest(ConvergenceTest &theNewTest)
Sets the convergence test to use in the analysis.
Definition: AnalysisAggregation.cc:757
EigenIntegrator * getEigenIntegratorPtr(void)
Returns, if possible, a pointer to the eigen integrator otherwise it returns nullptr.
Definition: AnalysisAggregation.cc:643
SolutionAlgorithm & newSolutionAlgorithm(const std::string &)
Creates a new solution algorithm with the name being passed as parameter.
Definition: AnalysisAggregation.cc:125
Domain * getDomainPtr(void)
Returns a pointer to the domain.
Definition: AnalysisAggregation.cc:507
Base class for the objects that performs the integration of physical properties over the domain to fo...
Definition: Integrator.h:99
IncrementalIntegrator * getIncrementalIntegratorPtr(void)
Returns, if possible, a pointer to the incremental integrator otherwise it returns nullptr...
Definition: AnalysisAggregation.cc:632
IncrementalIntegrator is an algorithmic class for setting up the finite element equations in an incre...
Definition: IncrementalIntegrator.h:96
Finite element problem.
Definition: FEProblem.h:82
SystemOfEqn & newSystemOfEqn(const std::string &)
Sets the system of equations type to use.
Definition: AnalysisAggregation.cc:371
Base class for eigenproblem integrators.
Definition: EigenIntegrator.h:85
EquiSolnAlgo is an abstract base class, i.e.
Definition: EquiSolnAlgo.h:88
convergence test.
Definition: ConvergenceTest.h:80
ConvergenceTest & newConvergenceTest(const std::string &)
Set convergence test to be used.
Definition: AnalysisAggregation.cc:437
AnalysisAggregation & operator=(const AnalysisAggregation &)
Assignment operator.
Definition: AnalysisAggregation.cc:482
bool CheckPointers(void)
Verifica que los pointers no sean nulos.
Definition: AnalysisAggregation.cc:806
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
virtual const Subdomain * getSubdomainPtr(void) const
Returns a pointer to the subdomain.
Definition: AnalysisAggregation.cc:544
virtual const DomainSolver * getDomainSolverPtr(void) const
Returns a pointer to the DomainSolver.
Definition: AnalysisAggregation.cc:528
ConstraintHandler * getConstraintHandlerPtr(void)
Returns a pointer to the constraint handler.
Definition: AnalysisAggregation.cc:560
Communication parameters between processes.
Definition: CommParameters.h:65
used to solve a system of equations and to do static condensation operations on the linear system of ...
Definition: DomainSolver.h:82
EigenAlgorithm * getEigenSolutionAlgorithmPtr(void)
Returns, if possible, a pointer to the solution algorithm of the eigen problem,, otherwise it returns...
Definition: AnalysisAggregation.cc:687
Integrator * getIntegratorPtr(void)
Returns a pointer to the integrator.
Definition: AnalysisAggregation.h:141
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:116
void revertToStart(void)
Returns the modelo a su estado original.
Definition: AnalysisAggregation.cc:840
SolutionAlgorithm * getSolutionAlgorithmPtr(void)
Returns a pointer to the solution algorithm.
Definition: AnalysisAggregation.h:153
int setAlgorithm(SolutionAlgorithm &theNewAlgorithm)
Sets the solution algorithm to use in the analysis.
Definition: AnalysisAggregation.cc:750
~AnalysisAggregation(void)
Destructor.
Definition: AnalysisAggregation.cc:494