From e8c2250e6089bf7622b6baaa3bc6caf26b272d27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ne=C4=8Dada?= Date: Sat, 2 Mar 2019 04:42:34 +0000 Subject: [PATCH] Writing down some plans on abstract t-matrices / particles. Former-commit-id: 83722142c0b53f995c61f53a3c58320491b27843 --- qpms/groups.h | 16 ++++++++++++++++ qpms/scatsystem.h | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/qpms/groups.h b/qpms/groups.h index 295e21c..15cc367 100644 --- a/qpms/groups.h +++ b/qpms/groups.h @@ -4,6 +4,22 @@ * Right now, the instances of qpms_finite_group_t are created at compilation time * from source code generated by Python script TODO (output groups.c) * and they are not to be constructed dynamically. + * + * In the end, I might want to have a special type for 3D point groups + * or more specifically, for the closed subgroups of O(3), see + * https://en.wikipedia.org/wiki/Point_groups_in_three_dimensions. + * They consist of the seven infinite series of axial groups + * (characterized by the series index, the axis direction, + * and the index \a n of the \a n-fold rotational symmetry) + * and the seven remaining point groups + the finite groups. + * All off them have a quite limited number of generators + * (max. 4?; CHECKME). + * The goal is to have some representation that would enable to + * 1. fully describe the symmetries of abstract T-matrices/nanoparticles, + * 2. quickly determine e.g. whether one is a subgroup of another, + * 3. have all the irreps, + * 4. have all in C and without excessive external dependencies, + * etc. */ #ifndef QPMS_GROUPS_H #define QPMS_GROUPS_H diff --git a/qpms/scatsystem.h b/qpms/scatsystem.h index 725d789..491c96f 100644 --- a/qpms/scatsystem.h +++ b/qpms/scatsystem.h @@ -301,4 +301,41 @@ qpms_errno_t qpms_scatsys_dump(qpms_scatsys_t *ss, char *path); /// NOT IMPLEMENTED Reads a qpms_scatsys_t structure from a file. qpms_scatsys_t *qpms_scatsys_load(char *path); + + +#if 0 +// Abstract types that describe T-matrix/particle/scatsystem symmetries +// To be implemented later. See also the thoughts in the beginning of groups.h. + +typedef *char qpms_tmatrix_id_t; ///< Maybe I want some usual integer type instead. + +///Abstract T-matrix type draft. +/** + * TODO. + */ +typedef struct qpms_abstract_tmatrix_t{ + qpms_tmatrix_id_t id; + /// Generators of the discrete point group under which T-matrix is invariant. + qpms_irot3_t *invar_gens; + /// Length of invar_gens. + qpms_gmi_t invar_gens_size; + +} qpms_abstract_tmatrix_t; + + +typedef struct qpms_abstract_particle_t{ +} qpms_abstract_particle_t; + +/// An abstract particle, defined by its position and abstract T-matrix. +typedef struct qpms_abstract_particle_t { + cart3_t pos; ///< Particle position in cartesian coordinates. + const qpms_abstract_tmatrix_t *tmatrix; ///< T-matrix; not owned by this. +} qpms_abstract_particle_t; + + +/** This is just an alias, as the same index can be used for + * abstract T-matrices as well. + */ +typedef qpms_particle_tid_t qpms_abstract_particle_tid_t; +#endif // 0 #endif //QPMS_SCATSYSTEM_H