1 Introduction

Since Schwarzschild [1] found the first exact solution of the Einstein field equations (EFE), the aim for obtaining new solutions to the EFE has become the subject of active research. Thus a wide variety of exact solutions of EFE has been obtained [2,3,4,5,6,7,8,9,10,11]. Particularly those solutions associated with the interior of self-gravitating compact objects represent an important and active area for the theoretical astrophysics. Initially for a long time, the interior of these self-gravitating objects was considered as an isotropic fluid (equal principal stresses). However recently in [12] it is proved that the state of isotropic pressure is unstable by the presence of dissipation, energy density inhomogeneities and shear. In fact, such result implies that any equilibrium configuration as a result of the final stage of a dynamic stellar regime always will be an anisotropic pressure state, even when the initially state was the isotropic regime. In this sense, there is strong evidence of the possible sources of deviations of the isotropy and fluctuations of the local anisotropy in the interior of relativistic compact objects, such as high density, intense magnetic fields, presence of solid interior cores, superfluids, phase transitions, rotation, among others [13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]. Therefore, the importance of modelling stellar compact objects considering them as self-gravitating spheres of anisotropic fluids is proved as valid.

Now, due to in static and spherically symmetric space-imes, there are only three independent EFE but five unknown functions, namely two metric functions (temporal and radial) and three physical quantities (density energy, the radial and tangential pressures) results that is necessary to provide two extra conditions in order to solve the problem, which can be relations between the metric functions or state equations that can relate the physical quantities. In such way the Gravitational Decoupling (GD) through the Minimal Geometric Deformation (MGD) or its Extended version (MGDe) permit us to solve the EFE and also extend isotropic known solutions to anisotropic case. This framework permit us use a known isotropic solution as a seed and extra condition (examples of such conditions are the mimic constrain for the pressure or energy density, barotropic equation of state, regularity of anisotropic pressure, complexity factor, among other) in order to close the entire system of EFE (for the implementation of this framework with the use of several seed solutions see Refs. [32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49]). Even this framework has been used widely in several scenarios such as 2 + 1 space-times [50,51,52,53,54,55], higher dimensions [56, 57], asymptotically (A-)dS space-times [58], for axially symmetric systems and rotating black holes [59], hairy black holes [60,61,62], Cosmology [63, 64], solutions in the background of Reissner–Nordström space-time [65,66,67], modified gravity theories [68,69,70,71,72,73,74,75,76,77,78], as well in braneworld gravity [79,80,81], among others. Precisely one of the extra conditions used to close the system of differential equations arising from GD through MGD or MGDe is the complexity factor, which results interesting since it permits us to play with the concept of complexity of self-gravitating fluids [82] in order to obtain new stellar models (see Refs. [83, 84] as examples where it condition was used with the GD through MGD).

However, the number of works where solutions with an isotropic regime of pressure are extended to solutions in the anisotropic regime through MGDe is very limited (see Refs. [51, 67, 85,86,87,88,89,90,91,92,93]), even though the framework of GD through MGDe is well established since the seminal works [94] and [95]. Particularly, in this work we use the interpretation of gravitational decoupling through MGDe described in [85] (this approach is called in [85] as 2-steps GD being a particular case of GD). Such interpretation consists in realize consecutive deformations of metrics of a seed solution. In specific, we begin realizing the deformation of radial metric and subsequently the temporal deformation is considered (such consecutive deformation is known as Left-path). However, this work differs from [85] since the extra condition used to close the EFE system is the vanishing complexity for self-gravitating spheres fluids (see Refs. [96,97,98,99,100,101] where this condition is used in order to obtain new static and spherically symmetric solutions).

2 Gravitational decoupling

In this section we briefly review the Gravitational Decoupling by MGDe (for more details, see [95]) for self-gravitating static spheres. Let us start with the EFE

$$\begin{aligned} G_{\mu \nu }=R_{\mu \nu }-\frac{1}{2}g_{\mu \nu }R = \kappa T_{\mu \nu }, \end{aligned}$$
(1)

with

$$\begin{aligned} T_{\mu \nu } = T^{(s)}_{\mu \nu } + \theta _{\mu \nu }, \end{aligned}$$
(2)

