AdaptInfo.h 19.6 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
/******************************************************************************
 *
 * AMDiS - Adaptive multidimensional simulations
 *
 * Copyright (C) 2013 Dresden University of Technology. All Rights Reserved.
 * Web: https://fusionforge.zih.tu-dresden.de/projects/amdis
 *
 * Authors: 
 * Simon Vey, Thomas Witkowski, Andreas Naumann, Simon Praetorius, et al.
 *
 * This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 * WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 *
 *
 * This file is part of AMDiS
 *
 * See also license.opensource.txt in the distribution.
 * 
 ******************************************************************************/
20
21


22
23
24
25
26
27
28

/** \file AdaptInfo.h */

#ifndef AMDIS_ADAPTINFO_H
#define AMDIS_ADAPTINFO_H

#include "MatrixVector.h"
29
#include "Initfile.h"
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#include "Serializable.h"

namespace AMDiS {

  /**
   * \ingroup Adaption
   * 
   * \brief
   * Holds adapt parameters and infos about the problem. Base class
   * for AdaptInfoScal and AdaptInfoVec.
   */
  class AdaptInfo : public Serializable
  {
  protected:
    /** \brief
     * Stores adapt infos for a scalar problem or for one component of a 
     * vector valued problem.
     */
    class ScalContent {
    public:
50
      /// Constructor.
51
      ScalContent(std::string prefix)
52
	: est_sum(0.0),
53
54
55
56
57
58
59
	  est_t_sum(0.0),
	  est_max(0.0),
	  est_t_max(0.0),
	  fac_max(0.0),
	  fac_sum(1.0),
	  spaceTolerance(0.0),
	  timeTolerance(0.0),
60
	  timeRelativeTolerance(0.0),
61
62
63
64
65
	  timeErrLow(0.0),
	  coarsenAllowed(0),
	  refinementAllowed(1),
	  refineBisections(1),
	  coarseBisections(1)	  	
66
      {
67
68
	Parameters::get(prefix + "->tolerance", spaceTolerance);
	Parameters::get(prefix + "->time tolerance", timeTolerance);
69
	Parameters::get(prefix + "->time relative tolerance", timeRelativeTolerance);
70
71
72
73
74
75
	Parameters::get(prefix + "->coarsen allowed", coarsenAllowed);
	Parameters::get(prefix + "->refinement allowed", refinementAllowed);
	Parameters::get(prefix + "->refine bisections", refineBisections);
	Parameters::get(prefix + "->coarsen bisections", coarseBisections);
	Parameters::get(prefix + "->sum factor", fac_sum);
	Parameters::get(prefix + "->max factor", fac_max);
76

77
78
	if (timeTolerance == 0.0 && timeRelativeTolerance == 0.0)
	  timeTolerance = 1.0;
79
	timeErrLow = timeTolerance * 0.3;
80
      }
81

82
      /// Sum of all error estimates
83
84
      double est_sum;

85
      /// Sum of all time error estimates
86
87
      double est_t_sum;

88
      /// maximal local error estimate.
89
90
      double est_max;

91
      /// Maximum of all time error estimates
92
      double est_t_max;
93
94
95
      
      /// factors to combine max and integral time estimate
      double fac_max, fac_sum;
96

97
      /// Tolerance for the (absolute or relative) error
98
99
      double spaceTolerance;

100
      /// Time tolerance.
101
      double timeTolerance;
102
103
104
      
      /// Relative time tolerance
      double timeRelativeTolerance;
105

106
      /// Lower bound for the time error.
107
108
      double timeErrLow;

109
      /// true if coarsening is allowed, false otherwise.
110
111
      int coarsenAllowed;

112
      /// true if refinement is allowed, false otherwise.
113
114
115
116
117
118
119
      int refinementAllowed;

      /** \brief
       * parameter to tell the marking strategy how many bisections should be 
       * performed when an element is marked for refinement; usually the value is
       * 1 or DIM
       */
120
      int refineBisections;
121
122
123
124
125
126

      /** \brief
       * parameter to tell the marking strategy how many bisections should
       * be undone when an element is marked for coarsening; usually the value is 
       * 1 or DIM
       */                          
127
      int coarseBisections;    
128
129
130
    };

  public:
131
    /// Constructor.
Thomas Witkowski's avatar
Thomas Witkowski committed
132
    AdaptInfo(std::string name_, int size = 1) 
133
134
135
136
137
138
139
140
141
142
143
      : name(name_), 
	spaceIteration(-1),
	maxSpaceIteration(-1),
	timestepIteration(0),
	maxTimestepIteration(30),
	timeIteration(0),
	maxTimeIteration(30),
	time(0.0),
	startTime(0.0),
	endTime(1.0),
	timestep(0.0),
144
	lastProcessedTimestep(0.0),
145
146
147
	minTimestep(0.0),
	maxTimestep(1.0),
	timestepNumber(0),
Thomas Witkowski's avatar
* Bla    
Thomas Witkowski committed
148
	nTimesteps(0),
149
150
151
152
	solverIterations(0),
	maxSolverIterations(0),
	solverTolerance(1e-8),
	solverResidual(0.0),
153
	globalTimeTolerance(1.0),
154
        scalContents(size),
155
156
	deserialized(false),
	rosenbrockMode(false)
157
    {
158
      init();
159
160
      char number[5];
      for (int i = 0; i < size; i++) {
161
162
	sprintf(number, "[%d]", i);
	scalContents[i] = new ScalContent(name + std::string(number));  
163
      }
164
    }
165

166
    /// Destructor.
Thomas Witkowski's avatar
Thomas Witkowski committed
167
168
169
    virtual ~AdaptInfo() 
    {
      for (unsigned int i = 0;  i < scalContents.size(); i++)
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
  delete scalContents[i];
    }

    /// Sets initial values to time/timestep variables
    inline void init()
    {
      Parameters::get(name + "->start time", startTime);
      time = startTime;
      Parameters::get(name + "->timestep", timestep);
      Parameters::get(name + "->end time", endTime);
      Parameters::get(name + "->max iteration", maxSpaceIteration);
      Parameters::get(name + "->max timestep iteration", maxTimestepIteration);
      Parameters::get(name + "->max time iteration", maxTimeIteration);
      Parameters::get(name + "->min timestep", minTimestep);
      Parameters::get(name + "->max timestep", maxTimestep);
      Parameters::get(name + "->number of timesteps", nTimesteps);
186
      Parameters::get(name + "->time tolerance", globalTimeTolerance);
187
    }
188

189
    /// Resets all variables to zero (or something equivalent)
190
191
192
193
194
195
196
197
198
199
    inline void reset() 
    {
      spaceIteration = -1;
      timestepIteration = 0;
      timeIteration = 0;
      time = 0.0;
      timestep = 0.0;
      timestepNumber = 0;
      solverIterations = 0;
      solverResidual = 0.0;
200

201
      Parameters::get(name + "->timestep", timestep);
202
      lastProcessedTimestep=timestep;
203
    }
204

205
    /// Returns whether space tolerance is reached.
206
207
    virtual bool spaceToleranceReached() 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
208
      for (unsigned int i = 0; i < scalContents.size(); i++) {
209
	if (!(scalContents[i]->est_sum < scalContents[i]->spaceTolerance))
210
	  return false;
211
      }
212

213
      return true;
214
    }
215

216
    /// Returns whether space tolerance of component i is reached.
217
218
    virtual bool spaceToleranceReached(int i) 
    {
219
      if (!(scalContents[i]->est_sum < scalContents[i]->spaceTolerance))
220
	return false;
221
      else
222
	return true;
223
    }
224

225
    /// Returns whether time tolerance is reached.
226
227
    virtual bool timeToleranceReached() 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
228
      for (unsigned int i = 0; i < scalContents.size(); i++)
229
	if (!(getTimeEstCombined(i) < scalContents[i]->timeTolerance))
230
	  return false;
231

232
      return true;
233
    }
234

235
    /// Returns whether time tolerance of component i is reached.
236
237
    virtual bool timeToleranceReached(int i) 
    {
238
      if (!(getTimeEstCombined(i) < scalContents[i]->timeTolerance))
239
	return false;
240
      else
241
	return true;
242
    }
243

244
    /// Returns whether time error is under its lower bound.
245
246
    virtual bool timeErrorLow() 
    {
Thomas Witkowski's avatar
Thomas Witkowski committed
247
      for (unsigned int i = 0; i < scalContents.size(); i++)
248
	if (!(getTimeEstCombined(i) < scalContents[i]->timeErrLow))
249
	  return false;
250

251
      return true;
252
    }
