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

563604 views
1
#include "ZZ.h"
2
#include "typedef.h"
3
#include "getput.h"
4
#include "name.h"
5
#include "gmp.h"
6
#include "name.h"
7
#include "bravais.h"
8
#include "datei.h"
9
#include "matrix.h"
10
#include "voronoi.h"
11
#include "autgrp.h"
12
#include "symm.h"
13
#include "contrib.h"
14
#include "base.h"
15
#include "zass.h"
16
#include "longtools.h"
17
#include "sort.h"
18
#include "idem.h"
19
20
static void rule_out_centerings(bravais_TYP *G,
21
matrix_TYP *L)
22
{
23
24
int i;
25
26
matrix_TYP *ele_L,
27
*ele_tmp;
28
29
/* ele_tmp = mat_inv(L); */
30
ele_L = long_elt_mat(NULL,L,NULL);
31
/* free_mat(ele_tmp); */
32
33
for (i=0;i<G->zentr_no;i++){
34
ele_tmp = long_elt_mat(NULL,G->zentr[i],NULL);
35
if (mat_comp(ele_tmp, ele_L) != 0){
36
free_mat(G->zentr[i]);
37
G->zentr[i] = NULL;
38
}
39
free_mat(ele_tmp);
40
}
41
42
free_mat(ele_L);
43
44
return;
45
46
}
47
48
49
matrix_TYP *z_class_inf(bravais_TYP *G,
50
bravais_TYP *DATABASEGROUP,
51
bravais_TYP **RES,
52
int *name)
53
{
54
55
int i = 0,
56
j,
57
number,
58
number2;
59
60
bravais_TYP **QCLASS,
61
**QCLASS2,
62
*G_tr = NULL,
63
*G_ALMOST;
64
65
matrix_TYP *T = NULL,
66
*ADLATTICE;
67
68
/* split the Q-class of DATABASEGROUP into Z-classes, and
69
then test each resulting one for Z-equivalence.
70
Attention: the proper way to do this would be first to
71
calculate only the homogenously decomposable groups,
72
fits these, and then test invariant (i.e. index in the homogenously
73
decomposable lattice), and save a lot of work. */
74
DATABASEGROUP->form = formspace(DATABASEGROUP->gen,
75
DATABASEGROUP->gen_no,
76
1,
77
&DATABASEGROUP->form_no);
78
QCLASS = q2z(DATABASEGROUP,&number,TRUE, NULL, TRUE);
79
80
/* calculate the almost decomposable lattice */
81
ADLATTICE = almost_decomposable_lattice(G);
82
G_ALMOST = konj_bravais(G,ADLATTICE);
83
84
/* added tilman 28.02.00 */
85
if (G_ALMOST->form == NULL){
86
G_ALMOST->form = formspace(G_ALMOST->gen,
87
G_ALMOST->gen_no,1,&G_ALMOST->form_no);
88
}
89
90
long_rein_formspace(G_ALMOST->form,G_ALMOST->form_no,1);
91
92
if (INFO_LEVEL & 4){
93
put_mat(ADLATTICE,0,0,0);
94
}
95
96
/* G_ALMOST is a proper group, ie. has the space of invariant
97
forms assigned */
98
while(T == NULL && i < number){
99
T = z_equivalent(G_ALMOST, &G_tr , QCLASS[i]);
100
101
if (T){
102
free_bravais(G_tr); G_tr = NULL;
103
free_mat(T); T = NULL;
104
105
rule_out_centerings(QCLASS[i],ADLATTICE);
106
QCLASS2 = get_groups(QCLASS+i,1,&number2);
107
j = 0;
108
while(T == NULL && j < number2){
109
if (QCLASS2[j]){
110
T = z_equivalent(G, &G_tr , QCLASS2[j]);
111
}
112
j++;
113
}
114
if (T == NULL){
115
fprintf(stderr,"error in z_class_inf.\n");
116
fprintf(stderr,"group does not appear in catalog.\n");
117
put_bravais(G,0,0);
118
exit(4);
119
}
120
}
121
i++;
122
}
123
free_bravais(G_tr);
124
free_bravais(G_ALMOST);
125
126
if (T == NULL){
127
fprintf(stderr,"error in z_class_inf.\n");
128
fprintf(stderr,"group does not appear in catalog.\n");
129
put_bravais(G,0,0);
130
exit(4);
131
}
132
else{
133
name[0] = i;
134
name[1] = j;
135
*RES = QCLASS2[j-1];
136
}
137
138
for (i=0;i<number;i++){
139
free_bravais(QCLASS[i]);
140
}
141
for (i=0;i<number2;i++){
142
if (QCLASS2[i] != NULL && *RES != QCLASS2[i]) free_bravais(QCLASS2[i]);
143
}
144
free(QCLASS);
145
free(QCLASS2);
146
free_mat(ADLATTICE);
147
148
return T;
149
}
150
151
152
153