## 1 Introduction  
Ultracold Fermi gases have attracted much attention because of its potential as an ideal test bed of condensed matter phenomena that can simulate or emulate a designed quantum many-body Hamiltonian in highly controllable environments [1; 2; 3; 4; 5]. The atomic Fermi gases confined in an optical dipole trap realize an artificial system at a temperature considerably lower than the Fermi temperature, being driven to the quantum degenerate regime [6; 7; 8]. The pseudospin components of the fermionic atom are given by its hyperfine states of which two are typically used in the popular systems of \({}^{6}\)Li or \({}^{40}\)K atoms, providing the up-spin and down-spin species of fermions. The scattering between these two-component fermionic atoms can be controlled by using the Feshbach resonance [9], providing a way to tune the particle-particle interaction to be attractive or repulsive. Loaded on optical lattices, fermionic atoms with tunable interactions can provide a realization of the Fermi Hubbard Hamiltonian [10]. In particular, the seminal experiments [11; 12] realizing the repulsive Hubbard model demonstrated the Mott-insulating phase of the Fermi gases in cubic optical lattices in a trap by examining the bulk compressibility of the atomic cloud. Theoretical calculations using the real-space dynamical mean-field theory [13] found that the Mott-insulating core appeared with the plateau in the density profile in the three-dimensional trap. The range of geometries of the optical lattices realized in ultracold quantum gas experiments has become much broader in recent years. The triangular, hexagonal, Kagome, and other non-standard types of lattices, including systems in dimensional crossover, are experimentally realizable [14; 15; 16; 17; 18; 19; 20; 21; 22; 23; 24; 25; 26; 27], providing new opportunities to explore the physics of strongly correlated particles within the Hubbard Hamiltonian, realized with ultracold Fermi gases. One of the most recent realizations is the Lieb lattice system that is the two-dimensional lattices decorated with an interstitial site residing at the center of each bond connecting the two nearest neighbors of the regular square lattices. While it has been elusive in conventional solid-state materials, structures like the Lieb lattices that support flat-band dispersion have attracted steady interest because of their peculiar properties related to the flat-band dispersion, which introduces a large degree of kinetic frustrations [28]. Perhaps the most well-known example is flat-band ferromagnetism [29; 30; 31; 32], which was rigorously proven in the presence of interactions in the Lieb lattices. In the context of ultracold gases, a possibility of condensation with kinetic frustrations in flat bands has been theoretically studied [33]. Very recently, there has been rapid progress in the experimental realization of Lieb lattices in artificial quantum systems. The experimental realizations of the optical Lieb lattice with ultracold Bose gases have been reported [34; 35]. Also, the photonic, polaritonic, and electronic realizations of the Lieb lattices and the one-dimensional analogs of the Lieb lattices have been reported [36; 37; 38; 39; 40; 41]. In this paper, we investigate the influences of the trap confinement of the ultracold gas system on the magnetic phase structure of repulsively interacting two-component fermions loaded on optical Lieb lattices within the description of the repulsive Hubbard model in an external harmonic potential. While the attractive and repulsive Hubbard models in the Lieb lattices and other flat-band lattice geometries have been an active subject of the flat-band superconductivity [42; 43; 44; 45; 46; 47; 48; 49; 50; 51], magnetism [52; 53; 54; 55; 56; 57; 58; 59; 60; 61; 62; 63; 64], and topological states [65; 66; 67; 68; 69; 70; 71], the inhomogeneity due to the essential presence of the trap potentials and possible formation of spatial phase structures have not been considered yet in the context of the ultracold gases.