Skip to content

Commit 2abac75

Browse files
fix(FEMTools): add default value for getdp_executable in OptSet wrapper function
1 parent bda2d42 commit 2abac75

1 file changed

Lines changed: 25 additions & 2 deletions

File tree

src/FEMTools.jl

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ using ..Materials
2828
using ..EarthProps
2929
using ..DataModel
3030
using ..Core
31-
import ..LineCableModels: FormulationSet
31+
import ..LineCableModels: FormulationSet, OptSet
3232

3333
# Module-specific dependencies
3434
using Gmsh
@@ -463,7 +463,7 @@ struct FEMOptions <: FormulationOptions
463463
force_overwrite::Bool=false,
464464
plot_field_maps::Bool=true,
465465
keep_run_files::Bool=false,
466-
base_path::String="./fem_output",
466+
base_path::String=joinpath(".", "fem_output"),
467467
getdp_executable::Union{String,Nothing}=nothing,
468468
verbosity::Int=0,
469469
logfile::Union{String,Nothing}=nothing
@@ -483,6 +483,29 @@ struct FEMOptions <: FormulationOptions
483483
end
484484
end
485485

486+
# Wrapper function to create a FEMOptions
487+
function OptSet(; mesh_only::Bool,
488+
force_remesh::Bool,
489+
force_overwrite::Bool,
490+
plot_field_maps::Bool,
491+
keep_run_files::Bool,
492+
base_path::String,
493+
getdp_executable::Union{String,Nothing}=nothing,
494+
verbosity::Int,
495+
logfile::Union{String,Nothing}=nothing,
496+
)
497+
return FEMOptions(; mesh_only=mesh_only,
498+
force_remesh=force_remesh,
499+
force_overwrite=force_overwrite,
500+
plot_field_maps=plot_field_maps,
501+
keep_run_files=keep_run_files,
502+
base_path=base_path,
503+
getdp_executable=getdp_executable,
504+
verbosity=verbosity,
505+
logfile=logfile
506+
)
507+
end
508+
486509
"""
487510
$(TYPEDEF)
488511

0 commit comments

Comments
 (0)