New members to qpms_scatsys_t for periodic lattices.

Former-commit-id: 94011c64fb1928b20419e628de045dbc762167eb
This commit is contained in:
Marek Nečada 2020-02-05 16:02:33 +02:00
parent 3fed9396a1
commit 2499c739c8
2 changed files with 40 additions and 0 deletions

View File

@ -147,8 +147,11 @@ static void add_orbit_type(qpms_scatsys_t *ss, const qpms_ss_orbit_type_t *ot_cu
qpms_scatsys_at_omega_t *qpms_scatsys_apply_symmetry(const qpms_scatsys_t *orig,
const qpms_finite_group_t *sym, complex double omega,
const qpms_tolerance_spec_t *tol) {
if(orig->lattice_dimension)
QPMS_NOT_IMPLEMENTED("Periodic systems not yet done");
// TODO check data sanity
qpms_l_t lMax = 0; // the overall lMax of all base specs.
qpms_normalisation_t normalisation = QPMS_NORMALISATION_UNDEF;
@ -178,6 +181,8 @@ qpms_scatsys_at_omega_t *qpms_scatsys_apply_symmetry(const qpms_scatsys_t *orig,
// Allocate T-matrix, particle and particle orbit info arrays
qpms_scatsys_t *ss;
QPMS_CRASHING_MALLOC(ss, sizeof(qpms_scatsys_t));
ss->lattice_dimension = orig->lattice_dimension;
// TODO basic periodic lattices related stuff here.
ss->lenscale = lenscale;
ss->sym = sym;
ss->medium = orig->medium;

View File

@ -135,7 +135,42 @@ typedef struct qpms_ss_derived_tmatrix_t {
struct qpms_trans_calculator;
struct qpms_epsmu_generator_t;
/// Common "class" for system of scatterers, both periodic and non-periodic.
/**
* Infinite periodic structures (those with \a lattice_dimension > 0)
* have the following additional members filled:
* - lattice_basis_csystem
* - lattice_basis
* - reciprocal_basis_csystem
* - reciprocal_basis
* - unitcell_volume
* These are ignored for finite systems (lattice_dimension == 0).
*
*/
typedef struct qpms_scatsys_t {
/// Number of dimensions in which the system is periodic from the range 03.
int lattice_dimension;
/// Coordinate system for \a lattice_basis.
/** This is mandatory for \a lattice_dimension != 0 */
qpms_coord_system_t lattice_basis_csystem;
/// (Direct) lattice basis of the system (only \a lattice_dimension elements are used)
/** This is mandatory for \a lattice_dimension != 0 */
anycoord_point_t lattice_basis[3];
/// Coordinate system for \a reciprocal_basis.
qpms_coord_system_t reciprocal_basis_csystem;
/// Reciprocal lattice basis.
/**(TODO specify whether it includes 2π or not) */
anycoord_point_t reciprocal_basis[3];
/// Unitcell volume (irrelevant for non-periodic systems).
/** The dimensionality of the volume corresponds to lattice_dimension, so
* for lattice_dimension == 1, this will actually be lenght and for
* lattice_dimension == 2, a 2D area.
*/
double unitcell_volume;
struct qpms_epsmu_generator_t medium; ///< Optical properties of the background medium.
/// (Template) T-matrix functions in the system.