  The study of opinions $-$ e.g., their formation and change, and their effects
on our society $-$ by means of theoretical and numerical models has been one of
the main goals of sociophysics until now, but it is one of the defining topics
addressed by social psychology and complexity science. Despite the flourishing
of different models and theories, several key questions still remain
unanswered. The aim of this paper is to provide a cognitively grounded
computational model of opinions in which they are described as mental
representations and defined in terms of distinctive mental features. We also
define how these representations change dynamically through different
processes, describing the interplay between mental and social dynamics of
opinions. We present two versions of the model, one with discrete opinions
(voter model-like), and one with continuous ones (Deffuant-like). By means of
numerical simulations, we compare the behaviour of our cognitive model with the
classical sociophysical models, and we identify interesting differences in the
dynamics of consensus for each of the models considered.
