> Could you please provide an MWE to describe how the 
> Patterns::Convert::to_value() function would work in this case.

In the dealii/tests/parameter_handler/patterns_05.cc

there are many examples that show how to use these.

> Is it must to use prm.add_parameter()  to be able to do so?
> I usually use prm.declare_entry() and prm.get(). 


No. It is more convenient, but not necessary:

Tensor<rank, dim> tensor;

using C = Patterns::Tools::Convert<Tensor<rank, dim>>;

prm.declare_entry(“My tensor”, C::to_string(tensor), *C::to_pattern(), 
“Documentation”);

...

tensor = C::to_value(prm.get(“My tensor”));


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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/3F36DBEA-4560-4F4B-965A-9EF52446EE7D%40gmail.com.

Reply via email to