where \(\kappa = \frac{8\pi G}{c^4}\) and \(T^{(s)}_{\mu \nu }\) represents the matter content of a known solution of Einstein’s field equations,Footnote 1 namely the seed sector, and \(\theta _{\mu \nu }\) describes an extra source. Note that, since the Einstein tensor fulfills the Bianchi identities, the total energy–momentum tensor satisfies

$$\begin{aligned} \nabla _{\mu } T^{\mu \nu } = 0. \end{aligned}$$
(3)

In a static and spherically symmetric space-time sourced by

$$\begin{aligned} T^{\mu (s)}_{\nu }= & {} \text {diag}(\rho ^{(s)},-p_{r}^{(s)},-p^{(s)}_{t},-p^{(s)}_{t}) \end{aligned}$$
(4)
$$\begin{aligned} \theta ^{\mu }_{\nu }= & {} \text {diag}(\theta _{0}^{0},\theta _{1}^{1},\theta _{2}^{2},\theta _{2}^{2}), \end{aligned}$$
(5)

and a metric given by

$$\begin{aligned} ds^{2}=e^{\nu }dt^{2}-e^{\lambda }dr^{2} -r^{2}(d\theta ^{2}+\sin ^{2}\theta d\phi ^{2}), \end{aligned}$$
(6)

Eqs. (1) and (2) lead to

