OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
spoolessparsemtrx.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 spoolessparsemtrx_h
36 #define spoolessparsemtrx_h
37 
38 #include "sparsemtrx.h"
39 
40 extern "C" {
41 #include <spooles/misc.h>
42 #include <spooles/FrontMtx.h>
43 #include <spooles/SymbFac.h>
44 };
45 
46 #define _IFT_SpoolesSparseMtrx_Name "spooles"
47 
48 namespace oofem {
52 class OOFEM_EXPORT SpoolesSparseMtrx : public SparseMtrx
53 {
54 protected:
55  InpMtx *mtrx;
56  int type;
57  int nent;
58  int sflag;
59 
60 public:
61  SpoolesSparseMtrx(int _type, int _nent, int _sflag, int n, int m) : SparseMtrx(n, m),
62  mtrx(NULL),
63  type(_type),
64  nent(_nent),
65  sflag(_sflag)
66  { }
68  mtrx(NULL),
69  type(SPOOLES_REAL),
70  nent(0),
71  sflag(SPOOLES_SYMMETRIC)
72  { }
73  virtual ~SpoolesSparseMtrx() {
74  if ( mtrx ) {
75  InpMtx_free(mtrx);
76  }
77  }
78 
79  // Overloaded methods
80  virtual SparseMtrx *GiveCopy() const;
81  virtual void times(const FloatArray &x, FloatArray &answer) const;
82  virtual void timesT(const FloatArray &x, FloatArray &answer) const;
83  virtual void times(double x);
84  virtual int buildInternalStructure(EngngModel *eModel, int di, const UnknownNumberingScheme &s);
85  virtual int assemble(const IntArray &loc, const FloatMatrix &mat);
86  virtual int assemble(const IntArray &rloc, const IntArray &cloc, const FloatMatrix &mat);
87  virtual bool canBeFactorized() const { return false; }
88  virtual SparseMtrx *factorized() { return NULL; }
89  virtual FloatArray *backSubstitutionWith(FloatArray &y) const { return NULL; }
90  virtual void zero();
91  virtual double &at(int i, int j);
92  virtual double at(int i, int j) const;
93  virtual void printStatistics() const;
94  virtual void printYourself() const;
95  virtual SparseMtrxType giveType() const { return SMT_SpoolesMtrx; }
96  virtual bool isAsymmetric() const { return this->type == SPOOLES_NONSYMMETRIC; }
97 
98  // Exposed internals
99  InpMtx *giveInpMtrx() { return this->mtrx; }
100  int giveValueType() const { return type; }
101  int giveSymmetryFlag() const { return sflag; }
102 };
103 } // end namespace oofem
104 #endif
Spooles sparse mtrx representation.
SpoolesSparseMtrx(int _type, int _nent, int _sflag, int n, int m)
virtual bool canBeFactorized() const
Determines, whether receiver can be factorized.
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
This class provides an sparse matrix interface to SPOOLES InpMtrx.
virtual SparseMtrxType giveType() const
Sparse matrix type identification.
Class implementing an array of integers.
Definition: intarray.h:61
virtual FloatArray * backSubstitutionWith(FloatArray &y) const
Computes the solution of linear system where A is receiver.
SparseMtrxType
Enumerative type used to identify the sparse matrix type.
Abstract base class allowing to control the way, how equations are assigned to individual DOFs...
Class representing vector of real numbers.
Definition: floatarray.h:82
Implementation of matrix containing floating point numbers.
Definition: floatmatrix.h:94
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 SparseMtrx * factorized()
Returns the receiver factorized.
virtual bool isAsymmetric() const
Returns true if asymmetric.

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