J. C. Maxwell, B. Riemann and H. Poincaré 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 coordinate systems, 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, a generalized Einstein's equation in inertial systems is derived based on some assumptions. This equation reduces to Einstein's equation in case of weak field in harmonic coordinate systems. In some special non-inertial coordinate systems, a second generalized Einstein's equation is derived based on some assumptions. If the field is weak and the coordinate system is quasi-inertial and harmonic, the second generalized Einstein's equation reduces to Einstein's equation. Thus, this theory may also explains all the experiments which support the theory of general relativity. There exists some fundamental differences between this theory and Einstein's theory of general relativity.