FemProcess
The GeMA Fem Process Plugin
Loading...
Searching...
No Matches
gmpFemSolverOptions.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_SOLVER_OPTIONS_H_
25#define _GEMA_PLUGIN_FEM_SOLVER_OPTIONS_H_
26
27#include <QString>
28#include <QVector>
29
30#include "gmpFemProcessConfig.h"
31
32#include <gmTaskManager.h>
33#include <luaEnv.h>
34
35class LuaTable;
37
38class GMP_FEM_PROCESS_API_EXPORT GmpFemSolverOptions
39{
40public:
41
44 {
45 automatic,
46 noDofHandling,
47 removeDof,
48 //-----------------------------------
49 // IMPORTANT: When adding entries or CHANGING enum order, please remember
50 // to also change assemblerModeOptions()
51 };
52
55 {
56 staticLinear,
57 staticSolver,
58 transientSolver,
59 transientLocalSolver,
60 transientNonlinearDc,
61 transientAutomaticTimeStep,
62 transientIterative,
63
64 //-----------------------------------
65 // IMPORTANT: When adding entries or CHANGING enum order, please remember
66 // to also change solverTypeOptions()
67 };
68
71 {
72 load,
73 displacement,
74 velocity,
75 flux,
76 absDisplacement,
77 //-----------------------------------
78 // IMPORTANT: When adding entries or CHANGING enum order, please remember
79 // to also change convergenceCriterionOptions()
80 };
81
84 {
85 newton,
86 picard,
87 //-----------------------------------
88 // IMPORTANT: When adding entries or CHANGING enum order, please remember
89 // to also change nonlinearSchemeOptions()
90 };
91
94 {
95 loadControlIncrement,
96 displacementControlIncrement,
97 cylindricalArcLengthIncrement,
98 sphericalArcLengthIncrement,
99 dissipatedEnergyIncrement,
100 combinedArcDissipatedEnergyIncrement,
101 strainControlIncrement,
102 elementControlIncrement,
103 externalWorkIncrement,
104 prescribedDisplacementIncrement,
105 //-----------------------------------
106 // IMPORTANT: When adding entries or CHANGING enum order, please remember
107 // to also change incrementStrategyOptions()
108 };
109
112 {
113 loadControl,
114 displacementControl,
115 linearArcLength,
116 cylindricalArcLength,
117 sphericalArcLength,
118 dissipatedEnergy,
119 combinedArcDissipatedEnergy,
120 elementControl,
121 strainControl,
122 minimalNorm,
123 orthogonalResidue,
124 prescribedDisplacement,
125 //-----------------------------------
126 // IMPORTANT: When adding entries or CHANGING enum order, please remember
127 // to also change iterationStrategyOptions()
128 };
129
132 {
133 full,
134 modified,
135 broyden,
136 bfgs,
137
138 //-----------------------------------
139 // IMPORTANT: When adding entries or CHANGING enum order, please remember
140 // to also change newtonRaphsonModeOptions()
141 };
142
145 {
146 none,
147 fixedNode,
148 selfWeight,
149 //-----------------------------------
150 // IMPORTANT: When adding entries or CHANGING enum order, please remember
151 // to also change geostaticTypeOptions()
152 };
153
156 {
157 fully,
158 iterative,
159
160 //-----------------------------------
161 // IMPORTANT: When adding entries or CHANGING enum order, please remember
162 // to also change couplingStrategyOptions()
163 };
164
165
166 /* Linear Transient Methods Type*/
167 enum LinearTransientMethods {
168 Implicit,
169 RK2,
170 RK4,
171 RK6,
172 };
173
174 enum ReductionMethod {
175 NoReduction,
176 GuyanReduction,
177 };
178
179 enum TimeIncrementMethod {
180 userDefined,
181 rate_based,
182 maxIncrementTransientVar,
183 };
184
187 {
188 printElementMatrices = 0x0001,
189 printElementVectors = 0x0002,
190 printElementDofMapping = 0x0004,
191 printEqMatrix = 0x0008,
192 printEqVector = 0x0010,
193 printGlobalMatrices = 0x0020,
194 printGlobalVectors = 0x0040,
195 printLinearMatrix = 0x0080,
196 printLinearVector = 0x0100,
197 printLinearResult = 0x0200,
198 saveLinearMatrix = 0x0400,
199 saveLinearVector = 0x0800,
200 saveLinearResult = 0x1000,
201 };
202
204 saveIteration = 0x0001,
205 savePhysicsId = 0x0002,
206 savePhysicsHeader = 0x0004,
207 saveDofMap = 0x0008,
208 saveDofValues = 0x0010,
209 saveFeVector = 0x0020,
210 saveFiVector = 0x0040,
211 saveKMatrix = 0x0080,
212 saveCMatrix = 0x0100,
213 saveMMatrix = 0x0200,
214 };
215
216 enum AccurateMethod {
217 firstOrder,
218 secondOrder,
219 //-----------------------------------
220 // IMPORTANT: When adding entries or CHANGING enum order, please remember
221 // to also change AccurateMethodOptions()
222 };
223
225
226 void loadFromTable(LuaTable& optionsTable, GmSimulationData* simData);
227
228 // Print & save options
229 unsigned _printOptions;
236
237 // Multi threaded options used when traversing elements
241
242 // Assembler option.
244
245 // Analysis type and other strategy definitions
247 IncrementStrategy _incrementStrategy;
248 IterationStrategy _iterationStrategy;
249 NewtonRaphsonMode _newtonRaphsonMode;
250 GeostaticType _geostaticType;
252 CouplingStrategy _couplingStrategy;
253 ReductionMethod _reductionMethod;
254 LinearTransientMethods _linearTransientMethod;
255 TimeIncrementMethod _timeIncrementMethod;
256 AccurateMethod _Order;
257 NonlinearScheme _nonlinearScheme;
258
259 // Load step and iteration options
260 unsigned _stepsMax;
261 unsigned _attemptsMax;
262 unsigned _iterationsMax;
264
265 // Tolerances & convergence criteria
266 unsigned _convergenceCriterion;
270
271 // displacement control Data & dof index
273
274 // Static solver options
275 double _loadOld;
276 double _loadNew;
277 double _loadMax;
286
287 // Transient solver options
288 double _timeOld;
289 double _timeNew;
290 double _timeMax;
295 bool _timeAdjustStep;
301
302 // controls time incrementation
303 unsigned _iterationsL;
304 unsigned _iterationsG;
306 unsigned _incrementsT;
307 double _DeltaG;
308 double _DeltaM;
309 double _DeltaB;
310 double _DeltaF;
311 // Element saving options
315
316 // Report options
317 bool _report;
321
322
323 const char** asssemblerModeOptions();
324 const char** solverTypeOptions();
325 const char** newtonRaphsonModeOptions();
326 const char** incrementStrategyOptions();
327 const char** iterationStrategyOptions();
328 const char** integrationSchemeOptions();
329 const char** nonlinearSchemeOptions();
330 const char** geostaticTypeOptions();
331 const char** couplingStrategyOptions();
332 const char** convergenceCriterionOptions();
333 const char** transientLinearOptions();
334 const char** reductionMethodOptions();
335 const char** timeIncrementAdaptativeOptions();
336 const char** AccurateMethodOptions();
337
338private:
339 void setAsssemblerMode (int index) { _assemblerDofMode = (AssemblerMode)index; }
340 void setSolverType (int index) { _type = (SolverType)index; }
341 void setNewtonRaphsonMode(int index) { _newtonRaphsonMode = (NewtonRaphsonMode)index; }
342 void setIncrementStrategy(int index) { _incrementStrategy = (IncrementStrategy)index; }
343 void setIterationStrategy(int index) { _iterationStrategy = (IterationStrategy)index; }
344 void setIntegrationScheme(int index);
345 void setNonlinearScheme (int index) { _nonlinearScheme = (NonlinearScheme)index; }
346 void setGeostaticType (int index) { _geostaticType = (GeostaticType)index; }
347 void setCouplingStrategy (int index) { _couplingStrategy = (CouplingStrategy)index; }
348 void setLinearTransient (int index) {_linearTransientMethod = (LinearTransientMethods)index;}
349 void setReductionMethod (int index) {_reductionMethod = (ReductionMethod)index; }
350 void setTimeIncrementStrategy(int index) { _timeIncrementMethod = (TimeIncrementMethod)index; }
351 void setAccurateMethod (int index) { _Order = (AccurateMethod)index; }
352};
353
354#endif
Definition gmpFemSolverOptions.h:39
char _printFormat
Format parameter used together with _printOptions: The format type f' or 'g'.
Definition gmpFemSolverOptions.h:231
QString _reportFile
The report file name. Can contain PATH macros.
Definition gmpFemSolverOptions.h:318
double _loadMaxIncrement
Solver option defining the maximum load increment.
Definition gmpFemSolverOptions.h:280
CouplingStrategy
Coupling strategy options.
Definition gmpFemSolverOptions.h:156
bool _crackTracking
Solver option defining the crack tracking algorithm.
Definition gmpFemSolverOptions.h:285
bool _skipLocalError
Solver option defining the local integration error control (yes/no)
Definition gmpFemSolverOptions.h:299
unsigned _iterationsMax
Solver option defining the maximum number of iterations.
Definition gmpFemSolverOptions.h:262
double _transientVariableChange
Solver option defining the máx allowable transient variable change per increment.
Definition gmpFemSolverOptions.h:298
double _initialEnergyIncrement
Solver option defining the initial energy increment.
Definition gmpFemSolverOptions.h:283
double _timeIncrement
Solver option defining the initial time increment.
Definition gmpFemSolverOptions.h:291
QVector< double > _saveFilterValues
The ordered list of values for the save attribute filter.
Definition gmpFemSolverOptions.h:235
bool _updateNumSolverTol
Updates the linear solver tolerance (valid only for LisSolver)
Definition gmpFemSolverOptions.h:269
unsigned _iterationsL
Solver option defining number of iterations after which the size of the subsequent increment will be ...
Definition gmpFemSolverOptions.h:303
double _loadOld
Solver option defining the old load factor.
Definition gmpFemSolverOptions.h:275
GeostaticType
Geostatic type options.
Definition gmpFemSolverOptions.h:145
bool _saveElementData
Should we save element data to an aux file?
Definition gmpFemSolverOptions.h:312
AssemblerMode
Assembler mode.
Definition gmpFemSolverOptions.h:44
QString _saveFilterAttr
Filter attribute used to limit the number of linear system values saved / printed.
Definition gmpFemSolverOptions.h:234
int _mtnTasks
The number of tasks. See GmTaskManager::runParallelCellLoop()
Definition gmpFemSolverOptions.h:239
double _integrationTolerance
Solver option defining the time integration tolerance.
Definition gmpFemSolverOptions.h:297
QVector< int > _dispControlData
Solver option defining the node, degree of fredom.
Definition gmpFemSolverOptions.h:272
double _loadNew
Solver option defining the new load factor.
Definition gmpFemSolverOptions.h:276
QString _reportId
The id of this solver in the report.
Definition gmpFemSolverOptions.h:319
double _DeltaG
Solver option defining time increment factor for proposed new time.
Definition gmpFemSolverOptions.h:307
IncrementStrategy
Increment strategy options - NL static solver.
Definition gmpFemSolverOptions.h:94
double _loadMinIncrement
Solver option defining the minimum load increment.
Definition gmpFemSolverOptions.h:279
NonlinearScheme
Nonlinear scheme options.
Definition gmpFemSolverOptions.h:84
SolverType _type
Solver option defining the analysis type.
Definition gmpFemSolverOptions.h:246
SolverType
Solver type.
Definition gmpFemSolverOptions.h:55
unsigned _saveElementOptions
An or of ElementSaveOptions values defining which data should be saved for each element.
Definition gmpFemSolverOptions.h:314
double _timeMax
Solver option defining the total time of analisys.
Definition gmpFemSolverOptions.h:290
AssemblerMode _assemblerDofMode
Dof handling mode for the assembler.
Definition gmpFemSolverOptions.h:243
unsigned _attemptsMax
Solver option defining the maximum number of attempts.
Definition gmpFemSolverOptions.h:261
unsigned _iterationsDesired
Solver option defining the desired number of iterations.
Definition gmpFemSolverOptions.h:263
ElementSaveOptions
Definition gmpFemSolverOptions.h:203
bool _timeControl
Solver option defining the time increment control (yes/no)
Definition gmpFemSolverOptions.h:305
PrintOptions
Flag options used to compose the printOptions constructor parameter.
Definition gmpFemSolverOptions.h:187
QStringList _toleranceQuotedGroupNames
The quoted names of the tolerance groups. Size equal to _tolerance size.
Definition gmpFemSolverOptions.h:268
bool _normalFlow
Solver option defining the normal flow technique.
Definition gmpFemSolverOptions.h:284
IterationStrategy
Iteration strategy options - NL static solver.
Definition gmpFemSolverOptions.h:112
double _DeltaF
Solver option defining Cutback factor if the solution seems to diverge.
Definition gmpFemSolverOptions.h:310
int _printPrecision
Format parameter used together with _printOptions: The number of decimal places.
Definition gmpFemSolverOptions.h:232
double _DeltaM
Solver option defining time increment factor for current time.
Definition gmpFemSolverOptions.h:308
int _mtnWorkers
The number of worker threads. See GmTaskManager::runParallelCellLoop()
Definition gmpFemSolverOptions.h:238
bool _resetDisplacement
Solver option defining the reset displacement (yes/no)
Definition gmpFemSolverOptions.h:300
double _minDissipatedEnergy
Solver option defining the minimum dissipated energy.
Definition gmpFemSolverOptions.h:282
QString _physicsType
The physics type when running the IterativeSolver. Used on messages. If equal to "mechanic" the time ...
Definition gmpFemSolverOptions.h:251
double _DeltaB
Solver option defining Cutback factor for the next increment if more than IL iterations were needed i...
Definition gmpFemSolverOptions.h:309
ConvergenceCriterion
Convergence criterion options.
Definition gmpFemSolverOptions.h:71
int _printFieldWidth
Format parameter used together with _printOptions: The matrix column minimum width.
Definition gmpFemSolverOptions.h:230
double _loadIncrement
Solver option defining the load increment.
Definition gmpFemSolverOptions.h:278
double _integrationScheme
Solver option defining the time integration scheme.
Definition gmpFemSolverOptions.h:294
double _timeMinIncrement
Solver option defining the minimum time increment.
Definition gmpFemSolverOptions.h:292
unsigned _stepsMax
Solver option defining the maximum step number.
Definition gmpFemSolverOptions.h:260
unsigned _incrementsT
Solver option defining consecutive increments if no cut-back has occurred to allow a time increment i...
Definition gmpFemSolverOptions.h:306
GmTaskManager::CellPartitionStrategy _mtStrategy
The cell partitioning strategy. See GmTaskManager::runParallelCellLoop()
Definition gmpFemSolverOptions.h:240
double _timeMaxIncrement
Solver option defining the maximum time increment.
Definition gmpFemSolverOptions.h:293
QString _saveBaseName
The base name for the file where linear system matrices and vectors are saved.
Definition gmpFemSolverOptions.h:233
QVector< double > _tolerance
Solver option defining the tolerance.
Definition gmpFemSolverOptions.h:267
double _loadMax
Solver option defining the maximum load factor.
Definition gmpFemSolverOptions.h:277
NewtonRaphsonMode
Newton Raphson optios.
Definition gmpFemSolverOptions.h:132
unsigned _printOptions
Print options flags (an or of PrintOptions values) defining what information should be logged by the ...
Definition gmpFemSolverOptions.h:229
bool _reportDetailed
Should we add additional detailed information to the report?
Definition gmpFemSolverOptions.h:320
QString _saveElementDataFileMask
The mask with the save element data file name. If it contains a XXXXXX substring, it will be replaced...
Definition gmpFemSolverOptions.h:313
bool _loadAdjustStep
Solver option defining the adaptative load increment.
Definition gmpFemSolverOptions.h:281
double _iterationTolerance
Solver option defining the iteration tolerance.
Definition gmpFemSolverOptions.h:296
bool _report
Should we save a report?
Definition gmpFemSolverOptions.h:317
unsigned _iterationsG
Solver option defining number of maximum number of iterations allowed in two consecutive increments f...
Definition gmpFemSolverOptions.h:304
Declaration of useful configuration definitions for the plugin library.