Add "std::string *::ufl() const" for all relevant classes
** Add "std::string *::ufl() const" for all relevant classes, returning the matching UFL representation string.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- None
- Direction:
- Needs approval
- Assignee:
- None
- Definition:
- New
- Series goal:
- None
- Implementation:
- Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
class form
{
// Name describing coefficient function i.
// (F.ex. "f" for the typical right hand side,
// "mu" and "lambda" for linear elasticity
// and "Re" for Navier-Stokes).
std::string coefficient_
// Name of physical unit, if any, for coefficient function i.
std::string coefficient_
// Name of integrals (could also be put in integral classes).
std::string cell_integral_
std::string exterior_
std::string interior_
// Name of underlying library or code generation tool.
std::string library_name() const = 0;
// Name of author.
std::string author() const = 0;
// Implementation in UFL, if applicable.
std::string ufl() const = 0;
};
AL: I suggest naming the ufl function something like ufl_repr so it's clear it's a string that can be used to instantiate a UFL expression in Python. It would also be good to make it non-pure virtual and return "" by default. Then form compilers or hand coders that don't depend on UFL don't need to implement this function. UFC should not depend on UFL.