xy_ordered_union Function

public pure function xy_ordered_union(A, B) result(C)

An ordered-keys set union for xy_lattices. It compares the lattice sites, looking at their x and y coordinates only: equal x,y entries are inserted in C just once, so to make it a set. A and B must be sets too. The sublattice labels are preserved in the process, assuming that two sites with the same x,y pertain to the same sublattice. For A the keys are assumed to be 1:size(A), and preserved as such (with an assertion). The keys of B are instead discarded, so to be replaced by size(A):size(C), which thus amounts to have result C uniquely indexed as 1, 2, ... , size(A) + size(B). This allows building consistently indexed matrices to act on the lattice array, such as real-space tight-binding hamiltonians. The keys would then be used to index other real space quantities, such as LDOS, Chern marker, local magnetization, and so on.

Arguments

Type IntentOptional Attributes Name
type(xy_lattice), intent(in) :: A
type(xy_lattice), intent(in) :: B

Return Value type(xy_lattice)


Calls

proc~~xy_ordered_union~~CallsGraph proc~xy_ordered_union xy_coordinates::xy_ordered_union proc~push_back xy_coordinates::xy_lattice%push_back proc~xy_ordered_union->proc~push_back

Called by

proc~~xy_ordered_union~~CalledByGraph proc~xy_ordered_union xy_coordinates::xy_ordered_union proc~hex2lattice xy_coordinates::hex2lattice proc~hex2lattice->proc~xy_ordered_union proc~get_flake honeytools::get_flake proc~get_flake->proc~hex2lattice proc~get_stripe honeytools::get_stripe proc~get_stripe->proc~hex2lattice proc~get_supercell honeytools::get_supercell proc~get_supercell->proc~hex2lattice proc~get_triangle honeytools::get_triangle proc~get_triangle->proc~hex2lattice