XC Open source finite element analysis program
elem_load.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 //elem_load.h
28 
29 #ifndef ELEM_LOAD_H
30 #define ELEM_LOAD_H
31 
32 #include "domain/load/beam_loads/Beam2dPointLoad.h"
33 #include "domain/load/beam_loads/Beam2dUniformLoad.h"
34 #include "domain/load/beam_loads/BeamStrainLoad.h"
35 #include "domain/load/beam_loads/Beam3dPointLoad.h"
36 #include "domain/load/beam_loads/Beam3dUniformLoad.h"
37 #include "domain/load/beam_loads/TrussStrainLoad.h"
38 #include "domain/load/volumen/BrickSelfWeight.h"
39 #include "domain/load/plane/ShellUniformLoad.h"
40 #include "domain/load/plane/BidimStrainLoad.h"
41 #include "domain/load/plane/ShellStrainLoad.h"
42 #include "domain/load/pattern/LoadPattern.h"
43 
44 namespace XC {
45 
47 template <class ELEM_LOAD>
48 ELEM_LOAD *new_elem_load(LoadPattern *lp,int &tag_el)
49  {
50  ELEM_LOAD *load= nullptr;
51  if(lp)
52  {
53  load= new ELEM_LOAD(tag_el);
54  if(load)
55  {
56  tag_el++;
57  if(!lp->addElementalLoad(load))
58  {
59  delete load;
60  std::cerr << __FUNCTION__
61  << "; load over element was not added." << std::endl;
62  }
63  }
64  else
65  std::cerr << __FUNCTION__
66  << "; can't create load over elements: " << tag_el << std::endl;
67  }
68  else
69  std::cerr << __FUNCTION__
70  << "; null pointer to load." << std::endl;
71  return load;
72  }
73 
74 ElementalLoad *procesa_element_load(LoadPattern *,int &,const std::string &);
75 
76 } // end of XC namespace
77 
78 #endif
A LoadPattern object is used to to store reference loads and single point constraints and a TimeSerie...
Definition: LoadPattern.h:87
ELEM_LOAD * new_elem_load(LoadPattern *lp, int &tag_el)
Adds a load over elements.
Definition: elem_load.h:48
virtual bool addElementalLoad(ElementalLoad *)
Adds the element load being passed as parameter.
Definition: LoadPattern.cpp:314
ElementalLoad * procesa_element_load(LoadPattern *, int &, const std::string &)
Crea una nueva load over element.
Definition: elem_load.cc:34
Base class for loads over elements.
Definition: ElementalLoad.h:73
================================================================================
Definition: ContinuaReprComponent.h:34