Skip to content

Commit dfc0df1

Browse files
Quarantine: DO NOT EVER MERGE!
1 parent 05b9d15 commit dfc0df1

3 files changed

Lines changed: 477 additions & 324 deletions

File tree

examples/tutorial4.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,9 @@ mesh_transition2 = MeshTransition(
322322

323323
# Define runtime options
324324
opts = (
325-
force_remesh = false, # Force remeshing
325+
force_remesh = true, # Force remeshing
326326
force_overwrite = true, # Overwrite existing files
327-
plot_field_maps = false, # Do not compute/ plot field maps
327+
plot_field_maps = true, # Do not compute/ plot field maps
328328
mesh_only = false, # Preview the mesh
329329
save_path = fullfile("fem_output"), # Results directory
330330
keep_run_files = true, # Archive files after each run

setup_env.jl

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
2+
using Pkg, Dates
3+
4+
# -------- sources --------
5+
lcm_url = "https://github.com/Electa-Git/LineCableModels.jl"
6+
lcm_rev = "dev/thermal"
7+
getdp_url = "https://github.com/Electa-Git/GetDP.jl"
8+
getdp_rev = "473dece8e9bdb614990f611cac346d10984cfd25"
9+
# -------------------------
10+
11+
Pkg.activate()
12+
13+
# 1) Remove from manifest (works even when not in Project.toml)
14+
for name in ("GetDP", "LineCableModels")
15+
try
16+
Pkg.rm(name; mode = Pkg.PKGMODE_MANIFEST)
17+
catch err
18+
@warn "Pkg.rm failed (ok if not present)" name err
19+
end
20+
end
21+
22+
# 2) GC immediately
23+
try
24+
Pkg.gc(; collect_delay = Day(0))
25+
catch err
26+
@warn "Pkg.gc failed (non-fatal)" err
27+
end
28+
29+
# 3) Delete depot caches (sources + compiled) for these two packages
30+
jver = "v$(VERSION.major).$(VERSION.minor)"
31+
32+
for depot in DEPOT_PATH
33+
# Sources / dev checkouts
34+
for p in (
35+
joinpath(depot, "packages", "GetDP"),
36+
joinpath(depot, "packages", "LineCableModels"),
37+
joinpath(depot, "dev", "GetDP"),
38+
joinpath(depot, "dev", "LineCableModels"),
39+
)
40+
if ispath(p)
41+
rm(p; force = true, recursive = true)
42+
println("rm -rf ", p)
43+
end
44+
end
45+
46+
# Compiled caches
47+
compdir = joinpath(depot, "compiled", jver)
48+
if isdir(compdir)
49+
for (root, _, files) in walkdir(compdir)
50+
for f in files
51+
if startswith(f, "GetDP") || startswith(f, "LineCableModels")
52+
fp = joinpath(root, f)
53+
rm(fp; force = true)
54+
println("rm ", fp)
55+
end
56+
end
57+
end
58+
end
59+
end
60+
61+
# 4) Re-add: pinned GetDP + LineCableModels, then rebuild
62+
Pkg.add(PackageSpec(url = getdp_url, rev = getdp_rev))
63+
Pkg.add(PackageSpec(url = lcm_url, rev = lcm_rev))
64+
65+
66+
Pkg.resolve()
67+
Pkg.instantiate()
68+
Pkg.precompile()
69+
70+
# 5) Verify the resolved GetDP source (truth)
71+
Pkg.status("GetDP")
72+
println(only([i for (u, i) in Pkg.dependencies() if i.name == "GetDP"]).source)

0 commit comments

Comments
 (0)