You are getting "multiple definitions error" because you have multiple definitions of the same externally visible name. That's illegal. It violates the "one definition rule".
You can put those in an unnamed namespace, as mike.did suggests or qualify them as static, which is what you did. However, both solutions skirt the real issue: Why do you have so many global variables? Your code is not very object oriented.
Your problem with your function cranknicolson1
is distinct from this issue. Ask that as a separate question.