also record number and list of non-loxodromics
This commit is contained in:
parent
b99a043ec6
commit
ba0d56e4c6
4
Makefile
4
Makefile
@ -1,8 +1,8 @@
|
|||||||
HEADERS=linalg.h mat.h coxeter.h enumerate_triangle_group.h parallel.h
|
HEADERS=linalg.h mat.h coxeter.h enumerate_triangle_group.h parallel.h
|
||||||
|
|
||||||
SPECIAL_OPTIONS=-O0 -g -D_DEBUG -DQEXT_SQRT5
|
#SPECIAL_OPTIONS=-O0 -g -D_DEBUG -DQEXT_SQRT5
|
||||||
#SPECIAL_OPTIONS=-O3 -pg -g -funroll-loops -fno-inline
|
#SPECIAL_OPTIONS=-O3 -pg -g -funroll-loops -fno-inline
|
||||||
#SPECIAL_OPTIONS=-O3 -flto -funroll-loops -Winline -DQEXT_SQRT5
|
SPECIAL_OPTIONS=-O3 -flto -funroll-loops -Winline -DQEXT_SQRT5
|
||||||
#SPECIAL_OPTIONS=-O3 -flto -funroll-loops -Winline -mavx512f -mavx512cd -mavx512er -mavx512pf # KNL
|
#SPECIAL_OPTIONS=-O3 -flto -funroll-loops -Winline -mavx512f -mavx512cd -mavx512er -mavx512pf # KNL
|
||||||
#SPECIAL_OPTIONS=
|
#SPECIAL_OPTIONS=
|
||||||
|
|
||||||
|
@ -1,6 +1,11 @@
|
|||||||
set grid
|
set grid
|
||||||
|
set xrange [0:2.5]
|
||||||
|
set yrange [0:5]
|
||||||
|
|
||||||
plot "output/barbot_map_5000" using ($1/100.0):($2/100.0):($3*0.4) w p pt 7 ps variable lc 1 t '', \
|
plot "output/barbot_map_5000_frequencies" \
|
||||||
"output/barbot_map_500000" using ($1/10.0) :($2/10.0) :($3*0.7+0.3) w p pt 7 ps variable lc 3 t ''
|
using ($1/100.0):($2/100.0):(($3==0||$3>6)?1/0:$4) w p pt 7 ps 1 lc palette t '', \
|
||||||
|
"output/barbot_map_500000" \
|
||||||
|
using ($1/10.0) :($2/10.0) :($3*0.7+0.3) w p pt 7 ps variable lc 3 t ''
|
||||||
|
|
||||||
pause mouse keypress
|
pause mouse keypress
|
||||||
|
reread
|
||||||
|
@ -217,7 +217,7 @@ int parallel_work(parallel_context *ctx)
|
|||||||
|
|
||||||
int parallel_run(parallel_context *ctx, const void *global_data, const void *input_array, void *output_array, unsigned int njobs, const char *_restart_filename)
|
int parallel_run(parallel_context *ctx, const void *global_data, const void *input_array, void *output_array, unsigned int njobs, const char *_restart_filename)
|
||||||
{
|
{
|
||||||
// in non-mpi-mode, just run init1, init2, forall(jobs) job
|
// in non-mpi-mode, just run init, forall(jobs) job
|
||||||
if(ctx->mpi_mode == 0) {
|
if(ctx->mpi_mode == 0) {
|
||||||
void *node_data = malloc(ctx->node_data_size);
|
void *node_data = malloc(ctx->node_data_size);
|
||||||
int result = ctx->init(global_data, node_data);
|
int result = ctx->init(global_data, node_data);
|
||||||
|
@ -48,7 +48,9 @@ struct input_data {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct output_data {
|
struct output_data {
|
||||||
int has_non_loxodromic;
|
int n_non_loxodromic;
|
||||||
|
int min_wordlength;
|
||||||
|
int elements[10];
|
||||||
};
|
};
|
||||||
|
|
||||||
static int compare_result(const void *a_, const void *b_)
|
static int compare_result(const void *a_, const void *b_)
|
||||||
@ -303,10 +305,15 @@ int init_node(const void *_g, void *_n)
|
|||||||
|
|
||||||
int process_output(group_t *group, mat *matrices, struct result **invariants, int invariants_length, struct output_data *out)
|
int process_output(group_t *group, mat *matrices, struct result **invariants, int invariants_length, struct output_data *out)
|
||||||
{
|
{
|
||||||
out->has_non_loxodromic = 0;
|
out->n_non_loxodromic = 0;
|
||||||
|
out->min_wordlength = INT_MAX;
|
||||||
for(int i = 0; i < invariants_length; i++) {
|
for(int i = 0; i < invariants_length; i++) {
|
||||||
if(invariants[i]->disc_sign <= 0 && invariants[i]->id != 0 && invariants[i]->id != 4 && invariants[i]->id != 22) {
|
if(invariants[i]->disc_sign <= 0 && invariants[i]->id != 0 && invariants[i]->id != 4 && invariants[i]->id != 22) {
|
||||||
out->has_non_loxodromic = 1;
|
if(out->n_non_loxodromic < 10)
|
||||||
|
out->elements[out->n_non_loxodromic] = invariants[i]->id;
|
||||||
|
out->n_non_loxodromic++;
|
||||||
|
if(group->elements[invariants[i]->id].length < out->min_wordlength)
|
||||||
|
out->min_wordlength = group->elements[invariants[i]->id].length;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -457,7 +464,7 @@ int main(int argc, char *argv[])
|
|||||||
if(g->sstart != g->send || g->qstart != g->qend) {
|
if(g->sstart != g->send || g->qstart != g->qend) {
|
||||||
|
|
||||||
struct input_data *inputs = malloc((g->send - g->sstart + 1)*(g->qend - g->qstart + 1)*sizeof(struct input_data));
|
struct input_data *inputs = malloc((g->send - g->sstart + 1)*(g->qend - g->qstart + 1)*sizeof(struct input_data));
|
||||||
struct output_data *outputs = malloc((g->send - g->sstart + 1)*(g->qend - g->qstart + 1)*sizeof(struct input_data));
|
struct output_data *outputs = malloc((g->send - g->sstart + 1)*(g->qend - g->qstart + 1)*sizeof(struct output_data));
|
||||||
|
|
||||||
int njobs = 0;
|
int njobs = 0;
|
||||||
for(int sloop = g->sstart; sloop <= g->send; sloop++) {
|
for(int sloop = g->sstart; sloop <= g->send; sloop++) {
|
||||||
@ -488,9 +495,13 @@ int main(int argc, char *argv[])
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
printf("%d/%d %d/%d %d\n",
|
printf("%d/%d %d/%d %d %d",
|
||||||
inputs[i].snum, inputs[i].sden, inputs[i].qnum, inputs[i].qden,
|
inputs[i].snum, inputs[i].sden, inputs[i].qnum, inputs[i].qden,
|
||||||
outputs[i].has_non_loxodromic);
|
outputs[i].n_non_loxodromic, outputs[i].min_wordlength);
|
||||||
|
for(int j = 0; j < 10 && j < outputs[i].n_non_loxodromic; j++)
|
||||||
|
printf(" %s", print_word(&n.group->elements[outputs[i].elements[j]], buf));
|
||||||
|
printf("\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
free(inputs);
|
free(inputs);
|
||||||
|
Loading…
Reference in New Issue
Block a user