add source codes for FFD with double precision