Flowing Vertices

It can be useful to extract certain components of the three (\(P\), \(C\), \(D\)) diagrammatic channels over the course of the FRG flow in order to analyze them in post-processing. For example, one may be interested to calculate expectation values like

\[\langle \Delta^\Lambda \rangle = \Delta_{12} X^\Lambda_{1234} \Delta_{34}\]

for a certain bilinear \(\Delta\) (for specific diagrammatic channels \(X\)) at each scale \(\Lambda\) of the flow. Plotting these expectation values can yield information on which fluctuation drives or suppresses a certain instability.

Because storing the full vertices (even in TU approximation) is not feasible, we here provide functionality to store the vertices of some momentum points, such that features specific to a model can be tracked.

In practice, if one has a diverge_flow_step_t object all set up, one can do the following during the flow loop:

// these are a prerequisite
// diverge_flow_step_t* step = ...;
// index_t* qpts = ...;
// index_t nqpts = ...;

// initialize the tu_vertex_storage_t object for the 'm'agnetic channel
tu_vertex_storage_t* mag = tu_vertex_storage_init( step, 'm', qpts, nqpts );
do {
    // here we store (magnetic) vertices
    tu_vertex_storage_snap( mag );
    diverge_flow_step_euler( step, eu.Lambda, eu.dLambda );
    diverge_flow_step_vertmax( step, &vmax );
    diverge_flow_step_chanmax( step, cmax );
} while (diverge_euler_next( &eu, vmax ));
// and the last one
tu_vertex_storage_snap( mag );

// we can get a specific vertex (step #1, qpt #0)...
complex128_t* mvert = tu_vertex_storage_get( mag, 1, 0 );
// or save them to a file:
tu_vertex_storage_to_file( mag, "magnetic_vertices.dvg" );

// finally, we have to cleanup
tu_vertex_storage_free( mag );
struct vertex_storage_qpt_t
[source]

utility struct to save qpoint and ints name

index_t qpt
[source]

qpt index (wrt ibz, cf. diverge_flow_step_ibz())

char name[24]
[source]

and a name that you can set if you’d like to

struct vertex_storage_t
[source]

utility struct to allow saving of TUFRG and grid FRG vertices at each flow step. npatch not supported, as the selection of qpts for npatch vertices is nontrivial (see src/npatch/vertex.h). For npatch, we instead refer the user to diverge_patching_vertex().

char chan
[source]

channel info, follows diverge_flow_step_vertex(). Channel may be inaccurate in case vertex_storage_snap_chan() has been used.

index_t n_steps
[source]

number of times vertex_storage_snap() has been called on this object for storage

index_t n_qpts
[source]

number of momentum points

vertex_storage_qpt_t *qpts
[source]

and actual momentum points

index_t linsz
[source]

linear dimension of vertex (n_orbff,n_spin,n_spin)

vertex_storage_t *vertex_storage_init(diverge_flow_step_t *s, char chan, const index_t *qpts, index_t n_qpts)
[source]

initialize the vertex storage for a specific channel (following channel nomenclature of diverge_flow_step_vertex()). For control over the qpts’ names use either the alternative constructor vertex_storage_init_fg() or access (and change) the names via vertex_storage_t.qpts.

vertex_storage_t *vertex_storage_init_fg(diverge_flow_step_t *s, char chan, const vertex_storage_qpt_t *qpts, index_t n_qpts)
[source]

initialize the vertex storage for a specific channel, but with named qpts (following channel nomenclature of diverge_flow_step_vertex()). otherwise equivalent to vertex_storage_init().

complex128_t *vertex_storage_get(vertex_storage_t *t, index_t istep, index_t iq)
[source]

get the stored array at qpt index iq and snap index istep on rank 0, all other ranks return NULL.

void vertex_storage_snap(vertex_storage_t *t)
[source]

add one more vertex to the storage object (which keeps a reference of diverge_flow_step_t around that was given in the constructor vertex_storage_init() in order to obtain the vertices).

void vertex_storage_snap_chan(vertex_storage_t *t, char chan)
[source]

same as vertex_storage_snap() but for arbitrary channel

void vertex_storage_lsnap(vertex_storage_t *t, double Lambda)
[source]

same as vertex_storage_snap() but with scale information

void vertex_storage_lsnap_chan(vertex_storage_t *t, double Lambda, char chan)
[source]

same as vertex_storage_snap_chan() but with scale information

void vertex_storage_snap_all(vertex_storage_t *t)
[source]

convenience wrapper around vertex_storage_snap_chan() that iterates over all channels that are included in the diverge_flow_step_t

void vertex_storage_lsnap_all(vertex_storage_t *t, double Lambda)
[source]

same as vertex_storage_snap_all() but with scale information

void vertex_storage_pop(vertex_storage_t *t)
[source]

pop last step from the storage object. does not release memory; operates lazily.

void vertex_storage_to_file(vertex_storage_t *t, const char *fname)
[source]

output a vertex_storage_t object to a file fname. This file can be read using the diverge.output python library (diverge.output.read() returns diverge.output.vertex_store). The output includes all channel and scale information.

file format specification info: header is 128 elements of type index_t (64 bit signed integers)

all displacement/length information is in bytes.

header[0-2]:

“vertex_storage_t” as byte array (including trailing zero byte), i.e., the three numbers (8313495814289909110,8385532525878079348,0) when interpreted as index_t

header[124]:

file size (in bytes)

header[125-126]:

file format version string [displ, size].

header[127]:

health check bit field (should be all zero!)

header[3]:

chan

header[4]:

linsz

header[5]:

n_steps

header[6]:

n_qpts

header[7-8]:

[displ, size] for qpts shape: (n_qpts,)

header[9-10]:

[displ, size] for verts shape: (n_steps,n_qpts,linsz,linsz)

header[11-12]:

[displ, size] for Lambda shape: (n_steps,)

header[13-14]:

[displ, size] for chans shape: (n_steps,)

void vertex_storage_free(vertex_storage_t *t)
[source]

free a vertex_storage_t object