Dear Luca, Thank you. This really shortens the code. Is it also possible to set the delimiter to a user desired value, say "|" instead of ",". Also, where exactly is the procedure for conversion from string to deali::Tensor or some other type say std::vector<double> defined? I could not find it in the source code.
Best regards, Paras On Tuesday, August 4, 2020 at 6:15:47 PM UTC+2, Paras Kumar wrote: > > Hi, > > Could you please provide an MWE to describe how the > Patterns::Convert::to_value() function would work in this case. > > Is it must to use prm.add_parameter() to be able to do so? I usually use > prm.declare_entry() and prm.get(). > > Best regards, > Paras > > On Wednesday, April 15, 2020 at 6:01:53 PM UTC+2, Luca Heltai wrote: >> >> Currently, this is also the simplest way: >> >> Tensor<rank, dim> tens; >> prm.add_parameter("Tensor", tens); >> >> Take a look at the documentation of the add parameter method. >> >> Patterns::Tools::to_string(tens); >> >> And >> >> Patterns::Tools::to_value >> >> Are also available to simplify what you want to achieve. >> >> Alternatively: Patterns::Tools::Convert offers ways to construct default >> Patterns for many types, including Tensors. >> >> Best, >> Luca >> >> > -- The deal.II project is located at http://www.dealii.org/ For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en --- You received this message because you are subscribed to the Google Groups "deal.II User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to dealii+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/01e0068e-205b-4984-a5e8-f9d23ab1bb72o%40googlegroups.com.