You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a bug below and don't know how to fix in ONSAS code. Please help me. Thank you in advance!
using ONSAS
n1 = Node(1.2, 2.3, 3.4)
n2 = Node(2, 3, 4) # Although I can fix this line as n2=Node(2.,3.,4.), it does not seems natural to represent an integer by a real value
S = Rectangle(0.6, 0.3)
frame1 = Frame(n1, n2, S) # The error appeared as ERROR: MethodError: no method matching Frame(::Node{3, Int64}, ::Node{3, Float64}, ::Rectangle{Float64})
The text was updated successfully, but these errors were encountered:
I see the error seems to be that the constructor of Frame expects a Vector of nodes where all nodes have the same type T:
functionFrame(n₁::N, n₂::N, g::G, mass_matrix::MassMatrix= Consistent,
label::Label= NO_LABEL) where {N <:AbstractNode, G <:AbstractCrossSection}
Frame(SVector(n₁, n₂), g, mass_matrix, label)
end
There is always a trade-off of how much we want to support this kind of nice to have things on the ONSAS side or in your script. If u see value, you can fix by defining a different node types in the constructor (which are parametric on the numeric type of each node coordinates:
functionFrame(n1::N1, n2::N2, g::G, mass_matrix::MassMatrix= Consistent,
label::Label= NO_LABEL) where {
N1 <:AbstractNode, N2 <:AbstractNode, G <:AbstractCrossSection}
Frame(SVector(n1, n2), g, mass_matrix, label)
end
I found a bug below and don't know how to fix in ONSAS code. Please help me. Thank you in advance!
The text was updated successfully, but these errors were encountered: