1 Introduction

It is widely believed that black holes typically emerge through the collapse of an immense star during the latter phase of its life-cycle [1, 2]. These stand as some of the most captivating revelations in the realm of science. Their presence has been definitively established through the identification of gravitational waves [3], shadow images [4,5,6,7,8], tracking of stellar movements within the Galactic Center, and the precise measurement of the orbital trajectories of these stars. These methods offer a profound opportunity to explore the fundamental essence of black holes and the deep nature of spacetime [9,10,11] These intricate objects offer way for delving into various realms of physics, encompassing quantum gravity, thermodynamics, superconducting phase transitions, paramagnetism-ferromagnetism phase transitions, superfluidity, condensed matter physics, information theory, and the holographic hypothesis. One of the most captivating revelations within the domain of general relativity is the profound interplay between black holes and thermodynamics. In recent times, this relationship has undergone intensive scrutiny within the field of physics. The profound connection between black holes and thermodynamics can be traced back to the groundbreaking work of Hawking [12, 13]. Nevertheless, astronomical observations compellingly suggest that black holes are enveloped by dark matter and that they possess a rotational aspect, necessitating the utilization of the Kerr spacetime geometry.

In a recent development, a novel approach for investigating the thermodynamic aspects of black holes has been presented in the work referenced as Ref. [14]. In this paper, the authors have done a comprehensive examination of black holes by studying the topological classes of black hole thermodynamics employing the generalized off-shell free energy framework. As a consequence of this approach, the manifold of black hole solutions is categorized into three distinct topological classes, their differentiation arising from diverse topological numbers. Within this manuscript, our focus is directed towards an examination of the thermodynamic topological categories pertaining to both stationary and rotating black holes immersed in the framework of PFDM. To comprehend the impact of PFDM upon critical aspects such as black hole shadows, quasinormal modes, and deflection angles, a comprehensive reference can be found in the following Refs. [17,18,19,20,21,22]. The topological approach to study the thermodynamics was used in recent works [23,24,25,26,27,28] and, in particular, it was extended to rotating black holes in Ref. [29]. In what follows, we shall sketch a few concepts and provide an overview of the topological methodology introduced in [14]. First of all, one has to use the notion of the generalized off-shell Helmholtz free energy, given by

$$\begin{aligned} {\mathscr {F}} = M -\frac{S}{\tau }. \end{aligned}$$
(1)

Once we have a black hole solution, several fundamental parameters come into play. These include the black hole mass denoted as M, the entropy represented by S, and an essential factor \(\tau \), inversely related to the temperature of the encompassing cavity. Furthermore, as an integral component of this framework, a core vector \(\phi \) can be introduced, as below [14]

$$\begin{aligned} \phi = \Big (\frac{\partial \mathscr {F}}{\partial r_{h}}, ~-C\cot \Theta \csc \Theta \Big ), \end{aligned}$$
(2)

where C is some arbitrary constant. In a broader context, this constant possesses the capacity to alter the orientation of the unit vector n. For ease of exposition, we will set \(C = 1\). The two key parameters, \(r_h\) and \(\Theta \), conform to the conditions \(0< r_h < +\infty \) and \(0\le \Theta \le \pi \), respectively. Notably, the component \(\phi ^\Theta \) exhibits divergence at \(\Theta = 0,\pi \), thereby signifying an outward vector orientation in these regions. Utilizing Duan’s theory of \(\phi \)-mapping topological currents, we can write the expression for a topological current as follows [15, 16] (see also [14])

$$\begin{aligned} j^{\mu }=\frac{1}{2\pi }\epsilon ^{\mu \nu \rho }\epsilon _{ab}\partial _{\nu }n^{a}\partial _{\rho }n^{b}, \quad \mu ,\nu ,\rho =0,1,2, \end{aligned}$$
(3)

where \(\partial _{\nu }= \partial /\partial {}x^{\nu }\) and \(x^{\nu }=(\tau ,~r_h,~\Theta )\). The unit vector n reads as \(n = (n^r, n^\Theta )\), where \(n^r = \phi ^{r_h}/||\phi ||\) and \(n^\Theta = \phi ^{\Theta }/||\phi ||\). It is simple to demonstrate that the topological current given above is conserved, allowing one to easily deduce \(\partial _{\mu }j^{\mu } = 0\). It is then established that the topological current \(j^\mu \) is a \(\delta \)-function of the field configuration [15, 16]

$$\begin{aligned} j^{\mu }=\delta ^{2}(\phi )J^{\mu }\Big (\frac{\phi }{x}\Big ), \end{aligned}$$
(4)

where the 3-dimensional Jacobian \(J^{\mu }\big (\phi /x\big )\) is defined as: \(\epsilon ^{ab}J^{\mu } \big (\phi /x\big ) = \epsilon ^{\mu \nu \rho }\partial _{\nu }\phi ^a\partial _{\rho }\phi ^b\). It is simple to indicate that \(j^\mu \) equals to zero only when \(\phi ^a(x_i) = 0\), hence the topological number W can be determined as follows:

$$\begin{aligned} W = \int _{\Sigma }j^{0}d^2x = \sum _{i=1}^{N}\beta _{i}\eta _{i} = \sum _{i=1}^{N}w_{i}, \end{aligned}$$
(5)

where \(\beta _i\) is the positive Hopf index that counts the number of the loops of the vector \(\phi ^a\) in the \(\phi \)-space when \(x^{\mu }\) are around the zero point \(z_i\), whilst \(\eta _{i}= \textit{sign}(J^{0}({\phi }/{x})_{z_i})=\pm 1\) is the Brouwer degree, and \(w_{i}\) is the winding number for the ith zero point of \(\phi \) that is contained in \(\Sigma \).

This paper is organized as follows: in the subsequent section, we study the topological classifications concerning the Kerr and Schwarzschild black holes within the context of PFDM. Moving forward, in Sect. 3 our focus shifts to an examination of the thermodynamic topological classes associated with Kerr and Kerr-AdS black holes in the presence of PFDM. We extend our analysis in Sect. 4 to encompass the Kerr–Newman black hole existing within the PFDM framework. Additionally, in Sect. 5, we elaborate on the impact induced by a nonlinear magnetic charge, specifically in the form of a rotating Hayward black hole within PFDM. Our paper culminates with a presentation of conclusions, outlined in Sect. 6.

2 Kerr black hole in PFDM background

