Understanding fluscw.f

Dear @dbozzato ,

Continuing the discussion from Modify fluscw.f with user defined conversion factors:

Sorry to reopen this topic again. There is no issue with the program, but I wanted to understand how the FLUSCWs are assigned in different blocks.

In the fluscw.f shared by you, there are few lines where FLUSCW value has been assigned. The line numbers are

Line 83: FLUSCW = ONEONE

Line 94: FLUSCW = ONEONE

Line 106: FLUSCW = ZERZER

Line 114: FLUSCW = ZERZER

Line 134: FLUSCW = ZERZER

  • Line 83 is the default one i.e. multiplication factor is 1.

  • I could not understand the purpose of Line 94. The purpose of this block was just to get the scoring name.

  • Then, Line 106, Line 114 : Are they required? Because from line no 119 onwards we are assigning the FLUSCW values.

  • Finally Line 134: This is for other particles we are setting as zero. This is understood.

Regards,
Riya

Dear @riya,

it ultimately comes down to force of habit. Only the assignments in line 83 and 134 are required, while the others may indeed be superfluous in your case. Suppose that in the future you wish to implement additional code in the routine: I think these additional “default returns” (if well thought) can make your code less error prone.

Best,
Davide

Thank you @dbozzato for the clarification.

Regards,
Riya

1 Like