Time Integration

Time Integration#

UML diagram of ButcherTableau, DynamicEquation, Relaxer, RKmethod, RungeKuttaStepper, RungeKuttaStepper::RungeKuttaStageExecutor, Stepper, TimeSolver.

@startuml
!theme vibrant
package Legend {
  class Class
  abstract class Abstract
  enum Enum
  class Visibility {
    +public field
    +public method()
    -private field
    -private method()
    #protected field
  }
  Class -[hidden]-> Extension
  Abstract -[hidden]-> Extension
  Enum -[hidden]-> Extension
  Visibility <|-- Extension : Extension
  Visibility o-- Aggregation : Aggregation
  Visibility +.. Nested : Nested
  Visibility --> Dependency : Dependency
  Visibility ..> WeakDependency : Weak dependency
}
abstract "Stepper" as C_0012141159885130425810
abstract C_0012141159885130425810 {
+setParentTimeSolver(TimeSolver *) : void
{abstract} +step() = 0 : void
__
#solver_ : TimeSolver *
}
class "RungeKuttaStepper" as C_0006522646547419731424
class C_0006522646547419731424 {
+nStages() const : int
+step() : void
__
-butcher_ : ButcherTableau
}
class "RungeKuttaStepper::RungeKuttaStageExecutor" as C_0007748372366276514134
class C_0007748372366276514134 {
+RungeKuttaStageExecutor(DynamicEquation, const RungeKuttaStepper &) : void
+getError() const : real
+resetX() : void
+setFinalX() : void
+setStageK(int) : void
+setStageX(int) : void
__
-butcher : const ButcherTableau &
-eq_ : DynamicEquation
-k : std::vector<Field>
-noise : std::optional<Field>
-stepper : const RungeKuttaStepper &
-x : const Variable &
-x0 : Field
}
enum "RKmethod" as C_0015559461378317421161
enum C_0015559461378317421161 {
HEUN
BOGACKI_SHAMPINE
CASH_KARP
FEHLBERG
DORMAND_PRINCE
}
class "ButcherTableau" as C_0014259824911774652212
class C_0014259824911774652212 {
{static} +get(RKmethod) : const ButcherTableau &
+isConsistent() const : bool
__
{static} +BogackiShampine : const ButcherTableau
{static} +CashKarp : const ButcherTableau
{static} +DormandPrince : const ButcherTableau
{static} +Fehlberg : const ButcherTableau
{static} +Heun : const ButcherTableau
+nodes : const std::vector<real>
+order1 : const int
+order2 : const int
+rkMatrix : const std::vector<std::vector<real>>
+weights1 : const std::vector<real>
+weights2 : const std::vector<real>
}
class "DynamicEquation" as C_0017651127052601681353
class C_0017651127052601681353 {
+grid() const : Grid
+ncomp() const : int
+system() const : std::shared_ptr<const System>
__
+noiseTerm : std::shared_ptr<FieldQuantity>
+rhs : std::shared_ptr<FieldQuantity>
+x : const Variable *
}
class "TimeSolver" as C_0007801327922661580961
class C_0007801327922661580961 {
+adaptTimeStep(real corr) : void
+disableAdaptiveTimeStep() : void
+enableAdaptiveTimeStep() : void
+equations() const : const std::vector<DynamicEquation> &
+getRungeKuttaMethod() : RKmethod
+hasAdaptiveTimeStep() const : bool
+headroom() const : real
+lowerBound() const : real
+maxError() const : real
+run(real duration) : void
+runwhile(std::function<bool ()>) : void
+sensibleFactor() const : real
+sensibleTimeStep() const : real
+sensibleTimestepDefault() const : real
+setEquations(std::vector<DynamicEquation> eq) : void
+setHeadroom(real headroom) : void
+setLowerBound(real lowerBound) : void
+setMaxError(real maxError) : void
+setRungeKuttaMethod(const std::string & method) : void
+setRungeKuttaMethod(RKmethod) : void
+setSensibleFactor(real factor) : void
+setSensibleTimestepDefault(real dt) : void
+setTime(real time) : void
+setTimeStep(real dt) : void
+setUpperBound(real upperBound) : void
+step() : void
+steps(unsigned int nsteps) : void
+time() const : real
+timestep() const : real
+upperBound() const : real
__
-eqs_ : std::vector<DynamicEquation>
-fixedTimeStep_ : bool
-headroom_ : real
-lowerBound_ : real
-maxError_ : real
-method_ : RKmethod
-sensibleFactor_ : real
-sensibleTimestepDefault_ : real
-stepper_ : std::unique_ptr<Stepper>
-time_ : real
-timestep_ : real
-upperBound_ : real
}
class "Relaxer" as C_0004731565546749197697
class C_0004731565546749197697 {
-calcEnergy() : real
-calcTorque(std::vector<FM_FieldQuantity>) : real
+exec() : void
-getEquation(const Magnet *) : std::vector<DynamicEquation>
-getTorque() : std::vector<FM_FieldQuantity>
__
-magnets_ : std::vector<const Magnet *>
-threshold_ : std::vector<real>
-timesolver_ : TimeSolver &
-tol_ : real
-world_ : const MumaxWorld *
}
C_0012141159885130425810 --> C_0007801327922661580961 : #solver_
C_0006522646547419731424 ..> C_0007801327922661580961
C_0006522646547419731424 ..> C_0015559461378317421161
C_0006522646547419731424 o-- C_0014259824911774652212 : -butcher_
C_0012141159885130425810 <|-- C_0006522646547419731424
C_0007748372366276514134 --+ C_0006522646547419731424
C_0007748372366276514134 --> C_0014259824911774652212 : -butcher
C_0007748372366276514134 --> C_0006522646547419731424 : -stepper
C_0007748372366276514134 o-- C_0017651127052601681353 : -eq_
C_0014259824911774652212 ..> C_0015559461378317421161
C_0014259824911774652212 --> C_0014259824911774652212 : +Heun
C_0014259824911774652212 --> C_0014259824911774652212 : +BogackiShampine
C_0014259824911774652212 --> C_0014259824911774652212 : +CashKarp
C_0014259824911774652212 --> C_0014259824911774652212 : +Fehlberg
C_0014259824911774652212 --> C_0014259824911774652212 : +DormandPrince
C_0007801327922661580961 o-- C_0017651127052601681353 : -eqs_
C_0007801327922661580961 o-- C_0012141159885130425810 : -stepper_
C_0007801327922661580961 o-- C_0015559461378317421161 : -method_
C_0004731565546749197697 ..> C_0017651127052601681353
C_0004731565546749197697 --> C_0007801327922661580961 : -timesolver_

'Generated with clang-uml, version 0.6.2
'LLVM version clang version 19.1.7 (https://github.com/conda-forge/clangdev-feedstock 3c5e7de432e909e225d8040e72a44724afb0c446)
@enduml