Sometimes I want to calculate extra information in the material routine; the dissipation and the gradient of dissipation.
I dont how common it for users to want other types of additional measures calculated in the material routine, or if this is just a special case of mine...but maybe it would be nice to have a system for this (if it is common enough).
A possible way of doing this is to use the option-dict and pass a key that you want to calculate the dissipation aswell, and then store the dissipation (and gradient of the dissipaiton) in the outptut state.
struct MatState
statvar::SymmetricTensor
D::Float64
dDdε::SymmetricTensor
end
...
function material response(...)
...
if options["dissipation"]
D = ...
end
end
This will store extra data that might be unused in most simulation which is not nice...
An option is to have D and dDdε optional in the struct instead... ::Union{dDdε, Missing}, but I dont know how this will effect type stability.
Sometimes I want to calculate extra information in the material routine; the dissipation and the gradient of dissipation.
I dont how common it for users to want other types of additional measures calculated in the material routine, or if this is just a special case of mine...but maybe it would be nice to have a system for this (if it is common enough).
A possible way of doing this is to use the
option-dict and pass a key that you want to calculate the dissipation aswell, and then store the dissipation (and gradient of the dissipaiton) in the outptut state.This will store extra data that might be unused in most simulation which is not nice...
An option is to have
DanddDdεoptional in the struct instead... ::Union{dDdε, Missing}, but I dont know how this will effect type stability.