GFem language documentation -- 3.5 Global operators

Previous: 3.4 Functions
Up: 3 The Gory Details
Next: 3.6 Integrals

## 3.5 Global operators

It is important to understand the difference between a global operator such as `dx()` and a local operator such as `sin()` .

To compute `dx(f)` at vertex `q` we need `f` at all neighbors of `q`. Therefore evaluation of `dx(2*f)` require the computation of `2*f` at all neighbor vertices of `q` before applying `dx()` ; but in which memory would the result be stored? Therefore Gfem does not allow this and forces the user to declare a function `g =2*f` before evaluation of `dx(g)` ; Hence in

    g = 2*f;
    h = dx(g) * dy(f);

the equal sign forces the evaluation of `g` at all vertices, then when the second equal signs forces the evaluation of the expression on the right of h at all vertices , everything is ready for it.

Global operators are

    dx(), dy(), convect(), intt[], int()[]

Example of forbidden expressions:

    intt[f+g], dx(dy(g)), dx(sin(f)), convect(2*u...)