$$\begin{aligned} \kappa \rho= & {} \frac{1}{r^2} + e^{-\lambda }\!\left( \frac{\lambda '}{r} - \frac{1}{r^2}\right) , \end{aligned}$$
(7)
$$\begin{aligned} \kappa p_{r}= & {} -\frac{1}{r^2} + e^{-\lambda }\!\left( \frac{\nu '}{r} + \frac{1}{r^2}\right) , \end{aligned}$$
(8)
$$\begin{aligned} \kappa p_{t}= & {} \frac{e^{-\lambda }}{4}\!\left( 2\nu '' + {\nu '}^2 - \lambda '\nu ' + 2\frac{\nu '-\lambda '}{r} \right) ,\! \end{aligned}$$
(9)

where we have defined

$$\begin{aligned} \rho= & {} \rho ^{(s)} + \theta _{0}^{0} , \end{aligned}$$
(10)
$$\begin{aligned} p_{r}= & {} p_r^{(s)}-\theta _{1}^{1} , \end{aligned}$$
(11)
$$\begin{aligned} p_{t}= & {} p_{t}^{(s)} -\theta _{2}^{2} . \end{aligned}$$
(12)

The conservation equation (3) is a linear combination of Eqs. (7)–(9), and yields

$$\begin{aligned} \left( p_{r}\right) '+\frac{\nu '}{2}\left( \rho + p_{r}\right) +\frac{2}{r}\left( p_{r}-p_{t}\right) = 0, \end{aligned}$$
(13)

which in terms of the two sources in Eq. (2) read,

$$\begin{aligned}&(p_r^{(s)})'+\frac{\nu '}{2}\left( \rho ^{(s)} + p_r^{(s)}\right) +\frac{2}{r}\left( p_{r}^{(s)}-p_{t}^{(s)}\right) \nonumber \\&\quad -\left( \theta _{1}^{1}\right) '+\frac{\nu '}{2}\left( \theta _{0}^{0}-\theta _{1}^{1}\right) +\frac{2}{r}\left( \theta _{2}^{2}-\theta _{1}^{1}\right) = 0. \end{aligned}$$
(14)

Is clear that the non-linearity of Einstein’s equations avoids that the decomposition (2) lead to two set of equations; one for each source involved. Nevertheless, contrary to the broadly belief, such a decoupling is possible in the context of MGDe as we shall demonstrate in what follows.

Let us introduce a geometric deformation in the metric functions given by

$$\begin{aligned} \nu \;\;\longrightarrow & {} \;\; \xi + \alpha g, \end{aligned}$$
(15)
$$\begin{aligned} e^{-\lambda }\;\;\longrightarrow & {} \;\; e^{-\mu } + \alpha f, \end{aligned}$$
(16)

where \(\{f,g\}\) are the so-called decoupling functions and \(\alpha \) is the same free parameter that “controls” the influence of \(\theta _{\mu \nu }\) on \(T_{\mu \nu }^{(s)}\). Now, replacing (15) and (16) in the system (7)–(9), we are able to split the complete set of differential equations into two subsets: one describing a seed sector sourced by the conserved energy-momentum tensor, \(T_{\mu \nu }^{(s)}\)

$$\begin{aligned} \kappa \rho ^{(s)}= & {} \frac{1}{r^2}-e^{-\mu }\left( \frac{1}{r^2}-\frac{\mu '}{r}\right) , \end{aligned}$$
(17)
$$\begin{aligned} \kappa p_r^{(s)}= & {} -\frac{1}{r^2}+e^{-\mu }\left( \frac{1}{r^2}+\frac{\xi '}{r}\right) , \end{aligned}$$
(18)
$$\begin{aligned} \kappa p_{t}^{(s)}= & {} \frac{e^{-\mu }}{4}\left( 2\xi ''+\xi '^2-\mu '\xi '+2\frac{\xi '-\mu '}{r}\right) , \end{aligned}$$
(19)

and the other set corresponding to source \(\theta _{\mu \nu }\)

$$\begin{aligned} \kappa \theta _{0}^{0}= & {} -\frac{\alpha f}{r^2}-\frac{\alpha f'}{r} \end{aligned}$$
(20)
$$\begin{aligned} \kappa \theta _{1}^{1}+\alpha Z_{1}= & {} -\alpha f\left( \frac{1}{r^2}+\frac{\nu '}{r}\right) \end{aligned}$$
(21)
$$\begin{aligned} \kappa \theta _{2}^{2}+\alpha Z_{2}= & {} -\frac{\alpha f}{4}\left( 2\nu ''+\nu '^2+\frac{2\nu '}{r}\right) -\frac{\alpha f'}{4}\left( \nu '+\frac{2}{r}\right) ,\nonumber \\ \end{aligned}$$
(22)

where \(Z_{1}=\frac{e^{-\mu }g'}{r}\) and \(4Z_2=e^{-\mu }(2g''+\alpha g'^2+\frac{2g'}{r}+2\xi 'g'-\mu 'g')\).

By another hand if we insert \(\nu '=\xi '+\alpha g'\) in Eq. (14) results

$$\begin{aligned}&\bigg [-(p_r^{(s)})'-\frac{\xi '}{2}\left( \rho ^{(s)}+p_r^{(s)}\right) -\frac{2}{r}\left( p_r^{(s)}-p_t^{(s)}\right) \bigg ]\nonumber \\&\quad -\frac{\alpha g'}{2}\left( \rho ^{(s)}+p_r^{(s)}\right) +(\theta _{1}^{1})'-\frac{\nu '}{2}(\theta _{0}^{0}-\theta _{1}^{1})\nonumber \\&\quad -\frac{2}{r}(\theta _{2}^{2}-\theta _{1}^{1})=0, \end{aligned}$$
(23)

where the bracket in Eq. (23) represents the divergence of \(T_{\mu \nu }^{(s)}\) calculated with the metric \(\lbrace \xi ,\mu \rbrace \), and due to \(T_{\mu \nu }^{(s)}\) satisfies with

$$\begin{aligned} \nabla _{\sigma }^{(\xi ,\mu )}T_{\nu }^{\sigma (s)} = 0 \end{aligned}$$
(24)

since \(T_{\nu }^{\sigma (s)}\) correspond a known “seed” source that satisfies its respective EFE.

Note that

$$\begin{aligned} \nabla _{\sigma }T_{\nu }^{\sigma (s)}=\nabla _{\sigma }^{(\xi ,\mu )}T_{\nu }^{\sigma (s)}-\frac{\alpha g'}{2}(T_{0}^{0 (s)}-T_{1}^{1 (s)})\delta _{\nu }^{1} \end{aligned}$$
(25)

where the divergence \(\nabla _{\sigma }\) is calculated with the metric \(\lbrace \nu ,\lambda \rbrace \). Explicitly Eq. (24) give us

$$\begin{aligned} (p_r^{(s)})'+\frac{\xi '}{2}(\rho ^{(s)}+p_r^{(s)})+\frac{2}{r}(p_r^{(s)}-p_t^{(s)})=0, \end{aligned}$$
(26)

which is a linear combination of Eqs. (17)–(19). By the way if we take in account the Eqs. (24) and (23) results that

$$\begin{aligned} \nabla _{\sigma }T_{\nu }^{\sigma (s)}=-\frac{\alpha g'}{2}(T_{0}^{0 (s)}-T_{1}^{1 (s)})\delta _{\nu }^{1} \end{aligned}$$
(27)

and

$$\begin{aligned} \nabla _{\nu }^{\sigma }\theta _{\nu }^{\sigma }=-\nabla T_{\nu }^{\sigma (s)}=\frac{\alpha g'}{2}(T_{0}^{0 (s)}-T_{1}^{1 (s)})\delta _{\nu }^{1}, \end{aligned}$$
(28)

which encodes the information of energy-momentum exchange \(\Delta \,\mathrm{E}\) between the sources, namely

$$\begin{aligned} \Delta \,\mathrm{E}= \frac{g'}{2}\left( \rho +p_r\right) , \end{aligned}$$
(29)

which we can write in terms of pure geometric functions as

$$\begin{aligned} \Delta \,\mathrm{E}= \frac{g'}{2\,\kappa }\frac{e^{-\mu }}{r}\left( \xi '+\mu '\right) . \end{aligned}$$
(30)

From the expression (30) we can see that \(g'>0\) yields \(\Delta \,\mathrm{E}>0\). This indicates \(\nabla _\sigma \theta ^{\sigma }_{\ \nu }>0\), according to the conservation equation (29), which means that the source \(\theta _{\mu \nu }\) is giving energy to the environment. The opposite occurs when \(g'<0\) (see Refs. [102, 103] for a recent study of the exchange of energy between a perfect fluid and a polytrope).

Now, in order to take in account that the metric should be continuous at surface \(\Sigma \) of star we have to match smoothly the interior metric with the outside, we require

$$\begin{aligned} e^{\nu }\Big |_{\Sigma ^{-}}= & {} \left( 1 - \frac{2M}{r}\right) \Bigg |_{\Sigma ^{+}}\,, \end{aligned}$$
(31)
$$\begin{aligned} e^{-\lambda }\Big |_{\Sigma ^{-}}= & {} \left( 1 - \frac{2M}{r}\right) \Bigg |_{\Sigma ^{+}}\,, \end{aligned}$$
(32)
$$\begin{aligned} p_r(r) \Big |_{\Sigma ^{-}}= & {} p_r(r) \Big |_{\Sigma ^{+}}, \end{aligned}$$
(33)

where M and R are the mass and radius of the star, respectively. Equations (31)–(33) correspond to the continuity of the first and second fundamental form across that surface.

Note that the system of Eqs. (7)–(9) represents three differential equations with five unknowns functions, namely \(\lbrace \nu , \lambda , \rho , p_r, p_t\rbrace \) represents a static and spherically symmetric space time sourced by an anisotropic fluid. In such sense, two auxiliary conditions must be provided, namely metric conditions, equations of state, etc. Then using GD approach we use a seed solution which reduce the number of degrees of freedom to four and, as a consequence, only one extra condition is required. Thus the extra condition have been implemented in the decoupling sector given by Eqs. (20)–(22) as some equation of state which leads to a differential equation for the decoupling functions f and g. However, we will take an alternative route in order to obtain the decoupling functions, which is the complexity factor that we shall introduce in the next section.

3 Complexity of compact sources

In order to characterize the complexity of self-gravitating fluid distributions, recently in Ref. [82] a new definition of such property has been introduced. This definition is based on the intuitive idea that the least complex gravitational system should be characterized by a homogeneous energy density distribution and isotropic pressure. Thus one expects that a complexity factor should measure the relation between the inhomogeneity in the energy density and the pressure anisotropy of a system. In such sense in [82] has been proposed a structure scalar function (such scalar and others were analyzed in detail by first time in [104]) associated to the orthogonal splitting of the Riemann tensor [105, 106] in spherically symmetric space–times which capture the essence of what we mean by complexity, namely

$$\begin{aligned} Y_{TF} = \kappa \Pi - \frac{\kappa }{2 r^3}\int ^{r}_{0} {\tilde{r}}^3 \rho ' d{\tilde{r}}, \end{aligned}$$
(34)

with \(\Pi \equiv p_{r}-p_{t}\). Also, it can be shown that (34) allows to write the Tolman mass as,

$$\begin{aligned} m_{T} = (m_{T})_{\Sigma }\left( \frac{r}{r_{\Sigma }}\right) ^3 + r^3\int ^{r_{\Sigma }}_{r} \frac{e^{( \nu + \lambda )/2}}{{{\tilde{r}}}} Y_{TF} d{\tilde{r}}, \end{aligned}$$
(35)

which can be considered as a solid argument to define the complexity factor by means of this scalar given that this function, encompasses all the modifications produced by the energy density inhomogeneity and the anisotropy of the pressure on the active gravitational mass. This scalar represents a suitable quantity that define the property of complexity of self-gravitating static spheres (the extension for the time dependent case is defined in [107]) that permits us to study them in a deepen way.

It is worth noticing that the condition \(Y_{TF} = 0\) (also known called as vanishing complexity condition) is satisfied not only in the simplest case of isotropic and homogeneous system, but also in the cases where

$$\begin{aligned} \Pi =\frac{1}{2r^{3}}\int \limits _{0}^{r}{\tilde{r}}^{3}\rho ' d{\tilde{r}}. \end{aligned}$$
(36)

In fact, the Eq. (36) represents a non-local equation of state, which can be use as a complementary condition to close the system of EFE.

In specific, \(Y_{TF} = 0\) in terms of the complexity factors of seed solution (\(Y_{TF}^{(s)}\)) and extra source \((Y_{TF}^{\theta })\) is

$$\begin{aligned} Y_{TF} = Y_{TF}^{(s)} + Y_{TF}^{\theta } = 0, \end{aligned}$$
(37)

namely

$$\begin{aligned} Y_{TF}^{(s)} + \kappa \Pi _{\theta }-\frac{\kappa }{2r^3}\int _{0}^{r}{\tilde{r}}^3\rho _{\theta }'d{\tilde{r}} = 0. \end{aligned}$$
(38)

4 Radial metric deformation

In order to obtain a convenient solution with zero complexity we consider the case when \(g = 0\) and \(f \ne 0\), namely, MGD (see [32, 108, 109] for details). Then from Eqs. (15), (16), (20)–(22) we obtain the matter sector of the source \(\theta _{\mu \nu }\)

$$\begin{aligned} \kappa \rho _{\theta }= & {} \kappa \theta _{0}^{0}= -\frac{\alpha f}{r^2}\left( 1+\frac{r f'}{f}\right) \end{aligned}$$
(39)
$$\begin{aligned} \kappa p_{\theta r}= & {} -\kappa \theta _{1}^{1}=\frac{\alpha f}{r^2}\left( 1+r\xi '\right) \end{aligned}$$
(40)
$$\begin{aligned} \kappa p_{\theta t}= & {} -\kappa \theta _{2}^{2}\nonumber \\= & {} \frac{\alpha f}{4}\left[ 2\xi ''+\xi '^2+2\frac{\xi '}{r}+\frac{f'}{f}\left( \xi '+\frac{2}{r}\right) \right] , \end{aligned}$$
(41)

in such that Eq. (38) turns into

$$\begin{aligned} f' + \left( 2\frac{\xi ''}{\xi '}+\xi '-\frac{2}{r}\right) f-\frac{4Y_{TF}^{(s)}}{\alpha \xi '} = 0. \end{aligned}$$
(42)

The Eq. (42) allows us to find the function f given the information of a seed solution. In this work we use the Heintzmann IIa solution [110, 111] as a seed solution whose metric components reads

$$\begin{aligned} e^{\xi (r)}= & {} A^2 \left( B r^2+1\right) ^3 \end{aligned}$$
(43)
$$\begin{aligned} e^{-\mu (r)}= & {} 1-\frac{3 B r^2}{2}\frac{\left( \frac{C}{\sqrt{4 B r^2+1}}+1\right) }{\left( B r^2+1\right) }, \end{aligned}$$
(44)

where A, B and C are constants.

The complexity factor of this seed solution can be obtained from EFE and (34), thus it is

$$\begin{aligned} Y_{TF}^{(s)} = \frac{3 B^2 r^2 \left( C \left( 6 B r^2+3\right) +\left( 4 B r^2+1\right) ^{3/2}\right) }{2 \left( B r^2+1\right) ^2 \left( 4 B r^2+1\right) ^{3/2}}. \end{aligned}$$
(45)

Now, using (43) and (45) in (42) we obtain the deformation

$$\begin{aligned} f = \frac{c_0}{B r^2+1} + \frac{B r^2 }{2 \alpha \left( B r^2+1\right) }\left( \frac{3 C}{\sqrt{4 B r^2+1}}+1\right) , \end{aligned}$$
(46)

where \(c_0\) is a integration constant. It can be shown that to ensure regularity in the matter sector the constant \(c_0\) must be zero.

Now replacing (44) and (46) in (16) we find the new radial metric component

$$\begin{aligned} e^{-\lambda } = \frac{1}{B r^2+1}. \end{aligned}$$
(47)

So using the EFE (7)–(9) we arrive at

$$\begin{aligned} \rho= & {} \frac{B \left( B r^2+3\right) }{\kappa \left( B r^2 + 1\right) ^2}, \end{aligned}$$
(48)
$$\begin{aligned} p_r= & {} \frac{B \left( 5-B r^2\right) }{\kappa \left( B r^2 + 1\right) ^2}, \end{aligned}$$
(49)
$$\begin{aligned} p_t= & {} \frac{5 B}{\kappa \left( B r^2 + 1\right) ^2}. \end{aligned}$$
(50)

Due to this solution depends only one constant B, we will not analyze their physical acceptability, but however it is useful since it can be used as seed solution.

5 Temporal metric deformation

In this section we use the solution found in the above section as seed solution. Specifically we consider the case when \(f = 0\) and \(g \ne 0\), such choose of deformation on the metric is known as Temporal Geometric Deformation (TGD) (for a detailed discussion see Ref. [101]). Then, from of Eqs. (15), (16), (20)–(22) we obtain

$$\begin{aligned} \rho _{\theta }= & {} \kappa \theta _{0}^{0} = 0, \end{aligned}$$
(51)
$$\begin{aligned} p_{\theta r}= & {} -\kappa \theta _{1}^{1} = \alpha Z_{1}, \end{aligned}$$
(52)
$$\begin{aligned} p_{\theta t}= & {} -\kappa \theta _{2}^{2} = \alpha Z_{2}, \end{aligned}$$
(53)

therefore

$$\begin{aligned} \Pi _{\theta } = p_{\theta r}-p_{\theta t} = \frac{\alpha }{\kappa }(Z_1-Z_2). \end{aligned}$$
(54)

In this way Eq. (38) becomes to

$$\begin{aligned} Y_{TF}^{(s)} = \alpha (Z_2-Z_1), \end{aligned}$$
(55)

implicitly it give us

$$\begin{aligned} g'' + \frac{\alpha }{2}g'^2 + \frac{1}{2}\left( 2\xi '-\mu '-\frac{2}{r}\right) g'-\frac{4 e^{\mu }}{\alpha }Y_{TF}^{(s)} = 0, \end{aligned}$$
(56)

which is a differential equation for g as unknown quantity due to \(\xi \) and \(\mu \) can be known since we assign a seed solution in order to close our problem.

Thus using the metrics of the found solution in the above section (43) and (47) in (56), we obtain

$$\begin{aligned} g= & {} \beta -\frac{2}{\alpha }\ln {\left( \alpha -6 B \eta \left( B r^2+1\right) ^{3/2}\right) }\nonumber \\&-\frac{3}{\alpha }\ln { \left( B r^2+1\right) }, \end{aligned}$$
(57)

where \(\beta \) and \(\eta \) are integration constants.

Now using this geometric deformation g in (15) we obtain the temporal metric

$$\begin{aligned} e^{\nu } = a\left( \alpha -6 B \eta \left( B r^2+1\right) ^{3/2}\right) ^2, \end{aligned}$$
(58)

where \(a = A^2 e^{\alpha \beta }\). So between the above and the present sections, we obtain the new interior space-time given by

$$\begin{aligned} e^{\nu }= & {} a\left( \alpha -6 B \eta \left( B r^2+1\right) ^{3/2}\right) ^2 \end{aligned}$$
(59)
$$\begin{aligned} e^{-\lambda }= & {} \frac{1}{B r^2+1}. \end{aligned}$$
(60)

Now using the metric components (60) and (59) in the EFE (7)–(9) the matter sector obtained is

$$\begin{aligned} \rho= & {} \frac{B \left( B r^2+3\right) }{\kappa \left( B r^2 + 1\right) ^2} \end{aligned}$$
(61)
$$\begin{aligned} p_{r}= & {} \frac{B \left( \alpha -6 B \eta \left( B r^2-5\right) \sqrt{B r^2+1}\right) }{\kappa \left( B r^2+1\right) \left( 6 B \eta \left( B r^2+1\right) ^{3/2}-\alpha \right) } \end{aligned}$$
(62)
$$\begin{aligned} p_{t}= & {} \frac{B \left( \alpha +30 B \eta \left( B r^2+1\right) ^{3/2}\right) }{\kappa \left( B r^2 + 1\right) ^2 \left( 6 B \eta \left( B r^2+1\right) ^{3/2}-\alpha \right) }. \end{aligned}$$
(63)

Note that (60) was obtained through the MGD and (59) through the TGD using the vanishing complexity as complementary condition, namely, this new solution is obtained through the use of 2-steps GD approach considering the Heintzmann IIa as seed solution, which has been modified as result of the influence of source \(\theta _{\mu \nu }\) over the \(T_{\mu \nu }\). Such influence firstly modified the radial metric of seed solution, and after modified the temporal one, in such a way that we obtain a deformed Heintzmann IIa solution whose matter sector is in the anisotropic regime of pressure.

Now using the continuity conditions given by Eqs. (31)–(33) we arrive at

$$\begin{aligned} \eta= & {} \frac{\alpha }{6 B^2 R^2 \sqrt{B R^2+1}-30 B \sqrt{B R^2+1}} \end{aligned}$$
(64)
$$\begin{aligned} B^2= & {} \frac{4 M^2}{R^4 (R-2 M)^2} \end{aligned}$$
(65)
$$\begin{aligned} a= & {} \frac{(12 M-5 R)^2}{36 \alpha ^2 R (R-2 M)}. \end{aligned}$$
(66)

It is worth mentioning that from (65) and (66) is clear that compactness parameter satisfies \(R > 2M\), which is in accordance with the restriction that any stable configuration should be greater than Schwarzschild radius.

6 Discussion

In this section we analyze the solution obtained previously in order to verify its physical acceptability [112].

6.1 Metrics

In Figs. 1 and 2 we show the metric functions for the compactness factors showed in the caption. We can observe that \(e^{\nu }\) is a monotonously increasing function with \(e^{\nu (0)} = constant\). For other hand \(e^{-\lambda }\) is a monotonously decreasing function with \(e^{-\lambda (0)} = 1\), as expected.

Fig. 1
figure 1

\(e^{\nu }\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

Fig. 2
figure 2

\(e^{-\lambda }\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

6.2 Matter sector

In Figs. 34 and 5 we show the profile of matter sector as a function of radial coordinate. All quantities, \(\rho \), \(p_r\) and \(p_t\) are finite at center of star and decrease monotonously toward the surface. Furthermore, \(p_r(0) = p_t(0)\) and \(p_t(r) > p_r(r)\) for all \(r > 0\), as expected (see Fig. 6). So the matter sector fulfill the physical requirements for acceptable interior solution.

Fig. 3
figure 3

\(\kappa \rho \) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

Fig. 4
figure 4

\(\kappa p_{r}\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

Fig. 5
figure 5

\(\kappa p_{t}\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

Fig. 6
figure 6

\(\kappa (p_{t}-p_{r})\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

6.3 Energy conditions and causality

An acceptable interior solution must be satisfies the dominant energy condition (DEC) in order to avoid the violation of causality. The DEC requires

$$\begin{aligned} \rho - p_{r} \ge 0\ \text {and}\ \rho - p_{t} \ge 0. \end{aligned}$$
(67)

In Figs. 7 and 8 the profiles of \(\rho -p_{r}\) and \(\rho -p_{t}\) are showed. Note that the solution satisfy the DEC for all compactness factors involved. In Figs. 9 and 10 we show the radial and tangential sound velocities are less than unity, as required since we are assuming \(c = 1\).

Fig. 7
figure 7

\(\kappa (\rho -p_{r})\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

Fig. 8
figure 8

\(\kappa (\rho -p_{t})\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

Fig. 9
figure 9

\(v_{r}(r)\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

Fig. 10
figure 10

\(v_{t}(r)\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

6.4 Redshift

In Fig. 11 we show the redshift \(z(r) = e^{-\nu /2}-1\) as a function of the radial coordinate. Observe that z is a monotonously decrease function and its value is less than universal surface bound for solutions satisfying the DEC, namely \(z_{bound} = 5.211\) [113].

Fig. 11
figure 11

z(r) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

We have checked that the solution fulfills the fundamental physical conditions for those compactness parameters such that \(0.403 \le u = M/R \le 0.411\).

Now we go and step further studying the stability of the solution in the next two subsections.

6.5 Stability against convection

The stability of a self-gravitating sphere to convection implies the buoyancy principle inside of fluid, which implies that any fluid element displaced downward floats back to its initial position. It was demonstrated in [114], in such a way that

$$\begin{aligned} \rho ''(r) \le 0. \end{aligned}$$
(68)

We show the profile the \(\rho ''\) in function of radial coordinate in Fig. 12. We observe that the model is stable after undergoing convective motion at the inner shells, while for the outer shells is unstable.

Fig. 12
figure 12

\(\rho ''\) for compactness factors of 0.403 (blue line), 0.405 (black line) and 0.410 (red line)

6.6 Stability against collapse

Since the model found here has sound velocities profiles that are not monotonically decreasing with radius (see Figs. 9 and 10), which could be interpreted as a signal of instability. However, it may not necessarily be definitive given the effects of anisotropy [115, 116]. Then to analyse its stability we study the behaviour of the adiabatic index (\(\Gamma \)) in the radial direction given by

$$\begin{aligned} \Gamma = \frac{\rho + p_{r}}{p_{r}}\frac{d p_{r}}{d\rho }, \end{aligned}$$
(69)

which should satisfy

$$\begin{aligned} \Gamma \ge \Gamma _{crit} \end{aligned}$$
(70)

where

$$\begin{aligned} \Gamma _{crit} = \frac{4}{3} + \frac{19}{21}u. \end{aligned}$$
(71)

The above relation takes in account relativistic corrections to the adiabatic index \(\Gamma \) that could introduce instabilities inside the star. So in this way the stability condition (70) applies to any relativistic compact object supported by anisotropic fluid (for a detailed discussion about this point see Refs. [41, 117, 118]).

Then in this way we show the adiabatic index profile as a function of radial coordinate in Fig. 13. We observe from this figure that the model present instability against collapse for the whole compactness factors showed in the caption.

Fig. 13
figure 13

\(\Gamma \) for compactness factors of 0.403 (\(\Gamma _{crit}=1.69795\)) (blue line), 0.405 (\(\Gamma _{crit}=1.69976\)) (black line), 0.410 (\(\Gamma _{crit}=1.70429\)) (red line) and 0.411 (\(\Gamma _{crit}=1.70519\)) (green line)

In summary, the model presented in this manuscript satisfy the fundamental physical conditions detailed in [112], but however the model present instability against convection motion and collapse for the restricted set of analysed compactness parameters.

7 Conclusions

We applied the approach of 2-steps GD described in [85], which is based on performing consecutive, non-simultaneous deformations of the metric components on a known seed solution, in specific the left-path approach where the first one metric deformed is the radial and after the temporal one, with the complement condition of vanishing complexity with success in order to extend the known Heintzmann IIa isotropic solution to the anisotropic regime of pressure. The found solution fulfills the fundamental acceptability physical conditions for a restricted set of compactness factor; namely, (i) metric functions are regular inside the star, moreover \(e^{\nu (0)} = constant\) and \(e^{-\lambda (0)} = 1\), (iii) the material sector (density energies and pressures) are regular inside star and decrease monotonously outward, (iii) the solutions satisfies the dominant energy condition. Regarding the convection stability, we found that the model has instabilities in the outer shells in this sense. Also, we found that the model is unstable against collapse for the set of analysed compactness factor. Therefore, results interesting investigate in future works the stability of this model in presence of small perturbations on matter sector. As well, the present manuscript represents a clear example of the feasibility of using 2-steps GD in order to find new physically acceptable interior solutions in the anisotropic regime of pressure. Therefore, it turns out that the 2-steps GD is a convenient alternative to using the GD through MGDe with vanishing complexity factor as complement condition, since the consideration of MGDe with the simultaneously deformations of the radial and temporal metrics in general is a difficult task. Also, is worth to mention that the method used in this work represent another valid tool in order to obtain interior solutions in the regime of anisotropic pressure that poses the simplest complexity, and which could be interesting from the point of view of stability against small perturbations. As well it would be interesting to use the same procedure used here with other values of complexity.