fixed periodic boundaries an hd calc. for linear waves