We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Extending associate construct for object oriented contexts would be very useful for readability and development in my opinion.
Instead of writing something like this:
associate(nx => self%nx, ny => self%ny, nz => self%nz, ng => self%ng, & dcsidx_gpu => self%base_gpu%dcsidx_gpu, detady_gpu => self%base_gpu%detady_gpu, & dzitdz_gpu => self%base_gpu%dzitdz_gpu, dcsidxs_gpu => self%base_gpu%dcsidxs_gpu, & detadys_gpu => self%base_gpu%detadys_gpu, dzitdzs_gpu => self%base_gpu%dzitdzs_gpu, & indx_cp_l => self%equation_base%indx_cp_l, & indx_cp_r => self%equation_base%indx_cp_r, & cp => self%equation_base%calorically_perfect, & t0 => self%equation_base%t0, channel_case => self%equation_base%channel_case, & enable_ibm => self%equation_base%enable_ibm)
I would like to write:
associate(from self: nx, ny, nz, ng; & from self%base_gpu: dcsidx_gpu, detady_gpu, dzitdz_gpu, dcsidxs_gpu, detadys_gpu, dzitdzs_gpu; & from self%equation_base: indx_cp_l, indx_cp_r, cp => calorically_perfect, t0, enable_ibm)
Francesco
The text was updated successfully, but these errors were encountered:
This use case is very similar to the one of the Pascal with statement.
with
To be even more compact, it could have a "all" specifier, saying the all the components shall be associated:
associate (from self:(all); from self%base_gpu:(all); from self%equation_base:(all))
To go further, it could be combined with #321 :
associate (from self:(all)) & (from base_gpu:(all); from equation_base:(all)) & (cp => calorically_perfect)
Additionnaly, a suffix specifier could solve the case where one wants to do that with several objects of the same type:
suffix
associate (from object1:(all); from object2:(all,suffix="2"))
would be equivalent to
associate (nx => object1%nx, [...,] nx2 => object2%nx )
Sorry, something went wrong.
No branches or pull requests
Extending associate construct for object oriented contexts would be very useful for readability and development in my opinion.
Instead of writing something like this:
I would like to write:
associate(from self: nx, ny, nz, ng; & from self%base_gpu: dcsidx_gpu, detady_gpu, dzitdz_gpu, dcsidxs_gpu, detadys_gpu, dzitdzs_gpu; & from self%equation_base: indx_cp_l, indx_cp_r, cp => calorically_perfect, t0, enable_ibm)
Francesco
The text was updated successfully, but these errors were encountered: