QPMS
Electromagnetic multiple scattering library and toolkit.
Functions | Variables
pointgroups.h File Reference

Quaternion-represented 3D point groups. More...

#include "qpms_error.h"
#include "quaternions.h"
Include dependency graph for pointgroups.h:

Go to the source code of this file.

Functions

static _Bool qpms_pg_is_finite_axial (qpms_pointgroup_class cls)
 Returns true if the point group class belongs to one of the seven "axial" group series.
 
int qpms_pg_irot3_approx_cmp (const qpms_irot3_t *, const qpms_irot3_t *, double atol)
 An ordering of qpms_irot3_t that considers close enough elements equal. More...
 
int qpms_pg_irot3_approx_cmp_v (const void *, const void *)
 A search.h compatible ordering of qpms_irot3_t that considers close enough elements equal. More...
 
qpms_gmi_t qpms_pg_order (qpms_pointgroup_class cls, qpms_gmi_t n)
 Returns the order of a given 3D point group type. More...
 
qpms_irot3_tqpms_pg_canonical_elems (qpms_irot3_t *target, qpms_pointgroup_class cls, qpms_gmi_t)
 Generates the canonical elements of a given 3D point group type. More...
 
qpms_gmi_t qpms_pg_genset_size (qpms_pointgroup_class cls, qpms_gmi_t n)
 Returns the number of canonical generators of a given 3D point group type. More...
 
qpms_gmi_t qpms_pg_genset (qpms_pointgroup_class cls, qpms_gmi_t n, qpms_irot3_t gen[])
 Fills an array of canonical generators of a given 3D point group type. More...
 
qpms_irot3_tqpms_pg_elems (qpms_irot3_t *target, qpms_pointgroup_t g)
 Generates all elements of a given point group. More...
 
_Bool qpms_pg_is_subgroup (qpms_pointgroup_t a, qpms_pointgroup_t b)
 Checks whether a is subgroup of b (in a dirty general way).
 

Variables

double qpms_pg_quat_cmp_atol
 Absolute tolerance threshold used internally to consider two different qpms_irot3_t instances equal. More...
 

Detailed Description

Quaternion-represented 3D point groups.

Function Documentation

◆ qpms_pg_canonical_elems()

qpms_irot3_t* qpms_pg_canonical_elems ( qpms_irot3_t target,
qpms_pointgroup_class  cls,
qpms_gmi_t  then 
)

Generates the canonical elements of a given 3D point group type.

Uses the canonical generators and DPS.

Parameters
targetTarget array (optional; if NULL, a new one is allocated)
clsPoint group class.
thenNumber of rotations around z axis (only for axial group classes).

◆ qpms_pg_elems()

qpms_irot3_t* qpms_pg_elems ( qpms_irot3_t target,
qpms_pointgroup_t  g 
)

Generates all elements of a given point group.

The order of elements corresponds to the one obtained from qpms_pg_canonical_elems().

Parameters
targetTarget array (optional; if NULL, a new one is allocated)
gSpecification of the point group.

◆ qpms_pg_genset()

qpms_gmi_t qpms_pg_genset ( qpms_pointgroup_class  cls,
qpms_gmi_t  n,
qpms_irot3_t  gen[] 
)

Fills an array of canonical generators of a given 3D point group type.

TODO what does it do for infinite (Lie) groups?

Parameters
clsPoint group class.
nNumber of rotations around main axis (only for axial groups).
genTarget generator array

◆ qpms_pg_genset_size()

qpms_gmi_t qpms_pg_genset_size ( qpms_pointgroup_class  cls,
qpms_gmi_t  n 
)

Returns the number of canonical generators of a given 3D point group type.

TODO what does it do for infinite (Lie) groups?

Parameters
clsPoint group class.
nNumber of rotations around main axis (only for axial groups).

◆ qpms_pg_irot3_approx_cmp()

int qpms_pg_irot3_approx_cmp ( const qpms_irot3_t p1,
const qpms_irot3_t p2,
double  atol 
)

An ordering of qpms_irot3_t that considers close enough elements equal.

Parameters
atolAbsolute tolerance for the quaternion part difference.

◆ qpms_pg_irot3_approx_cmp_v()

int qpms_pg_irot3_approx_cmp_v ( const void *  av,
const void *  bv 
)

A search.h compatible ordering of qpms_irot3_t that considers close enough elements equal.

The tolerance is determined by global variable qpms_pg_quat_cmp_atol.

◆ qpms_pg_order()

qpms_gmi_t qpms_pg_order ( qpms_pointgroup_class  cls,
qpms_gmi_t  n 
)

Returns the order of a given 3D point group type.

For infinite groups returns 0.

Parameters
clsPoint group class.
nNumber of rotations around main axis (only for finite axial groups).

Variable Documentation

◆ qpms_pg_quat_cmp_atol

double qpms_pg_quat_cmp_atol
extern

Absolute tolerance threshold used internally to consider two different qpms_irot3_t instances equal.

Used by qpms_pg_irot3_approx_cmp_v. By default, set to QPMS_QUAT_ATOL. It should work fine if the point group orders stay reasonable (thousands or less). Do not touch if unsure what you are doing.