Skip to content

Optimization for channel#18

Open
AsifH22 wants to merge 2 commits intomainfrom
Asif
Open

Optimization for channel#18
AsifH22 wants to merge 2 commits intomainfrom
Asif

Conversation

@AsifH22
Copy link
Copy Markdown
Collaborator

@AsifH22 AsifH22 commented Dec 1, 2021

Simone, please check if you agree

Comment thread src/cuda_derivs.h Outdated
for (int lt=1; lt<stencilSize+1; lt++) {
flxp -= dcoeffF[stencilSize-lt]*(s_f[si]+s_f[si+lt])*(s_g[si]+s_g[si+lt]);
flxm -= dcoeffF[stencilSize-lt]*(s_f[si]+s_f[si-lt])*(s_g[si]+s_g[si-lt]);
}
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

why this change?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It is as per the paper of Kuya and Kawai (2021). Basically they said that two loops are not needed to compute the flux. Same thing can be computed in one loop as a lot of terms cancel when the difference is taken.

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