253
254
255
256
    /// Returns the time estimation as a combination 
    /// of maximal and integral time error 
    double getTimeEstCombined(unsigned i) const 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
257
258
259
      return 
	scalContents[i]->est_t_max * scalContents[i]->fac_max +
	scalContents[i]->est_t_sum * scalContents[i]->fac_sum; 
260
261
    }

262

263
    /// Print debug information about time error and its bound.
264
265
    void printTimeErrorLowInfo() 
    {
266
      for (unsigned int i = 0; i < scalContents.size(); i++){
267
	std::cout << "    Time error estimate     ["<<i<<"] = " 
268
		  << getTimeEstCombined(i) << "\n"
269
		  << "    Time error estimate sum ["<<i<<"] = " 
270
		  << scalContents[i]->est_t_sum << "\n" 
271
		  << "    Time error estimate max ["<<i<<"] = " 
272
		  << scalContents[i]->est_t_max << "\n"
273
		  << "    Time error low bound    ["<<i<<"] = " 
274
		  << scalContents[i]->timeErrLow << "\n"
275
		  << "    Time error high bound   ["<<i<<"] = " 
276
		  << scalContents[i]->timeTolerance << "\n";
277
      }
278
    }
279

280
    /// Returns \ref spaceIteration.
281
282
    inline int getSpaceIteration() 
    { 
283
      return spaceIteration; 
284
    }
285

286
    /// Sets \ref spaceIteration.
287
288
    inline void setSpaceIteration(int it) 
    { 
289
      spaceIteration = it; 
290
    }
291
  
292
    /// Returns \ref maxSpaceIteration.
293
294
    inline int getMaxSpaceIteration() 
    { 
295
      return maxSpaceIteration;
296
    }
297

298
    /// Sets \ref maxSpaceIteration.
299
300
    inline void setMaxSpaceIteration(int it) 
    { 
301
      maxSpaceIteration = it; 
302
    }
303
  
304
    /// Increments \ref spaceIteration by 1;
305
306
    inline void incSpaceIteration() 
    { 
307
      spaceIteration++; 
308
    }
309

310
    /// Sets \ref timestepIteration.
311
312
    inline void setTimestepIteration(int it) 
    { 
313
      timestepIteration = it; 
314
    }
315
  
316
    /// Returns \ref timestepIteration.
317
318
    inline int getTimestepIteration() 
    { 
319
      return timestepIteration; 
320
    }
321

322
    /// Increments \ref timestepIteration by 1;
323
324
    inline void incTimestepIteration() 
    { 
325
      timestepIteration++; 
326
    }
327

328
    /// Returns \ref maxTimestepIteration.
329
330
    inline int getMaxTimestepIteration() 
    { 
331
      return maxTimestepIteration; 
332
    }
333

334
    /// Sets \ref maxTimestepIteration.
335
336
    inline void setMaxTimestepIteration(int it) 
    { 
337
      maxTimestepIteration = it; 
338
    }
339
  
340
    /// Sets \ref timeIteration.
341
342
    inline void setTimeIteration(int it) 
    { 
343
      timeIteration = it; 
344
    }
345
  
346
    /// Returns \ref timeIteration.
347
348
    inline int getTimeIteration() 
    { 
349
      return timeIteration; 
350
    }
351

352
    /// Increments \ref timesIteration by 1;
353
354
    inline void incTimeIteration() 
    { 
355
      timeIteration++; 
356
    }
357

358
    /// Returns \ref maxTimeIteration.
359
360
    inline int getMaxTimeIteration() 
    { 
361
      return maxTimeIteration; 
362
    }
363

364
    /// Sets \ref maxTimeIteration.
365
366
    inline void setMaxTimeIteration(int it) 
    { 
367
      maxTimeIteration = it; 
368
    }
369
  
370
    /// Returns \ref timestepNumber.
371
372
    inline int getTimestepNumber() 
    { 
373
      return timestepNumber; 
374
    }
375

376
377
378
    /// Sets \ref timestepNumber.
    inline void setTimestepNumber(int num) 
    {
379
      timestepNumber = std::min(nTimesteps, num);
380
381
    }
    
