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

563665 views
1
#include"typedef.h"
2
#include"bravais.h"
3
#include"base.h"
4
#include"voronoi.h"
5
#include"matrix.h"
6
#include"getput.h"
7
#include"symm.h"
8
#include"autgrp.h"
9
#include"reduction.h"
10
#include"datei.h"
11
12
13
14
/* -----------------------------------------------------------
15
Berechne Normalisator von H:
16
H: Gruppe (WIRD GEAENDERT!!!!!!!!!!!!!!)
17
Gtr: transponierte von H, kann NULL sein
18
A: G-perfekte Form, kann NULL sein
19
prime: Primzahl, kann 0 sein
20
b_option: Normalisator der Bravaisgruppe von H wird berechnet
21
o_option: Gib Ergebnis auf Bildschirm aus
22
------------------------------------------------------------- */
23
void normalisator(bravais_TYP *H,
24
bravais_TYP *Gtr,
25
matrix_TYP *A,
26
int prime,
27
boolean b_option,
28
boolean o_option)
29
{
30
bravais_TYP *G;
31
bravais_TYP *GB; /* the bravais group of G */
32
33
matrix_TYP *tmp,
34
*tmp2;
35
36
voronoi_TYP **V;
37
38
int Vanz,
39
i;
40
41
boolean gtr_flag = FALSE,
42
a_flag = FALSE;
43
44
45
46
/* throw away the normalizer of H */
47
for (i = 0; i < H->normal_no; i++){
48
free_mat(H->normal[i]);
49
}
50
if (H->normal != NULL && H->normal_no > 0)
51
free(H->normal);
52
H->normal = NULL;
53
H->normal_no = 0;
54
55
if (b_option){
56
G = copy_bravais(H);
57
}
58
else{
59
G = bravais_group(H, FALSE);
60
}
61
62
/* let's see whether we already got the formspace */
63
if (G->form == NULL){
64
G->form = formspace(G->gen, G->gen_no, 1, &G->form_no);
65
}
66
67
/* transposed group */
68
if (Gtr == NULL){
69
Gtr = tr_bravais(G,1,FALSE);
70
gtr_flag = TRUE;
71
}
72
73
/* G-perfect form */
74
if (A == NULL){
75
/* firstly calculate an positive definite G-invariant form */
76
tmp2 = init_mat(G->dim, G->dim, "1");
77
tmp = rform(G->gen, G->gen_no, tmp2, 101);
78
free_mat(tmp2);
79
80
/* now calculate the trace bifo */
81
tmp2 = trace_bifo(G->form ,Gtr->form, G->form_no);
82
A = first_perfect(tmp, G, Gtr->form, tmp2, &Vanz);
83
free_mat(tmp2);
84
free_mat(tmp);
85
86
a_flag = TRUE;
87
}
88
if (prime == 0)
89
prime = 1949;
90
91
GB = bravais_group(G,TRUE);
92
V = normalizer(A, GB, Gtr, prime, &Vanz);
93
G->normal = GB->normal; G->normal_no = GB->normal_no;
94
GB->normal = NULL; GB->normal_no = 0;
95
free_bravais(GB);
96
97
/* now we got G and it's normalizer, so see what we can do with H */
98
if (b_option){
99
/* very easy in this case */
100
H->normal = G->normal;
101
H->normal_no = G->normal_no;
102
G->normal = NULL;
103
G->normal_no = 0;
104
}
105
else{
106
H->normal = normalizer_in_N(H, G, &H->normal_no, FALSE);
107
}
108
109
if(o_option){
110
put_bravais(H, NULL, "group with complete normalizer");
111
put_bravais(Gtr, NULL, "Transposed group");
112
for(i = 0; i < Vanz; i++)
113
put_voronoi(V[i]);
114
}
115
116
/* cleaning up the memory */
117
for(i=0;i<Vanz;i++){
118
clear_voronoi(V[i]);
119
free(V[i]);
120
}
121
free(V);
122
free_bravais(G);
123
if (a_flag)
124
free_mat(A);
125
if (gtr_flag)
126
free_bravais(Gtr);
127
}
128
129
130