-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding Gurson material model #7
base: master
Are you sure you want to change the base?
Conversation
I think we should use julia> Int
Int64 |
src/UMAT.jl
Outdated
|
||
""" | ||
Variables updated by UMAT routine. | ||
""" | ||
@with_kw struct UmatVariableState <: AbstractMaterialState | ||
NTENS :: Int64 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So here, instead of Int64
, Int
is a better choice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok. I will change all. How about Float64, is that ok?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A good question. I think that the use of Float64 is ok. I'm not sure about why this Int32/Int64 is a problem with integers but not with floats. In principle, you could use template to have two structs, one for Float32 and another for Float64, but I have not seen these kinds of practices anywhere so far. So I think that Int and Float64 is the right way to go.
https://docs.julialang.org/en/v1/manual/integers-and-floating-point-numbers/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this is only when defining structs. When defining new functions, the use of abstract types is not hitting performance at all.
function foo(x::AbstractFloat, y::Integer)
# do something with `x` and `y`
end
is perfectly fine.
@ahojukka5 any ideas, where my problem is? When I run the
But it will go away if I run |
It has something to do with matrix dimensions? |
a87bf32
to
5a4d324
Compare
No description provided.