Skip to content

Commit

Permalink
code cleaning
Browse files Browse the repository at this point in the history
  • Loading branch information
CWillberg committed Aug 15, 2024
1 parent 72b824c commit 4904d6c
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/Compute/compute_global_values.jl
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,7 @@ function global_value_max(
dof::Union{Int64,Vector{Int64}},
nodes::Union{SubArray,Vector{Int64}},
)
# returnValue = zeros(length(field[1, :]))
# for iID in eachindex(field[1, :])
# returnValue[iID] = maximum(field[nodes, iID])
# end
# return returnValue

return maximum(field[nodes, dof])
end

Expand All @@ -165,11 +161,6 @@ function global_value_min(
nodes::Union{SubArray,Vector{Int64}},
)

# returnValue = zeros(length(field[1, :]))
# for iID in eachindex(field[1, :])
# returnValue[iID] = minimum(field[nodes, iID])
# end
# return returnValue
return minimum(field[nodes, dof])
end

Expand All @@ -191,10 +182,5 @@ function global_value_avg(
nodes::Union{SubArray,Vector{Int64}},
)

# returnValue = zeros(length(field[1, :]))
# for iID in eachindex(field[1, :])
# returnValue[iID] = sum(field[nodes, iID]) / length(nodes)
# end
# return returnValue
return sum(field[nodes, dof]) / length(nodes)
end

0 comments on commit 4904d6c

Please sign in to comment.