UFC

Add "std::string *::ufl() const" for all relevant classes

Registered by Garth Wells

** 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

Related branches

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(unsigned int i) const = 0;

      // Name of physical unit, if any, for coefficient function i.
      std::string coefficient_unit(unsigned int i) const = 0;

      // Name of integrals (could also be put in integral classes).
      std::string cell_integral_name(unsigned int i) const = 0;
      std::string exterior_facet_integral_name(unsigned int i) const = 0;
      std::string interior_facet_integral_name(unsigned int i) const = 0;

      // 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.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.