QPMS
Electromagnetic multiple scattering library and toolkit.
Data Fields
PGenClassInfo Struct Reference

PGen class metadata. More...

#include <lattices.h>

Collaboration diagram for PGenClassInfo:
Collaboration graph
[legend]

Data Fields

char *const name
 
int dimensionality
 
PGenPointFlags native_point_flags
 Info about the generator native coordinate system.
 
PGenReturnData(* next )(struct PGen *)
 Generate a single point in the native coordinates.
 
PGenZReturnData(* next_z )(struct PGen *)
 Generate a single 1D point.
 
PGenPolReturnData(* next_pol )(struct PGen *)
 Generate a single 2D point in polar coordinates.
 
PGenSphReturnData(* next_sph )(struct PGen *)
 Generate a single 3D point in spherical coordinates.
 
PGenCart2ReturnData(* next_cart2 )(struct PGen *)
 Generate a single 2D point in cartesian coordinates.
 
PGenCart3ReturnData(* next_cart3 )(struct PGen *)
 Generate a single 3D point in cartesian coordinates.
 
PGenReturnDataBulk(* fetch )(struct PGen *, size_t, anycoord_point_t *)
 Generate up to n points in the native coordinates.
 
PGenReturnDataBulk(* fetch_z )(struct PGen *, size_t, double *)
 Generate up to n 1D points.
 
PGenReturnDataBulk(* fetch_pol )(struct PGen *, size_t, pol_t *)
 Generate up to n 2D points in polar coordinates.
 
PGenReturnDataBulk(* fetch_sph )(struct PGen *, size_t, sph_t *)
 Generate up to n 3D points in spherical coordinates.
 
PGenReturnDataBulk(* fetch_cart2 )(struct PGen *, size_t, cart2_t *)
 Generate up to n 2D points in cartesian coordinates.
 
PGenReturnDataBulk(* fetch_cart3 )(struct PGen *, size_t, cart3_t *)
 Generate up to n 3D points in cartesian coordinates.
 
void(* destructor )(struct PGen *)
 Destructor. More...
 

Detailed Description

PGen class metadata.

This structure determines the behaviour of the PGen instance pointing to it.

For generating a single point, use the next() method. For generating up to N points in a single call, use the fetch() method.

It is strongly recommended that at least the native-coordinate fetch method and the native-coordinate next method are implemented.

Usually, each generator uses internally one "native" coordinate system (in lattice generators, this will typically be nD cartesian coordinates) in which the next() method gives its result.

One does not have to explicitly implement every single method.

TODO doc about the default transformations etc.

Field Documentation

◆ destructor

void(* PGenClassInfo::destructor) (struct PGen *)

Destructor.

To be called by next() at iteration end, or by the caller if ending the generation prematurely


The documentation for this struct was generated from the following file: