xc
Simple1GenBase.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 //Simple1GenBase.h
28 
29 #ifndef SIMPLE1GENBASE_H
30 #define SIMPLE1GENBASE_H
31 
32 #include <string>
33 #include <vector>
34 
35 #include "xc_utils/src/kernel/CommandEntity.h"
36 
37 namespace XC {
39 //
42 class Simple1GenBase: public CommandEntity
43  {
44  protected:
45  // Variables used for reading input files:
46  int NumNodes, NumPileEle, NumLayer, NumLoad, NumSp, NumMat;
47  double b, depth, stress, ru;
48  int *NodeNum; // Arrays for Nodes File
49  double *Nodey, *Nodex;
50  int *PileEleNum, *PileNode1, *PileNode2; // Arrays for Pile Elements File
51  double *gamma_t, *gamma_b, *z_t, *z_b, *c_t, *c_b, // Arrays for Soil Properties File
52  *zLoad_t, *zLoad_b, *load_val_t, *load_val_b, *zSp_t, *zSp_b, *sp_val_t,
53  *sp_val_b, *zMp_t, *zMp_b, *mp_val_t, *mp_val_b, *ru_t, *ru_b;
54  std::vector<std::string> MatType;
55  std::string PatternInfo;
56 
57  void free_mem(void);
58  // Member functions for reading input files:
59  void GetNodes(const std::string &file);
60  void GetPileElements(const std::string &file);
61  int NumRows(const std::string &file, const std::string &begin);
62  double linterp(double x1, double x2, double y1, double y2, double x3);
63 
64 
65  // Member functions for generating output:
66 
67  public:
68  // Public member functions accessed from TclModelBuilder.cpp
69  Simple1GenBase(void);
70  ~Simple1GenBase(void);
71  };
72 } // end of XC namespace
73 
74 #endif
~Simple1GenBase(void)
Destructor deletes dynamically allocated arrays.
Definition: Simple1GenBase.cc:187
Base class for objects that constructs PySimple1 materials (Boulanger, 2003) for pre-defined zeroLeng...
Definition: Simple1GenBase.h:42
void free_mem(void)
Free allocated memory.
Definition: Simple1GenBase.cc:36
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:34
Simple1GenBase(void)
Constructor initializes global variables to zero.
Definition: Simple1GenBase.cc:171