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

Write a wrapper for the optional variable needed for AutoDiff to avoid duplication of code #170

Closed
tarun-mitruka opened this issue Jun 1, 2023 · 0 comments · Fixed by #223
Assignees
Labels
enhancement New request to enhance existing features refactor Refactor code for readability
Milestone

Comments

@tarun-mitruka
Copy link
Collaborator

if (dx) {
  for (auto i = 0U; i < disp.size(); ++i)
    for (auto k2 = 0U; k2 < myDim; ++k2)
      disp[i][k2] = dx.value()[i * myDim + k2]
                    + d[this->localView().index(this->localView().tree().child(k2).localIndex(i))[0]];
} else
  for (auto i = 0U; i < disp.size(); ++i)
    for (auto k2 = 0U; k2 < myDim; ++k2)
      disp[i][k2] = d[this->localView().index(this->localView().tree().child(k2).localIndex(i))[0]];
@tarun-mitruka tarun-mitruka added bug Something isn't working enhancement New request to enhance existing features labels Jun 1, 2023
@tarun-mitruka tarun-mitruka added this to the v0.4 milestone Jun 1, 2023
@tarun-mitruka tarun-mitruka added refactor Refactor code for readability and removed bug Something isn't working labels Jan 2, 2024
@tarun-mitruka tarun-mitruka linked a pull request Jan 2, 2024 that will close this issue
@tarun-mitruka tarun-mitruka removed a link to a pull request Jan 4, 2024
@tarun-mitruka tarun-mitruka linked a pull request Jan 4, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New request to enhance existing features refactor Refactor code for readability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants