Initial version from private copy of PHASTA