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

Add new top-opt implementation #13

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

utkarshyashvardhan11
Copy link
Collaborator

Adding a new topology optimization implementation in Julia using the educational paper - An efficient 3D topology optimization code written in Matlab (Authors- Kai Liu & Andrés Tovar). Link to paper- https://link.springer.com/article/10.1007/s00158-014-1107-x. Also, comparing the efficiency of the Julia implementation with corresponding MATLAB code.

% === downloaded from the website: http://www.top3dapp.com/ ===
% === ----------------------------------------------------------------- ===
% === Disclaimer: ===
% === The authors reserves all rights for the program. ===
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the Matlab script from the repo. Also please mention in the Julia translation that the author gave us permission to translate the code to Julia under an MIT license. I also suggest committing the email exchange as a pdf to the repo.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have made the changes as suggested.

vert = [x y z; x y-hx z; x+hx y-hx z; x+hx y z; x y z+hx; x y-hx z+hx; x+hx y-hx z+hx; x+hx y z+hx];
vert[:, 2:3] = vert[:, 3:-1:2]; vert[:, 2, :] = -vert[:, 2, :];
if flag == false
scene = mesh(vert, faces, color = RGB(0.2+0.8*(1-rho[j,i,k]), 0.2+0.8*(1-rho[j,i,k]), 0.2+0.8*(1-rho[j,i,k])), shading = NoShading; axis=(; show_axis = false))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this doesn't work on my machine, there are 2 issues:

  • you can't have kwargs before the ;
  • I think shading should be boolean true/false

scene = mesh(vert, faces, color = RGB(0.2+0.8*(1-rho[j,i,k]), 0.2+0.8*(1-rho[j,i,k]), 0.2+0.8*(1-rho[j,i,k])), shading = NoShading; axis=(; show_axis = false))
flag = true;
else
mesh!(vert, faces, color = RGB(0.2+0.8*(1-rho[j,i,k]), 0.2+0.8*(1-rho[j,i,k]), 0.2+0.8*(1-rho[j,i,k])), shading = NoShading)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think shading should be boolean, true/false

@mohamed82008
Copy link
Member

Thanks for the PR. This seems to work once the shading kwarg is fixed. Let's add some unit tests in the test folder against the Matlab values.

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

Successfully merging this pull request may close these issues.

2 participants