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

Remove mutable structs for all model components #702

Closed
charleskawczynski opened this issue Jan 5, 2022 · 0 comments · Fixed by #705
Closed

Remove mutable structs for all model components #702

charleskawczynski opened this issue Jan 5, 2022 · 0 comments · Fixed by #705
Labels
enhancement New feature or request

Comments

@charleskawczynski
Copy link
Member

Using immutable structs, where possible, is a much simpler design pattern to follow since it greatly simplifies computation and initialization. In addition, it's necessary to use immutable structs on the GPU.

@charleskawczynski charleskawczynski added the enhancement New feature or request label Jan 5, 2022
bors bot added a commit that referenced this issue Jan 6, 2022
703: Make `SurfaceBase` immutable r=charleskawczynski a=charleskawczynski

This PR makes `SurfaceBase` immutable. This is a step towards closing #702.

This PR is slightly behavior changing because we used to use `SurfaceBase` before it was computed (inside `update_aux!`, for example, LMO is used [here](https://github.com/CliMA/TurbulenceConvection.jl/blob/main/src/update_aux.jl#L20) and computed [here](https://github.com/CliMA/TurbulenceConvection.jl/blob/main/src/update_aux.jl#L236))

Co-authored-by: Charles Kawczynski <kawczynski.charles@gmail.com>
@bors bors bot closed this as completed in #705 Jan 6, 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

Successfully merging a pull request may close this issue.

1 participant