Skip to content
Open

print #230

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ GridapGmsh = "3025c34a-b394-11e9-2a55-3fee550c04c8"
GridapSolvers = "6d3209ee-5e3c-4db7-a716-942eb12ed534"
IterativeSolvers = "42fd0dbc-a981-5370-80f2-aaf504508153"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
WriteVTK = "64499a7a-5c06-52f2-abe2-ccb03c286192"

Expand All @@ -35,6 +36,7 @@ GridapSolvers = "0.6, 0.7"
IterativeSolvers = "0.9"
LinearAlgebra = "1.10"
PartitionedArrays = "≥0.3"
Printf = "1.11.0"
Comment thread
miguelmaso marked this conversation as resolved.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Printf = "1.11.0"
Printf = "1.10"

StaticArrays = "1.9"
WriteVTK = "1.21"
julia = "1.10"
1 change: 1 addition & 0 deletions src/ComputationalModels/ComputationalModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ using GridapSolvers.SolverInterfaces: finished, print_message, converged

using LinearAlgebra
using WriteVTK
using Printf

using GridapGmsh
using GridapGmsh: GmshDiscreteModel
Expand Down
10 changes: 5 additions & 5 deletions src/ComputationalModels/Drivers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ function solve!(m::StaggeredModel;
flagconv = 1 # convergence flag 0 (max bisections) 1 (max steps)
∆τ = 1.0 / nsteps
for τ in 0:nsteps-1
println("*******************************************")
println(" Staggered Step: ")
println("*******************************************")
printstyled(@sprintf("*******************************************\n"), color=:green, bold=true)
printstyled(@sprintf(" Staggered Step: %i \n", τ), color=:green, bold=true)
printstyled(@sprintf("*******************************************\n"), color=:green, bold=true)
presolver(τ, ∆τ)
τ⁻=evolτ(τ*∆τ)
τ⁺=evolτ((τ+1)*∆τ)
Expand Down Expand Up @@ -177,7 +177,7 @@ function solve!(m::StaticNonlinearModel;
nbisect += 1
# @assert(nbisect <= stepping[:maxbisec], "Maximum number of bisections reached")
else
print_message(nls.log, "\nSTEP: $Λ_, Λ: \n")
print_message(nls.log, sprint(io -> printstyled(io, @sprintf("\nSTEP: %i, Λ: %.3f\n", Λ_, Λ); color=:green, bold=true)))
Λ_ += 1
# Write to PVD
post(Λ)
Expand Down Expand Up @@ -353,7 +353,7 @@ function solve!(m::DynamicNonlinearModel;

update_velocity!(m.velocity.vh, x, x⁻, Δt)
x⁻ .= x
print_message(nls.log, "\nStep: $itime, Time: $t\n")
print_message(nls.log, sprint(io -> printstyled(io, @sprintf("\nStep: %i, Time: %.3f s\n", itime, t); color=:green, bold=true)))
post(t)


Expand Down
Loading