Skip to content

Commit 2bd03c9

Browse files
committed
- Require Modia 0.9.1 + replaced @usingPlotPackage by @usingModiaPlot
1 parent 388cc3d commit 2bd03c9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+77
-88
lines changed

Manifest.toml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
6565

6666
[[deps.BandedMatrices]]
6767
deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"]
68-
git-tree-sha1 = "13223ec65172b18f164e8a8338e4e95d40d54c8c"
68+
git-tree-sha1 = "0227886a3141dfbb9fab5bfbf2133ac57677c1f9"
6969
uuid = "aae01518-5342-5314-be14-df237901396f"
70-
version = "0.17.2"
70+
version = "0.17.3"
7171

7272
[[deps.Base64]]
7373
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
@@ -603,9 +603,9 @@ uuid = "a63ad114-7e13-5084-954f-fe012c677804"
603603

604604
[[deps.Modia]]
605605
deps = ["DataFrames", "DiffEqBase", "DifferentialEquations", "FiniteDiff", "ForwardDiff", "InteractiveUtils", "JSON", "LinearAlgebra", "Measurements", "ModiaBase", "MonteCarloMeasurements", "OrderedCollections", "Printf", "RecursiveFactorization", "Reexport", "SignalTables", "StaticArrays", "Sundials", "Test", "TimerOutputs", "Unitful"]
606-
git-tree-sha1 = "6b9fd66ea84883eb9a03666fc3bdb360d4b86d32"
606+
git-tree-sha1 = "3740b2a8f0813a7ef12ad9785c3920eeb3216b9e"
607607
uuid = "cb905087-75eb-5f27-8515-1ce0ec8e839e"
608-
version = "0.9.0"
608+
version = "0.9.1"
609609

610610
[[deps.ModiaBase]]
611611
deps = ["DataFrames", "DiffRules", "Measurements", "MonteCarloMeasurements", "OrderedCollections", "StaticArrays", "Unitful"]
@@ -698,9 +698,9 @@ version = "6.18.1"
698698

699699
[[deps.PDMats]]
700700
deps = ["LinearAlgebra", "SparseArrays", "SuiteSparse"]
701-
git-tree-sha1 = "ca433b9e2f5ca3a0ce6702a032fce95a3b6e1e48"
701+
git-tree-sha1 = "9351c1a6c0e922cc862bd96822a98c9029a6d142"
702702
uuid = "90014a1f-27ba-587c-ab20-58faa44d9150"
703-
version = "0.11.14"
703+
version = "0.11.15"
704704

705705
[[deps.Parameters]]
706706
deps = ["OrderedCollections", "UnPack"]
@@ -895,9 +895,9 @@ uuid = "1a1011a3-84de-559e-8e89-a11a2f7dc383"
895895

896896
[[deps.SignalTables]]
897897
deps = ["DataFrames", "JSON", "OrderedCollections", "Pkg", "Tables", "Test", "Unitful"]
898-
git-tree-sha1 = "cc3aa097670199d3eb1424d69b393844a916edc8"
898+
git-tree-sha1 = "ddd51e545dc084c588ca158d773452218fdf0e9a"
899899
uuid = "3201582d-3078-4276-ba5d-0a1254d79d7c"
900-
version = "0.3.4"
900+
version = "0.3.5"
901901

902902
[[deps.SimpleTraits]]
903903
deps = ["InteractiveUtils", "MacroTools"]

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ HTTP = "0.9"
1212
JSON = "0.21"
1313
Measurements = "2"
1414
MeshIO = "0.4.10"
15-
Modia = "0.9.0"
15+
Modia = "0.9.1"
1616
MonteCarloMeasurements = "1"
1717
OrderedCollections = "1"
1818
Reexport = "1.0"

docs/src/index.md

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ Modia3D has various *3D animation features*:
5454

5555
## Faster Startup
5656

57-
In order to speed up startup, it is adviced to generate a sysimage by executing the following commands:
57+
In order to speed up startup a sysimage can be generated by executing the following commands:
5858

