ExtremeFLOW / neko

/ᐠ. 。.ᐟ\ᵐᵉᵒʷˎˊ˗
https://neko.cfd/
Other
161 stars 29 forks source link

Update map_to_equidistant_1d.f90 #1112

Closed Shiyu-Sandy-Du closed 7 months ago

Shiyu-Sandy-Du commented 7 months ago

Assign zero entries in the identity matrix explicitly.

timofeymukha commented 7 months ago

it's a tiny matrix, right? So you can just add ident = 0.0_rp right after allocation, which will assign everything to 0 from the beginning (or use rzero from math.f90, but I think it is kind of overkill). Then you can skip the do-loop and ifs you add here.

Shiyu-Sandy-Du commented 7 months ago

it's a tiny matrix, right? So you can just add ident = 0.0_rp right after allocation, which will assign everything to 0 from the beginning (or use rzero from math.f90, but I think it is kind of overkill). Then you can skip the do-loop and ifs you add here.

Sure it's a better way. Code is changed now.

Shiyu-Sandy-Du commented 7 months ago

The output had a bit bug and fixed now.