Re: [deal.II] Reading a list from parameter file

2021-04-19 Thread Wolfgang Bangerth
On 4/19/21 4:19 AM, Paras Kumar wrote: std::unique_ptr nItersListPattern(new dealii::Patterns::List(dealii::Patterns::Integer(1), 2, 8, "|")); nIters = dealii::Patterns::Tools::Convert::to_value(nMaxItersString,  nItersListPattern); I suspect you need to write this last line as

Re: [deal.II] Reading a list from parameter file

2021-04-19 Thread Paras Kumar
Dear Wolfgang, Thank you so much for the suggestion. Just to avoid confusion for future readers, the to_value() function needs a unique_ptr, and hence the aforementioned line needs to be replaced by the following lines: std::unique_ptr nItersListPattern(new

Re: [deal.II] Reading a list from parameter file

2021-04-16 Thread Wolfgang Bangerth
Paras, I am trying to read a list of integers from the parameter file using the dealii::Patterns::List class. However, I get a runtime error which can be reproduced using the attached MWE. I also tried the approach described (for tensor) in

[deal.II] Reading a list from parameter file

2021-04-15 Thread Paras Kumar
Dear All, I am trying to read a list of integers from the parameter file using the dealii::Patterns::List class. However, I get a runtime error which can be reproduced using the attached MWE. I also tried the approach described (for tensor) in