XC Open source finite element analysis program
Preprocessor.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 //Preprocessor.h
28 
29 #ifndef PREPROCESSOR_H
30 #define PREPROCESSOR_H
31 
32 #include "xc_utils/src/nucleo/EntCmd.h"
33 #include "utility/actor/actor/MovableObject.h"
34 #include "loaders/MaterialLoader.h"
35 #include "loaders/BeamIntegratorLoader.h"
36 #include "loaders/TransfCooLoader.h"
37 #include "loaders/NodeLoader.h"
38 #include "loaders/ElementLoader.h"
39 #include "loaders/LoadLoader.h"
40 #include "loaders/ConstraintLoader.h"
41 #include "set_mgmt/MapSet.h"
42 #include "cad/Cad.h"
43 #include "utility/handler/DataOutputHandler.h"
44 
45 
46 namespace XC {
47 class Domain;
48 class Constraint;
49 class ProblemaEF;
50 class FE_Datastore;
51 
53 
58 class Preprocessor: public EntCmd, public MovableObject
59  {
60  private:
61  static const int theDbTag= 0;
62 
63  Domain *domain;
64 
65  MaterialLoader materialHandler;
66  TransfCooLoader transf;
67  BeamIntegratorLoader beamIntegrators;
68  NodeLoader nodes;
69  ElementLoader elements;
70  LoadLoader loads;
71  ConstraintLoader constraints;
72 
73  Cad cad;
74 
75  MapSet sets;
76 
77  friend class Cad;
78  friend class SetMeshComp;
79  friend class Set;
80 
81  Preprocessor(const Preprocessor &otro);
82  Preprocessor &operator=(const Preprocessor &otro);
83  protected:
84  DbTagData &getDbTagData(void) const;
85  int sendData(CommParameters &);
86  int recvData(const CommParameters &);
87 
88  friend class EntMdlr;
89  friend class MapSet;
90  friend class SetEstruct;
91  friend class ProtoElementLoader;
92  friend class ElementLoader;
93  friend class ConstraintLoader;
94  friend class ProblemaEF;
95  void UpdateSets(Element *);
96  void UpdateSets(Constraint *);
97 
98  SetEstruct *busca_set_estruct(const std::string &nmb);
99  public:
100  Preprocessor(EntCmd *owr,DataOutputHandler::map_output_handlers *oh= nullptr);
101  inline Domain *getDomain(void)
102  { return domain; }
103  inline const Domain *getDomain(void) const
104  { return domain; }
105  FE_Datastore *getDataBase(void);
106 
107  void UpdateSets(Node *);
108 
109  MapSet &get_sets(void)
110  { return sets; }
111  const MapSet &get_sets(void) const
112  { return sets; }
113  MaterialLoader &getMaterialLoader(void)
114  { return materialHandler; }
115  const MaterialLoader &getMaterialLoader(void) const
116  { return materialHandler; }
117  inline NodeLoader &getNodeLoader(void)
118  { return nodes; }
119  inline const NodeLoader &getNodeLoader(void) const
120  { return nodes; }
121  ElementLoader &getElementLoader(void)
122  { return elements; }
123  const ElementLoader &getElementLoader(void) const
124  { return elements; }
125  LoadLoader &getLoadLoader(void)
126  { return loads; }
127  const LoadLoader &getLoadLoader(void) const
128  { return loads; }
129  ConstraintLoader &getConstraintLoader(void)
130  { return constraints; }
131  const ConstraintLoader &getConstraintLoader(void) const
132  { return constraints; }
133  TransfCooLoader &getTransfCooLoader(void)
134  { return transf; }
135  const TransfCooLoader &getTransfCooLoader(void) const
136  { return transf; }
137  BeamIntegratorLoader &getBeamIntegratorLoader(void)
138  { return beamIntegrators; }
139  const BeamIntegratorLoader &getBeamIntegratorLoader(void) const
140  { return beamIntegrators; }
141 
142  const Cad &getCad(void) const
143  { return cad; }
144  Cad &getCad(void)
145  { return cad; }
146 
147  void resetLoadCase(void);
148  void clearAll(void);
149 
150  static void setDeadSRF(const double &);
151 
152  virtual int sendSelf(CommParameters &);
153  virtual int recvSelf(const CommParameters &);
154 
155 
156  virtual ~Preprocessor(void);
157  };
158 } // end of XC namespace
159 
160 #endif
Constraint cration tools.
Definition: ConstraintLoader.h:44
void UpdateSets(Element *)
Insert the pointer to the element in the "total" set and in the sets that are currently opened...
Definition: Preprocessor.cc:81
Multiblock topology object (point, line, face, block,...).
Definition: EntMdlr.h:53
void resetLoadCase(void)
Domain setup to solve for a new load pattern.
Definition: Preprocessor.cc:131
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:98
Vector que almacena los dbTags de los miembros de la clase.
Definition: DbTagData.h:43
static void setDeadSRF(const double &)
Assign Stress Reduction Factor for element deactivation.
Definition: Preprocessor.cc:117
virtual int recvSelf(const CommParameters &)
Receive object through the channel being passed as parameter.
Definition: Preprocessor.cc:225
DbTagData & getDbTagData(void) const
Return a vector to store the dbTags of the class members.
Definition: Preprocessor.cc:170
Base class for model constraints.
Definition: Constraint.h:49
Definition: FE_Datastore.h:76
Mesh node.
Definition: Node.h:99
Finite element creation.
Definition: ProtoElementLoader.h:49
Base calass for the finite elements.
Definition: Element.h:104
Object that can move between processes.
Definition: MovableObject.h:91
Finite element model generation tools.
Definition: Preprocessor.h:58
Element creation manager.
Definition: ElementLoader.h:39
Beam integrators handler.
Definition: BeamIntegratorLoader.h:41
structured set, i. e. a set that can return a pointer a to a node or an element from its indices i...
Definition: SetEstruct.h:45
Finite element problem.
Definition: ProblemaEF.h:84
virtual ~Preprocessor(void)
Destructor.
Definition: Preprocessor.cc:108
Model geometry manager. Management of geometry entities: points, lines, surfaces, bodies...
Definition: Cad.h:69
FE_Datastore * getDataBase(void)
Return a pointer to the database.
Definition: Preprocessor.cc:159
Set of mesh components (nodes, elements and constraints).
Definition: SetMeshComp.h:58
void clearAll(void)
Delete all preprocessor entities.
Definition: Preprocessor.cc:143
SetEstruct * busca_set_estruct(const std::string &nmb)
Return a pointer to the set or geometric entity with the name being passed as a parameter.
Definition: Preprocessor.cc:122
Material handler (definition, searching,...).
Definition: MaterialLoader.h:45
Node creation manager.
Definition: NodeLoader.h:42
int sendData(CommParameters &)
Send data through the channel being passed as parameter.
Definition: Preprocessor.cc:177
Object set.
Definition: Set.h:63
virtual int sendSelf(CommParameters &)
Send object through the channel being passed as parameter.
Definition: Preprocessor.cc:211
Lee load patterns desde archivo. Load definition manager.
Definition: LoadLoader.h:44
Communication parameters between processes.
Definition: CommParameters.h:65
================================================================================
Definition: ContinuaReprComponent.h:34
Sets container.
Definition: MapSet.h:57
Manager for the creation/deletion of coordinate transformations.
Definition: TransfCooLoader.h:49
int recvData(const CommParameters &)
Receive data through the channel being passed as parameter.
Definition: Preprocessor.cc:194