@@ -8,11 +8,14 @@ using MPIMagneticFields
8
8
using SphericalHarmonicExpansions
9
9
using MPIFiles
10
10
11
+ export MagneticFieldCoefficients
12
+
13
+ # Spherical harmonic coefficients describing a magnetic field
11
14
mutable struct MagneticFieldCoefficients
12
- coeffs:: Array{SphericalHarmonicCoefficients,2}
13
- radius:: Float64
14
- center:: Vector{Float64}
15
- ffp:: Union{Array{Float64,2},Nothing}
15
+ coeffs:: Array{SphericalHarmonicCoefficients,2} # coefficients
16
+ radius:: Float64 # radius of measured sphere
17
+ center:: Vector{Float64} # center of measured sphere
18
+ ffp:: Union{Array{Float64,2},Nothing} # field-free-point (if available)
16
19
17
20
function MagneticFieldCoefficients (coeffs:: Array{SphericalHarmonicCoefficients,2} , radius:: Float64 ,
18
21
center:: Vector{Float64} , ffp:: Union{Array{Float64,2},Nothing} )
94
97
"""
95
98
function magneticField (tDesign:: SphericalTDesign , field:: Union{AbstractArray{T,2},AbstractArray{T,3}} ,
96
99
x:: Variable , y:: Variable , z:: Variable ;
97
- L:: Int = Int ( floor (tDesign. T/ 2 ) ),
100
+ L:: Int = floor (Int, tDesign. T/ 2 ),
98
101
calcSolid:: Bool = true ) where T <: Real
99
102
100
103
# get tDesign positions [m] and removing the unit
@@ -208,4 +211,4 @@ MPIMagneticFields.value(field::SphericalHarmonicDefinedField, r) = [MPIMagneticF
208
211
209
212
selectPatch (field:: SphericalHarmonicDefinedField , patchNum) = field. patch = patchNum
210
213
211
- end
214
+ end
0 commit comments