Try posing your question more mathematically.
Using discrete values does not generally make sense. Fields in the variational form are generally piecewise continuous functions.
It is possible to have Delta functions, but I suspect that this is not what you want.