Skip to content
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

Hello! I tried the method at https://github.com/PeriHub/PeriLab.jl/issues/143#issuecomment-2041515228 , for a 2d plate model with varying material properties. However, I am getting the following error message: #175

Closed
CWillberg opened this issue Aug 13, 2024 · 2 comments

Comments

@CWillberg
Copy link
Collaborator

          Hello! I tried the method at https://github.com/PeriHub/PeriLab.jl/issues/143#issuecomment-2041515228 , for a 2d plate model with varying material properties. However, I am getting the following error message:
[ Info: Run Verlet Solver]
ERROR: LoadError: DimensionMismatch: arrays could not be broadcast to a common size; got a dimension with lengths 6000 and 18
Stacktrace:
  [1] _bcs1
    @ ./broadcast.jl:555 [inlined]
  [2] _bcs
    @ ./broadcast.jl:549 [inlined]
  [3] broadcast_shape
    @ ./broadcast.jl:543 [inlined]
  [4] combine_axes
    @ ./broadcast.jl:524 [inlined]
  [5] _axes
    @ ./broadcast.jl:236 [inlined]
  [6] axes
    @ ./broadcast.jl:234 [inlined]
  [7] combine_axes
    @ ./broadcast.jl:524 [inlined]
  [8] _axes
    @ ./broadcast.jl:236 [inlined]
  [9] axes
    @ ./broadcast.jl:234 [inlined]
 [10] combine_axes
    @ ./broadcast.jl:524 [inlined]
 [11] _axes
    @ ./broadcast.jl:236 [inlined]
 [12] axes
    @ ./broadcast.jl:234 [inlined]
 [13] combine_axes
    @ ./broadcast.jl:524 [inlined]
 [14] _axes
    @ ./broadcast.jl:236 [inlined]
 [15] axes
    @ ./broadcast.jl:234 [inlined]
 [16] combine_axes
    @ ./broadcast.jl:524 [inlined]
 [17] instantiate
    @ ./broadcast.jl:306 [inlined]
 [18] materialize(bc::Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{2}, Nothing, typeof(/), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{2}, Nothing, typeof(*), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(/), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(*), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(*), Tuple{Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(*), Tuple{Float64, Vector{Float64}}}, Vector{Float64}}}, Base.Broadcast.Broadcasted{Base.Broadcast.DefaultArrayStyle{1}, Nothing, typeof(-), Tuple{Vector{Float64}, Vector{Float64}}}}}, Vector{Float64}}}, Matrix{Float64}}}, Vector{Float64}}})
    @ Base.Broadcast ./broadcast.jl:903
 [19] compute_forces(datamanager::Module, nodes::Vector{Int64}, material_parameter::Dict{Any, Any}, time::Float64, dt::Float64, to::TimerOutputs.TimerOutput)
    @ PeriLab.Solver.Physics.Material.Set_modules.Bondbased_Elastic ~/download/PeriLab.jl/src/Physics/Material/Material_Models/BondBased/Bondbased_Elastic.jl:102
 [20] compute_forces(datamanager::Module, nodes::Vector{Int64}, model_param::Dict{Any, Any}, time::Float64, dt::Float64, to::TimerOutputs.TimerOutput)
    @ PeriLab.Solver.Verlet.Physics.Material ~/download/PeriLab.jl/src/Physics/Material/Material_Factory.jl:131

I can share the mesh and input files if that helps with debugging.

Originally posted by @franciscoyapor in #159 (comment)

@CWillberg
Copy link
Collaborator Author

Is related to #143

CWillberg added a commit that referenced this issue Aug 13, 2024
@franciscoyapor
Copy link
Contributor

Thank you so much for looking at this so quickly, @CWillberg! I appreciate the fast turnaround. The improvements you've made to handle pointwise material definitions are spot-on and will enhance the code's flexibility. Thanks again to you and @JTHesse for your hard work and dedication to advancing the peridynamic field!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants