Re: [deal.II] initial values of different-type data

2020-12-09 Thread Matthias Maier
You have to be a bit careful - unfortunately, C++ has one of the most convoluted rules when objects are zero initialized or not. As a rule of thumb: * whenever you are working with a plain "double", "float", "int", etc. it is best to explicitly initialize the variable (because C++ in most cas

[deal.II] initial values of different-type data

2020-12-09 Thread Chenyi LUO
Hi dealii developers, I would like to ask(confirm)whether zero is the initial value of different-type data, e.g. for double, int, Vector and Tensor. For example, if I just define double x;. Does x have an initial value of 0.0? Moreover, in my task, I set initial values of a variable, e.g. "a",