Thomas Witkowski's avatar
* Bla    
Thomas Witkowski committed
382
    /// Returns \ref nTimesteps.
383
384
    inline int getNumberOfTimesteps() 
    {
Thomas Witkowski's avatar
* Bla    
Thomas Witkowski committed
385
386
387
      return nTimesteps;
    }

388
389
390
    /// Sets \ref nTimesteps.
    inline void setNumberOfTimesteps(int num) 
    {
391
      nTimesteps = std::max(0, num);
392
393
    }

394
    /// Increments \ref timestepNumber by 1;
395
396
    inline void incTimestepNumber() 
    { 
397
      timestepNumber++; 
398
    }
399

400
    /// Sets \ref est_sum.
401
402
    inline void setEstSum(double e, int index) 
    {
403
      scalContents[index]->est_sum = e;
404
    }
405

406
    /// Sets \ref est_max.
407
408
    inline void setEstMax(double e, int index) 
    {
409
      scalContents[index]->est_max = e;
410
    }
411

412
    /// Sets \ref est_max.
413
414
    inline void setTimeEstMax(double e, int index) 
    {
415
      scalContents[index]->est_t_max = e;
416
    }
417

418
    /// Sets \ref est_t_sum.
419
420
    inline void setTimeEstSum(double e, int index) 
    {
421
      scalContents[index]->est_t_sum = e;
422
    }
423

424
    /// Returns \ref est_sum.
425
426
    inline double getEstSum(int index) 
    { 
427
      FUNCNAME_DBG("AdaptInfo::getEstSum()");
Thomas Witkowski's avatar
Thomas Witkowski committed
428
429
430
431

      TEST_EXIT_DBG(static_cast<unsigned int>(index) < scalContents.size())
	("Wrong index for adaptInfo!\n");

432
      return scalContents[index]->est_sum; 
433
    }
434

435
    /// Returns \ref est_t_sum.
436
437
    inline double getEstTSum(int index) 
    { 
438
      return scalContents[index]->est_t_sum; 
439
    }
440

441
    /// Returns \ref est_max.
442
443
    inline double getEstMax(int index) 
    { 
444
      FUNCNAME_DBG("AdaptInfo::getEstSum()");
Thomas Witkowski's avatar
Thomas Witkowski committed
445
446
447
448

      TEST_EXIT_DBG(static_cast<unsigned int>(index) < scalContents.size())
	("Wrong index for adaptInfo!\n");

449
      return scalContents[index]->est_max; 
450
    }
451

452
    /// Returns \ref est_max.
453
454
    inline double getTimeEstMax(int index) 
    { 
455
      return scalContents[index]->est_t_max; 
456
    }
457

458
    /// Returns \ref est_t_sum.
459
460
    inline double getTimeEstSum(int index) 
    { 
461
      return scalContents[index]->est_t_sum; 
462
    }
Praetorius, Simon's avatar
Praetorius, Simon committed
463
464
465
466
467
468
469
470
471
472
473
    
    /// Returns \ref est_t the estimated overall time error
    inline double getTimeEst()
    {
      return est_t;
    }
    
    inline void setTimeEst(double value)
    {
      est_t = value;
    }
474

475
    /// Returns \ref spaceTolerance.
476
477
    inline double getSpaceTolerance(int index) 
    { 
478
      return scalContents[index]->spaceTolerance; 
479
    }  
480

481
    /// Sets \ref spaceTolerance.
482
483
    inline void setSpaceTolerance(int index, double tol) 
    { 
484
      scalContents[index]->spaceTolerance = tol; 
485
    }  
486

487
    /// Returns \ref timeTolerance.
488
489
    inline double getTimeTolerance(int index) 
    { 
490
      return scalContents[index]->timeTolerance; 
491
    }  
492

493
494
495
496
497
498
    /// Returns \ref timeRelativeTolerance.
    inline double getTimeRelativeTolerance(int index) 
    { 
      return scalContents[index]->timeRelativeTolerance; 
    }  

499
    /// Sets \ref time
500
501
    inline double setTime(double t) 
    { 
502
      time = t; 
503
504
505
506
507
      if (time > endTime) 
	time = endTime;
      if (time < startTime) 
	time = startTime;

508
      return time;
509
    }
510

511
    /// Gets \ref time
