XC Open source finite element analysis program
ProtoTruss.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 //ProtoTruss.h
28 
29 #ifndef ProtoTruss_h
30 #define ProtoTruss_h
31 
32 #include <domain/mesh/element/Element1D.h>
33 
34 namespace XC {
35 class Node;
36 class Material;
37 
39 //
41 //
44 class ProtoTruss : public Element1D
45  {
46  protected:
47  int numDOF;
48  int dimSpace;
51 
52  // static data - single copy for all objects of the class
53  static Matrix trussM2; // class wide matrix for 2*2
54  static Matrix trussM3; // class wide matrix for 3*3
55  static Matrix trussM4; // class wide matrix for 4*4
56  static Matrix trussM6; // class wide matrix for 6*6
57  static Matrix trussM12; // class wide matrix for 12*12
58  static Vector trussV2; // class wide Vector for size 2
59  static Vector trussV3; // class wide Vector for size 3
60  static Vector trussV4; // class wide Vector for size 44
61  static Vector trussV6; // class wide Vector for size 6
62  static Vector trussV12; // class wide Vector for size 12
63 
64  int sendData(CommParameters &cp);
65  int recvData(const CommParameters &cp);
66  void setup_matrix_vector_ptrs(int dofNd1);
67 
68  public:
69  ProtoTruss(int tag, int classTag,int Nd1,int Nd2,int ndof,int dimSpace);
70  ProtoTruss(const ProtoTruss &);
72 
73  virtual const Material *getMaterial(void) const= 0;
74  virtual Material *getMaterial(void)= 0;
75  Material &getMaterialRef(void);
76  virtual double getRho(void) const= 0;
77 
78  // public methods to obtain inforrmation about dof & connectivity
79  int getNumDIM(void) const;
80  int getNumDOF(void) const;
81 
82  };
83 
84 } //end of XC namespace
85 #endif
int recvData(const CommParameters &cp)
Receives members through the channel being passed as parameter.
Definition: ProtoTruss.cc:142
Base class for materials.
Definition: Material.h:85
void setup_matrix_vector_ptrs(int dofNd1)
Set the number of dof for element and set matrix and vector pointers.
Definition: ProtoTruss.cc:86
Definition: Vector.h:82
int sendData(CommParameters &cp)
Send members through the channel being passed as parameter.
Definition: ProtoTruss.cc:132
int getNumDOF(void) const
Returns the number of DOFs.
Definition: ProtoTruss.cc:69
ProtoTruss(int tag, int classTag, int Nd1, int Nd2, int ndof, int dimSpace)
Default constructor.
Definition: ProtoTruss.cc:47
Base class for one-dimensional elements (beam,truss,...)
Definition: Element1D.h:51
int dimSpace
truss in 2 or 3d domain
Definition: ProtoTruss.h:48
int getNumDIM(void) const
Return the dimension of the space on which the element is defined (2D or 3D).
Definition: ProtoTruss.cc:74
Base class for truss elements.
Definition: ProtoTruss.h:44
Matrix * theMatrix
pointer to objects matrix (a class wide Matrix)
Definition: ProtoTruss.h:49
Definition: Matrix.h:82
ProtoTruss & operator=(const ProtoTruss &)
Assignment operator.
Definition: ProtoTruss.cc:58
Material & getMaterialRef(void)
Returns a reference to element&#39;s material.
Definition: ProtoTruss.cc:78
Communication parameters between processes.
Definition: CommParameters.h:65
Vector * theVector
pointer to objects vector (a class wide Vector)
Definition: ProtoTruss.h:50
================================================================================
Definition: ContinuaReprComponent.h:34
int numDOF
number of dof for truss
Definition: ProtoTruss.h:47