Function parser for tensor function

48 views
Skip to first unread message

Konrad

unread,
Sep 6, 2019, 3:36:25 AM9/6/19
to deal.II User Group
Dear deal.ii community,

I was wondering if there is a simple way to parse input (e.g., from a parameter file) and use it similarly to the FunctionParser class (which works for vector valued functions) just for a TensorFunction.

Anyone did that or something similar?

Best,
Konrad

Wolfgang Bangerth

unread,
Sep 11, 2019, 6:06:10 PM9/11/19
to dea...@googlegroups.com
On 9/6/19 1:36 AM, Konrad wrote:
>
> I was wondering if there is a simple way to parse input (e.g., from a
> parameter file) and use it similarly to the FunctionParser class (which
> works for vector valued functions) just for a TensorFunction.

Nothing I would know already does that. But the FunctionParser class
supports vector-valued functions, and it should not be very difficult to
write a little wrapper that is derived from TensorFunction, takes a
Function object as constructor argument, and simply interprets the
vector components returned by the latter as the tensor components of a
TensorFunction.

Of course, you could also copy FunctionParser to TensorFunctionParser
and make the relevant adjustments. That also should not be very difficult.

In either case, this would actually make for a nice addition to the library!

Best
W.

--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/
Reply all
Reply to author
Forward
0 new messages