5959
```julia
6060
julia
@@ -96,30 +96,14 @@ julia -JModia3D_sysimage.so (otherwise)
9696

9797
### Version 0.11.0
9898

99-
- Requires Modia 0.9.0 or later.
99+
- Requires Modia 0.9.1 or later.
100100

101101
- Additional keyword arguments of Object3D: `Object3D(..., fixedInParent=true, velocity=[0.0, 0.0, 0.0], angularVelocity=[0.0, 0.0, 0.0])`,
102102
besides the existing `parent, translation, rotation, feature`. A freely moving Object3D is defined with
103103
`Object3D(..., fixedInParent=false, ...)`, where `velocity=.., angularVelocity=..`
104-
are the initial conditions (resolved in the parent frame). The states and other code for such Object3Ds are
105-
*not* part of the generated code (so compilation is faster, and the objects can be changed after code generation).\
106-
If `fixedToParent=false`, vectors `translation, rotation, velocity, angularVelocity` (all resolved in `parent`)
107-
are used as states and are available in the result for plotting.
108-
`rotation` is vector `[angleX, angleY, angleZ]` to rotate the parent coordinate system
109-
along the x-axis with `angleX`, the y-axis with `angleY` and the z-axis with `angleZ` to arrive at the Object3D
110-
coordinate system. If `rotation[2]` is close to its singular position (= 90u"°" or -90u"°"),
111-
an event is triggered and the rotation sequence is changed from `[angleX, angleY, angleZ]` to `[angleX, angleZ, angleY]`.
112-
In the new rotation sequence, `rotation[2]` is far from its singular position at this time instant.
113-
Variable `rotationXYZ::Bool` in the result signals whether rotation is defined with rotation
114-
sequence `[angleX, angleY, angleZ]` (`rotationXYZ=true`) or with rotation sequence
115-
`[angleX, angleZ, angleY]` (`rotationXYZ=false`). See, example `Modia3D/test/Basic/ShaftFreeMotionAdaptiveRotSequence.jl`.
116-
Note, the initial conditions (so `rotation=...` as key/value pair in the Object3D constructor)
117-
are always with `rotationXYZ=true`.\
118-
With respect to an approach where the rotation is described with *quaternions*, the
119-
adaptive rotation sequence handling has the benefits, that (1) all integrators can be used
120-
(a quaternion description works with an overdetermined set of states and therefore standard
121-
integrators with step size control need code changes) and that (2) integrators with step size control can usually
122-
perform larger steps.
104+
are the initial conditions (resolved in the parent frame). For more details, see [`Object3D`](@ref).\
105+
The states and other code for such Object3Ds are *not* part of the generated code
106+
(so compilation is faster, and the objects can be changed after code generation).
123107

124108
- The `FreeMotion` joints in all test models have been removed and replaced by Object3Ds with `fixedInParent=false`.
125109
A new test model test/Basic/FreeShaftAdaptiveRotSequenceWithFreeMotion.jl has been introduced with a `FreeMotion`

docs/src/tutorial/CollisionHandling.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ BouncingSphere = Model3D(
3131
bouncingSphere = @instantiateModel(BouncingSphere, unitless=true)
3232
simulate!(bouncingSphere, stopTime=2.2, dtmax=0.1)
3333
34-
@usingPlotPackage
34+
@usingModiaPlot
3535
plot(bouncingSphere, "sphere.translation", figure=1)
3636
3737
end

docs/src/tutorial/GettingStarted.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Pendulum = Model3D(
2525
pendulum = @instantiateModel(Pendulum, unitless=true)
2626
simulate!(pendulum, stopTime=3.0)
2727

28-
@usingPlotPackage # use the plot package defined by ENV["MODIA_PLOT"]
28+
@usingModiaPlot # use the plot package defined by ENV["MODIA_PLOT"]
2929
plot(pendulum, "rev.phi")
3030

3131
end
@@ -66,7 +66,7 @@ Pendulum = Model3D(
6666
pendulum = @instantiateModel(Pendulum, unitless=true)
6767
simulate!(pendulum, stopTime=3.0)
6868

69-
@usingPlotPackage
69+
@usingModiaPlot
7070
plot(pendulum, "rev.phi")
7171

7272
end
@@ -114,7 +114,7 @@ Pendulum = Model3D(
114114
pendulum = @instantiateModel(Pendulum, unitless=true)
115115
simulate!(pendulum, stopTime=3.0)
116116

117-
@usingPlotPackage
117+
@usingModiaPlot
118118
plot(pendulum, "rev.phi")
119119

120120
end

src/Composition/object3D.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,13 @@ If `rotation[2]` is close to its singular position (= 90u"°" or -90u"°"), an e
8282
`[angleX, angleZ, angleY]`. In the new rotation sequence, `rotation[2]` is far from its singular position at this time instant. Variable `rotationXYZ::Bool` in the result
8383
signals whether `rotation` is defined with rotation sequence `[angleX, angleY, angleZ]` (`rotationXYZ=true`) or with rotation sequence `[angleX, angleZ, angleY]` (`rotationXYZ=false`).
8484
See, example `Modia3D/test/Basic/ShaftFreeMotionAdaptiveRotSequence.jl`.
85+
The initial conditions (so `rotation=...` as key/value pair in the Object3D constructor) are always with `rotationXYZ=true`.\
8586
86-
87+
With respect to an approach where the rotation is described with *quaternions*, the
88+
adaptive rotation sequence handling has the benefit that all integrators can be used
89+
(a quaternion description works with an overdetermined set of states and therefore standard
90+
integrators with step size control need non-trivial code changes).
91+
8792
# Example
8893
8994
```julia

