XC Open source finite element analysis program
ElementLoader.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 //ElementLoader.h
28 
29 #ifndef ELEMENTLOADER_H
30 #define ELEMENTLOADER_H
31 
32 #include "preprocessor/loaders/ProtoElementLoader.h"
33 
34 namespace XC {
35 
40  {
41  public:
43  {
44  Element *semilla;
45  SeedElemLoader(const SeedElemLoader &otro);
46  SeedElemLoader &operator=(const SeedElemLoader &otro);
47  void libera(void);
48  protected:
49  void add(Element *);
50  public:
52  : ProtoElementLoader(preprocessor), semilla(nullptr) {}
53  Element *GetSeedElement(void)
54  { return semilla; }
55  const Element *GetSeedElement(void) const
56  { return semilla; }
57  int getDefaultTag(void) const;
58  void clearAll(void);
59  ~SeedElemLoader(void);
60  };
61  private:
62  SeedElemLoader seed_elem_loader;
63  protected:
64  virtual void add(Element *);
65  public:
67  Element *getElement(int tag);
68 
69  void new_element(Element *e);
70  inline SeedElemLoader &getSeedElemLoader(void)
71  { return seed_elem_loader; }
72  const Element *get_seed_element(void) const
73  { return seed_elem_loader.GetSeedElement(); }
74 
75  virtual void Add(Element *);
76 
77  int getDefaultTag(void) const;
78  void setDefaultTag(const int &tag);
79 
80  void clearAll(void);
81  };
82 
83 } // end of XC namespace
84 
85 #endif
Preprocessor * preprocessor
Pointer to preprocessor.
Definition: Loader.h:53
Finite element creation.
Definition: ProtoElementLoader.h:49
Definition: ElementLoader.h:42
ProtoElementLoader(Preprocessor *preprocessor)
Default constructor.
Definition: ProtoElementLoader.cc:93
Base calass for the finite elements.
Definition: Element.h:104
Finite element model generation tools.
Definition: Preprocessor.h:58
Element creation manager.
Definition: ElementLoader.h:39
Element * getElement(int tag)
Returns a pointer to the element identified by the tag being passed as parameter. ...
Definition: ElementLoader.cc:97
virtual void Add(Element *)
Adds the element to asignándole primero el tag que corresponde, se emplea en la clase EntPMdlr...
Definition: ElementLoader.cc:124
void setDefaultTag(const int &tag)
Sets the default tag for next element.
Definition: ElementLoader.cc:92
================================================================================
Definition: ContinuaReprComponent.h:34
void new_element(Element *e)
Adds a new element to the model.
Definition: ElementLoader.cc:136
void add(Element *)
Defines seed element.
Definition: ElementLoader.cc:58
~SeedElemLoader(void)
Destructor.
Definition: ElementLoader.cc:66