Hi all, I’m trying to use the macro keyword to include some functions into my weak form (just to tidy up my code and to make mistakes less likely when typing). However, when playing around with the macro keyword, I ran into a strange issue where I receive the following error:
I assumed that maybe this was because of the presence of exp() in my function; however the following code also contains exp() and does not result in any error:
When you call exp(), FF has to know what kind of argument it is (real, complex, matrix, vector of values…). exp is a polymorphic function.
In your first code, the type of “2” is not declared, which is the problem.
When you write your macro L11, you have real numbers, identified by “.”. Hence the result is a real number. The same occurs in your last def with 1e0*u.
Another way to make it work is