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

cached variable #16

Closed
kunyuan opened this issue Jul 17, 2022 · 1 comment
Closed

cached variable #16

kunyuan opened this issue Jul 17, 2022 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@kunyuan
Copy link
Member

kunyuan commented Jul 17, 2022

Sometimes, a n-dimensional variable needs to be transformed before it could be used in the integrand. For example, the (r, theta, phi) spherical coordinates to (x, y, z). It will be more efficient for the variable to cache the transformed values if the integrand involves many variables.

One possible implementation is to add a cached array and add a transform function as the member of the variable struct. If the transform function is initialized, the variable will be transformed and saved to the cached array after every update.

@kunyuan kunyuan added the enhancement New feature or request label Jul 17, 2022
@kunyuan kunyuan self-assigned this Jul 17, 2022
@kunyuan
Copy link
Member Author

kunyuan commented Nov 9, 2022

It is better for the user to cache it in the user code

@kunyuan kunyuan closed this as completed Nov 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant