FemProcess
The GeMA Fem Process Plugin
Loading...
Searching...
No Matches
gmpFemNonLinearSolverOld.h
Go to the documentation of this file.
1/************************************************************************
2**
3** Copyright (C) 2014 by Carlos Augusto Teixera Mendes
4** All rights reserved.
5**
6** This file is part of the "GeMA" software. It's use should respect
7** the terms in the license agreement that can be found together
8** with this source code.
9** It is provided AS IS, with NO WARRANTY OF ANY KIND,
10** INCLUDING THE WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR
11** A PARTICULAR PURPOSE.
12**
13************************************************************************/
14
24#ifndef _GEMA_PLUGIN_FEM_NONLINEARSOLVEROLD_H_
25#define _GEMA_PLUGIN_FEM_NONLINEARSOLVEROLD_H_
26
27#include "gmpFemSolver.h"
28#include "gmpFemSolverOptions.h"
29
31class GMP_FEM_PROCESS_API_EXPORT GmpFemNonLinearSolverOld : public GmpFemSolver
32{
33public:
36 const GmpFemSolverOptions&, const GmLogCategory&);
37
40
42 void enableFastUpdate(bool mode) { _fastUpdate = mode; }
43
45 virtual bool init();
46
47 virtual bool initResultAttributes(int fatherItemId);
48
50 virtual bool step(double dt, double* newt, bool* conv, double* err, int* niter, bool eval);
51
53 virtual bool geostatic();
54
56 virtual bool pos();
57
59 virtual bool crackDetection();
60
62 virtual bool crackPropagation();
63
65 virtual bool updateBC(double dt, int iter, bool updateBc);
66
67protected:
69 virtual bool initElementSets(GmNumSolver* solver);
70
72 virtual void setElementSets(bool, bool, bool, bool, bool);
73
75 virtual bool isNonLinear() const;
76
78 virtual bool isTransient() const
79 {
80 return _solverOptions._type == GmpFemSolverOptions::transientSolver;
81 }
82
84 virtual bool convergence();
85 virtual bool convergenceNew() const;
86
88 virtual void saveInternalForceAttributes();
89
91 virtual void update();
92
94 virtual void restore();
95
97 virtual void setLoad();
98
100 virtual void setTime();
101
103 virtual void setState();
104
106 virtual double loadPredictor();
107
109 virtual double loadCorrector();
110
112 virtual double calcLocalError(GmVector x, GmVector dx);
113
115 virtual GmpFemPhysics::FemResultType updateResidualForceAndStiffnessMatrix(double l);
116
118 virtual GmpFemPhysics::FemResultType fillStiffnessMatrixBroyden();
119
121 virtual GmpFemPhysics::FemResultType fillStiffnessMatrixBFGS();
122
124 bool solveLinearSystem(GmSolverMatrix* Keq, GmVector& Feq, GmVector& x, int iter=0);
125
127 bool evaluateSolverTolerance(int iter);
128
130 virtual bool staticSolver(double, double* newt);
131
133 virtual bool transientSolver(double, double* newt);
134
135 //bool prepareTransientSystem(double dt);
136 GmpFemPhysics::FemResultType prepareTransientSystem(double dt);
137 GmpFemPhysics::FemResultType prepareTransientSystemPredict(double dt);
138
139 void vectorTreatment(GmVector& fint);
140 bool timeIncrementAdjustment(double dt, int iter, GmVector& X1, GmVector& X0);
141 // Dump methods
142 virtual bool addStateItemsToGroup(GmStateDump* state, int groupId);
143 virtual bool fillStateControlMapData(QVariantMap* map);
144 virtual bool stateControlMapDataLoaded(QVariantMap* map);
146
148 virtual bool fillStateControlMapDataStaticSolver(QVariantMap* map);
149
151 virtual bool fillStateControlMapDataTransientSolver(QVariantMap* map);
152
153 //atributtes
154 int _dofIndex;
155 double _dl;
156 double _dl0;
157 double _ddl;
158 double _arc;
159 double _Lold;
160 double _tin;
161 double _dt;
162 int _It;
163
164 GmVector _dx;
165 GmVector _xold;
166 GmVector _dxt;
167 GmVector _ddx;
168 GmVector _ddxt;
169 GmVector _ddxr;
170 GmVector _FeGs;
173
174 QVector<int> _fixedDof;
175
176 bool _fastUpdate;
177private:
179
180 int _femBroydenItem = -1;
181
182};
183
184#endif
Basic class for solving Non linear FEM problems.
Definition gmpFemNonLinearSolverOld.h:32
GmVector _normR
Vector storing the current (0) and previous (1) value of the residual norm.
Definition gmpFemNonLinearSolverOld.h:172
bool _nonlinear
Is this a non linear problem ?
Definition gmpFemNonLinearSolverOld.h:178
virtual bool isTransient() const
Checks transient analysis.
Definition gmpFemNonLinearSolverOld.h:78
GmVector _r0
Vector with the residual of the previous step.
Definition gmpFemNonLinearSolverOld.h:171
void enableFastUpdate(bool mode)
Sets fastUpdate option.
Definition gmpFemNonLinearSolverOld.h:42
FemResultType
Result type for local matrix calculation methods.
Definition gmpFemPhysics.h:50
Basic class for the FEM solving process.
Definition gmpFemSolver.h:52
virtual bool initResultAttributes(int fatherItemId)
Helper function used to register the set of result attributes managed by the fem solver.
Definition gmpFemSolver.cpp:487
virtual bool stateControlMapDataLoaded(QVariantMap *map)
Method called when the state dump control registered in addStateItemsToGroup() has been loaded.
Definition gmpFemSolver.cpp:2204
bool solveLinearSystem(bool xFilled)
Solves the linear system K.x = f taking K and f from the single equivalent matrix/vector or from matr...
Definition gmpFemSolver.cpp:872
bool update(int mode, QString &err)
Informs the solver of an external change in model dofs, elements or BCs that must be forwarded to the...
Definition gmpFemSolver.cpp:356
virtual bool stateLoadedCalcDerivedResultsNonLinear()
Returns the value of the "nonLinearSolver" parameter that will be passed to the calcDerivedResults() ...
Definition gmpFemSolver.h:102
virtual bool fillStateControlMapData(QVariantMap *map)
Method called for filling the state dump control registered in addStateItemsToGroup()
Definition gmpFemSolver.cpp:2183
virtual bool initElementSets(GmNumSolver *solver)
Helper function used to initialize the matrix / vector sets with the definition of the needed types a...
Definition gmpFemSolver.cpp:460
virtual bool init()
Prepares the solver for assembling matrices by creating the assembler object and allocating the neede...
Definition gmpFemSolver.cpp:138
virtual bool addStateItemsToGroup(GmStateDump *state, int groupId)
Adds to 'state' the data items that should be saved for this FEM process. Should probably be overridd...
Definition gmpFemSolver.cpp:2104
Definition gmpFemSolverOptions.h:39
arma::vec GmVector
Declaration of the GmpFemSolver class.
Declaration of the GmpFemSolverOptions class.