OOFEM 3.0
Loading...
Searching...
No Matches
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 - 2025 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
40extern "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
48namespace oofem {
53{
54protected:
55 InpMtx *mtrx;
56 int type;
57 int sflag;
58
59public:
60 SpoolesSparseMtrx(int n=0, int m=0, int _sflag=SPOOLES_SYMMETRIC, int _type=SPOOLES_REAL) : SparseMtrx(n, m),
61 mtrx(nullptr),
62 type(_type),
63 sflag(_sflag)
64 { }
66 if ( mtrx ) {
67 InpMtx_free(mtrx);
68 }
69 }
70
71 void times(const FloatArray &x, FloatArray &answer) const override;
72 void timesT(const FloatArray &x, FloatArray &answer) const override;
73 void times(double x) override;
74 int buildInternalStructure(EngngModel *eModel, int di, const UnknownNumberingScheme &s) override;
75 int assemble(const IntArray &loc, const FloatMatrix &mat) override;
76 int assemble(const IntArray &rloc, const IntArray &cloc, const FloatMatrix &mat) override;
77 bool canBeFactorized() const override { return false; }
78 SparseMtrx *factorized() override { return nullptr; }
79 FloatArray *backSubstitutionWith(FloatArray &y) const override { return nullptr; }
80 void zero() override;
81 double &at(int i, int j) override;
82 double at(int i, int j) const override;
83 void printStatistics() const override;
84 void printYourself() const override;
85 SparseMtrxType giveType() const override { return SMT_SpoolesMtrx; }
86 bool isAsymmetric() const override { return this->type == SPOOLES_NONSYMMETRIC; }
87
88 // Exposed internals
89 InpMtx *giveInpMtrx() { return this->mtrx; }
90 int giveValueType() const { return type; }
91 int giveSymmetryFlag() const { return sflag; }
92};
93} // end namespace oofem
94#endif
SparseMtrx(int n=0, int m=0)
Definition sparsemtrx.h:89
SparseMtrx * factorized() override
SpoolesSparseMtrx(int n=0, int m=0, int _sflag=SPOOLES_SYMMETRIC, int _type=SPOOLES_REAL)
bool canBeFactorized() const override
Determines, whether receiver can be factorized.
bool isAsymmetric() const override
Returns true if asymmetric.
SparseMtrxType giveType() const override
Sparse matrix type identification.
FloatArray * backSubstitutionWith(FloatArray &y) const override
FloatArrayF< N > assemble(const FloatArrayF< M > &x, int const (&c)[M])
Assemble components into zero matrix.
FloatMatrixF< N, M > zero()
Constructs a zero matrix (this is the default behavior when constructing a matrix,...
@ SMT_SpoolesMtrx
Spooles sparse mtrx representation.
#define OOFEM_EXPORT
Definition oofemcfg.h:7

This page is part of the OOFEM-3.0 documentation. Copyright Copyright (C) 1994-2025 Borek Patzak Bořek Patzák
Project e-mail: oofem@fsv.cvut.cz
Generated at for OOFEM by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2011