JuliaTopOpt / TopOpt.jl

A package for binary and continuous, single and multi-material, truss and continuum, 2D and 3D topology optimization on unstructured meshes using automatic differentiation in Julia.
https://juliatopopt.github.io/TopOpt.jl/
Other
181 stars 30 forks source link

Debug truss_stress.jl coupled variable R #152

Closed pitipatw closed 1 year ago

pitipatw commented 1 year ago

Summary

A short summary of the changes in this PR.

Highlights:

  1. on truss_stress.jl line 35 add copy(R) to uncouple the variables

What type of change is this?

Checklist

pitipatw commented 1 year ago

I hope this work :)

yijiangh commented 1 year ago

@pitipatw Could you please add a test file with your 3-member truss to compare against hand-derived values?

pitipatw commented 1 year ago

Will do!

pitipatw commented 1 year ago

I added the test file in the "test" folder.

pitipatw commented 1 year ago

@pitipatw Could you please add a test file with your 3-member truss to compare against hand-derived values?

Please let me know if I should add to the test folder or somewhere else.

mohamed82008 commented 1 year ago

You have to include the new test file in the runtests.jl file.

pitipatw commented 1 year ago

The JSON file too?

mohamed82008 commented 1 year ago

You can put the file in the same directory. But only include the Julia file in runtests.jl

yijiangh commented 1 year ago

@pitipatw you can put your test code into this file by adding a new @testset. And your json file can be put into this folder. You can read more about testset here if you are curious.

yijiangh commented 1 year ago

Also, I think it makes a lot of sense to merge your work on the JSON documentation (https://github.com/JuliaTopOpt/TopOpt.jl/pull/148) into this one PR here. Shall we do that?

pitipatw commented 1 year ago

I updated the test file, however, when I run the runtest.jl , it says Functions/test_common_fns.jl is broken.

Mine pass successfully.

pitipatw commented 1 year ago

Also, I think it makes a lot of sense to merge your work on the JSON documentation (#148) into this one PR here. Shall we do that?

Isn't it already come with the commits in this PR?

yijiangh commented 1 year ago

Close #138

mohamed82008 commented 1 year ago

🎉🎉🎉