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
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())
-
index_t qpt
-
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 casevertex_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
-
vertex_storage_qpt_t *qpts
[source] and actual momentum points
-
char chan
-
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 constructorvertex_storage_init_fg()or access (and change) the names viavertex_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 tovertex_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
iqand snap indexistepon 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_taround that was given in the constructorvertex_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 thediverge_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_tobject to a filefname. This file can be read using thediverge.outputpython library (diverge.output.read()returnsdiverge.output.vertex_store). The output includes all channel and scale information.file format specification info:
headeris 128 elements of typeindex_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]:chanheader[4]:linszheader[5]:n_stepsheader[6]:n_qptsheader[7-8]:[displ, size] for
qptsshape: (n_qpts,)header[9-10]:[displ, size] for
vertsshape: (n_steps,n_qpts,linsz,linsz)header[11-12]:[displ, size] for
Lambdashape: (n_steps,)header[13-14]:[displ, size] for
chansshape: (n_steps,)
-
void vertex_storage_free(vertex_storage_t *t)
[source] free a
vertex_storage_tobject