Closed tjhei closed 4 months ago
I am not sure this is the right thing to do or if we need to initialize with invalid values, but this makes the warnings go away...
If it doesn't have one, it needs to be added.
It is a struct without any constructor or functions:
https://github.com/geodynamics/aspect/blob/d87c3c8df59ec5c479b94bfad8a3ff3d702c0eb2/include/aspect/material_model/rheology/diffusion_creep.h#L40-L51
By your logic, wouldn't this become a class if you add constructors to it?
The difference in initialization of structures with
MyStruct s;
and
MyStruct s{};
and
MyStruct s = {};
is so convoluted and ununderstandable that I'm opposed to it. Let's add a constructor to the class that avoids the issue.
Let's add a constructor to the class that avoids the issue.
NaNs or 0.0 for doubles?
NaN's If anyone uses this without initialization it is wrong.
Yes, sNaNs.
updated.
Might as well squash/fixup, though.
fixes #5763