We were discussing the option of specifying only a certain set of indices for writing the sigma vtu files and I looked into the code to find an elegant way of doing that. I see three options:
-
Reading in a text file with indices strictly written on one line and separated by a space character, so that they can be read in an array within the Fortran code in jfield.f90 subroutines.
-
Reading in the indices as a string from gimic.inp, then converting that into an array of integers in the python parser in gimic.in.
-
Writing a separate python function in gimic.in that avoids the defined types INT, BOOL, DBL_ARRAY, etc. Writing it in python style, i.e., splitting the string into a list of integers, and then passing it as an array to the Fortran code of gimic in an alternative way.
I do not like option 1 because it hints of being in the 80s or so.
I have been fighting with option 2 since it sounded the most logical one. However, the existing structure is rigid and I my brain is not big enough to find a way through it.
I have not tried option 3 yet.
What are your thoughts on the matter? Do you have different suggestions?
We were discussing the option of specifying only a certain set of indices for writing the sigma vtu files and I looked into the code to find an elegant way of doing that. I see three options:
Reading in a text file with indices strictly written on one line and separated by a space character, so that they can be read in an array within the Fortran code in jfield.f90 subroutines.
Reading in the indices as a string from gimic.inp, then converting that into an array of integers in the python parser in gimic.in.
Writing a separate python function in gimic.in that avoids the defined types INT, BOOL, DBL_ARRAY, etc. Writing it in python style, i.e., splitting the string into a list of integers, and then passing it as an array to the Fortran code of gimic in an alternative way.
I do not like option 1 because it hints of being in the 80s or so.
I have been fighting with option 2 since it sounded the most logical one. However, the existing structure is rigid and I my brain is not big enough to find a way through it.
I have not tried option 3 yet.
What are your thoughts on the matter? Do you have different suggestions?