forces can be computed either with a global approach (J and n defined globally) or a local one