• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

PolyMathOrg / PolyMath / 4385132063

pending completion
4385132063

push

github

GitHub
Merge pull request #316 from jecisc/divers-cleanings

2977 of 2977 new or added lines in 214 files covered. (100.0%)

19725 of 24212 relevant lines covered (81.47%)

2.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/Math-ODE/PMSymplecticSystem.class.st
1
"
2
Description
3

4
This concept describes how to define a symplectic system written with generalized coordinate q and generalized momentum p:
5

6
q'(t) = f(p)
7

8
p'(t) = g(q)
9

10
Such a situation is typically found for Hamiltonian systems with a separable Hamiltonian:
11

12
H(p,q) = Hkin(p) + V(q)
13

14
which gives the equations of motion:
15

16
q'(t) = dHkin / dp = f(p)
17

18
p'(t) = dV / dq = g(q)
19

20
The algorithmic implementation of this situation is described by a pair of callable objects for f and g with a specific parameter signature. Such a system should be implemented as a std::pair of functions or a functors. Symplectic systems are used in symplectic steppers like symplectic_rkn_sb3a_mclachlan. 
21
"
22
Class {
23
        #name : #PMSymplecticSystem,
24
        #superclass : #PMODESystem,
25
        #instVars : [
26
                'dqdt',
27
                'firstBlock',
28
                'dpdt',
29
                'secondBlock'
30
        ],
31
        #category : #'Math-ODE'
32
}
33

34
{ #category : #accessing }
35
PMSymplecticSystem >> dpdt [
×
36
        ^ dpdt
×
37
]
×
38

39
{ #category : #accessing }
40
PMSymplecticSystem >> dpdt: anObject [
×
41
        dpdt := anObject
×
42
]
×
43

44
{ #category : #accessing }
45
PMSymplecticSystem >> dqdt [
×
46
        ^ dqdt
×
47
]
×
48

49
{ #category : #accessing }
50
PMSymplecticSystem >> dqdt: anObject [
×
51
        dqdt := anObject
×
52
]
×
53

54
{ #category : #evaluation }
55
PMSymplecticSystem >> first: pState [
×
56
        dqdt := firstBlock value: pState.
×
57
        ^ dqdt
×
58
]
×
59

60
{ #category : #accessing }
61
PMSymplecticSystem >> firstBlock [
×
62
        ^ firstBlock
×
63
]
×
64

65
{ #category : #accessing }
66
PMSymplecticSystem >> firstBlock: anObject [
×
67
        firstBlock := anObject
×
68
]
×
69

70
{ #category : #evaluation }
71
PMSymplecticSystem >> second: qState [
×
72
        dpdt := secondBlock value: qState.
×
73
        ^ dpdt
×
74
]
×
75

76
{ #category : #accessing }
77
PMSymplecticSystem >> secondBlock [
×
78
        ^ secondBlock
×
79
]
×
80

81
{ #category : #accessing }
82
PMSymplecticSystem >> secondBlock: anObject [
×
83
        secondBlock := anObject
×
84
]
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc