  We propose a general principle for realizing second-order topological corner
states in the modified Kane-Mele model with magnetization. It is demonstrated
that the sign of the edge Dirac mass depends on the magnetization of the edge
sublattice termination. By adjusting the directions of magnetization according
to the type of sublattice at the termination of two edges, a mass domain wall
can be induced in the presence of topological corner states at an arbitrary
position. All previous work on introducing magnetization in the Kane-Mele model
to realize second-order topological corner states can be explained by the
presence of the Dirac mass domain wall with opposite signs. Applying this
principle, we design square-shaped and armchair-type hexagon-shaped graphene
nanoflakes with edge magnetization, allowing for the emergence of second-order
topological corner states. Our findings serve as a general theory,
demonstrating that the realization of second-order topological corner states is
not limited by boundary type or nanoflake shape.
