Mean-field description of dipolar bosons in triple-well potentials