KratosMultiphysics
KRATOS Multiphysics (Kratos) is a framework for building parallel, multi-disciplinary simulation software, aiming at modularity, extensibility, and high performance. Kratos is written in C++, and counts with an extensive Python interface.
adaptive_time_incrementor.h
Go to the documentation of this file.
1 // KRATOS___
2 // // ) )
3 // // ___ ___
4 // // ____ //___) ) // ) )
5 // // / / // // / /
6 // ((____/ / ((____ ((___/ / MECHANICS
7 //
8 // License: geo_mechanics_application/license.txt
9 //
10 // Main authors: Wijtze Pieter Kikstra
11 // Anne van de Graaf
12 //
13 
14 #pragma once
15 
16 #include "time_incrementor.h"
17 
18 namespace Kratos
19 {
20 
22 {
23 public:
24  AdaptiveTimeIncrementor(double StartTime,
25  double EndTime,
26  double StartIncrement,
27  std::size_t MaxNumOfCycles = 10,
28  double ReductionFactor = 0.5,
29  double IncreaseFactor = 2.0,
30  double MaxTimeStepFactor = 1000.0,
31  std::size_t MinNumOfIterations = 3,
32  std::size_t MaxNumOfIterations = 15);
33 
34  [[nodiscard]] bool WantNextStep(const TimeStepEndState& rPreviousState) const override;
35  [[nodiscard]] bool WantRetryStep(std::size_t CycleNumber, const TimeStepEndState& rPreviousState) const override;
36  [[nodiscard]] double GetIncrement() const override;
37  void PostTimeStepExecution(const TimeStepEndState& rResultantState) override;
38 
39 private:
40  double mEndTime;
41  double mDeltaTime;
42  std::size_t mMaxNumOfCycles;
43  double mReductionFactor;
44  double mIncreaseFactor;
45  double mMaxDeltaTime;
46  std::size_t mMinNumOfIterations;
47  std::size_t mMaxNumOfIterations;
48 };
49 
50 } // namespace Kratos
Definition: adaptive_time_incrementor.h:22
bool WantRetryStep(std::size_t CycleNumber, const TimeStepEndState &rPreviousState) const override
Definition: adaptive_time_incrementor.cpp:63
void PostTimeStepExecution(const TimeStepEndState &rResultantState) override
Definition: adaptive_time_incrementor.cpp:74
bool WantNextStep(const TimeStepEndState &rPreviousState) const override
Definition: adaptive_time_incrementor.cpp:58
double GetIncrement() const override
Definition: adaptive_time_incrementor.cpp:72
AdaptiveTimeIncrementor(double StartTime, double EndTime, double StartIncrement, std::size_t MaxNumOfCycles=10, double ReductionFactor=0.5, double IncreaseFactor=2.0, double MaxTimeStepFactor=1000.0, std::size_t MinNumOfIterations=3, std::size_t MaxNumOfIterations=15)
Definition: adaptive_time_incrementor.cpp:22
Definition: time_incrementor.h:24
REF: G. R. Cowper, GAUSSIAN QUADRATURE FORMULAS FOR TRIANGLES.
Definition: mesh_condition.cpp:21
Definition: time_step_end_state.hpp:23