Modeling chemical gradients in sediments under losing and gaining flow conditions: The GRADIENT code