To begin, let us recall that the metric for a black hole in PFDM can be derived through the utilization of the action for the gravity theory minimally coupled to PFDM [30]

$$\begin{aligned} {\mathscr {I}}=\int dx^4\sqrt{-g}\left( \frac{1}{16\pi G} R+ {\mathscr {L}}_{DM}\right) , \end{aligned}$$
(6)

then from the Einstein’s field equations obtained as

$$\begin{aligned} R_{\mu \nu }-\frac{1}{2}g_{\mu \nu }R = 8\pi G T_{\mu \nu }^{DM}, \end{aligned}$$
(7)

along with the effective energy density of PFDM that is given by

$$\begin{aligned} T_{t}^{\,t}=T_{r}^{\,r}=\frac{1}{8\pi }\frac{\alpha }{r^{3}}. \end{aligned}$$
(8)

One can then obtain the static solution and perform a Newman-Janis method to get the line element of the Kerr-like black hole in the dark matter background is given as [30]

$$\begin{aligned} ds^{2}= & {} -\left( 1-\frac{2mr-\alpha r \ln \left( \frac{r}{|\alpha |}\right) }{\Sigma }\right) dt^2+\frac{\Sigma }{\Delta _r}dr^2 \nonumber \\{} & {} +\Sigma d\theta ^2-2a\left( \frac{2mr-\alpha r \ln \left( \frac{r}{|\alpha |}\right) }{\Sigma }\right) dtd\phi \nonumber \\{} & {} +\sin ^2\theta \left( r^2+a^2+a^2\sin ^2\theta \frac{2mr-\alpha r\ln \left( \frac{r}{|\alpha |}\right) }{\Sigma }\right) d\phi ^2,\nonumber \\ \end{aligned}$$
(9)

where

$$\begin{aligned} \Delta _r= & {} r^{2}-2mr+a^{2}+\alpha r\ln \left( \frac{r}{|\alpha |}\right) , \end{aligned}$$
(10)
$$\begin{aligned} \Sigma= & {} r^{2}+a^{2}\cos ^{2}\theta . \end{aligned}$$
(11)

Here m is the mass parameter, a is the rotation parameter, and \(\alpha \) represents the dark matter parameter. For each chosen value \(\alpha \) and the corresponding \(a<k_c\),Footnote 1 the line element (9) represents a black hole with two horizons, the inner horizon \(r_-\) and the outer (Cauchy) horizon \(r_h\), respectively [31]. For \(a=k_c\), the line element represents an extremal black hole with one horizon.Footnote 2 The size of the black hole depends on the PFDM parameter \(\alpha \). The mass M, entropy S, and the Hawking temperature T of the Kerr black hole in PFDM background is given by [32]

$$\begin{aligned} M= & {} m, \end{aligned}$$
(12)
$$\begin{aligned} S= & {} \pi \left( r_h^2+a^2\right) ,\end{aligned}$$
(13)
$$\begin{aligned} T= & {} \frac{r_h}{4\pi \left( r_h^2+a^2\right) }\left( 1-\frac{a^2}{r^2_h}+\frac{\alpha }{r_h}\right) . \end{aligned}$$
(14)

The generalized off-shell free energy of the system in this case takes the form

$$\begin{aligned} {\mathscr {F}}= & {} \frac{1}{2r_h}\left[ r^2_h+a^2+\alpha r_h \ln \left( \frac{r_h}{|\alpha |}\right) \right] -\frac{\pi \left( r_h^2+a^2\right) }{\tau }. \end{aligned}$$
(15)

Thus, the component of the vector field \(\phi \) can be written as

$$\begin{aligned} \phi ^{r_h}= & {} \frac{1}{2r_h^2}\left( r^2_h+\alpha r_h-a^2\right) -\frac{2\pi r_h}{\tau },\end{aligned}$$
(16)
$$\begin{aligned} \phi ^\theta= & {} -\cot {\Theta }\csc {\Theta }. \end{aligned}$$
(17)

The inverse temperature parameter surrounding the Kerr black hole in PDFD can be written as

$$\begin{aligned} \tau =\frac{4\pi r^3_h}{r^2_h+\alpha r_h-a^2}\equiv {\mathscr {G}}(r_h). \end{aligned}$$
(18)

This shows the inverse temperature parameter \(\tau \) (which is zero point of the n vector field \(\phi \)) decreases with increasing \(\alpha \). Now, to find the winding number \(w_i\), and the topological number W, we use the approach given in [34] and verify our results by plotting the vector field \(\phi \). Thus, we define a characterized complex function as

$$\begin{aligned} {\mathscr {R}}(z)=\frac{1}{\tau -{\mathscr {G}}(z)}. \end{aligned}$$
(19)

The winding number \(\omega _i\) is define as [34]

$$\begin{aligned} w_i=\frac{\text {Res}{\mathscr {R}}\left( z_i\right) }{|\text {Res}{\mathscr {R}}\left( z_i\right) |}\equiv \text {Sgn}\left[ \text {Res}{\mathscr {R}}\left( z_i\right) \right] , \end{aligned}$$
(20)

where \(\text {Res}{\mathscr {R}}\left( z_i\right) \) represents residue of \({\mathscr {R}}\left( z_i\right) \) corresponding to the singular point \(z_i\), Sgn(x) represents sign function and |z| represents the absolute value of z.

For the Kerr black hole in PFDM the characterized complex function takes the form

$$\begin{aligned} {\mathscr {R}}\left( z\right)= & {} -\frac{z^2+\alpha z-a^2}{4\pi z^3-\tau \left( z^2+\alpha z-a^2\right) }\equiv -\frac{z^2+\alpha z-a^2}{{\mathscr {A}}\left( z\right) }.\nonumber \\ \end{aligned}$$
(21)

The roots analysis of \({\mathscr {A}}\left( z\right) =0\) shows,Footnote 3 for any choice of \(\alpha \) with \(a<k_c\) and \(\tau <\tau _c\) where

$$\begin{aligned} \tau _c=4\pi \frac{\left( -\alpha +\sqrt{3a^2+\alpha ^2}\right) ^3}{2a^2-\alpha \left( -\alpha +\sqrt{3a^2+\alpha ^2}\right) }, \end{aligned}$$
(22)

there is one real negative and two complex roots. So, the off-shell condition cannot be satisfied. However, for \(\tau _c<\tau \), we have three singular points such that

$$\begin{aligned} z_1,z_2,z_3\in {\mathbb {R}},~ \text {and}~ 0<z_2<z_1~\text {whereas}~z_3<0. \end{aligned}$$
(23)

So, the corresponding winding numbers and the topological number are

$$\begin{aligned} w_1=-1,~w_2=1~\text {and}~W=0. \end{aligned}$$
(24)

This shows that the winding numbers and the topological number for Kerr black hole in PFDM are the same as that of the Kerr black hole [29]. This can also be seen from Fig. 1 (left hand side) which is plotted for unit vector field n for the Kerr black hole in PFDM. The black dots represent the zero points of the vector field \(\phi \).

Fig. 1
figure 1

Left hand side: the red arrows represent unit vector field n on a portion of the \(r_h\)-\(\Theta \) plane plotted for the Kerr black hole in PFDM with \(a/r_0=1/2\), \(\tau /r_0=4\pi \) and \(\alpha /r_0=1/2\). Right hand side: the plot of the vector field for the Schwarzschild black hole in PFDM with \(\tau /r_0=4\pi \) and \(\alpha /r_0=1/2\). The zero points are marked with black dots and are located at (left hand side) \((r_h/r_0,\Theta )=(0.35,\pi /2)\), and \((1.24,\pi /2)\); (right hand side) \((r_h/r_0,\Theta )=(1.37,\pi /2)\)

2.1 Schwarzschild black hole in dark matter background

As a special case of the Kerr black hole in PFDM we can obtain the static line element; namely, the Schwarzschild black hole in PFDM with the line element

$$\begin{aligned} ds^{2}= & {} -f(r)dt^2+\frac{1}{f(r)}dr^2+r^2(d\theta ^2+\sin ^2\theta d\phi ^2), \end{aligned}$$
(25)

with

$$\begin{aligned} f(r)=1-\frac{2m}{r}+\frac{\alpha }{r} \ln \left( \frac{r}{|\alpha |}\right) , \end{aligned}$$
(26)

where m representing the mass and \(\alpha \) as the PFDM parameter. Note, that for every choice of the parameter \(\alpha \), the line element (25) represents a black hole with one horizon called event horizon represented by \(r_h\). Further, the size of the event horizon increases with increasing the dark matter parameter \(\alpha \) [31]. The thermodynamic quantities for the Schwarzschild black hole in PFDM background are given as [32]

$$\begin{aligned} M= m,\quad S=\pi r_h^2, \quad T=\frac{1}{4\pi r_h}\left( 1+\frac{\alpha }{r_h}\right) . \end{aligned}$$
(27)

In the absence of the PFDM, that is, for \(\alpha =0\), the line element and the thermodynamical quantities reduce to that of the Schwarzschild black hole. For the Schwarzschild black hole in PFDM, the generalized off-shell free energy takes the form

$$\begin{aligned} {\mathscr {F}}= & {} \frac{1}{2}\left[ r_h+\alpha \ln \left( \frac{r_h}{|\alpha |}\right) \right] -\frac{\pi r_h^2}{\tau }. \end{aligned}$$
(28)

Further, the components of the vector field \(\phi \) are

$$\begin{aligned} \phi ^{r_h}= & {} \frac{1}{2}\left( 1+\frac{\alpha }{r_h}\right) -\frac{2\pi r_h}{\tau },\end{aligned}$$
(29)
$$\begin{aligned} \quad \phi ^\theta= & {} -\cot {\Theta }\csc {\Theta }, \end{aligned}$$
(30)

which gives the values of the inverse temperature parameter (\(\tau \)) of the cavity surrounding the black hole as

$$\begin{aligned} \tau =\frac{4\pi r_h^2}{r_h+\alpha }. \end{aligned}$$
(31)

This shows that \(\tau \) decreases with increasing the dark matter parameter \(\alpha \). Further, in the absence of PFDM \((\alpha =0)\), the result reduces to that of the Schwarzschild black hole [14]. Now, the characterized complex function is given as

$$\begin{aligned} {\mathscr {R}}\left( z\right)= & {} -\frac{z+\alpha }{4\pi z^2-\tau \left( z+\alpha \right) }. \end{aligned}$$
(32)

The function \({\mathscr {R}}\left( z\right) \) for all values of \(\alpha \) has two singular points say, \(z_1\) and \(z_2\), such that

$$\begin{aligned} z_1, z_2\in {\mathbb {R}},~ \text {and} ~ z_2<0 ~ \text {whereas} ~0<z_1. \end{aligned}$$
(33)

For the negative real root \(z_2\), the off-shell condition cannot be satisfied and therefore, we only consider the positive singular value \(z_1\) which gives the corresponding winding number \(w_1\) and the topological number as

$$\begin{aligned} w_1=-1~ \text {and}~W=-1. \end{aligned}$$
(34)

This indicates that the winding number and topological classes for the Schwarzschild black hole within the PFDM framework align with those of the Schwarzschild black hole [14]. Conversely, they diverge from the corresponding values for the Kerr black hole in the PFDM context. Hence, the rotation of spacetime within the context of PFDM exerts an influence on its topological characteristics. This assertion finds support in the graphical representation of the n vector field, as depicted in Fig. 1 (right hand side).

3 Kerr-AdS black hole in dark matter background

In this section, we discuss the effect of PFDM on topological classes of Kerr-Ads spacetime. The line element of the Kerr-Ads black hole in the dark matter background is given as [30]

$$\begin{aligned} ds^{2}= & {} -\frac{\Delta _r}{\Xi \Sigma }\left( dt-a\sin ^2\theta d\phi \right) ^2+\frac{\Sigma }{\Delta }dr^{2}+\frac{\Sigma }{\Delta _\theta } d\theta ^{2}\nonumber \\{} & {} +\frac{\Delta _\theta \sin ^2\theta }{\Xi \Sigma } \left[ adt-\left( r^2+a^2\right) d\phi \right] ^2, \end{aligned}$$
(35)

where

$$\begin{aligned} \Delta _r= & {} r^{2}-2mr+a^{2}-\frac{\Lambda }{3}r^2\left( r^2+a^2\right) +\alpha r\ln \left( \frac{r}{|\alpha |}\right) , \nonumber \\ \Delta _\theta= & {} 1+\frac{\Lambda }{3}a^2\cos ^2\theta , \nonumber \\ \Sigma= & {} r^{2}+a^{2}\cos ^{2}\theta \quad \Xi =1+\frac{\Lambda }{3}a^2. \end{aligned}$$
(36)

Here m and a are the mass and angular momentum per unit mass parameters of the black hole and \(\alpha \) and \(\Lambda \) are the PFDM parameter and cosmological constant, respectively.

In the absence of PFDM (\(\alpha =0\)), the line element (35) represents a Kerr-AdS black hole. The location of the black hole horizons can be obtained by solving the horizon equation

$$\begin{aligned} \Delta _r \!=\!r^{2}-2mr\!+\!a^{2}\!-\!\frac{\Lambda }{3}r^2\left( r^2+a^2\right) \!+\!\alpha r\ln \left( \frac{r}{|\alpha |}\right) =0.\nonumber \\ \end{aligned}$$
(37)

The mass and other thermodynamical quantities are given by given by [32]

$$\begin{aligned} M= & {} \frac{m}{\Xi ^2},\end{aligned}$$
(38)
$$\begin{aligned} S= & {} \frac{\pi \left( r_h^2+a^2\right) }{\Xi },\end{aligned}$$
(39)
$$\begin{aligned} T= & {} \frac{r_h}{4\pi \Xi \left( r_h^2+a^2\right) }\left[ 1-\frac{a^2}{r^2_h}-\frac{\Lambda }{3}\left( 3r^2_h+a^2\right) +\frac{\alpha }{r_h}\right] .\nonumber \\ \end{aligned}$$
(40)

Using these thermodynamical quantities generalized off-shell free energy of the system can be obtained as

$$\begin{aligned} {\mathscr {F}}=\frac{1}{2\tau r_h\left( 3-8\pi a^2P\right) ^2} \Big [3 \left( r_h^2+a^2\right) {\mathscr {G}}+9 \alpha r_h \tau \ln \left( \frac{r_h}{\left| \alpha \right| }\right) \Big ],\nonumber \\ \end{aligned}$$
(41)

where

$$\begin{aligned} {\mathscr {G}}=2 \pi r_h \left( 8 \pi P a^2 +4\tau P r_h-3\right) + 3 \tau . \end{aligned}$$
(42)

which gives the the components of n vector field as

$$\begin{aligned} \phi ^{r_h}= & {} \frac{6\pi r^2_h\left\{ 8\pi a^2r_h P-3r_h+2\tau P\left( a^2+3r^2_h\right) \right\} }{2r^2_h\tau \left( 3-8\pi a^2 P\right) ^2}\nonumber \\{} & {} +\frac{9\tau \left( r^2_h+\alpha r_h-a^2\right) }{2\tau r^2_h\left( 3-8\pi a^2P\right) },\end{aligned}$$
(43)
$$\begin{aligned} \phi ^\theta= & {} -\cot \Theta \csc \Theta . \end{aligned}$$
(44)

Thus, the inverse temperature for the Kerr-Ads black hole in PFDM as

$$\begin{aligned} \tau =\frac{4 \pi r_h^3 \left( 3 -8 \pi P a^2 \right) }{3\left( r_h^2+ \alpha r_h-a^2\right) +8 \pi P a^2 r_h^2\left( a^2+ 3r^2_h\right) }. \end{aligned}$$
(45)

The characterized function in this case takes the form

$$\begin{aligned} {\mathscr {R}}(z)\equiv -\frac{3\left( z^2+\alpha z-a^2\right) +8\pi Pa^2z\left( a^2+3z^2\right) }{{\mathscr {A}}(z)}, \end{aligned}$$
(46)

where

$$\begin{aligned} {\mathscr {A}}(z)= & {} 4\pi z^3\left( 3-8\pi P a^2\right) -\tau \Bigg \{3\left( z^2+\alpha z-a^2\right) \nonumber \\{} & {} + 8\pi P a^2 z \left( a^2+3z^2\right) \Bigg \}. \end{aligned}$$
(47)

The root analysis of \({\mathscr {A}}(z)=0\), shows that the for any chosen a and \(\tau <\tau _a\) or \(\tau _b<\tau \) there is only one real positive root and hence the corresponding winding and topological number is 1. Further, for \(\tau \in (\tau _a,\tau _b)\) there are three positive and one negative root, and the corresponding winding numbers are \(w_1=1,~w_2=-1,~w_3=1\) and hence again we have same topological number \(W=1\). This result can be seen from the Fig. 2 (left hand side) in which vector field \(\phi \) is plotted for \(\tau \in (\tau _a,\tau _b)\) which has three zero points with the winding number \(w_1=1,~w_2=-1,~w_3=1\) with the topological number \(W=1\). The zero point of the vector field is plotted in Fig. 2 (right hand side) which divides the black hole into a small, intermediate, and large black hole with one generation and one annihilation point represented by black dots. So, the Kerr-AdS black hole in PFDM has different topological behavior (with topological \(W=1\)) than that of the Kerr black hole in PFDM (with topological \(W=0\)).

Fig. 2
figure 2

Left hand side: the n vector field \(\phi \) for Kerr-AdS black hole in PFDM with \(a/r_0=0.3\), \(\tau /r_0=4\pi \), \(\alpha /r_0=1/2\) and \(Pr^2_0=0.0022\) is plotted. There are three zero points (two are shown in the inset which is plotted for small values of \(r_h/r_0\)) and are located at \((r_h/r_0,\Theta )=(0.08,\pi /2)\), \((1.72,\pi /2)\), and \((r_h/r_0,\Theta )=(16.92,\pi /2)\). Right hand side: the zero points of \(\phi ^{r_h}\) with \(a=r_0\), \(\tau /r_0=4\pi \), \(\alpha /r_0=1\) and \(Pr^2_0=0.0022\) are for Kerr-Ads Black hole in PFDM is shown. The red solid, blue dashed, and black solid lines are for the large, intermediate, and small black hole, respectively. Further, for Kerr-Ads black hole in PFDM there is a generation point as well as an annihilation point represented by black dots

4 The role of electric charge: Kerr–Newman black hole in dark matter background

Let’s now direct our focus towards understanding the importance of the electric charge concerning the topological numbers of thermodynamics. To find the spacetime geometry, one can start from the action for the gravity theory minimally coupled with gauge field in PFDM reads as [33]

$$\begin{aligned} {\mathscr {I}}=\int dx^4\sqrt{-g}\left( \frac{1}{16\pi G} R+\frac{1}{4} F^{\mu \nu }F_{\mu \nu } + {\mathscr {L}}_{DM}\right) . \end{aligned}$$
(48)

