Skip to content

Commit 6def635

Browse files
committed
Fix formatting
1 parent d549653 commit 6def635

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

mwes/mwe_04.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,5 +34,5 @@ function Base.show(io::IO, vs::VSMSettings)
3434
end
3535
print(io, replace(repr(vs.solver_settings), "\n" => "\n "))
3636
end
37-
vs = VSMSettings()
37+
# vs = VSMSettings()
3838

src/VortexStepMethod.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ using Pkg
2121
using DifferentiationInterface
2222
import SciMLBase: successful_retcode
2323
import YAML
24-
import Base: show
2524

2625
# Export public interface
26+
export VSMSettings, WingSettings, SolverSettings, vs
2727
export Wing, Section, RamAirWing, init!
2828
export BodyAerodynamics
2929
export Solver, solve, solve_base!, solve!, VSMSolution, linearize

src/settings.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
filename = "vsm_settings.yaml"
22
data = YAML.load_file(joinpath(dirname(dirname(pathof(VortexStepMethod))), "data", filename))
33

4-
@Base.kwdef mutable struct WingSettings
4+
@with_kw mutable struct WingSettings
55
name::String = "main_wing"
66
n_panels::Int64 = 40
77
n_groups::Int64 = 40
@@ -10,7 +10,7 @@ data = YAML.load_file(joinpath(dirname(dirname(pathof(VortexStepMethod))), "data
1010
remove_nan = true
1111
end
1212

13-
@Base.kwdef mutable struct SolverSettings
13+
@with_kw mutable struct SolverSettings
1414
aerodynamic_model_type::String = "VSM"
1515
max_iterations::Int64 = 1000
1616
end
@@ -20,6 +20,12 @@ end
2020
solver_settings::SolverSettings = SolverSettings()
2121
end
2222

23+
const VSM_SETTINGS = VSMSettings()
24+
25+
function vs()
26+
VSM_SETTINGS
27+
end
28+
2329
function Base.show(io::IO, vs::VSMSettings)
2430
println(io, "VSMSettings:")
2531
for wing in vs.wings

0 commit comments

Comments
 (0)