Skip to content

Commit

Permalink
Update cavity convergence script for Palace
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiangrimberg committed Aug 23, 2023
1 parent ca3fc32 commit 6a00ee1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/cavity/cavity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,8 @@ function solve_cavity_resonator(
# println(log_file)

# Search through for the DOF count
start_ind = findfirst("number of global unknowns: ", log_file)[end]
end_ind = findfirst("\n", log_file[start_ind:end])[1]
start_ind = findfirst("ND: ", log_file)[end]
end_ind = findfirst(",", log_file[start_ind:end])[1]
dof = parse(Int, filter(isdigit, log_file[start_ind:(start_ind + end_ind)]))

# Extract the top two frequency modes
Expand Down Expand Up @@ -259,7 +259,7 @@ function generate_cavity_convergence_data(;
push!(dof, eltype(dof)())
push!(f_TM_010, eltype(f_TM_010)())
push!(f_TE_111, eltype(f_TE_111)())
ref_lower = (p == 1 && mesh_type == 2) ? max(1, ref_min) : ref_min
ref_lower = ref_min
ref_upper = (p > 3) ? min(3, ref_max) : ref_max
for ref = ref_lower:ref_upper
print("p = ", p, ", ref = ", ref, ": ")
Expand Down

0 comments on commit 6a00ee1

Please sign in to comment.