Hi,
I want to track the load steps in my code using gridap but i got operation cell field out of this code and I cant get the values. Is this way right to implement this? Also I added this print lines to check the process but I couldnt get any print notifications out of it.
function new_EnergyStateit(ψPlusPrev_in, ψhPos_in, current_step,last_update)
ψPlus_in = ψhPos_in
if ψPlus_in >= ψPlusPrev_in
last_update = current_step
println("Updated at step $current_step, last_update set to $last_update")
else
println("No update at step $current_step, last_update remains $last_update")
end
return last_update
end
I used this function as below
update_steps = []
last_update = 1.0 # Tracks the last update step
while vApp <= vAppMax
count = count + 1
ψhPos_in = (ψPos∘(ε(uh)))
current_step= count
last_update = new_EnergyStateit∘(ψPlusPrev, ψhPos_in, current_step,last_update)
update_state!( new_EnergyState ,ψPlusPrev ,ψhPos_in)
end
push!(update_steps,last_update)
in this case the output for update_steps is
50-element Vector{Any}:
new_EnergyStateit ∘ (CellState(), OperationCellField(), 1, 1.0)
new_EnergyStateit ∘ (CellState(), OperationCellField(), 2, new_EnergyStateit ∘ (CellState(), OperationCellField(), 2, new_EnergyStateit ∘ (CellState(), OperationCellField(), 2, new_EnergyStateit ∘ (CellState(), OperationCellField(), 2, new_EnergyStateit ∘ (CellState(), OperationCellField(), 1, 1.0)))))
.
.
.