Validation of an electroseismic and seismoelectric modeling code, for layered earth models, by the explicit homogeneous space solutions