You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the present form, Save_Cgns_Results and Save_Vtu_Results are very difficult to read. If a developer focuses on one model at a time (which he or she always does), he or she has to jump from one if condition to another, and make a separate checklist to see what is saved for each model. Very fuzzy.
It should be done in the following way:
if(turbulence_model .eq. K_EPS) then
call Save_Vtu_Scalar(kin % n ...
call Save_Vtu_Scalar(eps % n ...
...
end if
if(turbulence_model .eq. K_EPS_ZETA_F22) then
call Save_Vtu_Scalar(kin % n ...
call Save_Vtu_Scalar(eps % n ...
call Save_Vtu_Scalar(zeta % n ...
call Save_Vtu_Scalar(f22 % n ...
...
end if
if(turbulence_model .eq. HANJALIC_JAKIRLIC .or.
turbulence_model .eq. REYNOLDS_STRESS) then
call Save_Vtu_Scalar(uu % n ...
call Save_Vtu_Scalar(vv % n ...
call Save_Vtu_Scalar(ww % n ...
call Save_Vtu_Scalar(uv % n ...
call Save_Vtu_Scalar(uw % n ...
call Save_Vtu_Scalar(vw % n ...
call Save_Vtu_Scalar(kin % n ...
call Save_Vtu_Scalar(eps % n ...
if(turbulence_model .eq. REYNOLDS_STRESS) then
call Save_Vtu_Cells(f22 % n ...
end if
...
end if
I understand that it would mean repeating some lines of the code (Save_Vtu_Scalar(kin % n ... for example), but the way we have it now, we have repetition of if statements which are scattered over hundreds of lines of code.
The text was updated successfully, but these errors were encountered:
Originally I was doing it as you suggest but I then wanted to make as few line as possible but also I wanted to make structure of file such that I can switch from one model to another as easy as possible. But this is another story and it should be done by using different approach.
To summarize, I agree with proposal.
In the present form, Save_Cgns_Results and Save_Vtu_Results are very difficult to read. If a developer focuses on one model at a time (which he or she always does), he or she has to jump from one
if
condition to another, and make a separate checklist to see what is saved for each model. Very fuzzy.It should be done in the following way:
I understand that it would mean repeating some lines of the code (
Save_Vtu_Scalar(kin % n
... for example), but the way we have it now, we have repetition ofif
statements which are scattered over hundreds of lines of code.The text was updated successfully, but these errors were encountered: