The analysis of a flow pattern in cerebral aneurysms and the effect of stent strut shapes are presented in this article. The treatment of cerebral aneurisms with a porous stent has recently been proposed as a minimally invasive way to prevent rupture and favor coagulation mechanism inside the aneurism. The efficiency of stent is related to several parameters, including porosity and stent strut shapes. The goal of this article is to study the effect of the stent strut shape and porosity on the hemodynamic properties of the flow inside an aneurysm using a numerical analysis. In this study, we use the concept of flow reduction to characterize the stent efficiency. Also, we use the lattice Boltzmann method (LBM) of a non-Newtonian blood flow. To resolve the characteristics of a highly complex flow, we use an extrapolation method for the wall and stent boundary. To ease the code development and facilitate the incorporation of new physics, a scientific programming strategy based on object-oriented concepts is developed. Reduced velocity, smaller average vorticity magnitude, smaller average shear rate, and increased viscosity are observed when the proposed stent shapes and porosities are used. The rectangular stent is observed to be optimal and to decrease the magnitude of the velocity by 89.25% in the 2D model and 53.92% in the 3D model in the aneurysm sac. Our results show the role of the porosity and stent strut shape and help us to understand the characteristics of stent strut design.