Skip to content

Commit 706408d

Browse files
authored
Merge pull request #60 from MultiSimOLab/piola2
2 parents 9096171 + 2c76504 commit 706408d

File tree

2 files changed

+4
-18
lines changed

2 files changed

+4
-18
lines changed

src/ComputationalModels/PostProcessors.jl

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -78,30 +78,16 @@ end
7878

7979
function Piola(physmodel::ThermoElectroMechano,kine::NTuple{3,KinematicModel}, uh, φh, θh, Ω, dΩ, Λ=1.0)
8080
= physmodel(Λ)
81-
8281
F, _, _ = get_Kinematics(kine[1])
8382
E = get_Kinematics(kine[2])
8483
∂Ψu = DΨ[2]
85-
refL2 = ReferenceFE(lagrangian, Float64, 0)
86-
ref = ReferenceFE(lagrangian, Float64, 1)
87-
VL2 = FESpace(Ω, refL2, conformity=:L2)
88-
V = FESpace(Ω, ref, conformity=:H1)
89-
n1 = VectorValue(1.0, 0.0, 0.0)
90-
n2 = VectorValue(0.0, 1.0, 0.0)
91-
n3 = VectorValue(0.0, 0.0, 1.0)
92-
σ11h = interpolate_everywhere(L2_Projection(n1 ((∂Ψu (F((uh)'), E((φh)), θh)) * n1), dΩ, VL2), V)
93-
σ12h = interpolate_everywhere(L2_Projection(n1 ((∂Ψu (F((uh)'), E((φh)), θh)) * n2), dΩ, VL2), V)
94-
σ13h = interpolate_everywhere(L2_Projection(n1 ((∂Ψu (F((uh)'), E((φh)), θh)) * n3), dΩ, VL2), V)
95-
σ22h = interpolate_everywhere(L2_Projection(n2 ((∂Ψu (F((uh)'), E((φh)), θh)) * n2), dΩ, VL2), V)
96-
σ23h = interpolate_everywhere(L2_Projection(n2 ((∂Ψu (F((uh)'), E((φh)), θh)) * n3), dΩ, VL2), V)
97-
σ33h = interpolate_everywhere(L2_Projection(n3 ((∂Ψu (F((uh)'), E((φh)), θh)) * n3), dΩ, VL2), V)
98-
ph = interpolate_everywhere(L2_Projection(tr (∂Ψu (F((uh)'), E((φh)), θh)), dΩ, VL2), V)
99-
return (σ11h, σ12h, σ13h, σ22h, σ23h, σ33h, ph)
84+
σh = ∂Ψu (F((uh)'), E((φh)), θh)
85+
interpolate_L2_tensor(σh, Ω, dΩ)
10086
end
10187

10288

10389
function Cauchy(args...)
104-
@warn "The function Cauchy is deprecated and will be removed at the end of November 25. Please, replace it by Piola."
90+
@warn "The function Cauchy is deprecated. Shortly it'll be J^-1*P*F^-T."
10591
Piola(args...)
10692
end
10793

test/data/ViscoElasticSimulation.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ function visco_elastic_simulation(;t_end=15, writevtk=true, verbose=true)
7373
F,_,_ = get_Kinematics(k)
7474

7575
function driverpost(post)
76-
σh11, _... = Cauchy(cons_model, Kinematics(Mechano,Solid),uh, unh, state_vars, Ω, dΩ, 0.0, Δt)
76+
σh11, _... = Piola(cons_model, Kinematics(Mechano,Solid),uh, unh, state_vars, Ω, dΩ, 0.0, Δt)
7777
σΓ1 = sum((σh11)dΓ1) / sum((1.0)dΓ1)
7878
push!(σΓ, σΓ1)
7979
push!(λx, 1.0 + component_LInf(uh, :x, Ω) / long)

0 commit comments

Comments
 (0)