xc
ProtoElementHandler.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 //ProtoElementHandler.h
28 
29 #ifndef PROTOELEMENTHANDLER_H
30 #define PROTOELEMENTHANDLER_H
31 
32 #include "PrepHandler.h"
33 #include "MaterialHandler.h"
34 #include "TransfCooHandler.h"
35 #include "BeamIntegratorHandler.h"
36 #include <map>
37 
38 namespace XC {
39 class Element;
40 
50  {
51  Element *create_element(const std::string &cmd,int tag_elem);
52 
53  std::string nmb_mat;
54  int num_sec;
55  int dim_elem;
56  std::string nmb_transf;
57  std::string nmb_integ;
58  int dir;
59  protected:
60  virtual void add(Element *)= 0;
61  const MaterialHandler &get_material_handler(void) const;
62  MaterialHandler::const_iterator get_iter_material(void) const;
63  const Material *get_ptr_material(void) const;
64  const TransfCooHandler &get_transf_coo_handler(void) const;
65  TransfCooHandler::const_iterator get_iter_transf_coo(void) const;
66  const CrdTransf *get_ptr_transf_coo(void) const;
68  BeamIntegratorHandler::const_iterator get_iter_beam_integrator(void) const;
69  const BeamIntegration *get_ptr_beam_integrator(void) const;
70 
71  friend class Preprocessor;
72 
73  public:
74  ProtoElementHandler(Preprocessor *preprocessor);
75  virtual int getDefaultTag(void) const= 0;
76 
77  void setDefaultMaterial(const std::string &);
78  const std::string &getDefaultMaterial(void) const;
79  void setNumSections(const int &);
80  int getNumSections(void) const;
81  void setDimElem(const int &);
82  int getDimElem(void) const;
83  void setDefaultTransf(const std::string &);
84  const std::string &getDefaultTransf(void) const;
85  void setDefaultIntegrator(const std::string &);
86  const std::string &getDefaultIntegrator(void) const;
87 
88  Element *newElement(const std::string &,const ID &);
89 
90  };
91 
92 } // end of XC namespace
93 
94 #endif
BeamIntegratorHandler::const_iterator get_iter_beam_integrator(void) const
Returns an iterator al integrator que se especifica en nmb_integ.
Definition: ProtoElementHandler.cc:123
Finite element model generation tools.
Definition: Preprocessor.h:58
CrdTransf provides the abstraction of a frame coordinate transformation.
Definition: CrdTransf.h:87
void setDefaultTransf(const std::string &)
Sets the name of the default coordinate transformation for new elements.
Definition: ProtoElementHandler.cc:466
const Material * get_ptr_material(void) const
Returns a pointer to material que se especifica en nmb_mat.
Definition: ProtoElementHandler.cc:106
Base class for materials.
Definition: Material.h:91
Vector of integers.
Definition: ID.h:93
void setDimElem(const int &)
Sets the default dimension (0D,1D,2D or 3D) for new elements.
Definition: ProtoElementHandler.cc:458
Base class for the preprocessor objects that create model entities: nodes, elements, loads, etc.
Definition: PrepHandler.h:46
ProtoElementHandler(Preprocessor *preprocessor)
Default constructor.
Definition: ProtoElementHandler.cc:93
const std::string & getDefaultTransf(void) const
Returns the name of the default coordinate transformation for new elements.
Definition: ProtoElementHandler.cc:470
Base class for the finite elements.
Definition: Element.h:109
void setDefaultIntegrator(const std::string &)
Sets the name of the default integrator for new elements.
Definition: ProtoElementHandler.cc:474
const BeamIntegration * get_ptr_beam_integrator(void) const
Returns a pointer to integrator que se especifica en nmb_integ.
Definition: ProtoElementHandler.cc:128
MaterialHandler::const_iterator get_iter_material(void) const
Returns an iterator al material que se especifica en nmb_mat.
Definition: ProtoElementHandler.cc:102
const std::string & getDefaultMaterial(void) const
Returns the default material name for new elements.
Definition: ProtoElementHandler.cc:446
int getNumSections(void) const
Returns the default number of sections for new elements.
Definition: ProtoElementHandler.cc:454
Base class for integration on beam elements.
Definition: BeamIntegration.h:73
const CrdTransf * get_ptr_transf_coo(void) const
Returns a pointer to the coordinate transformation with the name being passed as parameter (nullptr i...
Definition: ProtoElementHandler.cc:151
Manager for the creation/deletion of coordinate transformations.
Definition: TransfCooHandler.h:49
const BeamIntegratorHandler & get_beam_integrator_handler(void) const
Returns a reference to de integrator handler.
Definition: ProtoElementHandler.cc:119
Material handler (definition, searching,...).
Definition: MaterialHandler.h:45
Finite element creation.
Definition: ProtoElementHandler.h:49
const MaterialHandler & get_material_handler(void) const
Returns a reference to the material handler.
Definition: ProtoElementHandler.cc:98
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
const std::string & getDefaultIntegrator(void) const
Returns the name of the default integrator for new elements.
Definition: ProtoElementHandler.cc:478
TransfCooHandler::const_iterator get_iter_transf_coo(void) const
Returns an iterator to the coordinate transformation with the name being passed as parameter...
Definition: ProtoElementHandler.cc:147
const TransfCooHandler & get_transf_coo_handler(void) const
Returns a reference to the coordinate transformation handler.
Definition: ProtoElementHandler.cc:143
Beam integrators handler.
Definition: BeamIntegratorHandler.h:41
Element * newElement(const std::string &, const ID &)
Create a new element.
Definition: ProtoElementHandler.cc:421
void setDefaultMaterial(const std::string &)
Sets the default material name for new elements.
Definition: ProtoElementHandler.cc:442
int getDimElem(void) const
Returns the default dimension (0D,1D,2D or 3D) for new elements.
Definition: ProtoElementHandler.cc:462
void setNumSections(const int &)
Default number of sections for new elements.
Definition: ProtoElementHandler.cc:450