Text this: A novel neural network method for solid mechanics problems of heterogeneous bars.