PITTSBURGH — Carnegie Mellon University is getting back $40 million, or about 83 percent of what it lost in an alleged investment swindle that targeted university endowments and other nonprofits.A federal court judge in New York last month approved a plan to repay $814 million to 24 victims, roughly 85 percent of what was lost.