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

563582 views
1
#include "typedef.h"
2
#include "matrix.h"
3
#include "symm.h"
4
#include "getput.h"
5
#include "bravais.h"
6
#include "sort.h"
7
#include "polyeder.h"
8
#include "presentation.h"
9
#include "tools.h"
10
#include "tietzetrans.h"
11
#include "datei.h"
12
13
extern int SFLAG;
14
15
int main (int argc, char *argv[])
16
{
17
bravais_TYP *G;
18
matrix_TYP *vec;
19
matrix_TYP *Form;
20
polyeder_TYP *Pol;
21
22
extern polyeder_TYP *fub();
23
24
read_header(argc, argv);
25
if(FILEANZ != 3)
26
{
27
printf("\n");
28
printf("Usage\n");
29
printf(" %s file1 file2 file3 \n", argv[0]);
30
printf(" \n");
31
printf(" where file1 contains a bravais_TYP describing\n");
32
printf(" a set of affine matrices generating a space group.\n");
33
printf(" \n");
34
printf(" where file2 contains a matrix_TYP describing\n");
35
printf(" an affine vector which is a starting point for the algorithm\n");
36
printf(" \n");
37
printf(" where file3 contains a matrix_TYP describing a positive definite,\n");
38
printf(" invariant form for R \n");
39
printf(" \n");
40
printf(" Calculates a fundamental polyhedron for the group in file1,\n");
41
printf(" and writes it to the stdout.\n");
42
43
printf(" \n");
44
printf(" The options are:\n");
45
printf("\n");
46
printf(" -h : Gives you this help.\n");
47
printf("\n");
48
49
if (is_option('h')){
50
exit(0);
51
}
52
else{
53
exit(31);
54
}
55
}
56
57
/* setting SFALG according to optionnumber('h') */
58
if (is_option('h') && optionnumber('h') == 8){
59
SFLAG = 1;
60
}
61
62
G = get_bravais(FILENAMES[0]);
63
vec = get_mat(FILENAMES[1]);
64
Form = get_mat(FILENAMES[2]);
65
66
Pol = fub(vec, G, Form);
67
68
put_polyeder(Pol);
69
free_polyeder(Pol);
70
71
free_bravais(G);
72
free_mat(vec); vec = NULL;
73
free_mat(Form); Form = NULL;
74
75
if (SFLAG == 1){
76
pointer_statistics(0,0);
77
}
78
printf("\n");
79
}
80
81