I am trying to solve a (seemingly very simple) one-dimensional spring system, much like the one described here on wikipedia:
Spring system - Wikipedia, the free encyclopedia
The example shown in the wikipedia article consists of only three nodes, in reality my system contains hundreds of thousands of nodes.
This is not really a problem (hold on for the real problem), as this system is elliptic, and can be solved using a fast multigrid solver.
However, and now comes my problem, in my situation, the springs are not restricted to one direction. They can flip over to the other direction so to speak. In a sense, my springs are more "physically correct".
So, if you consider a single spring, compress it, then it will exert a force in one direction (opposite to its compression); when you compress it further until it reaches zero length, it will exert its maximum force, and then it "flips over", meaning it will exert a force in the other direction. This is just like natural springs. You compress the spring, until you go past the point where it is connected, and then it will flip over.
So my question is, with this "minor" adjustment of the problem, how do I efficiently solve this system on a computer?
Thanks in advance for any helpful comments!