xc
FEProblem.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 //FEProblem.h
29 
30 #ifndef FEPROBLEM_H
31 #define FEPROBLEM_H
32 
33 #include "utility/kernel/CommandEntity.h"
34 #include "version.h"
35 #include "preprocessor/Preprocessor.h"
36 #include "solution/SolutionProcedure.h"
37 #include "utility/handler/DataOutputHandler.h"
38 
40 namespace XC {
41 class Domain;
42 class FE_Datastore;
43 class FEM_ObjectBroker;
44 
79 
81 class FEProblem: public CommandEntity
82  {
83  mutable DataOutputHandler::map_output_handlers output_handlers; //Manejadores para salida de resultados.
84  Preprocessor preprocessor;
85  SolutionProcedure proc_solu;
86  FE_Datastore *dataBase;
87  static FEM_ObjectBroker theBroker;
88 
89  public:
90  static Domain *theActiveDomain;
91  FEProblem(void);
92  ~FEProblem(void);
93  static inline const std::string &getXCVersion(void)
94  { return gVERSION; }
95  static inline const std::string &getXCVersionShort(void)
96  { return gVERSION_SHORT; }
97  void clearAll(void);
98  FE_Datastore *defineDatabase(const std::string &, const std::string &);
99  inline FE_Datastore *getDataBase(void)
100  { return dataBase; }
101  inline const Preprocessor &getPreprocessor(void) const
102  { return preprocessor; }
103  inline Preprocessor &getPreprocessor(void)
104  { return preprocessor; }
105  inline Domain *getDomain(void)
106  { return preprocessor.getDomain(); }
107  inline const Domain *getDomain(void) const
108  { return preprocessor.getDomain(); }
109  inline const SolutionProcedure &getSoluProc(void) const
110  { return proc_solu; }
111  inline SolutionProcedure &getSoluProc(void)
112  { return proc_solu; }
113  inline DataOutputHandler::map_output_handlers *getOutputHandlers(void) const
114  { return &output_handlers; }
115 
116  boost::python::dict getPyDict(void) const;
117  void setPyDict(const boost::python::dict &);
118  };
119 
120 inline std::string getXCVersion(void)
121  { return FEProblem::getXCVersion(); }
122 inline std::string getXCVersionShort(void)
123  { return FEProblem::getXCVersionShort(); }
124 
125 } // end of XC namespace
126 
127 #endif
void clearAll(void)
Delete all entities in the FE problem.
Definition: FEProblem.cc:161
Base class for objects that store/restore model information.
Definition: FE_Datastore.h:84
FE_Datastore * defineDatabase(const std::string &, const std::string &)
Database definition.
Definition: FEProblem.cc:63
Finite element model generation tools.
Definition: Preprocessor.h:59
void setPyDict(const boost::python::dict &)
Set the values of the object members from a Python dictionary.
Definition: FEProblem.cc:118
~FEProblem(void)
Destructor.
Definition: FEProblem.cc:155
FEM_ObjectBroker is is an object broker class for the finite element method.
Definition: FEM_ObjectBroker.h:151
boost::python::dict getPyDict(void) const
Return a Python dictionary with the object members values.
Definition: FEProblem.cc:97
FEProblem(void)
Default constructor.
Definition: FEProblem.cc:57
Solution procedure for the finite element problem.
Definition: SolutionProcedure.h:57
Objet that can execute python scripts.
Definition: CommandEntity.h:40
Finite element problem.
Definition: FEProblem.h:81
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:117