Add template constraints and sanity checks.
Density on walls can be set on zero component only.