Skip to content

Commit 60ec2e1

Browse files
committed
fix bug for linearly combined T
1 parent 47d9bf3 commit 60ec2e1

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/Setup_geometry.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1583,7 +1583,7 @@ function addSlab!(Phase, Temp, Grid::AbstractGeneralGrid, trench::Trench;
15831583
if isa(T, LinearWeightedTemperature)
15841584
l_decouplingind = findall(Top[:,2].<=-trench.d_decoupling);
15851585
l_decoupling = Top[l_decouplingind[1],1];
1586-
temp.crit_dist = l_decoupling;
1586+
T.crit_dist = l_decoupling;
15871587
end
15881588

15891589
# Compute thermal structure accordingly. See routines below for different options {Future: introducing the length along the trench for having lateral varying properties along the trench}
@@ -1602,7 +1602,6 @@ function addSlab!(Phase, Temp, Grid::AbstractGeneralGrid, trench::Trench;
16021602

16031603
ind = findall( (0.0 .<= d_weakzone .<= trench.WeakzoneThickness) .& (Z .>-trench.d_decoupling) );
16041604
Phase[ind] .= trench.WeakzonePhase
1605-
@info "added weak zone for " length(ind)
16061605
end
16071606

16081607
return nothing

test/test_setup_geometry.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ T_slab = LinearWeightedTemperature(crit_dist=600, F1=TsHC, F2=TsMK);
263263
phase = LithosphericPhases(Layers=[5 7 88], Phases = [2 3 4], Tlab=nothing)
264264
t1 = Trench(Start = (400.0,400.0), End = (800.0,800.0),θ_max = 90.0, direction = 1.0, n_seg = 50, L0 = 600.0, D0 = 80.0, Lb = 500.0,d_decoupling = 100.0, type_bending =:Ribe, WeakzoneThickness=10, WeakzonePhase=9)
265265

266-
addSlab!(Phase,Temp,Cart, t1, phase=phase, T = TsHC)
267-
@test Temp[84,84,110] 713.1083054586794
266+
addSlab!(Phase,Temp,Cart, t1, phase=phase, T = T_slab)
267+
@test Temp[84,84,110] 718.8406936737412
268268

269269
Data_Final = CartData(X,Y,Z,(Phase=Phase,Temp=Temp))

0 commit comments

Comments
 (0)