OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
rowcol.h
Go to the documentation of this file.
1 /*
2  *
3  * ##### ##### ###### ###### ### ###
4  * ## ## ## ## ## ## ## ### ##
5  * ## ## ## ## #### #### ## # ##
6  * ## ## ## ## ## ## ## ##
7  * ## ## ## ## ## ## ## ##
8  * ##### ##### ## ###### ## ##
9  *
10  *
11  * OOFEM : Object Oriented Finite Element Code
12  *
13  * Copyright (C) 1993 - 2013 Borek Patzak
14  *
15  *
16  *
17  * Czech Technical University, Faculty of Civil Engineering,
18  * Department of Structural Mechanics, 166 29 Prague, Czech Republic
19  *
20  * This library is free software; you can redistribute it and/or
21  * modify it under the terms of the GNU Lesser General Public
22  * License as published by the Free Software Foundation; either
23  * version 2.1 of the License, or (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
28  * Lesser General Public License for more details.
29  *
30  * You should have received a copy of the GNU Lesser General Public
31  * License along with this library; if not, write to the Free Software
32  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
33  */
34 
35 #ifndef rowcol_h
36 #define rowcol_h
37 
38 #include "oofemcfg.h"
39 
40 namespace oofem {
41 class FloatArray;
42 class IntArray;
43 
65 class OOFEM_NO_EXPORT RowColumn
66 {
67 protected:
68 
69  int number;
70  int start;
71  double *row;
72  double *column;
73  double diag;
74 
75 public:
76  RowColumn(int, int);
77  ~RowColumn();
78 
79 #ifdef DEBUG
80  double &atU(int);
81  double &atL(int);
82 #else
83  double &atU(int i) { return column [ i - start ]; }
84  double &atL(int i) { return row [ i - start ]; }
85 #endif
86  double &atDiag() { return diag; }
87  void checkBounds(int);
88  void checkSizeTowards(const IntArray &);
89  double dot(const FloatArray &, char, int, int);
90  int giveStart() { return start; }
91  void growTo(int);
92  void zero();
93  void printYourself();
94  int giveSize() { return 1 + 2 * ( number - start ); }
95 
96  RowColumn *GiveCopy();
97 
98 protected:
99  RowColumn(int, int, double *, double *, double);
100 };
101 } // end namespace oofem
102 #endif // rowcol_h
double * column
Definition: rowcol.h:72
double diag
Definition: rowcol.h:73
This class implements a segment of a unsymmetric matrix stored in segmented form (skyline).
Definition: rowcol.h:65
Class implementing an array of integers.
Definition: intarray.h:61
double & atDiag()
Definition: rowcol.h:86
int giveSize()
Definition: rowcol.h:94
Class representing vector of real numbers.
Definition: floatarray.h:82
int giveStart()
Definition: rowcol.h:90
double * row
Definition: rowcol.h:71
double & atU(int i)
Definition: rowcol.h:83
double & atL(int i)
Definition: rowcol.h:84
the oofem namespace is to define a context or scope in which all oofem names are defined.
double dot(const FloatArray &x, const FloatArray &y)
Definition: floatarray.C:980

This page is part of the OOFEM documentation. Copyright (c) 2011 Borek Patzak
Project e-mail: info@oofem.org
Generated at Tue Jan 2 2018 20:07:31 for OOFEM by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2011