Skip to content
Merged
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
1 change: 1 addition & 0 deletions src/ComputationalModels/ComputationalModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ export get_test_space
include("PostProcessors.jl")
export PostProcessor
export Cauchy
export Piola
export Jacobian
export Entropy
export D0
Expand Down
20 changes: 13 additions & 7 deletions src/ComputationalModels/PostProcessors.jl
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ function Jacobian(uh,km)
J ∘ F ∘ ∇(uh)
end

function Cauchy(physmodel::ThermoElectroMechano,kine::NTuple{3,KinematicModel}, uh, φh, θh, Ω, dΩ, Λ=1.0)
function Piola(physmodel::ThermoElectroMechano,kine::NTuple{3,KinematicModel}, uh, φh, θh, Ω, dΩ, Λ=1.0)
DΨ = physmodel(Λ)

F, _, _ = get_Kinematics(kine[1])
Expand All @@ -100,26 +100,32 @@ function Cauchy(physmodel::ThermoElectroMechano,kine::NTuple{3,KinematicModel},
end


function Cauchy(model::Elasto,km::KinematicModel,uh, unh, state_vars, Ω, dΩ, t, Δt)
σh = Cauchy(model,km,uh)
function Cauchy(args...)
@warn "The function Cauchy is deprecated and will be removed at the end of November 25. Please, replace it by Piola."
Piola(args...)
end


function Piola(model::Elasto,km::KinematicModel,uh, unh, state_vars, Ω, dΩ, t, Δt)
σh = Piola(model,km,uh)
interpolate_L2_tensor(σh, Ω, dΩ)
end


function Cauchy(model::ViscoElastic, km::KinematicModel, uh, unh, state_vars, Ω, dΩ, t, Δt)
σh = Cauchy(model, km, uh, unh, state_vars, Δt)
function Piola(model::ViscoElastic, km::KinematicModel, uh, unh, state_vars, Ω, dΩ, t, Δt)
σh = Piola(model, km, uh, unh, state_vars, Δt)
interpolate_L2_tensor(σh, Ω, dΩ)
end


function Cauchy(model::Elasto, km::KinematicModel,uh, vars...)
function Piola(model::Elasto, km::KinematicModel,uh, vars...)
_, ∂Ψu, _ = model()
F, _, _ = get_Kinematics(km)
∂Ψu ∘ (F∘∇(uh))
end


function Cauchy(model::ViscoElastic, km::KinematicModel, uh, unh, states, Δt)
function Piola(model::ViscoElastic, km::KinematicModel, uh, unh, states, Δt)
_, ∂Ψu, _ = model(Δt=Δt)
F, _, _ = get_Kinematics(km)
∂Ψu ∘ (F∘∇(uh), F∘∇(unh), states...)
Expand Down
1 change: 1 addition & 0 deletions src/Exports.jl
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ end
@publish ComputationalModels PostMetrics
@publish ComputationalModels StaggeredModel
@publish ComputationalModels Cauchy
@publish ComputationalModels Piola
@publish ComputationalModels Jacobian
@publish ComputationalModels Entropy
@publish ComputationalModels D0
Expand Down
Loading