How to define FE basis function in gridap as fields

It sounds like you want ∇(u) ⋅ (C_mat ⋅ ∇(v)) if I understand Gridap’s tensor operations (see listing 7 in this paper) correctly.