From ff85c401139ff9e299bdb6a232150398d12b8869 Mon Sep 17 00:00:00 2001 From: hyrodium Date: Wed, 12 Jul 2023 19:00:57 +0900 Subject: [PATCH] add a new method to show_strain --- src/_elasticity.jl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/_elasticity.jl b/src/_elasticity.jl index 543d817..c67b33a 100644 --- a/src/_elasticity.jl +++ b/src/_elasticity.jl @@ -70,6 +70,31 @@ function show_strain(D::Tuple{ClosedInterval{<:Real}, ClosedInterval{<:Real}}; i return end +""" + show_strain(domains; index=0) + +Show the predicted maximum strain and, if possible, also the computed strain with the given index. +""" +function show_strain(domains::Vector{<:Tuple{ClosedInterval{<:Real}, ClosedInterval{<:Real}}}; index = 0) + msg = "" + for domain in domains + minE, maxE = _predict_minmax_strain(domain) + + D₁, D₂ = domain + msg *= "Strain - domain: " * repr([endpoints(D₁)...]) * "×" * repr([endpoints(D₂)...]) * "\n" + msg *= " Predicted: (min: $(minE), max: $(maxE))\n" + end + + # if isTheShapeComputed() + # M = loadM(index=index) + # minE, maxE = _compute_minmax_strain(M) + # msg *= "Computed: (min: $(minE), max: $(maxE))\n" + # end + + @info msg + + return +end # Elastic Modulus function C(i, j, k, l, g⁻)