Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download

GAP 4.8.9 installation with standard packages -- copy to your CoCalc project to get it

563680 views
1
#include "ZZ.h"
2
#include "typedef.h"
3
#include "voronoi.h"
4
#include "symm.h"
5
#include "autgrp.h"
6
#include "bravais.h"
7
#include "base.h"
8
#include "idem.h"
9
#include "longtools.h"
10
#include "reduction.h"
11
12
13
bravais_TYP **get_groups(bravais_TYP **ADGROUPS,
14
int ad_no,
15
int *number)
16
{
17
int i,
18
j,
19
k,
20
normal_no,
21
centr_no;
22
23
bravais_TYP **GROUPS,
24
*G1,
25
*G2;
26
27
matrix_TYP *tmp,
28
**centerings,
29
**normal;
30
31
G1 = init_bravais(ADGROUPS[0]->dim);
32
33
/* look for all the centerings and so on */
34
number[0] = 0;
35
for (i=0;i<ad_no;i++){
36
number[0] += ADGROUPS[i]->zentr_no;
37
}
38
GROUPS = (bravais_TYP **) calloc(2 * number[0] , sizeof(bravais_TYP *));
39
40
k=0;
41
for (i=0;i<ad_no;i++){
42
centerings = ADGROUPS[i]->zentr;
43
centr_no = ADGROUPS[i]->zentr_no;
44
ADGROUPS[i]->zentr = NULL;
45
ADGROUPS[i]->zentr_no = 0;
46
normal = ADGROUPS[i]->normal;
47
ADGROUPS[i]->normal = NULL;
48
normal_no = ADGROUPS[i]->normal_no;
49
ADGROUPS[i]->normal_no = 0;
50
G1->gen = normal;
51
G1->gen_no = normal_no;
52
for (j=0;j<centr_no;j++){
53
if (centerings[j]){
54
tmp = mat_inv(centerings[j]);
55
if (j==0){
56
GROUPS[k] = konj_bravais(ADGROUPS[i],tmp);
57
GROUPS[k]->normal = normal;
58
GROUPS[k]->normal_no = normal_no;
59
GROUPS[k + number[0] ] = (bravais_TYP * ) 1;
60
}
61
else{
62
G2 = gittstab(G1,centerings[j]);
63
ADGROUPS[i]->normal = G2->gen;
64
ADGROUPS[i]->normal_no = G2->gen_no;
65
GROUPS[k] = konj_bravais(ADGROUPS[i],tmp);
66
long_rein_formspace(GROUPS[k]->form,GROUPS[k]->form_no,1);
67
ADGROUPS[i]->normal = NULL;
68
ADGROUPS[i]->normal_no = 0;
69
free_bravais(G2);
70
GROUPS[k + number[0] ] = (bravais_TYP * ) 0;
71
}
72
free_mat(tmp);
73
free_mat(centerings[j]);
74
}
75
k++;
76
}
77
if (centerings[0] == NULL){
78
/* case only used for z_class_inf */
79
ADGROUPS[0]->normal = normal;
80
ADGROUPS[0]->normal_no = normal_no;
81
}
82
free(centerings);
83
}
84
85
free(G1);
86
87
return GROUPS;
88
}
89
90