LBM base class design #1
kks32
started this conversation in
Code design
Replies: 1 comment 3 replies
-
There are some pros and cons I could think up with using different structures of distribution arrays:
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How should we structure the LBM base class with distribution functions
f
defined on GPU?One possibility is to have the distribution function
f
be a flattened array that gets 3 dimensions (lx
,ly
, andlz
) in the constructor. As described here: https://stackoverflow.com/questions/12924155/sending-3d-array-to-cuda-kernel/12925014#12925014This paper also uses flattened array:
index new = 𝑥id + 𝑦id × 𝑁𝑥 + 𝑧id × 𝑁𝑥 × 𝑁𝑦
The alternative options are:
@Amber1995 @reihos What are the design advantages/disadvantages of one over the other?
Beta Was this translation helpful? Give feedback.
All reactions