Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
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
Project: cocalc-sagemath-dev-slelievre
Views: 418346#include"typedef.h"1#include"longtools.h"2#include"getput.h"3#include"bravais.h"4#include"symm.h"5#include"autgrp.h"6#include"matrix.h"7#include"voronoi.h"8#include"polyeder.h"91011int INFO_LEVEL;12extern int SFLAG;1314main (int argc, char *argv[])15{1617bravais_TYP *G,18*G_tr,19*H,20*H_tr;2122matrix_TYP *erg;2324char comment[1000];2526int i,27tmp;2829read_header(argc, argv);30if ((FILEANZ < 2) || (is_option('h') && optionnumber('h') ==0)){31printf("Usage: %s 'file1' 'file2'\n",argv[0]);32printf("\n");33printf("file1: bravais_TYP containing G.\n");34printf("file2: bravais_TYP containing H.\n");35printf("\n");36printf("Tests whether the BRAVAIS GROUPS of the groups\n");37printf("G and H respectively are conjugated in GL_n(Z).\n");38printf("If so, it returns a conjugating matrix X which conjugates\n");39printf("the BRAVAIS GROUPS, ie. X^1 B(G) X = B(H).\n");40printf("\n");41printf("WARNING: The procedure may involve calculating the normalizer\n");42printf(" of the groups. This may be very time comsuming,\n");43printf(" especially when both groups are <-I_n>, where n>5.\n");44if (is_option('h')){45exit(0);46}47else{48exit(31);49}50}5152INFO_LEVEL = optionnumber('h');53if (INFO_LEVEL & 12){54SFLAG = 1;55}5657G = get_bravais(FILENAMES[0]);58H = get_bravais(FILENAMES[1]);5960/* we might not deal with th whole bravais group */61G->order = H->order = 0;6263/* paranoia setting: recalculate the formspace because it has to be a64Z-basis */65if (G->form !=NULL){66for (i=0;i<G->form_no;i++){67free_mat(G->form[i]);68}69free(G->form);70}71G->form = formspace(G->gen,G->gen_no,1,&tmp);72G->form_no = tmp;73if (H->form !=NULL){74for (i=0;i<H->form_no;i++){75free_mat(H->form[i]);76}77free(H->form);78}79H->form = formspace(H->gen,H->gen_no,1,&tmp);80H->form_no = tmp;8182G_tr = tr_bravais(G,1,FALSE);83H_tr = tr_bravais(H,1,FALSE);8485/* output for debugging purposes86put_bravais(G,NULL,NULL);87put_bravais(H,NULL,NULL); */8889erg = is_z_equivalent(G,G_tr,H,H_tr);9091if (erg == NULL){92printf("the bravais groups are not conjugated\n");93}94else{95sprintf(comment,"conjugates the group of %s in the group of %s",96FILENAMES[0],FILENAMES[1]);97put_mat(erg,NULL,comment,2);98free_mat(erg);99}100101/* output the groups again, just to make sure we didn't change102them */103if (INFO_LEVEL == 5){104put_bravais(H,NULL,NULL);105put_bravais(H_tr,NULL,NULL);106}107108free_bravais(G);109free_bravais(G_tr);110free_bravais(H);111free_bravais(H_tr);112113114if (INFO_LEVEL & 12){115pointer_statistics(0,0);116}117exit(0);118}119120121