From 4e4da9d6adea49463835365a96992e528d97ae77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Wed, 27 Feb 2019 12:29:19 +0200 Subject: [PATCH] Move some typedefs from groups.h to qpms_types.h Former-commit-id: 2618edc301db95bbc383a170a9ad2047ab0275fd --- qpms/groups.h | 12 ++---------- qpms/qpms_types.h | 13 +++++++++++++ 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/qpms/groups.h b/qpms/groups.h index 6bfa851..a74cb52 100644 --- a/qpms/groups.h +++ b/qpms/groups.h @@ -8,13 +8,7 @@ #ifndef QPMS_GROUPS_H #define QPMS_GROUPS_H -/// Group member index. -typedef int qpms_gmi_t; - -/// Permutation representation of a group element. -/** For now, it's just a string of the form "(0,1)(3,4,5)" - */ -typedef const char * qpms_permutation_t; +#include "qpms_types.h" /// To be used only in qpms_finite_group_t struct qpms_finite_group_irrep_t { @@ -27,8 +21,6 @@ struct qpms_finite_group_irrep_t { complex double *m; }; -struct qpms_irot3_t; - /// A point group with its irreducible representations and some metadata. /** * The structure of the group is given by the multiplication table \a mt. @@ -53,7 +45,7 @@ typedef struct qpms_finite_group_t { char **elemlabels; ///< Optional human readable labels for the group elements. int permrep_nelem; ///< Number of the elements over which the permutation representation acts. struct qpms_irot3_t *rep3d; ///< The quaternion representation of a 3D point group (if applicable). - int nirreps; ///< How many irreps does the group have + qpms_iri_t nirreps; ///< How many irreps does the group have struct qpms_finite_group_irrep_t *irreps; ///< Irreducible representations of the group. } qpms_finite_group_t; diff --git a/qpms/qpms_types.h b/qpms/qpms_types.h index 33015b3..0d1c2f2 100644 --- a/qpms/qpms_types.h +++ b/qpms/qpms_types.h @@ -308,5 +308,18 @@ typedef int32_t qpms_ss_tmi_t; /// Particle index used in qpms_scatsys_t and related structures. typedef int32_t qpms_ss_pi_t; +// These types are mainly used in groups.h: +/// Finite group member index. +typedef int qpms_gmi_t; + +/// Irreducible representation index +typedef int qpms_iri_t; + +/// Permutation representation of a group element. +/** For now, it's just a string of the form "(0,1)(3,4,5)" + */ +typedef const char * qpms_permutation_t; + + #define lmcheck(l,m) assert((l) >= 1 && abs(m) <= (l)) #endif // QPMS_TYPES