test/Basic/BouncingSphere3D.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ requiredFinalStates = [-1.1158498420134682e-7, 0.09999999283736953, 1.9605796328
2626
simulate!(bouncingSphere, stopTime=2.2, dtmax=0.1, log=true, logStates=true, requiredFinalStates=requiredFinalStates)
2727
showInfo(bouncingSphere)
2828

29-
@usingPlotPackage
29+
@usingModiaPlot
3030
plot(bouncingSphere, ["sphere.translation", "sphere.velocity", "sphere.rotationXYZ"], figure=1)
3131

3232
end

test/Basic/BoxPlanarMotion.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ stopTime = 4.0
2222
requiredFinalStates = [1.0, 3.0, -2.0, -1.0, 3.0, 12.0]
2323
simulate!(model, stopTime=stopTime, log=true, logStates=true, requiredFinalStates=requiredFinalStates)
2424

25-
@usingPlotPackage
25+
@usingModiaPlot
2626
plot(model, ["prismatic_x.s", "prismatic_y.s", "revolute_z.phi"], figure=1)
2727

2828
end

test/Basic/DoublePendulumWithDampers.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ tolerance = 1.0e-8
5050
requiredFinalStates = [-0.9608496178685947, 1.0258202272580021, -6.0828664801544345, -0.11676963250128454]
5151
simulate!(doublePendulum, stopTime=stopTime, tolerance=tolerance, log=true, logStates=false, requiredFinalStates=requiredFinalStates)
5252

53-
@usingPlotPackage
53+
@usingModiaPlot
5454
plot(doublePendulum, [("rev1.phi", "rev2.phi"), ("rev1.w", "rev2.w")])
5555

5656
end

test/Basic/FreeShaft.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ stopTime = 5.0
3131
requiredFinalStates=[0.0, 0.5, -0.75, 0.0, 0.1, -0.9, 12.518049845080435, -0.901864379852841, 13.979844149553378, -1.556318674959713, 1.9667313208626755, 2.776623306112369]
3232
simulate!(shaft, stopTime=stopTime, log=true, logStates=false, requiredFinalStates=requiredFinalStates)
3333

34-
@usingPlotPackage
34+
@usingModiaPlot
3535
plot(shaft, ["shaft.shaft.translation", "shaft.shaft.rotation", "shaft.shaft.velocity", "shaft.shaft.angularVelocity"], figure=1)
3636

3737
end

0 commit comments

Comments
 (0)