  In this paper we develop and test a fully conservative SPH scheme based on a
tensor formulation that can be applied to simulate astrophysical systems. In
the proposed scheme, derivatives are calculated from an integral expression
that leads to a tensor (instead of a vectorial) estimation of gradients and
reduces to the standard formulation in the continuum limit. The new formulation
improves the interpolation of physical magnitudes, leading to a set of
conservative equations that resembles those of standard SPH. The resulting
scheme is verified using a variety of well-known tests, all of them simulated
in two dimensions. We also discuss an application of the proposed tensor method
to astrophysics by simulating the stability of a Sun-like polytrope calculated
in three dimensions.
