scatsystem.h new prototype drafts and misc.
Former-commit-id: 954f4f82f5fc3932425b696b05dcab88a5566479
This commit is contained in:
parent
0fb36f1e4c
commit
a4b0022305
|
@ -3,4 +3,6 @@
|
||||||
*.swp
|
*.swp
|
||||||
*.out
|
*.out
|
||||||
*.pdf
|
*.pdf
|
||||||
|
*.o
|
||||||
docs/*
|
docs/*
|
||||||
|
qpms/qpms_c.c
|
||||||
|
|
|
@ -412,6 +412,30 @@ qpms_scatsys_t *qpms_scatsys_apply_symmetry(const qpms_scatsys_t *orig, const st
|
||||||
/// Destroys the result of qpms_scatsys_apply_symmetry or qpms_scatsys_load.
|
/// Destroys the result of qpms_scatsys_apply_symmetry or qpms_scatsys_load.
|
||||||
void qpms_scatsys_free(qpms_scatsys_t *s);
|
void qpms_scatsys_free(qpms_scatsys_t *s);
|
||||||
|
|
||||||
|
/// Projects a "big" matrix onto an irrep.
|
||||||
|
/** TODO doc */
|
||||||
|
qpms_errno_t qpms_scatsys_irrep_pack_matrix(complex double *target_packed,
|
||||||
|
const complex double *orig_full, const qpms_scatsys_t *ss,
|
||||||
|
qpms_iri_t iri);
|
||||||
|
|
||||||
|
/// Transforms a big "packed" matrix into the full basis.
|
||||||
|
/** TODO doc */
|
||||||
|
qpms_errno_t qpms_scatsys_irrep_unpack_matrix(complex double *target_full,
|
||||||
|
const complex double *orig_packed, const qpms_scatsys_t *ss,
|
||||||
|
bool add);
|
||||||
|
|
||||||
|
/// Projects a "big" vector onto an irrep.
|
||||||
|
/** TODO doc */
|
||||||
|
qpms_errno_t qpms_scatsys_irrep_pack_vector(complex double *target_packed,
|
||||||
|
const complex double *orig_full, const qpms_scatsys_t *ss,
|
||||||
|
qpms_iri_t iri);
|
||||||
|
|
||||||
|
/// Transforms a big "packed" vector into the full basis.
|
||||||
|
/** TODO doc */
|
||||||
|
qpms_errno_t qpms_scatsys_irrep_unpack_vector(complex double *target_full,
|
||||||
|
const complex double *orig_packed, const qpms_scatsys_t *ss,
|
||||||
|
bool add);
|
||||||
|
|
||||||
/// NOT IMPLEMENTED Dumps a qpms_scatsys_t structure to a file.
|
/// NOT IMPLEMENTED Dumps a qpms_scatsys_t structure to a file.
|
||||||
qpms_errno_t qpms_scatsys_dump(qpms_scatsys_t *ss, char *path);
|
qpms_errno_t qpms_scatsys_dump(qpms_scatsys_t *ss, char *path);
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
|
||||||
|
from qpms import Particle, CTMatrix, BaseSpec, FinitePointGroup, ScatteringSystem, TMatrixInterpolator
|
||||||
|
bspec1 = BaseSpec(lMax = 1)
|
||||||
|
|
||||||
|
tmfile = '/home/mmn/tmp/cylinder_50nm_lMax4_cleaned.TMatrix'
|
||||||
|
interp = TMatrixInterpolator(tmfile, bspec1)
|
||||||
|
interp(3)
|
|
@ -0,0 +1,13 @@
|
||||||
|
from qpms import Particle, CTMatrix, BaseSpec, FinitePointGroup, ScatteringSystem
|
||||||
|
from qpms.symmetries import point_group_info
|
||||||
|
import numpy as np
|
||||||
|
|
||||||
|
sym = FinitePointGroup(point_group_info['D3h'])
|
||||||
|
bspec2 = BaseSpec(lMax=2)
|
||||||
|
bspec1 = BaseSpec(lMax=1)
|
||||||
|
t1 = CTMatrix(bspec1, np.diag(np.random.random(len(bspec1))))
|
||||||
|
t2 = CTMatrix(bspec2, np.diag(np.random.random(len(bspec2))))
|
||||||
|
p1 = Particle((1,2,),t1)
|
||||||
|
p2 = Particle((1,2,3),t1)
|
||||||
|
p3 = Particle((0.1,2),t2)
|
||||||
|
ss = ScatteringSystem([p1, p2, p3], sym)
|
Loading…
Reference in New Issue