FParser is a hot mess. It is not under active development anymore. Uses awkward multistage source generation and is set up to use explicit instantiation without the possibility to template on user defined types after libmesh is built.
ExprTk (GitHub) is a fast, versatile, and actively maintained header only library that can be templated on custom types. I have an initial branch that templates ExprTk on DualReal. This requires some minor MetaPhysicL changes that are half merged (roystgnr/MetaPhysicL#46), half pending PR (roystgnr/MetaPhysicL#47). And a very minor change to upstream exprtk (which is being discussed).
Design
Use ExprTk as a parser backend for ParsedFunctions and parsed materials. It looks like the syntax will be mostly compatible with FParser (and in fact a ton more versatile and powerful).
Right now symbolic automatic differentiation - which is desirable for phase field - is missing in ExprTk. We could either do higher order derivatives with MetaPhysicL (pretty straight forward) or investigate differentiating the AST of ExprTk.
Impact
Parsed functions / parsed materials with AD support. (Plong @lindsayad)
Reason
FParser is a hot mess. It is not under active development anymore. Uses awkward multistage source generation and is set up to use explicit instantiation without the possibility to template on user defined types after libmesh is built. ExprTk (GitHub) is a fast, versatile, and actively maintained header only library that can be templated on custom types. I have an initial branch that templates ExprTk on
DualReal
. This requires some minor MetaPhysicL changes that are half merged (roystgnr/MetaPhysicL#46), half pending PR (roystgnr/MetaPhysicL#47). And a very minor change to upstream exprtk (which is being discussed).Design
Use ExprTk as a parser backend for ParsedFunctions and parsed materials. It looks like the syntax will be mostly compatible with FParser (and in fact a ton more versatile and powerful).
Right now symbolic automatic differentiation - which is desirable for phase field - is missing in ExprTk. We could either do higher order derivatives with MetaPhysicL (pretty straight forward) or investigate differentiating the AST of ExprTk.
Impact
Parsed functions / parsed materials with AD support. (Plong @lindsayad)