In the last equation g = det(\(g_{ab}\)) is the determinant of the metric tensor, R is the Ricci scalar, further G is Newton’s gravitational constant, \(F_{\mu \nu }= \nabla _\mu A_\nu -\nabla _\nu A_\mu \) is electromagnetic field tensor and \({\mathscr {L}}_{DM}\) is the Lagrangian density for PFDM. Upon using the variation for the action principle, one can obtain the Einstein field equations [33]

$$\begin{aligned} R_{\mu \nu }-\frac{1}{2}g_{\mu \nu }R = 8\pi G (T_{\mu \nu }^M +T_{\mu \nu }^{DM}), \end{aligned}$$
(49)

along with

$$\begin{aligned} F^{\mu \nu }_{;\nu }=0, \nonumber \\ F^{\mu \nu ;\alpha } +F^{\nu \alpha ;\mu }+F^{\alpha \mu ; \nu } =0. \end{aligned}$$
(50)

We have \(T_{\mu \nu }^M\), which is the energy-momentum tensor for ordinary matter and \(T_{\mu \nu }^{DM}\) that describes the energy-momentum tensor for PFDM

$$\begin{aligned} T^\mu _\nu =g^{\mu \nu } T_{\mu \nu }, \nonumber \\ T^t_t = -\rho , \quad T^r_r = T^{\theta }_{\theta } = T^{\phi }_{\phi } = P. \end{aligned}$$
(51)

It was shown that the line element of the Kerr–Newman like black hole in the dark matter background is given as [33]

$$\begin{aligned} ds^{2}= & {} -\frac{\Delta }{\Sigma }\left( dt-a\sin ^2\theta d\phi \right) ^2+\frac{\Sigma }{\Delta }dr^{2}+\Sigma d\theta ^{2}\nonumber \\{} & {} +\frac{ \sin ^2\theta }{\Sigma } \left[ adt-\left( r^2+a^2\right) d\phi \right] ^2, \end{aligned}$$
(52)

where

$$\begin{aligned} \Delta= & {} r^{2}-2mr+Q^2+a^{2}+\alpha r\ln \left( \frac{r}{|\alpha |}\right) , \nonumber \\ \Sigma= & {} r^{2}+a^{2}\cos ^{2}\theta . \end{aligned}$$
(53)

Here Q is the electric charge of the black hole. The root analysis of the horizon equation \(\Delta =0\) shows that for any choice of \(\alpha \) if the rotation parameter a and charge parameter Q are in the limit \(a^2+Q^2<k^2_c\), the line element (52) represents a black hole with three horizons and a naked singularity otherwise. The thermodynamic quantities for this spacetime can be written as

