xc
BJvector.h
1 // -*-c++-*-
2 //----------------------------------------------------------------------------
3 // XC program; finite element analysis code
4 // for structural analysis and design.
5 //
6 // Copyright (C) Luis C. Pérez Tato
7 //
8 // This program derives from OpenSees <http://opensees.berkeley.edu>
9 // developed by the «Pacific earthquake engineering research center».
10 //
11 // Except for the restrictions that may arise from the copyright
12 // of the original program (see copyright_opensees.txt)
13 // XC is free software: you can redistribute it and/or modify
14 // it under the terms of the GNU General Public License as published by
15 // the Free Software Foundation, either version 3 of the License, or
16 // (at your option) any later version.
17 //
18 // This software is distributed in the hope that it will be useful, but
19 // WITHOUT ANY WARRANTY; without even the implied warranty of
20 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 // GNU General Public License for more details.
22 //
23 //
24 // You should have received a copy of the GNU General Public License
25 // along with this program.
26 // If not, see <http://www.gnu.org/licenses/>.
27 //----------------------------------------------------------------------------
28 
29 // $Revision: 1.1 $
30 // $Date: 2001/08/23 16:45:51 $
31 // $Source: /usr/local/cvs/OpenSees/SRC/nDarray/BJvector.h,v $
32 
33 //#############################################################################
34 // #
35 // #
36 // /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/~~\ #
37 // | |____| #
38 // | | #
39 // | | #
40 // | | #
41 // | | #
42 // | B A S E C L A S S E S | #
43 // | | #
44 // | | #
45 // | | #
46 // | | #
47 // | C + + H E A D E R | #
48 // | | #
49 // | | #
50 // | | #
51 // | | #
52 // /~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~/ | #
53 // \_________________________________________\__/ #
54 // #
55 // #
56 //#############################################################################
57 //#############################################################################
59 //################################################################################
60 //# COPYRIGHT (C): :-)) #
61 //# PROJECT: Object Oriented Finite Element Program #
62 //# PURPOSE: #
63 //# CLASS: BJvector #
64 //# #
65 //# VERSION: #
66 //# LANGUAGE: C++.ver >= 2.0 ( Borland C++ ver=3.10, SUN C++ ver=2.1 ) #
67 //# TARGET OS: DOS || UNIX || . . . #
68 //# DESIGNER(S): Boris Jeremic #
69 //# PROGRAMMER(S): Boris Jeremic #
70 //# #
71 //# #
72 //# DATE: November '92 #
73 //# UPDATE HISTORY: 05 - __ avgust '93. redefined as derived class from #
74 //# nDarray class #
75 //# August 22-29 '94 choped to separate files and worked on #
76 //# const and & issues #
77 //# August 30-31 '94 added use_def_dim to full the CC #
78 //# resolved problem with temoraries for #
79 //# operators + and - ( +=, -= ) #
80 //# #
81 //# #
82 //# #
83 //# #
84 //# #
85 //################################################################################
86 //*/
87 
88 
89 #ifndef VECTOR_HH
90 #define VECTOR_HH
91 
92 #include "utility/matrix/nDarray/BJmatrix.h"
93 
94 // All of this inheritance idioms are after
95 // Jim Coplien : "Advanced C++ programming styles and idioms".
96 // I tried to understand idioms and I think I succeeded.
97 
98 namespace XC {
102 class BJvector: virtual public BJmatrix
103  {
104  public:
105  BJvector(int order_n = 1, double initvalue = 0.0); // default constructor
106  BJvector(int order_n, double *initval);
107  BJvector(const std::vector<double> &);
108  BJvector(const boost::python::list &);
109 
110  explicit BJvector(const nDarray &x); // copy-initializer
111 
112 //.... ~BJvector( );
113 
114  BJvector& operator=( const BJvector & x ); // BJvector assignment
115 //.. BJvector& operator=( const BJmatrix & x ); // BJvector assignment
116 //.. BJvector& operator=( const nDarray & x ); // BJvector assignment
117 
118 //####### BJmatrix operator*( BJvector &); // BJvector multiplication
119 
120 //.... BJvector operator*( double arg); // scalar multiplication
121 // this ellipsis at the end are just to prevent the compiler
122 // from issuing a warning on hiding function from base class nDarray . . .
123  double &val(int subscript, ... );
124  const double &val(int subscript, ... ) const;
125  double cval(int subscript, ... ) const; // const
126 // THE ROW COUNTER STARTS FROM 1 ( NOT FROM 0 )
127  };
128 } // end of XC namespace
129 #endif
Boris Jeremic vector class.
Definition: BJvector.h:102
BJvector & operator=(const BJvector &x)
Assignment operator.
Definition: BJvector.cpp:124
n-dimensional array.
Definition: nDarray.h:242
BJvector(int order_n=1, double initvalue=0.0)
Constructor.
Definition: BJvector.cpp:100
Open source finite element program for structural analysis.
Definition: ContinuaReprComponent.h:35
Boris Jeremic matrix class.
Definition: BJmatrix.h:104