radiasoft / zgoubi

Git repo for zgoubi source code
https://sourceforge.net/projects/zgoubi/
GNU General Public License v2.0
9 stars 3 forks source link

Eliminate duplicate common blocks. #81

Open dtabell opened 4 years ago

dtabell commented 4 years ago

Zgoubi has multiple common blocks (originally a total of 17) that have duplicate definitions. For example, the file common/C.DROITE.H declares

      COMMON/DROITE/ CA(MDR),SA(MDR),CM(MDR),IDRT

whereas the file common/C.DROITE_2.H declares

      COMMON/DROITE/ AM(MDR),BM(MDR),CM(MDR),IDRT

In other words, files that include the first version and refer to CA are referring to the same data as files that include the second version and refer to AM.

Before we can move such common blocks to data modules (and take advantage of possible optimizations), we need to eliminate the duplicate definitions. This requires modifying the relevant files to use a common set of variable names.

dtabell commented 4 years ago

Waiting on #83

dtabell commented 4 years ago

I fixed (and closed) the issue with the failing tests, #86.

Have now merged in Boaz's new tests (#83) for electric elements. Last set of duplicate common blocks are those associated with E fields: C.DDEXYZ_2.H, C.D3E_2.H, and C.D4EXYZ_2.H.