File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change 1
1
name = " Oceananigans"
2
2
uuid = " 9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
3
3
authors = [" Climate Modeling Alliance and contributors" ]
4
- version = " 0.96.28 "
4
+ version = " 0.96.29 "
5
5
6
6
[deps ]
7
7
Adapt = " 79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Original file line number Diff line number Diff line change 1
1
using Oceananigans. Grids: NegativeZDirection, validate_unit_vector
2
+ using Adapt
2
3
3
4
struct BuoyancyForce{M, G}
4
5
formulation :: M
5
6
gravity_unit_vector :: G
6
7
end
7
8
9
+ Adapt. adapt_structure (to, bf:: BuoyancyForce ) =
10
+ BuoyancyForce (adapt (to, bf. formulation),
11
+ adapt (to, bf. gravity_unit_vector))
12
+
8
13
"""
9
14
BuoyancyForce(formulation; gravity_unit_vector=NegativeZDirection())
10
15
@@ -44,7 +49,6 @@ function BuoyancyForce(formulation; gravity_unit_vector=NegativeZDirection())
44
49
return BuoyancyForce (formulation, gravity_unit_vector)
45
50
end
46
51
47
-
48
52
@inline ĝ_x (bf) = @inbounds - bf. gravity_unit_vector[1 ]
49
53
@inline ĝ_y (bf) = @inbounds - bf. gravity_unit_vector[2 ]
50
54
@inline ĝ_z (bf) = @inbounds - bf. gravity_unit_vector[3 ]
You can’t perform that action at this time.
0 commit comments