OOFEM  2.4
OOFEM.org - Object Oriented Finite Element Solver
sparsenonlinsystemnm.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 
36 // *************************************
37 // *** CLASS SparseNonLinearSystemNM ***
38 // *************************************
39 
40 
41 #ifndef sparsenonlinsystemnm_h
42 #define sparsenonlinsystemnm_h
43 
44 #include "nummet.h"
45 #include "nmstatus.h"
46 #include "floatarray.h"
47 #include "intarray.h"
48 
50 
51 #define _IFT_NonLinearStatic_randPertAmplitude "rpa"
52 #define _IFT_NonLinearStatic_randSeed "rseed"
53 #define _IFT_NonLinearStatic_pert "pert"
54 #define _IFT_NonLinearStatic_pertw "pertw"
55 
56 
57 namespace oofem {
58 class EngngModel;
59 class SparseMtrx;
60 class FloatArray;
61 class TimeStep;
62 class SparseLinearSystemNM;
63 
74 class OOFEM_EXPORT SparseNonLinearSystemNM : public NumericalMethod
75 {
76 protected:
78  double deltaL;
79 
82  int randSeed;
88 public:
95  rlm_total=0,
96  rlm_incremental=1,
97  };
98 
100  SparseNonLinearSystemNM(Domain * d, EngngModel * m) : NumericalMethod(d, m), igp_PertDmanDofSrcArray(), igp_PertWeightArray(), igp_Map(), igp_Weight() { pert_init_needed = false; }
103 
121  virtual NM_Status solve(SparseMtrx &K, FloatArray &R, FloatArray *R0,
122  FloatArray &X, FloatArray &dX, FloatArray &F,
123  const FloatArray &internalForcesEBENorm, double &s, referenceLoadInputModeType rlm,
124  int &nite, TimeStep *tStep) = 0;
125 
131  virtual double giveCurrentStepLength() { return this->deltaL; }
137  virtual void setStepLength(double s) { this->deltaL = s; }
141  virtual bool referenceLoad() const { return false; }
147  virtual void printState(FILE *outputStream) { }
148 
153  virtual SparseLinearSystemNM *giveLinearSolver() { return NULL; }
154 
155  IRResultType initializeFrom(InputRecord *ir);
156  virtual void convertPertMap();
157  virtual void applyPerturbation(FloatArray* displacement);
158 
159  virtual const char *giveClassName() const { return "SparseNonLinearSystemNM"; }
161  std :: string errorInfo(const char *func) const { return std :: string(giveClassName()) + "::" + func; }
162 };
163 } // end namespace oofem
164 #endif // sparsenonlinsystemnm_h
virtual SparseLinearSystemNM * giveLinearSolver()
Constructs (if necessary) and returns a linear solver.
virtual bool referenceLoad() const
Returns true if reference loads are used (i.e.
Class and object Domain.
Definition: domain.h:115
std::string errorInfo(const char *func) const
Error printing helper.
Base class for all matrices stored in sparse format.
Definition: sparsemtrx.h:60
virtual double giveCurrentStepLength()
Returns step length.
virtual ~SparseNonLinearSystemNM()
Destructor.
This base class is an abstraction for all numerical methods solving sparse linear system of equations...
This base class is an abstraction for numerical algorithm.
Definition: nummet.h:80
virtual void setStepLength(double s)
Sets the step length.
virtual const char * giveClassName() const
unsigned long NM_Status
Mask defining NumMetod Status; which can be asked after finishing computation by Numerical Method...
Definition: nmstatus.h:44
Class implementing an array of integers.
Definition: intarray.h:61
virtual void printState(FILE *outputStream)
Prints status message of receiver to output stream.
referenceLoadInputModeType
The following parameter allows to specify how the reference load vector is obtained from given totalL...
Class representing vector of real numbers.
Definition: floatarray.h:82
IRResultType
Type defining the return values of InputRecord reading operations.
Definition: irresulttype.h:47
Class representing the general Input Record.
Definition: inputrecord.h:101
double randPertAmplitude
Amplitude of a random perturbation applied on the solution before the iteration process.
SparseNonLinearSystemNM(Domain *d, EngngModel *m)
Constructor.
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.
Class representing solution step.
Definition: timestep.h:80
This base class is an abstraction for all numerical methods solving sparse nonlinear system of equati...

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