ExtremeFLOW / neko

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

Add possibility to provide default string for json string array reader #1153

Closed timofeymukha closed 4 months ago

timofeymukha commented 4 months ago

Useful to not get garbage in the read array. For example, for bc_labels, we can default to "not" as we do now outside of JSON, or some similar dummy value.

timfelle commented 4 months ago

It is really sad bounds checking is not really a thing in fortran...

njansson commented 4 months ago

It is really sad bounds checking is not really a thing in fortran...

Hey, bounds checking is really a thing in fortran compared to C ;) (e.g. -fbounds-check in gfortran)

timfelle commented 4 months ago

It is really sad bounds checking is not really a thing in fortran...

Hey, bounds checking is really a thing in fortran compared to C ;) (e.g. -fbounds-check in gfortran)

Ah right. Why do we not have a CI that does that then?

njansson commented 4 months ago

It is really sad bounds checking is not really a thing in fortran...

Hey, bounds checking is really a thing in fortran compared to C ;) (e.g. -fbounds-check in gfortran)

Ah right. Why do we not have a CI that does that then?

Since that would fail due to our "creative" use of indexing (i.e x(i,1,1,1)) to flatten some arrays, and get nice vectorisation

timfelle commented 4 months ago

It is really sad bounds checking is not really a thing in fortran...

Hey, bounds checking is really a thing in fortran compared to C ;) (e.g. -fbounds-check in gfortran)

Ah right. Why do we not have a CI that does that then?

Since that would fail due to our "creative" use of indexing (i.e x(i,1,1,1)) to flatten some arrays, and get nice vectorisation

Is that used in places where an elemental function could not do the trick instead?

njansson commented 4 months ago

It is really sad bounds checking is not really a thing in fortran...

Hey, bounds checking is really a thing in fortran compared to C ;) (e.g. -fbounds-check in gfortran)

Ah right. Why do we not have a CI that does that then?

Since that would fail due to our "creative" use of indexing (i.e x(i,1,1,1)) to flatten some arrays, and get nice vectorisation

Is that used in places where an elemental function could not do the trick instead?

Yes and no, the main issue with elemental is the uncertainty on how well certain compilers implement it.