512
513
    inline double getTime() 
    { 
514
      return time; 
515
    }  
516

517
    /// Gets \ref &time
518
519
    inline double *getTimePtr() 
    { 
520
      return &time; 
521
    }  
522

523
    /// Sets \ref timestep
524
525
    inline double setTimestep(double t) 
    { 
526
      timestep = t; 
527
      if (timestep > maxTimestep)
528
	timestep = maxTimestep;
529
      if (timestep < minTimestep)
530
	timestep = minTimestep;
531
      if (time + timestep > endTime)
532
533
	timestep = endTime - time;
      
534
      return timestep;
535
    }
536
537
538
539
540
541
    /// Gets \ref timestep
    inline double getTimestep() 
    { 
      return timestep; 
    }

542
543
544
    inline void setLastProcessedTimestep(double t)
    {
      lastProcessedTimestep = t;
545
546
    } 

547
548
    inline double getLastProcessedTimestep()
    {
549
550
	return lastProcessedTimestep;
    } 
551

552
553
    /// Returns true, if the end time is reached and no more timestep
    /// computations must be done.
554
555
    inline bool reachedEndTime() 
    {
556
557
558
      if (nTimesteps > 0) 
	return !(timestepNumber < nTimesteps);

559
      return !(fabs(time - endTime) > DBL_TOL);
Thomas Witkowski's avatar
* Bla    
Thomas Witkowski committed
560
561
    }

562

563
    /// Sets \ref minTimestep
564
565
    inline void setMinTimestep(double t) 
    { 
566
      minTimestep = t; 
567
    }
568

569
    /// Gets \ref minTimestep
570
571
    inline double getMinTimestep() 
    { 
572
      return minTimestep; 
573
    }  
574

575
    /// Sets \ref maxTimestep
576
577
    inline void setMaxTimestep(double t) 
    { 
578
      maxTimestep = t; 
579
    }
580

581
    /// Gets \ref maxTimestep
582
583
    inline double getMaxTimestep() 
    { 
584
      return maxTimestep; 
585
    }  
586
    
587
    /// Gets \ref &timestep
588
589
    inline double *getTimestepPtr() 
    { 
590
      return &timestep; 
591
    }  
592

593
    /// Sets \ref startTime = time
594
595
    inline void setStartTime(double time) 
    { 
596
      startTime = time; 
597
    }
598

599
    /// Sets \ref endTime = time
600
601
    inline void setEndTime(double time) 
    { 
602
      endTime = time; 
603
    }
604

605
    /// Returns \ref startTime
606
607
    inline double getStartTime() 
    { 
608
      return startTime; 
609
    }
610

611
    /// Returns \ref endTime
612
613
    inline double getEndTime() 
    { 
614
      return endTime; 
615
    }
616

617
    /// Returns \ref timeErrLow.
618
619
    inline double getTimeErrLow(int index) 
    { 
620
      return scalContents[index]->timeErrLow; 
621
    }  
622

623
    /// Returns whether coarsening is allowed or not.
624
625
    inline bool isCoarseningAllowed(int index) 
    {
626
      return (scalContents[index]->coarsenAllowed == 1);
627
    }
628

629
    /// Returns whether coarsening is allowed or not.
630
631
    inline bool isRefinementAllowed(int index) 
    {
632
      return (scalContents[index]->refinementAllowed == 1);
633
    }
634

635
    ///
636
637
    inline void allowRefinement(bool allow, int index) 
    {
638
      scalContents[index]->refinementAllowed = allow;
639
    }
640

641
    ///
642
643
    inline void allowCoarsening(bool allow, int index) 
    {
644
      scalContents[index]->coarsenAllowed = allow;
645
    }
646

647
    /// Returns \ref refineBisections
648
    inline int getRefineBisections(int index) const 
649
    {
650
      return scalContents[index]->refineBisections;
651
    }
652

653
    /// Returns \ref coarseBisections
654
    inline int getCoarseBisections(int index) const 
655
    {
656
      return scalContents[index]->coarseBisections;
657
    }    
658

659
660
    inline int getSize() 
    { 
Thomas Witkowski's avatar
Thomas Witkowski committed
661
      return scalContents.size(); 
662
    }
663

664
665
666
667
668
    inline bool getRosenbrockMode()
    {
      return rosenbrockMode;
    }

