OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
skyline.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 skyline_h
36 #define skyline_h
37 
38 #include "sparsemtrx.h"
39 
40 #define _IFT_Skyline_Name "skyline"
41 
42 namespace oofem {
68 class OOFEM_EXPORT Skyline : public SparseMtrx
69 {
70 protected:
72  int nwk;
76  double *mtrx;
79 
80 public:
85  Skyline(int n);
90  Skyline();
92  virtual ~Skyline();
93 
94  virtual SparseMtrx *GiveCopy() const;
95 
96  virtual void times(const FloatArray &x, FloatArray &answer) const;
97  virtual void timesT(const FloatArray &x, FloatArray &answer) const { this->times(x, answer); }
98  virtual void times(double x);
99  virtual void add(double x, SparseMtrx &m);
100  virtual int buildInternalStructure(EngngModel *, int, const UnknownNumberingScheme &);
101 
102  //virtual Skyline *giveSubMatrix(Skyline &mat, IntArray &rows, IntArray &cols);
103  //virtual Skyline *beSubMatrixOf(const Skyline &mat, IntArray &rows, IntArray &cols);
104  //virtual SparseMtrx *beSubMatrixOf(const SparseMtrx &mat, IntArray &rows, IntArray &cols);
105  virtual SparseMtrx *giveSubMatrix(const IntArray &rows, const IntArray &cols);
110  int setInternalStructure(IntArray &a);
111 
112  virtual int assemble(const IntArray &loc, const FloatMatrix &mat);
113  virtual int assemble(const IntArray &rloc, const IntArray &cloc, const FloatMatrix &mat);
114 
115  virtual bool canBeFactorized() const { return true; }
116  virtual SparseMtrx *factorized();
117  virtual FloatArray *backSubstitutionWith(FloatArray &) const;
118  virtual void zero();
131  void rbmodes(FloatMatrix &r, int &nse, IntArray &se, double limit, int tc);
141  void ldl_feti_sky(FloatArray &x, FloatArray &y, int nse, double limit, IntArray &se);
143  virtual double &at(int, int);
145  virtual double at(int i, int j) const;
147  virtual bool isAllocatedAt(int i, int j) const;
148  int giveNumberOfNonZeros() const { return this->nwk; }
149  virtual void toFloatMatrix(FloatMatrix &answer) const;
151  virtual void printYourself() const;
152  virtual void writeToFile(const char *fname) const;
153  int giveAllocatedSize() { return nwk; }
154 
155  virtual SparseMtrxType giveType() const { return SMT_Skyline; }
156  virtual bool isAsymmetric() const { return false; }
157 
158  virtual const char *giveClassName() const { return "Skyline"; }
159 
160 protected:
161  Skyline(int, int, double *, const IntArray &);
162 };
163 } // end namespace oofem
164 #endif // skyline_h
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
int isFactorized
Flag indicating whether factorized.
Definition: skyline.h:78
IntArray adr
Integer array holding addresses of diagonal members.
Definition: skyline.h:74
Class implementing an array of integers.
Definition: intarray.h:61
Class implementing sparse matrix stored in skyline form.
Definition: skyline.h:68
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
int nwk
Total number of nonzero coefficients stored.
Definition: skyline.h:72
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
int giveNumberOfNonZeros() const
Definition: skyline.h:148
virtual bool canBeFactorized() const
Determines, whether receiver can be factorized.
Definition: skyline.h:115
int giveAllocatedSize()
Definition: skyline.h:153
double * mtrx
Vector of stored coefficients.
Definition: skyline.h:76
virtual SparseMtrxType giveType() const
Sparse matrix type identification.
Definition: skyline.h:155
virtual void timesT(const FloatArray &x, FloatArray &answer) const
Evaluates .
Definition: skyline.h:97
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
virtual bool isAsymmetric() const
Returns true if asymmetric.
Definition: skyline.h:156
Abstract base class representing the "problem" under consideration.
Definition: engngm.h:181
the oofem namespace is to define a context or scope in which all oofem names are defined.
virtual const char * giveClassName() const
Definition: skyline.h:158
Symmetric skyline.

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