XC Open source finite element analysis program
ProtoElementLoader.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 //ProtoElementLoader.h
28 
29 #ifndef PROTOELEMENTLOADER_H
30 #define PROTOELEMENTLOADER_H
31 
32 #include "Loader.h"
33 #include "MaterialLoader.h"
34 #include "TransfCooLoader.h"
35 #include "BeamIntegratorLoader.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;
62  MaterialLoader::const_iterator get_iter_material(void) const;
63  Material *get_ptr_material(void) const;
65  TransfCooLoader::const_iterator get_iter_transf_coo(void) const;
66  CrdTransf *get_ptr_transf_coo(void) const;
68  BeamIntegratorLoader::const_iterator get_iter_beam_integrator(void) const;
70 
71  friend class Preprocessor;
72 
73  public:
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
CrdTransf provides the abstraction of a frame coordinate transformation. It is an abstract base class...
Definition: CrdTransf.h:87
const std::string & getDefaultIntegrator(void) const
Returns the name of the default integrator for new elements.
Definition: ProtoElementLoader.cc:363
BeamIntegratorLoader & get_beam_integrator_loader(void) const
Returns a reference to de integrator handler.
Definition: ProtoElementLoader.cc:119
void setDefaultMaterial(const std::string &)
Sets the default material name for new elements.
Definition: ProtoElementLoader.cc:327
Base class for materials.
Definition: Material.h:85
const std::string & getDefaultTransf(void) const
Returns the name of the default coordinate transformation for new elements.
Definition: ProtoElementLoader.cc:355
int getNumSections(void) const
Returns the default number of sections for new elements.
Definition: ProtoElementLoader.cc:339
Preprocessor * preprocessor
Pointer to preprocessor.
Definition: Loader.h:53
Finite element creation.
Definition: ProtoElementLoader.h:49
ProtoElementLoader(Preprocessor *preprocessor)
Default constructor.
Definition: ProtoElementLoader.cc:93
int getDimElem(void) const
Returns the default dimension (0D,1D,2D or 3D) for new elements.
Definition: ProtoElementLoader.cc:347
Base calass for the finite elements.
Definition: Element.h:104
void setDefaultTransf(const std::string &)
Sets the name of the default coordinate transformation for new elements.
Definition: ProtoElementLoader.cc:351
MaterialLoader::const_iterator get_iter_material(void) const
Returns an iterator al material que se especifica en nmb_mat.
Definition: ProtoElementLoader.cc:102
Finite element model generation tools.
Definition: Preprocessor.h:58
BeamIntegratorLoader::const_iterator get_iter_beam_integrator(void) const
Returns an iterator al integrator que se especifica en nmb_integ.
Definition: ProtoElementLoader.cc:123
Definition: ID.h:77
Beam integrators handler.
Definition: BeamIntegratorLoader.h:41
Material * get_ptr_material(void) const
Returns a pointer to material que se especifica en nmb_mat.
Definition: ProtoElementLoader.cc:106
void setDimElem(const int &)
Sets the default dimension (0D,1D,2D or 3D) for new elements.
Definition: ProtoElementLoader.cc:343
BeamIntegration * get_ptr_beam_integrator(void) const
Returns a pointer to integrator que se especifica en nmb_integ.
Definition: ProtoElementLoader.cc:128
TransfCooLoader & get_transf_coo_loader(void) const
Returns a reference to the coordinate transformation loader.
Definition: ProtoElementLoader.cc:143
CrdTransf * get_ptr_transf_coo(void) const
Returns a pointer to the coordinate transformation with the name being passed as parameter (nullptr i...
Definition: ProtoElementLoader.cc:151
Base class for the preprocessor objects that create model entities: nodes, elements, loads, etc.
Definition: Loader.h:50
const std::string & getDefaultMaterial(void) const
Returns the default material name for new elements.
Definition: ProtoElementLoader.cc:331
Material handler (definition, searching,...).
Definition: MaterialLoader.h:45
Element * newElement(const std::string &, const ID &)
Create a new element.
Definition: ProtoElementLoader.cc:306
MaterialLoader & get_material_loader(void) const
Returns a reference to the material handler.
Definition: ProtoElementLoader.cc:98
TransfCooLoader::const_iterator get_iter_transf_coo(void) const
Returns an iterator to the coordinate transformation with the name being passed as parameter...
Definition: ProtoElementLoader.cc:147
void setNumSections(const int &)
Default number of sections for new elements.
Definition: ProtoElementLoader.cc:335
================================================================================
Definition: ContinuaReprComponent.h:34
Base class for integration on beam elements.
Definition: BeamIntegration.h:73
Manager for the creation/deletion of coordinate transformations.
Definition: TransfCooLoader.h:49
void setDefaultIntegrator(const std::string &)
Sets the name of the default integrator for new elements.
Definition: ProtoElementLoader.cc:359