669
670
    inline void setSolverIterations(int it) 
    {
671
      solverIterations = it;
672
    }
673
  
674
675
    inline int getSolverIterations() 
    {
676
      return solverIterations;
677
    }
678
  
679
680
    inline void setMaxSolverIterations(int it) 
    {
681
      maxSolverIterations = it;
682
    }
683
  
684
685
    inline int getMaxSolverIterations() 
    {
686
      return maxSolverIterations;
687
    }
688
  
689
690
    inline void setSolverTolerance(double tol) 
    {
691
      solverTolerance = tol;
692
    }
693
  
694
695
    inline double getSolverTolerance() 
    {
696
      return solverTolerance;
697
    }
698
  
699
700
    inline void setSolverResidual(double res) 
    {
701
      solverResidual = res;
702
    }
703
  
704
705
    inline double getSolverResidual() 
    {
706
      return solverResidual;
707
    }
708
709
710
711
712
713
714
715
716
717
718
719
  
    inline void setGlobalTimeTolerance(double tol) 
    {
      globalTimeTolerance = tol;
    }
  
    inline double getGlobalTimeTolerance() 
    {
      return globalTimeTolerance;
    }
    
    
720

721
    /// Returns true, if the adaptive procedure was deserialized from a file.
722
    bool isDeserialized() const 
723
    {
724
      return deserialized;
725
726
    }

727
728
    inline void setIsDeserialized(bool b) 
    {
729
730
731
732
733
734
      deserialized = b;
    }

    inline void setRosenbrockMode(bool b)
    {
      rosenbrockMode = b;
735
736
    }

737
    /// Creates new scalContents with the given size.
738
739
    void setScalContents(int newSize);

740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
    /** \brief
     * Resets timestep, current time and time boundaries without
     * any check. Is used by the parareal algorithm.
     */
    void resetTimeValues(double newTimeStep,
			 double newStartTime,
			 double newEndTime)
    {
      time = newStartTime;
      startTime = newStartTime;
      endTime = newEndTime;
      timestep = newTimeStep;
      timestepNumber = 0;
    }

Thomas Witkowski's avatar
Thomas Witkowski committed
755
    void serialize(std::ostream& out);
756

Thomas Witkowski's avatar
Thomas Witkowski committed
757
    void deserialize(std::istream& in);
758
759

  protected:
760
    /// Name.
Thomas Witkowski's avatar
Thomas Witkowski committed
761
    std::string name;
762

763
    /// Current space iteration
764
765
766
767
768
769
770
771
    int spaceIteration;

    /** \brief
     * maximal allowed number of iterations of the adaptive procedure; if 
     * maxIteration <= 0, no iteration bound is used
     */
    int maxSpaceIteration;

772
    /// Current timestep iteration
773
774
    int timestepIteration;

775
    /// Maximal number of iterations for choosing a timestep
776
777
    int maxTimestepIteration;

778
    /// Current time iteration
779
780
    int timeIteration;

781
    /// Maximal number of time iterations
782
783
    int maxTimeIteration;

784
    /// Actual time, end of time interval for current time step
785
786
    double time;

787
    /// Initial time
788
789
    double startTime;

790
    /// Final time
791
792
    double endTime;

793
    ///Time step size to be used
794
795
    double timestep;

796
797
798
    /// Last processed time step size of finished iteration
    double lastProcessedTimestep;

799
    /// Minimal step size
800
801
    double minTimestep;

802
    /// Maximal step size
803
    double maxTimestep;
804
    
805
    /// Number of current time step
806
    int timestepNumber;
Thomas Witkowski's avatar
* Bla    
Thomas Witkowski committed
807
808
809
810
811
812
813

    /** \brief
     * Per default this value is 0 and not used. If it is set to a non-zero value,
     * the computation of the stationary problem is done nTimesteps times with a
     * fixed timestep.
     */
    int nTimesteps;
814
  
815
    /// number of iterations needed of linear or nonlinear solver
816
817
    int solverIterations;

818
    /// maximal number of iterations needed of linear or nonlinear solver
819
820
    int maxSolverIterations;

821
    ///
822
823
    double solverTolerance;

824
    ///
825
    double solverResidual;
826
827
828
    
    /// tolerance for the overall time error
    double globalTimeTolerance;