CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

| Download

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

Views: 418346
1
/* author: Oliver Heidbuechel */
2
/* last change: 19.01.2001 */
3
4
#include <ZZ.h>
5
#include<typedef.h>
6
#include<getput.h>
7
#include<matrix.h>
8
#include<longtools.h>
9
#include<tools.h>
10
#include"zass.h"
11
#include <base.h>
12
#include <bravais.h>
13
#include <graph.h>
14
#include <presentation.h>
15
16
17
int INFO_LEVEL;
18
extern int SFLAG;
19
boolean GRAPH_DEBUG;
20
21
22
23
int main (int argc, char *argv[])
24
{
25
bravais_TYP *P, *R, **S;
26
27
int i, anz;
28
29
char comment[1000],
30
file[1000];
31
32
33
read_header(argc, argv);
34
if (FILEANZ < 1 || (is_option('h') && optionnumber('h') == 0)){
35
printf("\n");
36
printf("Usage: %s 'file1' 'p_1' ... 'p_n' \n", argv[0]);
37
printf("\n");
38
printf("file1: Spacegroup in standard affine form\n");
39
printf("p_i : primes\n");
40
printf("\n");
41
printf("Calculates the minimal klassengleich supergroups with p_i-power index.\n");
42
printf("\n");
43
printf("Options:\n");
44
printf("-t : omit the last dim generators of the spacegroup\n");
45
printf("-f : print the supergroups in files 'file1_j'\n");
46
printf("-h : gives this help\n");
47
printf("-d : only for debugging\n");
48
exit(11);
49
}
50
INFO_LEVEL = optionnumber('h');
51
if (INFO_LEVEL & 12){
52
SFLAG = 1;
53
}
54
55
/* get data */
56
R = get_bravais(FILENAMES[0]);
57
if (is_option('t'))
58
R->gen_no -= (R->dim - 1);
59
P = p_group(R);
60
for (i = 2; i <= FILEANZ; i++){
61
P->divisors[atoi(argv[i])]++;
62
}
63
64
/* calculate and print minimal klassengleich supergroups of prime-power-index */
65
S = min_k_super(P, R, &anz, is_option('d'));
66
67
if (is_option('f')){
68
for (i = 0; i < anz; i++){
69
sprintf(comment, "%d-th minimal klassengleich supergroup of %s", i + 1, FILENAMES[0]);
70
sprintf(file, "%s_%d", FILENAMES[0], i + 1);
71
put_bravais(S[i], file, comment);
72
}
73
}
74
else
75
for (i = 0; i < anz; i++)
76
put_bravais(S[i],0,0);
77
78
/* clean */
79
if (is_option('t'))
80
R->gen_no += (R->dim - 1);
81
free_bravais(R);
82
free_bravais(P);
83
for (i = 0; i < anz; i++)
84
free_bravais(S[i]);
85
free(S);
86
87
/* for debugging */
88
if (INFO_LEVEL & 12){
89
fprintf(stderr,"write pointer_statistics\n");
90
pointer_statistics(0,0);
91
}
92
93
exit(0);
94
}
95
96
97
98
99
100
101
102