J. C. Maxwell, B. Riemann and H. Poincar$\acute{e}$ have proposed the idea that all microscopic particles are sink flows in a fluidic aether. Following this research program, a previous theory of gravitation based on a mechanical model of vacuum and a sink flow model of particles is generalized by methods of special relativistic continuum mechanics. In inertial reference frames, we construct a tensorial potential which satisfies the wave equation. Inspired by the equation of motion of a test particle, a definition of a metric tensor of a Riemannian spacetime is introduced. Applying Fock's theorem, generalized Einstein's equations in inertial systems are derived based on some assumptions. These equations reduce to Einstein's equations in case of weak field in harmonic reference frames. There exist some differences between this theory and Einstein's theory of general relativity.