xc
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/kernel/CommandEntity.h"
33 #include "utility/actor/actor/MovableObject.h"
34 #include "prep_handlers/MaterialHandler.h"
35 #include "prep_handlers/BeamIntegratorHandler.h"
36 #include "prep_handlers/TransfCooHandler.h"
37 #include "prep_handlers/NodeHandler.h"
38 #include "prep_handlers/ElementHandler.h"
39 #include "prep_handlers/LoadHandler.h"
40 #include "prep_handlers/BoundaryCondHandler.h"
41 #include "set_mgmt/MapSet.h"
42 #include "multi_block_topology/MultiBlockTopology.h"
43 #include "utility/handler/DataOutputHandler.h"
44 
45 
46 namespace XC {
47 class Domain;
48 class Constraint;
49 class FEProblem;
50 class FE_Datastore;
51 
53 
58 class Preprocessor: public CommandEntity, public MovableObject
59  {
60  private:
61  static const int theDbTag= 0;
62 
63  Domain *domain;
64 
65  MaterialHandler materialHandler;
66  TransfCooHandler transf;
67  BeamIntegratorHandler beamIntegrators;
68  NodeHandler nodes;
69  ElementHandler elements;
70  LoadHandler loads;
71  BoundaryCondHandler constraints;
72 
73  MultiBlockTopology mbt;
74 
75  MapSet sets;
76 
77  friend class MultiBlockTopology;
78  friend class SetMeshComp;
79  friend class Set;
80 
81  Preprocessor(const Preprocessor &);
82  Preprocessor &operator=(const Preprocessor &);
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 ProtoElementHandler;
92  friend class ElementHandler;
93  friend class BoundaryCondHandler;
94  friend class FEProblem;
95  void UpdateSets(Element *);
96  void UpdateSets(Constraint *);
97 
98  SetEstruct *busca_set_estruct(const std::string &nmb);
99  public:
100  Preprocessor(CommandEntity *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  MaterialHandler &getMaterialHandler(void)
114  { return materialHandler; }
115  const MaterialHandler &getMaterialHandler(void) const
116  { return materialHandler; }
117  inline NodeHandler &getNodeHandler(void)
118  { return nodes; }
119  inline const NodeHandler &getNodeHandler(void) const
120  { return nodes; }
121  ElementHandler &getElementHandler(void)
122  { return elements; }
123  const ElementHandler &getElementHandler(void) const
124  { return elements; }
125  LoadHandler &getLoadHandler(void)
126  { return loads; }
127  const LoadHandler &getLoadHandler(void) const
128  { return loads; }
129  BoundaryCondHandler &getBoundaryCondHandler(void)
130  { return constraints; }
131  const BoundaryCondHandler &getBoundaryCondHandler(void) const
132  { return constraints; }
133  TransfCooHandler &getTransfCooHandler(void)
134  { return transf; }
135  const TransfCooHandler &getTransfCooHandler(void) const
136  { return transf; }
137  BeamIntegratorHandler &getBeamIntegratorHandler(void)
138  { return beamIntegrators; }
139  const BeamIntegratorHandler &getBeamIntegratorHandler(void) const
140  { return beamIntegrators; }
141 
142  const MultiBlockTopology &getMultiBlockTopology(void) const
143  { return mbt; }
144  MultiBlockTopology &getMultiBlockTopology(void)
145  { return mbt; }
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
virtual int recvSelf(const CommParameters &)
Receive object through the channel being passed as parameter.
Definition: Preprocessor.cc:225
Sets container.
Definition: MapSet.h:48
Objects of this class are used in the program to store/restore the geometry and state information in ...
Definition: FE_Datastore.h:81
Node creation manager.
Definition: NodeHandler.h:42
virtual ~Preprocessor(void)
Destructor.
Definition: Preprocessor.cc:108
Finite element model generation tools.
Definition: Preprocessor.h:58
Object that can move between processes.
Definition: MovableObject.h:99
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
static void setDeadSRF(const double &)
Assign Stress Reduction Factor for element deactivation.
Definition: Preprocessor.cc:117
Model geometry manager.
Definition: MultiBlockTopology.h:68
virtual int sendSelf(CommParameters &)
Send object through the channel being passed as parameter.
Definition: Preprocessor.cc:211
Vector that stores the dbTags of the class members.
Definition: DbTagData.h:43
Constraint cration tools.
Definition: BoundaryCondHandler.h:44
Element creation manager.
Definition: ElementHandler.h:39
DbTagData & getDbTagData(void) const
Return a vector to store the dbTags of the class members.
Definition: Preprocessor.cc:170
Base class for the finite elements.
Definition: Element.h:109
Set of mesh components (nodes, elements and constraints).
Definition: SetMeshComp.h:58
void clearAll(void)
Delete all preprocessor entities.
Definition: Preprocessor.cc:143
Object set.
Definition: Set.h:56
Manager for the creation/deletion of coordinate transformations.
Definition: TransfCooHandler.h:49
Finite element problem.
Definition: FEProblem.h:82
Multiblock topology object (point, line, face, block,...).
Definition: EntMdlr.h:54
Material handler (definition, searching,...).
Definition: MaterialHandler.h:45
int recvData(const CommParameters &)
Receive data through the channel being passed as parameter.
Definition: Preprocessor.cc:194
structured set, i.
Definition: SetEstruct.h:45
Finite element creation.
Definition: ProtoElementHandler.h:49
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
int sendData(CommParameters &)
Send data through the channel being passed as parameter.
Definition: Preprocessor.cc:177
Communication parameters between processes.
Definition: CommParameters.h:65
Base class for model constraints.
Definition: Constraint.h:49
Lee load patterns desde archivo.
Definition: LoadHandler.h:44
void resetLoadCase(void)
Domain setup to solve for a new load pattern.
Definition: Preprocessor.cc:131
Beam integrators handler.
Definition: BeamIntegratorHandler.h:41
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
Domain (mesh and boundary conditions) of the finite element model.
Definition: Domain.h:116
Mesh node.
Definition: Node.h:110
FE_Datastore * getDataBase(void)
Return a pointer to the database.
Definition: Preprocessor.cc:159