$$\begin{aligned} M= & {} m,\end{aligned}$$
(54)
$$\begin{aligned} S= & {} {\pi \left( r^2+a^2\right) },\end{aligned}$$
(55)
$$\begin{aligned} T= & {} \frac{\Delta '(r_h)}{4 \pi (r_h^2+a^2)} \end{aligned}$$
(56)

For this black hole, the off-shell free energy can be obtained as

$$\begin{aligned} {\mathscr {F}}= & {} \frac{a^2+\alpha r_h \ln \left( \frac{r_h}{\left| \alpha \right| }\right) +Q^2+r^2_h}{2r_h}-\frac{\pi \left( a^2+r^2_h\right) }{\tau } \end{aligned}$$
(57)

This gives the components of the n vector field as

$$\begin{aligned} \phi ^{r_h}= & {} \frac{1}{2r^2_h}\left( r^2_h+\alpha r_h-a^2-Q^2- \frac{4\pi r^3_h}{\tau }\right) ,\end{aligned}$$
(58)
$$\begin{aligned} \phi ^\theta= & {} -\cot \Theta \csc \Theta , \end{aligned}$$
(59)

and

$$\begin{aligned} \tau =\frac{4\pi r^3_h}{r^2_h+\alpha r_h-a^2-Q^2} \end{aligned}$$
(60)

To find the winding number we define

$$\begin{aligned} {\mathscr {R}}(z)=-\frac{z^2+\alpha z-a^2-Q^2}{4\pi z^3-\tau \left( z^2+\alpha z-a^2-Q^2\right) }, \end{aligned}$$
(61)

which has the same form as that of the Kerr black hole in PFDM [given by Eq. (21)] instead of \(a^2\rightarrow a^2+Q^2\). So, a similar analysis as for the Kerr black hole in Sect. 2, shows that for any choice of \(\alpha \) with \(a^2+Q^2<k^2_c\) and \(\tau _c<\tau \), where

$$\begin{aligned} \tau _c=4\pi \frac{\Big (-\alpha +\sqrt{3(a^2+Q^2)+\alpha ^2}\Big )^3}{2a^2-\alpha \Big (-\alpha +\sqrt{3(a^2+Q^2)+\alpha ^2}\Big )}, \end{aligned}$$
(62)

the winding number and the topological number for the Kerr–Newman black hole in PFDM are

$$\begin{aligned} w_1=-1,~w_2=1~\text {and}~W=0. \end{aligned}$$
(63)

4.1 The Reissner–Nordström black hole in PFDM

It has the line element

$$\begin{aligned} ds^{2}= & {} -f(r)dt^2+\frac{1}{f(r)}dr^2+r^2(d\theta ^2+\sin ^2\theta d\phi ^2), \end{aligned}$$
(64)

with

$$\begin{aligned} f(r)=1-\frac{2m}{r}+\frac{Q^2}{r^2}+\frac{\alpha }{r} \ln \left( \frac{r}{|\alpha |}\right) , \end{aligned}$$
(65)

The results for the Reissner–Nordström black hole in PFDM can be obtained as from the Kerr–Newman Black hole, which shows that for \(Q<k_c\), and \(\tau <\tau _c\), the winding number, and the topological number are

$$\begin{aligned} w_1=-1,~w_2=1~\text {and}~W=0. \end{aligned}$$
(66)

The zero point \(\tau \) of the vector field \(\phi ^{r_h}\) is plotted in Fig. 3 for the family of black holes which shows the different topological classes with winding and the topological number. For instant, the Schwarschild black hole and the Schwarschild black hole in PFDM have a topological number \(-1\) with no generation/annihilation point whereas other black holes have a topological number equal to 0 with one generation point.

Fig. 3
figure 3

The zero points of vector field \(\phi \) are plotted in \(r_h\)-\(\tau \) plane for a family of black holes spacetimes. The figure shows that the rotation and electric charge affects the topological behavior of spacetime as the charged and rotating black holes have generation points and different topological numbers from Schwarzschild black holes

Fig. 4
figure 4

The \({\mathscr {A}}(z)\) [defined by Eq. (100)] is plotted for different mentioned values for rotating Hayward BH in the absence of PFDM. We see from this case that for \(\tau _c<\tau \), \({\mathscr {A}}(z)=0\) has two real positive roots

5 The role of nonlinear magnetic charge: rotating Hayward black hole in dark matter background

In this section, we shall investigate the role played by the magnetic charge. In order to find the spacetime geometry, one has to start from the action for the gravity theory minimally coupled with gauge field in PFDM reads with the Einstein gravity coupled to a nonlinear electromagnetic field in the presence of the perfect fluid dark matter (Fig. 4). One can show that the following equations can be obtained [35]

$$\begin{aligned}{} & {} G_{\mu }^{\,\nu }=2\left( \frac{\partial {\mathscr {L}}\left( F\right) }{\partial F}F_{\mu \lambda }F^{\nu \lambda }-\delta _{\mu }^{\,\nu }{\mathscr {L}}\right) +8\pi T_{\mu }^{\,\nu }\left( \textrm{DM}\right) ,\nonumber \\ \end{aligned}$$
(67)
$$\begin{aligned}{} & {} \nabla _{\mu }\left( \frac{\partial {\mathscr {L}}\left( F\right) }{\partial F}F^{\nu \mu }\right) =0. \end{aligned}$$
(68)

In which \(F_{\mu \nu }=2\nabla _{[\mu }A_{\nu ]}\) where \({\mathscr {L}}\) is a function of \(F\equiv \frac{1}{4}F_{\mu \nu }F^{\mu \nu }\) and it is given by [35]

$$\begin{aligned} {\mathscr {L}}\left( F\right) =\frac{3M}{\vert Q_m\vert ^{3}}\frac{\left( 2Q_m^{2}F \right) ^{\frac{3}{2}} }{\left( 1+ \left( 2Q_m^{2}F \right) ^{\frac{3}{4}} \right) ^{2} }. \end{aligned}$$
(69)

It is straightforward to show that the line element of the rotating Hayward like black hole in the dark matter background is given as [35]

$$\begin{aligned} ds^{2}= & {} -\frac{\Delta }{\Sigma }\left( dt-a\sin ^2\theta d\phi \right) ^2+\frac{\Sigma }{\Delta }dr^{2}+\Sigma d\theta ^{2}\nonumber \\{} & {} +\frac{ \sin ^2\theta }{\Sigma } \left[ adt-\left( r^2+a^2\right) d\phi \right] ^2, \end{aligned}$$
(70)

where

$$\begin{aligned} \Delta= & {} r^{2}-\frac{2 m r^4}{r^3+Q_m^3}+a^{2}+\alpha r\ln \left( \frac{r}{|\alpha |}\right) , \nonumber \\ \Sigma= & {} r^{2}+a^{2}\cos ^{2}\theta \end{aligned}$$
(71)

Here Q is the electric charge of the black hole. The mass M, magnetic charge \(Q_m\), entropy S, and the Hawking temperature T of the black hole are

$$\begin{aligned} M= & {} m,\end{aligned}$$
(72)
$$\begin{aligned} S= & {} =\pi \left[ r_h^2+a^2-\frac{2 Q_m^3}{r_h}\left( 1+\frac{a^2}{3 r_h^2}\right) \right] , \end{aligned}$$
(73)
$$\begin{aligned} T= & {} \frac{\Delta '(r)}{4 \pi (r_h^2+a^2)}|_{r_h}. \end{aligned}$$
(74)

Using the same method as that used for the previous section we can find the components of the n vector field as

$$\begin{aligned} \phi ^{r_h}= & {} \frac{1}{2\tau r^5_h}\Big [r^3_h\left\{ \tau \left( r^2_h+\alpha r_h-a^2\right) -4\pi r^3_h\right\} \nonumber \\{} & {} -Q_m^3\tau \Big (2r^2_h+4a^2+\alpha r_h\left( 1-3\ln \left( {\frac{r_h}{|\alpha |}}\right) \right) \nonumber \\{} & {} +\frac{4\pi r_h}{\tau }\left( r^2+a^2\right) \Big )\Big ],\end{aligned}$$
(75)
$$\begin{aligned} \phi ^\theta= & {} -\cot \Theta \csc \Theta , \end{aligned}$$
(76)

and the inverse temperature parameter is given by

$$\begin{aligned} \tau =4\pi \frac{r^6_h+Q_m^3r_h\left( r^2_h+a^2\right) }{r^3_h\left( r^2_h+\alpha r_h-a^2\right) -Q_m^3{\mathscr {H}}\left( r_h\right) }, \end{aligned}$$
(77)

where

$$\begin{aligned} {\mathscr {H}}(r_h)=4a^2+2r^2_h-\alpha r_h+3\alpha r_h\ln \left( \frac{r_h}{|\alpha |}\right) . \end{aligned}$$
(78)

The complex function \({\mathscr {R}}(z)\) takes the form

$$\begin{aligned} {\mathscr {R}}(z)\equiv -\frac{z^3\left( z^2+\alpha z-a^2\right) -Q_m^3{\mathscr {H}}(z)}{{\mathscr {A}}(z)} \end{aligned}$$
(79)

where

$$\begin{aligned} {\mathscr {A}}(z)= & {} 4\pi \left\{ z^6+Q^3_mz\left( z^2+a^2\right) \right\} \nonumber \\{} & {} -\tau \left\{ z^3\left( z^2+\alpha z-a^2\right) -Q_m^3{\mathscr {H}}(z)\right\} . \end{aligned}$$
(80)
Fig. 5
figure 5

The plot of the \({\mathscr {A}}(z)\) [define by Eq. (96)] for the static Hayward BH in the presence of PFDM. This shows that just like Kerr-Ads black hole, for the non-rotating Hayward BH in PFDM background, there are two critical values of \(\tau \), \(\tau _a\) and \(\tau _b\) such that if \(\tau \in (\tau _a,\tau _b)\), the equation \({\mathscr {A}}(z)=0\) has three real positive roots and one real root otherwise. Similar behavior is seen for other choices of the parameter \(\alpha \), a, and Q

For the analysis of complex function \({\mathscr {R}}(z)\) and hence the winding number (Fig. 5), we have plotted \({\mathscr {A}}(z)\) for rotating Hayward black hole in PFDM [define by Eq. (80)] in Fig. 6. This figure shows that for \(\tau _c<\tau \), the equation \({\mathscr {A}}(z)\) has two positive real roots say \(z_1\) and \(z_2\) with \(z_1<z_2\) such that the corresponding winding number are \(w_1=-1\) and \(w_2=1\) with topological number \(W=0\).Footnote 4 The result can be verified from the vector field plot in Fig. 7 (bottom left panel). Further, from the graph of zero point \(\phi ^{r_h}\) in Fig. 9 we can see that the rotating black hole has 1 or 0 point but no annihilation point.

Fig. 6
figure 6

The plot of \({\mathscr {A}}(z)\) [defined by Eq. (80)] for the general case of rotating Hayward BH in the presence of PFDM. Similar result we find here for \(\tau _c<\tau \), \({\mathscr {A}}(z)=0\) has two real positive roots and in both cases, the rotating Hayward and rotating Hayward BH in PFDM background have same winding numbers \(w_1=-1\) and \(w_2=1\) with topological number \(W=0\)

5.1 Static solution: Hayward black hole in the absence of PFDM

In the absence of PFDM the line element for the Hayward black hole can be written as [35]

$$\begin{aligned} ds^{2}= & {} -f(r)dt^2+\frac{1}{f(r)}dr^2+r^2(d\theta ^2+\sin ^2\theta d\phi ^2), \end{aligned}$$
(81)

where

$$\begin{aligned} f(r)=1-\frac{2 m r^2}{r^3+Q_m^3}. \end{aligned}$$
(82)

The generalized off-shell free energy, the radial component of n vector, and its zero point of the vector field in this case take the form

$$\begin{aligned} {\mathscr {F}}= & {} \frac{1}{2r^2_h\tau }\left\{ -2\pi r^4_h+\tau r^3_h+Q^3\left( \tau -4\pi r_h\right) \right\} ,\end{aligned}$$
(83)
$$\begin{aligned} \phi ^{r_h}= & {} \frac{1}{2r^3_h\tau }\left\{ \tau \left( r^3_h-2Q_m^3\right) -4\pi r_h\left( r^3_h+Q^3_m\right) \right\} ,\end{aligned}$$
(84)
$$\begin{aligned} \tau= & {} \frac{4\pi r_h\left( r^3_h+Q^3\right) }{r^3_h-2Q^3}. \end{aligned}$$
(85)

To find the winding numbers the complex function is given as

$$\begin{aligned} {\mathscr {R}}_s(z)=-\frac{z^3-2Q^3}{4\pi z^4-\tau z^3\!+\!4\pi Q^3z\!+\!2\tau Q^3}\equiv -\frac{z^3-2Q^3}{{\mathscr {A}}(z)}.\nonumber \\ \end{aligned}$$
(86)

The root analysis of \({\mathscr {A}}(z)\) shows that for every Q and \(\tau _c<\tau \), \({\mathscr {A}}(z)\) has two real positive real root.Footnote 5 Thus, the winding and hence topological numbers for the Hayward black hole in the absence of dark matter are

$$\begin{aligned} w_1=-1,~ w_2=1 ~\text {and}~ W=0, \end{aligned}$$
(87)

which are different from that of the Schwarschild black hole. This shows that the presence of the magnetic charge \(Q_m\) in Hayward spacetime really affects both winding and topological numbers. This can be verified from the n vector field [see Fig. 7 (top left panel)].

Fig. 7
figure 7

The unit vector field \(\phi \) is plotted for the class of black holes with the magnetic charge. Top left panel: the field for Hayward black hole (with \(a=0,~Q=1/2,~\tau =30\)) which shows that Hayward black hole has 2 zero points. Top right panel: the field for rotating Hayward black hole (with \(a=1/2,~Q=1/2,~\tau =30\)) which has 2 zero points. Left bottom panel: the field has plotted for the rotating Hayward black hole in PFDM (with \(a=1/2,~Q=1/2,~\alpha =1/2,~\tau =18\)). Right bottom: the field is plotted for Hayward black hole in PFDM (with \(a=0,~Q=1/2,~\alpha =1/3,~\tau =20\)) which shows unlike other black holes the Hayward black hole in PFDM has three zero points. A similar behavior is seen for other choices of parameters

5.2 Static solution: Hayward BH in PFDM

It has the line element [35]

$$\begin{aligned} ds^{2}= & {} -f(r)dt^2+\frac{1}{f(r)}dr^2+r^2(d\theta ^2+\sin ^2\theta d\phi ^2), \end{aligned}$$
(88)

with

$$\begin{aligned} f(r)=1-\frac{2 m r^2}{r^3+Q_m^3}+\frac{\alpha }{r} \ln \left( \frac{r}{|\alpha |}\right) , \end{aligned}$$
(89)

where \(Q_m\) is the magnetic monopole charge. The mass M, magnetic charge \(Q_m\), entropy S, and the Hawking temperature T of the black hole are

$$\begin{aligned} M= & {} m,\end{aligned}$$
(90)
$$\begin{aligned} S= & {} =\pi \left[ r_h^2-\frac{2 Q_m^3}{r_h}\right] \end{aligned}$$
(91)
$$\begin{aligned} T= & {} \frac{f'(r)}{4 \pi }|_{r_h} \end{aligned}$$
(92)

where

$$\begin{aligned} f(r)=1-\frac{2 m r^2}{r^3+Q_m^3}+\frac{\alpha }{r} \ln \left( \frac{r}{|\alpha |}\right) . \end{aligned}$$
(93)

The generalized off-shell free shell energy, the radial components of n vector field, and its zero point can be obtained as

$$\begin{aligned} {\mathscr {F}}= & {} \frac{1}{2r^3_h\tau }\left\{ \left( r^3_h+Q^3\right) \left( r_h+\alpha \ln \left( \frac{r_h}{|\alpha |}\right) \right) -\pi \left( r^3_h-2Q^3\right) \right\} ,\nonumber \\ \phi ^{r_h}= & {} \frac{1}{2r^4_h\tau }\Big [r^3_h\Big \{\tau \left( r^2_h+\alpha r_h\right) -4\pi r^3_h\Big \}\nonumber \\{} & {} -Q^2_m\tau \Big \{2r^2_h+\alpha r_h\Big (1-3\ln \left( \frac{r_h}{|\alpha |}\right) +\frac{4\pi r^3_h}{\tau }\Big )\Big \}\Big ],\nonumber \\ \tau= & {} 4\pi \frac{r^3_h\left( r^3_h+Q^3_m \right) }{r^3_h\left( r^2_h+\alpha r_h\right) -Q^3_m\left( 2r^2_h-\alpha r_h+3\alpha r_h \ln \Big (\frac{r_h}{|\alpha |}\Big )\right) }.\nonumber \\ \end{aligned}$$
(94)

The complex function in this case takes the form

$$\begin{aligned} {\mathscr {R}}(z)\equiv -\frac{z^3\left( z^2+\alpha z\right) -Q_m^3\Big (2z^2-\alpha z+3\alpha z \ln \Big (\frac{z}{|\alpha |}\Big )\Big )}{{\mathscr {A}}(z)},\nonumber \\ \end{aligned}$$
(95)

where

$$\begin{aligned} {\mathscr {A}}(z)= & {} 4\pi z^3\left( z^3+Q^3_m\right) -\tau \Big \{z^3\left( z^2+\alpha z\right) \nonumber \\{} & {} -Q_m^3 \Big (2z^2-\alpha z+3\alpha z \ln \Big (\frac{z}{|\alpha |}\Big )\Big )\Big \}. \end{aligned}$$
(96)

For the winding and topological number we have plotted the function \({\mathscr {A}}(z)\) in Fig. 5, which shows that unlike to Hayward black hole and rotating Hayward black hole in PFDM, the Hayward black hole in PFDM, for \(\tau _c<\tau \), the equation \({\mathscr {A}}(z)\) has three real positive roots. So, similar to other cases we can easily deduce that the winding and the topological numbers for the Hayward black hole in PDFM are

$$\begin{aligned} w_1=-1, ~w_2=1, ~w_3=1 \quad \text {and}\quad W=1. \end{aligned}$$
(97)

This case be verified from the vector field \(\phi \) graph plotted in Fig. 7 (bottom right panel). Further, the zero point of \(\phi \) is plotted in Fig. 8 which shows that the spacetime has generation as well as annihilation point.

Fig. 8
figure 8

The zero point of \(\phi ^{r_h}\) for Hayward black hole in PFDM is plotted. The red solid, blue dashed, and black solid lines representing the large, intermediate, and small black hole, respectively

5.3 Rotating Hayward BH

Let us now elaborate the final special case, namely, we include the role of rotation and magnetic charge. For this case we get

$$\begin{aligned} \tau =4\pi \frac{r^6_h+Q_m^3r_h\left( r^2_h+a^2\right) }{r^3_h\left( r^2_h-a^2\right) -Q_m^3\left( 4a^2+2r^2_h\right) }. \end{aligned}$$
(98)

The function \({\mathscr {R}}(z)\) on the other hand takes the following form

$$\begin{aligned} {\mathscr {R}}(z)\equiv -\frac{z^3\left( z^2-a^2\right) -Q_m^3\left( 4a^2+2z^2\right) }{{\mathscr {A}}(z)} \end{aligned}$$
(99)

where we have defined

$$\begin{aligned} {\mathscr {A}}(z)= & {} 4\pi \left\{ z^6+Q^3_mz\left( z^2+a^2\right) \right\} \nonumber \\{} & {} -\tau \left\{ z^3\left( z^2-a^2\right) -Q_m^3\left( 4a^2+2z^2\right) \right\} \end{aligned}$$
(100)

The graph of the function \({\mathscr {A}}(z)\) is plotted in Fig. 6 which shows that for \(\tau _c<\tau \), \({\mathscr {A}}(z)=0\) has two positive real roots and hence similar to that of the Hayward black hole (Fig. 9), the rotating Hayward black hole has the same winding and topological numbers

$$\begin{aligned} w_1=-1,~ w_2=1 ~\text {and}~ W=0. \end{aligned}$$
(101)

6 Conclusions

We have extensively investigated the thermodynamic classes of a specific class of black hole solutions (singular and regular solutions) situated within the context of PFDM spacetime, all while accounting for rotational dynamics, electric charge, and magnetic charge effects. From a physical point of view, such a perfect fluid matter is of particular interest since it mimics the behavior of dark matter in large distances from the black hole. The first important result of our analysis unveils that the winding and topological properties exhibited by Schwarzschild and Kerr black holes remain unaltered when the effect of PFDM is introduced. However, when considering the Kerr-AdS background in the realm of PFDM, a distinct topological feature emerges, setting it apart from the Kerr black hole in PFDM. Although, the same topological number is obtained compared to the Kerr-AdS black holes.

Fig. 9
figure 9

The zero point of \(\phi ^{r_h}\) for class of black hole is plotted which shows that the black holes has one generation point and no annihilation point

Table 1 In this table, we summarize our results for the topological numbers as well as the generation point (GP) and annihilation point (AP) of the black holes studied in the present paper. We also present some of the results reported in the literature

In the subsequent sections of this paper we have investigated the impact of electric charge and nonlinear magnetic charge on the thermodynamic topological classes. This exploration is conducted using both the Kerr–Newman black hole and the regular rotating Hayward black holes in PFDM. To this end, we analysed also the static metrics such as the Reissner–Nordström BH and the Hayward black holes in PFDM. It is very interesting to note that, if we compare our results with the existing results of the black holes in the literature, our findings demonstrate that there is no effect of PFDM on topological numbers for Schwarzschild BH, Kerr BH, Kerr-AdS BH, Reissner–Nordström BH and Kerr–Newman BH.

In the final part of the present paper, we have studied the most interesting case that has to do with the role of the magnetic charges which can shift the topological numbers, accentuating differences between static Hayward BH and the Schwarzschild black hole. This difference in topological number compared to the Schwarzschild black hole arises in both cases that includes the absence and presence of PFDM. Moreover, when a magnetic charge is introduced, rotation exhibits a notable influence on the topological attributes as well. Table 1 provides a concise overview of our findings regarding the topological numbers, along with the generation point (GP) and annihilation point (AP) for the black holes investigated in this study. Additionally, we incorporate some of the most important cases studied in existing literature for comparative context.