13 USE iso_fortran_env,
ONLY: output_unit
23#include "./base/base_uses.f90"
26 CHARACTER(LEN=default_path_length) :: mode, filename, arg, filename_b
29 COMPLEX(KIND=dp),
ALLOCATABLE :: overlap(:, :)
30 INTEGER :: ia, ib, shift(3), i, j, ios, io_unit
31 REAL(kind=
dp) :: metric, gap
34 CALL get_command_argument(1, mode)
35 SELECT CASE (trim(mode))
37 IF (command_argument_count() /= 8)
THEN
38 cpabort(
'Usage: topology_phasons overlap left point right point gx gy gz')
40 CALL get_command_argument(2, filename)
41 CALL get_command_argument(3, arg)
42 READ (arg, *, iostat=ios) ia
44 CALL get_command_argument(4, filename_b)
45 CALL get_command_argument(5, arg)
46 READ (arg, *, iostat=ios) ib
49 CALL get_command_argument(5 + i, arg)
50 READ (arg, *, iostat=ios) shift(i)
57 ALLOCATE (overlap(left%rank, right%rank))
59 WRITE (io_unit,
'(A,I0)')
'OVERLAP ', left%rank
62 WRITE (io_unit,
'(2ES26.17)') real(overlap(i, j),
dp), aimag(overlap(i, j))
65 CASE (
'mesh',
'links')
66 IF (command_argument_count() /= 2)
THEN
67 cpabort(
'Usage: topology_phasons mesh|links manifest')
69 CALL get_command_argument(2, filename)
70 CALL analyze_mesh(trim(filename), trim(mode) ==
'mesh', fine, io_unit)
71 CASE (
'converge',
'converge-links')
72 IF (command_argument_count() /= 4)
THEN
73 cpabort(
'Usage: topology_phasons converge coarse fine tolerance')
75 CALL get_command_argument(2, filename)
76 CALL get_command_argument(3, filename_b)
77 CALL get_command_argument(4, arg)
78 READ (arg, *, iostat=ios) metric
80 CALL analyze_mesh(trim(filename), trim(mode) ==
'converge', coarse, io_unit)
81 CALL analyze_mesh(trim(filename_b), trim(mode) ==
'converge', fine, io_unit)
84 WRITE (io_unit,
'(A)')
'Usage: topology_phasons mesh manifest | links file | overlap left point right point gx gy gz'
85 cpabort(
'Unknown or missing topology_phasons mode')
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_path_length
Native streaming mesh analysis with physical endpoint sewing.
subroutine, public analyze_mesh(path, physical, report, io_unit)
Build physical links or read reference links; stream plaquettes through an anonymous file.
subroutine, public compare_refinements(coarse, fine, tolerance, io_unit)
Compare two jointly refined meshes of the same declared family; never round the estimate.
Reader and physical moving-basis links for version-1 topology snapshots.
subroutine, public snapshot_overlap(a, b, ka, kb, overlap)
Apply screened Gaussian cross-geometry operator by atom blocks, without a dense AO matrix.
subroutine, public check_snapshot(a, metric_tol, gap_tol, metric_error, gap)
Check AO-metric normalization and separation at every selected/excluded boundary.
subroutine, public read_snapshot(filename, point, state)
Read a single point, retaining only its states; reject malformed/truncated exports.
program topology_phasons
Native, bounded-memory snapshot/link postprocessor for closed 2D/4D parameter meshes.