Research Article

Finite Element Assembly Using an Embedded Domain Specific Language

Listing 9

Definition of a terminal allowing user extension.
()  template<typename T> struct user_op ;
()  struct my_callable ;
()  // A terminal typed using the above structs
()  proto::terminal< user_op<my_callable> >::type const my_op=;
()  // Can be used as a function
()  my_op(1,2,3);