Orbiter 2022
Combinatorial Objects
surface_domain_high_level.cpp
Go to the documentation of this file.
1/*
2 * surface_domain_high_level.cpp
3 *
4 * Created on: Mar 28, 2021
5 * Author: betten
6 */
7
8
9
10#include "orbiter.h"
11
12using namespace std;
13
14
15namespace orbiter {
16namespace layer5_applications {
17namespace applications_in_algebraic_geometry {
18namespace cubic_surfaces_in_general {
19
20
21
23{
24}
25
27{
28}
29
32 surface_create_description *Surface_Descr,
33 std::string &sweep_fname,
34 int verbose_level)
35{
36 int f_v = (verbose_level >= 1);
37
38 if (f_v) {
39 cout << "surface_domain_high_level::do_sweep_4_15_lines" << endl;
40 cout << "surface_domain_high_level::do_sweep_4_15_lines verbose_level=" << verbose_level << endl;
41 }
42
43
44 surface_with_action *Surf_A;
45
47 Surf_A,
48 verbose_level);
49
50 if (f_v) {
51 cout << "surface_domain_high_level::do_sweep_4_15_lines "
52 "before Surf_A->sweep_4_15_lines" << endl;
53 }
54 Surf_A->sweep_4_15_lines(
55 Surface_Descr,
56 sweep_fname,
57 verbose_level);
58 if (f_v) {
59 cout << "surface_domain_high_level::do_sweep_4_15_lines "
60 "after Surf_A->sweep_4_15_lines" << endl;
61 }
62
63
64 if (f_v) {
65 cout << "surface_domain_high_level::do_sweep_4_15_lines done" << endl;
66 }
67}
68
71 surface_create_description *Surface_Descr,
72 std::string &sweep_fname,
73 int verbose_level)
74{
75 int f_v = (verbose_level >= 1);
76
77 if (f_v) {
78 cout << "surface_domain_high_level::do_sweep_F_beta_9_lines" << endl;
79 cout << "surface_domain_high_level::do_sweep_F_beta_9_lines verbose_level=" << verbose_level << endl;
80 }
81
82
83 surface_with_action *Surf_A;
84
86 Surf_A,
87 verbose_level);
88
89 if (f_v) {
90 cout << "surface_domain_high_level::do_sweep_F_beta_9_lines "
91 "before Surf_A->sweep_F_beta_9_lines" << endl;
92 }
94 Surface_Descr,
95 sweep_fname,
96 verbose_level);
97 if (f_v) {
98 cout << "surface_domain_high_level::do_sweep_F_beta_9_lines "
99 "after Surf_A->sweep_F_beta_9_lines" << endl;
100 }
101
102
103 if (f_v) {
104 cout << "surface_domain_high_level::do_sweep_F_beta_9_lines done" << endl;
105 }
106}
107
108
111 surface_create_description *Surface_Descr,
112 std::string &sweep_fname,
113 int verbose_level)
114{
115 int f_v = (verbose_level >= 1);
116
117 if (f_v) {
118 cout << "surface_domain_high_level::do_sweep_6_9_lines" << endl;
119 cout << "surface_domain_high_level::do_sweep_6_9_lines verbose_level=" << verbose_level << endl;
120 }
121
122
123 surface_with_action *Surf_A;
124
126 Surf_A,
127 verbose_level);
128
129 if (f_v) {
130 cout << "surface_domain_high_level::do_sweep_6_9_lines "
131 "before Surf_A->sweep_6_9_lines" << endl;
132 }
133 Surf_A->sweep_6_9_lines(
134 Surface_Descr,
135 sweep_fname,
136 verbose_level);
137 if (f_v) {
138 cout << "surface_domain_high_level::do_sweep_6_9_lines "
139 "after Surf_A->sweep_6_9_lines" << endl;
140 }
141
142
143 if (f_v) {
144 cout << "surface_domain_high_level::do_sweep_6_9_lines done" << endl;
145 }
146}
147
150 surface_create_description *Surface_Descr,
151 std::string &sweep_fname,
152 int verbose_level)
153{
154 int f_v = (verbose_level >= 1);
155
156 if (f_v) {
157 cout << "surface_domain_high_level::do_sweep_4_27" << endl;
158 cout << "surface_domain_high_level::do_sweep_4_27 verbose_level=" << verbose_level << endl;
159 }
160
161 surface_with_action *Surf_A;
162
164 Surf_A,
165 verbose_level);
166
167 if (f_v) {
168 cout << "surface_domain_high_level::do_sweep_4_27 before Surf_A->sweep_4" << endl;
169 }
170 Surf_A->sweep_4_27(
171 Surface_Descr,
172 sweep_fname,
173 verbose_level);
174 if (f_v) {
175 cout << "surface_domain_high_level::do_sweep_4_27 after Surf_A->sweep_4" << endl;
176 }
177
178 if (f_v) {
179 cout << "surface_domain_high_level::do_sweep_4_27 done" << endl;
180 }
181}
182
183
184
189 int verbose_level)
190{
191 int f_v = (verbose_level >= 1);
192
193 if (f_v) {
194 cout << "surface_domain_high_level::classify_surfaces_with_double_sixes" << endl;
195 }
196
198 surface_with_action *Surf_A;
199
200
201 if (f_v) {
202 cout << "surface_domain_high_level::classify_surfaces_with_double_sixes "
203 "before classify_surfaces, control=" << endl;
204 Control->print();
205 }
207 PA->F, PA,
208 Control,
209 Surf, Surf_A,
210 SCW,
211 verbose_level);
212
213 if (f_v) {
214 cout << "surface_domain_high_level::classify_surfaces_with_double_sixes "
215 "after classify_surfaces" << endl;
216 }
217
218#if 0
219 if (f_v) {
220 cout << "surface_domain_high_level::classify_surfaces_with_double_sixes "
221 "before SCW->generate_source_code" << endl;
222 }
223 SCW->generate_source_code(verbose_level);
224 if (f_v) {
225 cout << "surface_domain_high_level::classify_surfaces_with_double_sixes "
226 "after SCW->generate_source_code" << endl;
227 }
228#endif
229
230#if 0
231 if (FALSE) {
232
233 layered_graph_draw_options *O;
234
235
236 if (!Orbiter->f_draw_options) {
237 cout << "please use option -draw_options .. -end" << endl;
238 exit(1);
239 }
241
242
243 SCW->create_report(TRUE /*f_with_stabilizers */,
244 O,
245 verbose_level);
246 }
247#endif
248
249 //FREE_OBJECT(Surf_A);
250 //FREE_OBJECT(Surf);
251 if (f_v) {
252 cout << "surface_domain_high_level::classify_surfaces_with_double_sixes done" << endl;
253 }
254}
255
256
263 int verbose_level)
264{
265 int f_v = (verbose_level >= 1);
267
268 if (f_v) {
269 cout << "surface_domain_high_level::prepare_surface_classify_wedge" << endl;
270 }
271
272
274 Surf_A,
275 verbose_level);
276
277 Surf = Surf_A->Surf;
278
279
280
282
283 if (f_v) {
284 cout << "surface_domain_high_level::prepare_surface_classify_wedge before SCW->init" << endl;
285 }
286
287 SCW->init(Surf_A,
288 Control,
289 verbose_level - 1);
290
291 if (f_v) {
292 cout << "surface_domain_high_level::prepare_surface_classify_wedge after SCW->init" << endl;
293 }
294
295
296 if (f_v) {
297 cout << "surface_domain_high_level::prepare_surface_classify_wedge before SCW->do_classify_double_sixes" << endl;
298 }
299 SCW->do_classify_double_sixes(verbose_level);
300 if (f_v) {
301 cout << "surface_domain_high_level::prepare_surface_classify_wedge after SCW->do_classify_double_sixes" << endl;
302 }
303
304 if (f_v) {
305 cout << "surface_domain_high_level::prepare_surface_classify_wedge before SCW->do_classify_surfaces" << endl;
306 }
307 SCW->do_classify_surfaces(verbose_level);
308 if (f_v) {
309 cout << "surface_domain_high_level::prepare_surface_classify_wedge after SCW->do_classify_surfaces" << endl;
310 }
311
312 if (f_v) {
313 cout << "surface_domain_high_level::prepare_surface_classify_wedge done" << endl;
314 }
315
316}
317
319{
320 int f_v = (verbose_level >= 1);
321
322 if (f_v) {
323 cout << "surface_domain_high_level::do_study_surface" << endl;
324 }
325
326 surface_study *study;
327
328 study = NEW_OBJECT(surface_study);
329
330 cout << "before study->init" << endl;
331 study->init(F, nb, verbose_level);
332 cout << "after study->init" << endl;
333
334 cout << "before study->study_intersection_points" << endl;
335 study->study_intersection_points(verbose_level);
336 cout << "after study->study_intersection_points" << endl;
337
338 cout << "before study->study_line_orbits" << endl;
339 study->study_line_orbits(verbose_level);
340 cout << "after study->study_line_orbits" << endl;
341
342 cout << "before study->study_group" << endl;
343 study->study_group(verbose_level);
344 cout << "after study->study_group" << endl;
345
346 cout << "before study->study_orbits_on_lines" << endl;
347 study->study_orbits_on_lines(verbose_level);
348 cout << "after study->study_orbits_on_lines" << endl;
349
350 cout << "before study->study_find_eckardt_points" << endl;
351 study->study_find_eckardt_points(verbose_level);
352 cout << "after study->study_find_eckardt_points" << endl;
353
354#if 0
355 if (study->nb_Eckardt_pts == 6) {
356 cout << "before study->study_surface_with_6_eckardt_points" << endl;
357 study->study_surface_with_6_eckardt_points(verbose_level);
358 cout << "after study->study_surface_with_6_eckardt_points" << endl;
359 }
360#endif
361
362 if (f_v) {
363 cout << "surface_domain_high_level::do_study_surface done" << endl;
364 }
365}
366
367
368
369
373 int f_test_nb_Eckardt_points, int nb_E,
374 int verbose_level)
375{
376 int f_v = (verbose_level >= 1);
377
378 if (f_v) {
379 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines" << endl;
380 }
381
382 surface_with_action *Surf_A;
385
386
387
390
391
392 if (f_v) {
393 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines "
394 "before Surf->init" << endl;
395 }
396 Surf->init(PA->F, 0 /*verbose_level*/);
397 if (f_v) {
398 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines "
399 "after Surf->init" << endl;
400 }
401
402
403#if 0
404 if (f_v) {
405 cout << "before Surf->init_large_polynomial_domains" << endl;
406 }
407 Surf->init_large_polynomial_domains(0 /*verbose_level*/);
408 if (f_v) {
409 cout << "after Surf->init_large_polynomial_domains" << endl;
410 }
411#endif
412
413
414 if (f_v) {
415 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines "
416 "before Surf_A->init" << endl;
417 }
418 Surf_A->init(Surf, PA, TRUE /* f_recoordinatize */, 0 /*verbose_level - 1*/);
419 if (f_v) {
420 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines "
421 "after Surf_A->init" << endl;
422 }
423
424
426
428
429 if (f_v) {
430 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines "
431 "before SAL->init" << endl;
432 }
433 SAL->init(
434 Surf_A,
435 Control_six_arcs,
436 f_test_nb_Eckardt_points, nb_E,
437 verbose_level - 2);
438 if (f_v) {
439 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines "
440 "after SAL->init" << endl;
441 }
442
443 if (TRUE) {
444 if (f_v) {
445 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines "
446 "before SAL->report" << endl;
447 }
448 SAL->report(Control_six_arcs->draw_options, verbose_level - 2);
449 if (f_v) {
450 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines "
451 "after SAL->report" << endl;
452 }
453
454 }
455 FREE_OBJECT(SAL);
456
457
458 if (f_v) {
459 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_two_lines done" << endl;
460 }
461
462}
463
469 int f_test_nb_Eckardt_points, int nb_E,
470 int verbose_level)
471{
472 int f_v = (verbose_level >= 1);
473
474 if (f_v) {
475 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs" << endl;
476 }
477
478 surface_with_action *Surf_A;
481
482
483
486
487
488 if (f_v) {
489 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
490 "before Surf->init" << endl;
491 }
492 Surf->init(PA->F, 0 /*verbose_level*/);
493 if (f_v) {
494 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
495 "after Surf->init" << endl;
496 }
497
498
499#if 0
500 if (f_v) {
501 cout << "before Surf->init_large_polynomial_domains" << endl;
502 }
503 Surf->init_large_polynomial_domains(0 /*verbose_level*/);
504 if (f_v) {
505 cout << "after Surf->init_large_polynomial_domains" << endl;
506 }
507#endif
508
509
510 if (f_v) {
511 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
512 "before Surf_A->init" << endl;
513 }
514 Surf_A->init(Surf, PA, TRUE /* f_recoordinatize */, verbose_level - 1);
515 if (f_v) {
516 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
517 "after Surf_A->init" << endl;
518 }
519
520
521
522 if (f_v) {
523 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
524 "before Surf_A->Classify_trihedral_pairs->classify" << endl;
525 }
526 Surf_A->Classify_trihedral_pairs->classify(Control1, Control2, verbose_level);
527 if (f_v) {
528 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
529 "after Surf_A->Classify_trihedral_pairs->classify" << endl;
530 }
531
532 if (f_v) {
533 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
534 "before Surf_arc->classify_surfaces_through_arcs_and_trihedral_pairs" << endl;
535 }
536
538
540
541
543 Control_six_arcs,
544 Surf_A,
545 f_test_nb_Eckardt_points, nb_E,
546 verbose_level);
547
548 if (f_v) {
549 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
550 "after Surf_arc->classify_surfaces_through_arcs_and_trihedral_pairs" << endl;
551 }
552
553 if (f_v) {
554 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
555 "before Surf_arc->report" << endl;
556 }
557
558
559 if (orbiter_kernel_system::Orbiter->f_draw_options) {
560 Surf_arc->report(orbiter_kernel_system::Orbiter->draw_options, verbose_level);
561 }
562 else {
563 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
564 "please use -draw_option for a report" << endl;
565 }
566
567 if (f_v) {
568 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs "
569 "after Surf_arc->report" << endl;
570 }
571
572 FREE_OBJECT(Surf_arc);
573
574 if (f_v) {
575 cout << "surface_domain_high_level::do_classify_surfaces_through_arcs_and_trihedral_pairs done" << endl;
576 }
577
578}
579
583 int f_filter_by_nb_Eckardt_points, int nb_Eckardt_points,
584 int verbose_level)
585{
586 int f_v = (verbose_level >= 1);
587
588 if (f_v) {
589 cout << "surface_domain_high_level::do_six_arcs" << endl;
590 }
591
593
594 F = PA->F;
595
596
598
599 if (f_v) {
600 cout << "surface_domain_high_level::do_six_arcs before Surf->init" << endl;
601 }
603 Surf->init(F, 0/*verbose_level - 1*/);
604 if (f_v) {
605 cout << "surface_domain_high_level::do_six_arcs after Surf->init" << endl;
606 }
607
608
609
612
613 int *transporter;
614
616
618 Six_arc_descr->f_target_size = TRUE;
619 Six_arc_descr->target_size = 6;
620 Six_arc_descr->Control = Control_six_arcs;
621
622
623
624 // classify six arcs not on a conic:
625
626 if (f_v) {
627 cout << "surface_domain_high_level::do_six_arcs "
628 "Setting up the group of the plane:" << endl;
629 }
630
631
632
633 if (f_v) {
634 cout << "surface_domain_high_level::do_six_arcs "
635 "before Six_arcs->init:" << endl;
636 }
637
638
639 Six_arcs->init(
640 Six_arc_descr,
641 PA,
642 FALSE, 0, //NULL,
643 verbose_level);
644
645 transporter = NEW_int(Six_arcs->Gen->PA->A->elt_size_in_int);
646
647 int nb_orbits;
648 int level = 6;
649
650 nb_orbits = Six_arcs->Gen->gen->nb_orbits_at_level(level);
651
652 if (f_v) {
653 cout << "surface_domain_high_level::do_six_arcs "
654 "We found " << nb_orbits << " isomorphism types "
655 "of 6-arcs" << endl;
656 }
657
658
659
660 long int Arc6[6];
661 int h, a, b, c, d;
662 int v1[3];
663 int v2[3];
664
665
666 if (f_v) {
667 cout << "surface_domain_high_level::do_six_arcs "
668 "testing the arcs" << endl;
669 }
670
672 int *Abcd;
673 int *Nb_E;
674 int *Ago;
675
676 Abcd = NEW_int(nb_orbits * 4);
677 Nb_E = NEW_int(nb_orbits);
678 Ago = NEW_int(nb_orbits);
679
680 for (h = 0; h < nb_orbits; h++) {
681
682 if (f_v && (h % 10000) == 0) {
683 cout << "surface_domain_high_level::do_six_arcs "
684 "testing arc " << h << " / " << nb_orbits << endl;
685 }
686
687
688 Six_arcs->Gen->gen->get_set_by_level(level, h, Arc6);
689
690 Six_arcs->Gen->gen->get_stabilizer_order(level, h, ago);
691
692 if (Arc6[0] != 0) {
693 cout << "Arc6[0] != 0" << endl;
694 exit(1);
695 }
696 if (Arc6[1] != 1) {
697 cout << "Arc6[1] != 1" << endl;
698 exit(1);
699 }
700 if (Arc6[2] != 2) {
701 cout << "Arc6[2] != 2" << endl;
702 exit(1);
703 }
704 if (Arc6[3] != 3) {
705 cout << "Arc6[3] != 3" << endl;
706 exit(1);
707 }
708 Surf->P2->unrank_point(v1, Arc6[4]);
709 Surf->P2->unrank_point(v2, Arc6[5]);
710 if (v1[2] != 1) {
711 cout << "v1[2] != 1" << endl;
712 exit(1);
713 }
714 if (v2[2] != 1) {
715 cout << "v2[2] != 1" << endl;
716 exit(1);
717 }
718 a = v1[0];
719 b = v1[1];
720 c = v2[0];
721 d = v2[1];
722
723 Abcd[h * 4 + 0] = a;
724 Abcd[h * 4 + 1] = b;
725 Abcd[h * 4 + 2] = c;
726 Abcd[h * 4 + 3] = d;
727
729
731
732 E = Gg.compute_eckardt_point_info(Surf->P2, Arc6, 0/*verbose_level*/);
733
734
735 Nb_E[h] = E->nb_E;
736 Ago[h] = ago.as_int();
737
738 //cout << h << " : " << a << "," << b << "," << c << "," << d << " : " << E->nb_E << " : " << ago << endl;
739
740 FREE_OBJECT(E);
741 }
742
743#if 0
744 cout << "Summary of " << nb_orbits << " arcs:" << endl;
745 for (h = 0; h < nb_orbits; h++) {
746 a = Abcd[h * 4 + 0];
747 b = Abcd[h * 4 + 1];
748 c = Abcd[h * 4 + 2];
749 d = Abcd[h * 4 + 3];
750
751 cout << h << " : " << a << "," << b << "," << c << "," << d << " : " << Nb_E[h] << " : " << Ago[h] << endl;
752 }
753#endif
754
756
757 C.init(Nb_E, nb_orbits, FALSE, 0);
758
759 cout << "nb_E distribution: ";
760 C.print_naked_tex(cout, FALSE);
761 cout << endl;
762
763
764 if (f_filter_by_nb_Eckardt_points) {
765 cout << "Nonconical six-arcs associated with surfaces with " << nb_Eckardt_points << " Eckardt points in PG(2," << F->q << "):" << endl;
766
767 }
768 else {
769 cout << "Nonconical six-arcs associated in PG(2," << F->q << "):" << endl;
770
771 }
772 int nb_E;
773 int cnt = 0;
774
775 cout << "$$" << endl;
776 cout << "\\begin{array}{|r|c|r|}" << endl;
777 cout << "\\hline" << endl;
778 cout << "\\mbox{Orbit} & a,b,c,d & \\mbox{Ago} \\\\" << endl;
779 cout << "\\hline" << endl;
780
781 for (h = 0; h < nb_orbits; h++) {
782 a = Abcd[h * 4 + 0];
783 b = Abcd[h * 4 + 1];
784 c = Abcd[h * 4 + 2];
785 d = Abcd[h * 4 + 3];
786
787 nb_E = Nb_E[h];
788
789 if (f_filter_by_nb_Eckardt_points) {
790 if (nb_E != nb_Eckardt_points) {
791 continue;
792 }
793 }
794 cout << h << " & " << a << "," << b << "," << c << "," << d << " & ";
795 //<< Nb_E[h] << " & "
796 cout << Ago[h] << "\\\\" << endl;
797
798 cnt++;
799 }
800 cout << "\\hline" << endl;
801 cout << "\\end{array}" << endl;
802 cout << "$$" << endl;
803 cout << "There are " << cnt << " such arcs.\\\\" << endl;
804
805
806 FREE_int(Abcd);
807 FREE_int(Nb_E);
808 FREE_int(Ago);
809
810
811 FREE_OBJECT(Six_arcs);
812 FREE_OBJECT(Six_arc_descr);
813 FREE_int(transporter);
814
815
816 if (f_v) {
817 cout << "surface_domain_high_level::do_six_arcs done" << endl;
818 }
819
820}
821
822
823
826 std::string &fname_csv, int defining_q,
827 int column_offset,
828 int verbose_level)
829{
830 int f_v = (verbose_level >= 1);
831
832 if (f_v) {
833 cout << "surface_domain_high_level::do_cubic_surface_properties" << endl;
834 }
835
836 int i;
840 surface_with_action *Surf_A;
844
845
846
847
849 F0->finite_field_init(defining_q, FALSE /* f_without_tables */, 0);
850
851 F = PA->P->F;
852
853
855 Surf->init(F, 0 /*verbose_level - 1*/);
856 if (f_v) {
857 cout << "surface_domain_high_level::do_cubic_surface_properties "
858 "after Surf->init" << endl;
859 }
860
862
863 if (f_v) {
864 cout << "surface_domain_high_level::do_cubic_surface_properties "
865 "before Surf_A->init" << endl;
866 }
867 Surf_A->init(Surf, PA, TRUE /* f_recoordinatize */, 0 /*verbose_level*/);
868 if (f_v) {
869 cout << "surface_domain_high_level::do_cubic_surface_properties "
870 "after Surf_A->init" << endl;
871 }
872
873
874
875
876
877
878 long int *M;
879 int nb_orbits, n;
880
881 Fio.lint_matrix_read_csv(fname_csv, M, nb_orbits, n, verbose_level);
882
883 if (n != 3 + column_offset) {
884 cout << "surface_domain_high_level::do_cubic_surface_properties "
885 "n != 3 + column_offset" << endl;
886 exit(1);
887 }
888
889 int orbit_idx;
890
891 long int *Orbit;
892 long int *Rep;
893 long int *Stab_order;
894 long int *Orbit_length;
895 long int *Nb_pts;
896 long int *Nb_lines;
897 long int *Nb_Eckardt_points;
898 long int *Nb_singular_pts;
899 long int *Nb_Double_points;
900 long int *Ago;
901
902 Orbit = NEW_lint(nb_orbits);
903 Rep = NEW_lint(nb_orbits);
904 Stab_order = NEW_lint(nb_orbits);
905 Orbit_length = NEW_lint(nb_orbits);
906 Nb_pts = NEW_lint(nb_orbits);
907 Nb_lines = NEW_lint(nb_orbits);
908 Nb_Eckardt_points = NEW_lint(nb_orbits);
909 Nb_singular_pts = NEW_lint(nb_orbits);
910 Nb_Double_points = NEW_lint(nb_orbits);
911 Ago = NEW_lint(nb_orbits);
912
913 for (orbit_idx = 0; orbit_idx < nb_orbits; orbit_idx++) {
914 if (f_v) {
915 cout << "surface_domain_high_level::do_cubic_surface_properties "
916 "orbit_idx = " << orbit_idx << " / " << nb_orbits << endl;
917 }
918 int coeff20[20];
919 char str[1000];
920
921
922 Orbit[orbit_idx] = M[orbit_idx * n + 0];
923 Rep[orbit_idx] = M[orbit_idx * n + column_offset + 0];
924 Stab_order[orbit_idx] = M[orbit_idx * n + column_offset + 1];
925 Orbit_length[orbit_idx] = M[orbit_idx * n + column_offset + 2];
926
927 cout << "Rep=" << Rep[orbit_idx] << endl;
928 F0->PG_element_unrank_modified_lint(coeff20, 1, 20, Rep[orbit_idx]);
929 cout << "coeff20=";
930 Int_vec_print(cout, coeff20, 20);
931 cout << endl;
932
934
936 Descr->f_q = TRUE;
937 Descr->q = F->q;
938 Descr->f_by_coefficients = TRUE;
939 sprintf(str, "%d,0", coeff20[0]);
940 Descr->coefficients_text.assign(str);
941 for (i = 1; i < 20; i++) {
942 sprintf(str, ",%d,%d", coeff20[i], i);
943 Descr->coefficients_text.append(str);
944 }
945 cout << "Descr->coefficients_text = " << Descr->coefficients_text << endl;
946
947
948 surface_create *SC;
950
951 if (f_v) {
952 cout << "surface_domain_high_level::do_cubic_surface_properties "
953 "before SC->init" << endl;
954 }
955 SC->init(Descr, Surf_A, 0 /*verbose_level*/);
956 if (f_v) {
957 cout << "surface_domain_high_level::do_cubic_surface_properties "
958 "after SC->init" << endl;
959 }
960
961
962 if (SC->F->e == 1) {
964 }
965
966 SC->F->PG_element_normalize(SC->SO->eqn, 1, 20);
967
968 if (f_v) {
969 cout << "surface_domain_high_level::do_cubic_surface_properties "
970 "We have created the following surface:" << endl;
971 cout << "$$" << endl;
972 SC->Surf->print_equation_tex(cout, SC->SO->eqn);
973 cout << endl;
974 cout << "$$" << endl;
975
976 cout << "$$" << endl;
977 Int_vec_print(cout, SC->SO->eqn, 20);
978 cout << endl;
979 cout << "$$" << endl;
980 }
981
982
983 // compute the group of the surface if we are over a small field.
984 // Otherwise we don't, because it would take too long.
985
986
987 if (F->q <= 8) {
988 if (f_v) {
989 cout << "surface_domain_high_level::do_cubic_surface_properties "
990 "before SC->compute_group" << endl;
991 }
992 SC->compute_group(PA, verbose_level);
993 if (f_v) {
994 cout << "surface_domain_high_level::do_cubic_surface_properties "
995 "after SC->compute_group" << endl;
996 }
997 Ago[orbit_idx] = SC->Sg->group_order_as_lint();
998 }
999 else {
1000 cout << "F->q = " << F->q << " we are not computing the automorphism group" << endl;
1001 Ago[orbit_idx] = 0;
1002 }
1003
1004
1005 Nb_pts[orbit_idx] = SC->SO->nb_pts;
1006 Nb_lines[orbit_idx] = SC->SO->nb_lines;
1007 Nb_Eckardt_points[orbit_idx] = SC->SO->SOP->nb_Eckardt_points;
1008 Nb_singular_pts[orbit_idx] = SC->SO->SOP->nb_singular_pts;
1009 Nb_Double_points[orbit_idx] = SC->SO->SOP->nb_Double_points;
1010
1011 //SC->SO->SOP->print_everything(ost, verbose_level);
1012
1013
1014
1015
1016
1017
1018 FREE_OBJECT(SC);
1019 FREE_OBJECT(Descr);
1020
1021
1022 }
1023
1024
1025 string fname_data;
1027
1028 fname_data.assign(fname_csv);
1029 ST.chop_off_extension(fname_data);
1030
1031 char str[1000];
1032 sprintf(str, "_F%d.csv", F->q);
1033 fname_data.append(str);
1034
1035 long int *Vec[10];
1036 char str_A[1000];
1037 char str_P[1000];
1038 char str_L[1000];
1039 char str_E[1000];
1040 char str_S[1000];
1041 char str_D[1000];
1042 sprintf(str_A, "Ago-%d", F->q);
1043 sprintf(str_P, "Nb_P-%d", F->q);
1044 sprintf(str_L, "Nb_L-%d", F->q);
1045 sprintf(str_E, "Nb_E-%d", F->q);
1046 sprintf(str_S, "Nb_S-%d", F->q);
1047 sprintf(str_D, "Nb_D-%d", F->q);
1048 const char *column_label[] = {
1049 "Orbit_idx",
1050 "Rep",
1051 "StabOrder",
1052 "OrbitLength",
1053 str_A,
1054 str_P,
1055 str_L,
1056 str_E,
1057 str_S,
1058 str_D,
1059 };
1060
1061 Vec[0] = Orbit;
1062 Vec[1] = Rep;
1063 Vec[2] = Stab_order;
1064 Vec[3] = Orbit_length;
1065 Vec[4] = Ago;
1066 Vec[5] = Nb_pts;
1067 Vec[6] = Nb_lines;
1068 Vec[7] = Nb_Eckardt_points;
1069 Vec[8] = Nb_singular_pts;
1070 Vec[9] = Nb_Double_points;
1071
1072 Fio.lint_vec_array_write_csv(10 /* nb_vecs */, Vec, nb_orbits,
1073 fname_data, column_label);
1074
1075 if (f_v) {
1076 cout << "Written file " << fname_data << " of size "
1077 << Fio.file_size(fname_data) << endl;
1078 }
1079
1080
1081
1082 FREE_lint(M);
1083 //FREE_OBJECT(PA);
1084 FREE_OBJECT(F0);
1085 FREE_OBJECT(Surf);
1086 FREE_OBJECT(Surf_A);
1087
1088 if (f_v) {
1089 cout << "surface_domain_high_level::do_cubic_surface_properties done" << endl;
1090 }
1091}
1092
1093
1095
1097
1099 long int Orbit_idx;
1100 long int Rep;
1101 long int Stab_order;
1103 long int Ago;
1104 long int Nb_pts;
1105 long int Nb_lines;
1109
1110};
1111
1114 std::string &fname_csv, int defining_q,
1115 int verbose_level)
1116{
1117 int f_v = (verbose_level >= 1);
1118
1119 if (f_v) {
1120 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze" << endl;
1121 }
1122
1126 surface_with_action *Surf_A;
1130
1131
1132
1134 F0->finite_field_init(defining_q, FALSE /* f_without_tables */, 0);
1135
1136 F = PA->P->F;
1137
1138
1140 Surf->init(F, 0 /* verbose_level - 1 */);
1141 if (f_v) {
1142 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze "
1143 "after Surf->init" << endl;
1144 }
1145
1147
1148 if (f_v) {
1149 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze "
1150 "before Surf_A->init" << endl;
1151 }
1152 Surf_A->init(Surf, PA, TRUE /* f_recoordinatize */, 0 /*verbose_level*/);
1153 if (f_v) {
1154 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze "
1155 "after Surf_A->init" << endl;
1156 }
1157
1158
1159 int nb_orbits, n;
1160 int orbit_idx;
1161 struct cubic_surface_data_set *Data;
1162
1163 {
1164 long int *M;
1165
1166 Fio.lint_matrix_read_csv(fname_csv, M, nb_orbits, n, verbose_level);
1167
1168 if (n != 10) {
1169 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze n != 10" << endl;
1170 exit(1);
1171 }
1172
1173
1174
1175
1176
1177 Data = new struct cubic_surface_data_set [nb_orbits];
1178
1179 for (orbit_idx = 0; orbit_idx < nb_orbits; orbit_idx++) {
1180 Data[orbit_idx].orbit_idx = orbit_idx;
1181 Data[orbit_idx].Orbit_idx = M[orbit_idx * n + 0];
1182 Data[orbit_idx].Rep = M[orbit_idx * n + 1];
1183 Data[orbit_idx].Stab_order = M[orbit_idx * n + 2];
1184 Data[orbit_idx].Orbit_length = M[orbit_idx * n + 3];
1185 Data[orbit_idx].Ago = M[orbit_idx * n + 4];
1186 Data[orbit_idx].Nb_pts = M[orbit_idx * n + 5];
1187 Data[orbit_idx].Nb_lines = M[orbit_idx * n + 6];
1188 Data[orbit_idx].Nb_Eckardt_points = M[orbit_idx * n + 7];
1189 Data[orbit_idx].Nb_singular_pts = M[orbit_idx * n + 8];
1190 Data[orbit_idx].Nb_Double_points = M[orbit_idx * n + 9];
1191 }
1192 FREE_lint(M);
1193 }
1194 long int *Nb_singular_pts;
1195
1196 Nb_singular_pts = NEW_lint(nb_orbits);
1197 for (orbit_idx = 0; orbit_idx < nb_orbits; orbit_idx++) {
1198 Nb_singular_pts[orbit_idx] = Data[orbit_idx].Nb_singular_pts;
1199 }
1200
1201
1203
1204 T_S.init_lint(Nb_singular_pts, nb_orbits, FALSE, 0);
1205
1206 cout << "Classification by the number of singular points:" << endl;
1207 T_S.print(TRUE /* f_backwards */);
1208
1209 {
1210 string fname_report;
1212
1213 fname_report.assign(fname_csv);
1214 ST.chop_off_extension(fname_report);
1215 fname_report.append("_report.tex");
1218
1219 {
1220 ofstream ost(fname_report);
1221 L.head_easy(ost);
1222
1223#if 0
1224 if (f_v) {
1225 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze "
1226 "before get_A()->report" << endl;
1227 }
1228
1229 if (!Descr->f_draw_options) {
1230 cout << "please use -draw_options" << endl;
1231 exit(1);
1232 }
1233 PA->A->report(ost,
1234 FALSE /* f_sims */,
1235 NULL, //A1/*LG->A_linear*/->Sims,
1236 FALSE /* f_strong_gens */,
1237 NULL,
1238 Descr->draw_options,
1239 verbose_level - 1);
1240
1241 if (f_v) {
1242 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze "
1243 "after LG->A_linear->report" << endl;
1244 }
1245#endif
1246
1247 if (f_v) {
1248 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze "
1249 "before report" << endl;
1250 }
1251
1252
1253 ost << "\\section{Surfaces over ${\\mathbb F}_{" << F->q << "}$}" << endl;
1254
1255
1256 ost << "Number of surfaces: " << nb_orbits << "\\\\" << endl;
1257 ost << "Classification by the number of singular points:" << endl;
1258 ost << "$$" << endl;
1259 T_S.print_file_tex_we_are_in_math_mode(ost, TRUE /* f_backwards */);
1260 ost << "$$" << endl;
1261
1262
1263 ost << "\\section{Singular Surfaces}" << endl;
1264
1265 report_singular_surfaces(ost, Data, nb_orbits, verbose_level);
1266
1267 ost << "\\section{Nonsingular Surfaces}" << endl;
1268
1269 report_non_singular_surfaces(ost, Data, nb_orbits, verbose_level);
1270
1271
1272
1273 if (f_v) {
1274 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze "
1275 "after report" << endl;
1276 }
1277
1278 L.foot(ost);
1279 }
1280 cout << "Written file " << fname_report << " of size "
1281 << Fio.file_size(fname_report) << endl;
1282 }
1283
1284
1285
1286
1287
1288 //FREE_OBJECT(PA);
1289 FREE_OBJECT(F0);
1290 FREE_OBJECT(Surf_A);
1291 FREE_OBJECT(Surf);
1292
1293 if (f_v) {
1294 cout << "surface_domain_high_level::do_cubic_surface_properties_analyze done" << endl;
1295 }
1296}
1297
1299 struct cubic_surface_data_set *Data, int nb_orbits, int verbose_level)
1300{
1301 int f_v = (verbose_level >= 1);
1302
1303 if (f_v) {
1304 cout << "surface_domain_high_level::report_singular_surfaces" << endl;
1305 }
1306
1307 struct cubic_surface_data_set *Data_S;
1308 int nb_S, h, orbit_idx;
1309
1310
1311 nb_S = 0;
1312 for (orbit_idx = 0; orbit_idx < nb_orbits; orbit_idx++) {
1313 if (Data[orbit_idx].Nb_singular_pts) {
1314 nb_S++;
1315 }
1316 }
1317
1318
1319 Data_S = new struct cubic_surface_data_set [nb_S];
1320
1321 h = 0;
1322 for (orbit_idx = 0; orbit_idx < nb_orbits; orbit_idx++) {
1323 if (Data[orbit_idx].Nb_singular_pts) {
1324 Data_S[h] = Data[orbit_idx];
1325 h++;
1326 }
1327 }
1328 if (h != nb_S) {
1329 cout << "h != nb_S" << endl;
1330 exit(1);
1331 }
1332
1333 long int *Selected_Nb_lines;
1334
1335
1336 Selected_Nb_lines = NEW_lint(nb_S);
1337
1338
1339 for (h = 0; h < nb_S; h++) {
1340 Selected_Nb_lines[h] = Data_S[h].Nb_lines;
1341 }
1342
1344
1345 T_L.init_lint(Selected_Nb_lines, nb_S, FALSE, 0);
1346
1347 ost << "Number of surfaces: " << nb_S << "\\\\" << endl;
1348 ost << "Classification by the number of lines:" << endl;
1349 ost << "$$" << endl;
1350 T_L.print_file_tex_we_are_in_math_mode(ost, TRUE /* f_backwards */);
1351 ost << "$$" << endl;
1352
1353 report_surfaces_by_lines(ost, Data_S, T_L, verbose_level);
1354
1355
1356
1357 FREE_lint(Selected_Nb_lines);
1358 delete [] Data_S;
1359
1360 if (f_v) {
1361 cout << "surface_domain_high_level::report_singular_surfaces done" << endl;
1362 }
1363}
1364
1365
1367 struct cubic_surface_data_set *Data, int nb_orbits, int verbose_level)
1368{
1369 int f_v = (verbose_level >= 1);
1370
1371 if (f_v) {
1372 cout << "surface_domain_high_level::report_non_singular_surfaces" << endl;
1373 }
1374
1375 struct cubic_surface_data_set *Data_NS;
1376 int nb_NS, h, orbit_idx;
1377
1378
1379 nb_NS = 0;
1380 for (orbit_idx = 0; orbit_idx < nb_orbits; orbit_idx++) {
1381 if (Data[orbit_idx].Nb_singular_pts == 0) {
1382 nb_NS++;
1383 }
1384 }
1385
1386
1387 Data_NS = new struct cubic_surface_data_set [nb_NS];
1388
1389 h = 0;
1390 for (orbit_idx = 0; orbit_idx < nb_orbits; orbit_idx++) {
1391 if (Data[orbit_idx].Nb_singular_pts == 0) {
1392 Data_NS[h] = Data[orbit_idx];
1393 h++;
1394 }
1395 }
1396 if (h != nb_NS) {
1397 cout << "h != nb_NS" << endl;
1398 exit(1);
1399 }
1400
1401 long int *Selected_Nb_lines;
1402
1403
1404 Selected_Nb_lines = NEW_lint(nb_NS);
1405
1406
1407 for (h = 0; h < nb_NS; h++) {
1408 Selected_Nb_lines[h] = Data_NS[h].Nb_lines;
1409 }
1410
1411 for (h = 0; h < nb_NS; h++) {
1412 cout << h << " : " << Data_NS[h].orbit_idx << " : " << Data_NS[h].Nb_lines << endl;
1413 }
1414
1416
1417 T_L.init_lint(Selected_Nb_lines, nb_NS, FALSE, 0);
1418
1419 ost << "Number of surfaces: " << nb_NS << "\\\\" << endl;
1420 ost << "Classification by the number of lines:" << endl;
1421 ost << "$$" << endl;
1422 T_L.print_file_tex_we_are_in_math_mode(ost, TRUE /* f_backwards */);
1423 ost << "$$" << endl;
1424
1425
1426 report_surfaces_by_lines(ost, Data_NS, T_L, verbose_level);
1427
1428
1429 FREE_lint(Selected_Nb_lines);
1430 delete [] Data_NS;
1431
1432 if (f_v) {
1433 cout << "surface_domain_high_level::report_non_singular_surfaces done" << endl;
1434 }
1435}
1436
1438 struct cubic_surface_data_set *Data,
1439 data_structures::tally &T, int verbose_level)
1440{
1441 int f_v = (verbose_level >= 1);
1442
1443 if (f_v) {
1444 cout << "surface_domain_high_level::report_surfaces_by_lines" << endl;
1445 }
1446
1447 int i, j, f, l, a, idx;
1448
1449 for (i = T.nb_types - 1; i >= 0; i--) {
1450 f = T.type_first[i];
1451 l = T.type_len[i];
1452 a = T.data_sorted[f];
1453
1454 int nb_L;
1455 struct cubic_surface_data_set *Data_L;
1456
1457 nb_L = l;
1458
1459 Data_L = new struct cubic_surface_data_set [nb_L];
1460
1461 ost << "The number of surfaces with exactly " << a << " lines is " << nb_L << ": \\\\" << endl;
1462
1463 for (j = 0; j < l; j++) {
1464 idx = T.sorting_perm_inv[f + j];
1465 Data_L[j] = Data[idx];
1466
1467 }
1468
1469
1470 for (j = 0; j < l; j++) {
1471 ost << j
1472 << " : i=" << Data_L[j].orbit_idx
1473 << " : id=" << Data_L[j].Orbit_idx
1474 << " : P=" << Data_L[j].Nb_pts
1475 << " : S=" << Data_L[j].Nb_singular_pts
1476 << " : E=" << Data_L[j].Nb_Eckardt_points
1477 << " : D=" << Data_L[j].Nb_Double_points
1478 << " : ago=" << Data_L[j].Ago
1479 << " : Rep=" << Data_L[j].Rep
1480 << "\\\\" << endl;
1481 }
1482
1483 delete [] Data_L;
1484 }
1485 if (f_v) {
1486 cout << "surface_domain_high_level::report_surfaces_by_lines done" << endl;
1487 }
1488
1489}
1490
1491
1492
1494
1496 int q;
1497 int p;
1498 int h;
1499
1501
1503
1506
1508 int *nb_E;
1509
1511
1512
1513
1514};
1515
1516void surface_domain_high_level::do_create_surface_reports(std::string &field_orders_text, int verbose_level)
1517{
1518 int f_v = (verbose_level >= 1);
1519
1520 if (f_v) {
1521 cout << "surface_domain_high_level::do_create_surface_reports" << endl;
1522 cout << "surface_domain_high_level::do_create_surface_reports verbose_level=" << verbose_level << endl;
1523 }
1524
1528
1529
1530 int *Q;
1531 int nb_q;
1532
1533 Int_vec_scan(field_orders_text, Q, nb_q);
1534
1535 int q;
1536 int cur;
1537 int i;
1538
1539 cur = 0;
1540 for (i = 0; i < nb_q; i++) {
1541
1542 q = Q[i];
1543
1544
1545 int nb_total;
1546 int ocn;
1547
1548 nb_total = K.cubic_surface_nb_reps(q);
1549
1550 if (f_v) {
1551 cout << "surface_domain_high_level::do_create_surface_reports considering q=" << q << " with " << nb_total << " surfaces" << endl;
1552 }
1553
1554
1555 for (ocn = 0; ocn < nb_total; ocn++) {
1556
1557 string cmd;
1558 string fname;
1559 char str[1000];
1560 char str_ocn[1000];
1561
1562 if (f_v) {
1563 cout << "surface_domain_high_level::do_create_surface_reports considering q=" << q << " ocn=" << ocn << " / " << nb_total << endl;
1564 }
1565
1566 make_fname_surface_report_tex(fname, q, ocn);
1567
1568#if 0
1569 $(ORBITER_PATH)orbiter.out -v 3 \
1570 -define F -finite_field -q 4 -end \
1571 -define P -projective_space 3 F -end \
1572 -with P -do \
1573 -projective_space_activity \
1574 -define_surface S -q 4 -catalogue 0 -end \
1575 -end \
1576 -with S -do \
1578 -report \
1579 -report_with_group \
1580 -all_quartic_curves \
1581 -end
1582#endif
1583
1584
1585 sprintf(str, "%d ", q);
1586 sprintf(str_ocn, "%d ", ocn);
1587
1588 cmd.assign(orbiter_kernel_system::Orbiter->orbiter_path);
1589 cmd.append("/orbiter.out -v 3 ");
1590 cmd.append("-define F -finite_field -q ");
1591 cmd.append(str);
1592 cmd.append("-end ");
1593 cmd.append("-define P -projective_space 3 F -end ");
1594 cmd.append("-with P -do ");
1595 cmd.append("-projective_space_activity ");
1596 cmd.append("-define_surface S -q ");
1597 cmd.append(str);
1598 cmd.append("-catalogue ");
1599 cmd.append(str_ocn);
1600 cmd.append("-end ");
1601 cmd.append("-end ");
1602 cmd.append("-with S -do ");
1603 cmd.append("-cubic_surface_activity ");
1604 cmd.append("-report ");
1605 cmd.append("-report_with_group ");
1606 //cmd.append("-all_quartic_curves ");
1607 cmd.append("-end >log_surface");
1608
1609 if (f_v) {
1610 cout << "executing command: " << cmd << endl;
1611 }
1612 system(cmd.c_str());
1613
1614 std::string fname_report_tex;
1615
1616 make_fname_surface_report_tex(fname_report_tex, q, ocn);
1617
1618 cmd.assign("pdflatex ");
1619 cmd.append(fname_report_tex);
1620 cmd.append(" >log_pdflatex");
1621
1622 if (f_v) {
1623 cout << "executing command: " << cmd << endl;
1624 }
1625 system(cmd.c_str());
1626
1627
1628 }
1629
1630
1631 }
1632
1633 if (f_v) {
1634 cout << "surface_domain_high_level::do_create_surface_reports done" << endl;
1635 }
1636}
1637
1639{
1640 int f_v = (verbose_level >= 1);
1641
1642 if (f_v) {
1643 cout << "surface_domain_high_level::do_create_surface_atlas" << endl;
1644 cout << "surface_domain_high_level::do_create_surface_atlas verbose_level=" << verbose_level << endl;
1645 }
1646
1648
1649
1653
1654
1656
1657 T = new struct table_surfaces_field_order[q_max];
1658
1659 int q;
1660 int cur;
1661 int j;
1662
1663 cur = 0;
1664 for (q = 2; q <= q_max; q++) {
1665
1666 int p;
1667 int h;
1668
1669 if (!NT.is_prime_power(q, p, h)) {
1670 continue;
1671 }
1672
1673 cout << "considering q=" << q << endl;
1674
1675
1676 T[cur].q = q;
1677 T[cur].p = p;
1678 T[cur].h = h;
1679
1680 int f_semilinear;
1681
1682 if (h > 1) {
1683 f_semilinear = TRUE;
1684 }
1685 else {
1686 f_semilinear = FALSE;
1687 }
1688
1689#if 0
1690 T[cur].Descr = NEW_OBJECT(linear_group_description);
1691
1692 T[cur].Descr->n = 4;
1693 T[cur].Descr->input_q = q;
1694 T[cur].Descr->f_projective = TRUE;
1695 T[cur].Descr->f_general = FALSE;
1696 T[cur].Descr->f_affine = FALSE;
1697 T[cur].Descr->f_semilinear = FALSE;
1698
1699 if (h > 1) {
1700 T[cur].Descr->f_semilinear = TRUE;
1701 }
1702 T[cur].Descr->f_special = FALSE;
1703#endif
1704
1706 T[cur].F->finite_field_init(q, FALSE /* f_without_tables */, 0);
1707
1708 //T[cur].Descr->F = T[cur].F;
1709
1710
1712 T[cur].PA->init(T[cur].F, 3, f_semilinear,
1713 TRUE /* f_init_incidence_structure */,
1714 verbose_level);
1715
1716 //T[cur].LG = NEW_OBJECT(linear_group);
1717
1718 //cout << "before LG->linear_group_init" << endl;
1719 //T[cur].LG->linear_group_init(T[cur].Descr, verbose_level);
1720
1721
1722
1723
1724
1725
1726
1727
1728 if (f_v) {
1729 cout << "surface_domain_high_level::do_create_surface_atlas before Surf->init" << endl;
1730 }
1731
1733 T[cur].Surf->init(T[cur].F, 0 /*verbose_level - 1*/);
1734 if (f_v) {
1735 cout << "do_create_surface_atlas after Surf->init" << endl;
1736 }
1737
1739
1740 if (f_v) {
1741 cout << "surface_domain_high_level::do_create_surface_atlas before Surf_A->init_with_linear_group" << endl;
1742 }
1743 T[cur].Surf_A->init(T[cur].Surf, T[cur].PA, TRUE /* f_recoordinatize */, 0 /*verbose_level*/);
1744 if (f_v) {
1745 cout << "surface_domain_high_level::do_create_surface_atlas after Surf_A->init_with_linear_group" << endl;
1746 }
1747
1748
1749 if (T[cur].q == 2) {
1750 cur++;
1751 continue;
1752 }
1753 if (T[cur].q == 3) {
1754 cur++;
1755 continue;
1756 }
1757 if (T[cur].q == 5) {
1758 cur++;
1759 continue;
1760 }
1761
1762
1763 T[cur].nb_total = K.cubic_surface_nb_reps(T[cur].q);
1764
1765
1766 T[cur].nb_E = NEW_int(T[cur].nb_total);
1767
1768 for (j = 0; j < T[cur].nb_total; j++) {
1769 T[cur].nb_E[j] = K.cubic_surface_nb_Eckardt_points(T[cur].q, j);
1770 }
1771
1773
1774 T[cur].T_nb_E->init(T[cur].nb_E, T[cur].nb_total, FALSE, 0);
1775
1776
1777 cur++;
1778 }
1779
1780 cout << "we found the following field orders:" << endl;
1781
1782 int nb_fields;
1783 int c;
1784
1785
1786 nb_fields = cur;
1787
1788 for (c = 0; c < nb_fields; c++) {
1789 cout << c << " : " << T[c].q << endl;
1790 }
1791
1792
1793
1794 {
1795 string fname_report;
1796
1797 fname_report.assign("surface");
1798 fname_report.append("_atlas.tex");
1799
1800 {
1801 ofstream ost(fname_report);
1802
1803
1804 const char *title = "ATLAS of Cubic Surfaces";
1805 const char *author = "Anton Betten and Fatma Karaoglu";
1806
1808
1809 L.head(ost,
1810 FALSE /* f_book */,
1811 TRUE /* f_title */,
1812 title, author,
1813 FALSE /*f_toc */,
1814 FALSE /* f_landscape */,
1815 FALSE /* f_12pt */,
1816 TRUE /*f_enlarged_page */,
1817 TRUE /* f_pagenumbers*/,
1818 NULL /* extra_praeamble */);
1819
1820
1821 int E[] = {0,1,2,3,4,5,6,9,10,13,18,45};
1822 int nb_possible_E = sizeof(E) / sizeof(int);
1823 int j;
1824
1825 ost << "$$" << endl;
1826 ost << "\\begin{array}{|c|c|c|}" << endl;
1827 ost << "\\hline" << endl;
1828 ost << "\\ \\ q \\ \\ ";
1829 ost << "& \\ \\ \\mbox{Total} \\ \\ ";
1830 for (j = 0; j < nb_possible_E; j++) {
1831 ost << "&\\ \\ " << E[j] << "\\ \\ ";
1832 }
1833 ost << "\\\\" << endl;
1834 ost << "\\hline" << endl;
1835 for (c = 0; c < nb_fields; c++) {
1836
1837 if (T[c].q == 2) {
1838 continue;
1839 }
1840 if (T[c].q == 3) {
1841 continue;
1842 }
1843 if (T[c].q == 5) {
1844 continue;
1845 }
1846 //ost << c << " & ";
1847 ost << T[c].q << " " << endl;
1848
1849 ost << " & " << T[c].nb_total << " " << endl;
1850
1851 for (j = 0; j < nb_possible_E; j++) {
1852
1853 int *Idx;
1854 int nb;
1855
1856 T[c].T_nb_E->get_class_by_value(Idx, nb, E[j], 0);
1857
1858 if (nb) {
1859
1860 int nb_e = E[j];
1861 string fname_report_tex;
1862 string fname_report_html;
1863
1865 T + c, nb_e, Idx, nb,
1866 fname_report_tex,
1867 verbose_level);
1868
1870
1871 fname_report_html.assign(fname_report_tex);
1872 ST.chop_off_extension(fname_report_html);
1873 fname_report_html.append(".html");
1874
1875
1876 ost << " & ";
1877 ost << "%%tth: \\begin{html} <a href=\"" << fname_report_html << "\"> " << nb << " </a> \\end{html}" << endl;
1878
1879
1880 string cmd;
1881
1882 cmd.assign("~/bin/tth ");
1883 cmd.append(fname_report_tex);
1884 system(cmd.c_str());
1885 }
1886 else {
1887 ost << " & ";
1888 }
1889
1890 FREE_int(Idx);
1891 }
1892 ost << "\\\\" << endl;
1893 ost << "\\hline" << endl;
1894 }
1895
1896 //
1897
1898 ost << "\\end{array}" << endl;
1899
1900 ost << "$$" << endl;
1901
1902#if 0
1903 ost << "\\subsection*{The surface $" << SC->label_tex << "$}" << endl;
1904
1905
1906 if (SC->SO->SOP == NULL) {
1907 cout << "group_theoretic_activity::do_create_surface SC->SO->SOP == NULL" << endl;
1908 exit(1);
1909 }
1910
1911 if (f_v) {
1912 cout << "group_theoretic_activity::do_create_surface "
1913 "before SC->SO->SOP->print_everything" << endl;
1914 }
1915 SC->SO->SOP->print_everything(ost, verbose_level);
1916 if (f_v) {
1917 cout << "group_theoretic_activity::do_create_surface "
1918 "after SC->SO->SOP->print_everything" << endl;
1919 }
1920#endif
1921
1922 L.foot(ost);
1923 }
1925
1926 cout << "Written file " << fname_report << " of size "
1927 << Fio.file_size(fname_report) << endl;
1928
1929
1930 }
1931
1932
1933
1934
1935
1936 if (f_v) {
1937 cout << "surface_domain_high_level::do_create_surface_atlas done" << endl;
1938 }
1939}
1940
1941
1942
1944 struct table_surfaces_field_order *T, int nb_e, int *Idx, int nb,
1945 std::string &fname_report_tex,
1946 int verbose_level)
1947{
1948 int f_v = (verbose_level >= 1);
1949
1950 if (f_v) {
1951 cout << "surface_domain_high_level::do_create_surface_atlas_q_e" << endl;
1952 cout << "surface_domain_high_level::do_create_surface_atlas q=" << T->q << " " << nb_e << endl;
1953 }
1954
1956
1957
1961
1962
1963
1964
1965 {
1966 char str[1000];
1967
1968 sprintf(str, "_q%d_e%d", T->q, nb_e);
1969 fname_report_tex.assign("surface_atlas");
1970 fname_report_tex.append(str);
1971 fname_report_tex.append(".tex");
1972
1973 {
1974 ofstream ost(fname_report_tex);
1975
1976
1977 string title;
1978
1979 title.assign("ATLAS of Cubic Surfaces");
1980 sprintf(str, ", q=%d, \\#E=%d", T->q, nb_e);
1981 title.append(str);
1982
1983 const char *author = "Anton Betten and Fatma Karaoglu";
1984
1986
1987 //latex_head_easy(fp);
1988 L.head(ost,
1989 FALSE /* f_book */,
1990 TRUE /* f_title */,
1991 title.c_str(), author,
1992 FALSE /*f_toc */,
1993 FALSE /* f_landscape */,
1994 FALSE /* f_12pt */,
1995 TRUE /*f_enlarged_page */,
1996 TRUE /* f_pagenumbers*/,
1997 NULL /* extra_praeamble */);
1998
1999
2000 int i;
2001
2002 ost << "$$" << endl;
2003 ost << "\\begin{array}{|c|c|c|}" << endl;
2004 ost << "\\hline" << endl;
2005 ost << "\\ \\ i \\ \\ ";
2006 ost << "& \\ \\ \\mbox{Orbiter Number} \\ \\ ";
2007 ost << "& \\ \\ \\mbox{Report} \\ \\ ";
2008 ost << "\\\\" << endl;
2009 ost << "\\hline" << endl;
2010 for (i = 0; i < nb; i++) {
2011
2012 //ost << c << " & ";
2013 ost << i << " " << endl;
2014
2015 ost << " & " << Idx[i] << " " << endl;
2016
2017
2018 std::string fname;
2019
2020 make_fname_surface_report_pdf(fname, T->q, Idx[i]);
2021
2022 ost << " & " << endl;
2023 ost << "%%tth: \\begin{html} <a href=\"" << fname << "\"> report </a> \\end{html}" << endl;
2024
2025 ost << "\\\\" << endl;
2026 ost << "\\hline" << endl;
2027 }
2028
2029 //
2030
2031 ost << "\\end{array}" << endl;
2032
2033 ost << "$$" << endl;
2034
2035
2036 L.foot(ost);
2037 }
2039
2040 cout << "Written file " << fname_report_tex << " of size "
2041 << Fio.file_size(fname_report_tex) << endl;
2042
2043
2044 }
2045
2046}
2047
2049{
2050 int f_v = (verbose_level >= 1);
2051
2052 if (f_v) {
2053 cout << "surface_domain_high_level::do_create_dickson_atlas" << endl;
2054 cout << "surface_domain_high_level::do_create_dickson_atlas verbose_level=" << verbose_level << endl;
2055 }
2056
2058
2059
2060
2061
2062
2063 {
2064 string fname_report;
2065
2066 fname_report.assign("dickson_surfaces");
2067 fname_report.append(".tex");
2068
2069 {
2070 ofstream ost(fname_report);
2071
2072
2073 const char *title = "ATLAS of Dickson Surfaces";
2074 const char *author = "Fatma Karaoglu";
2075
2077
2078 //latex_head_easy(fp);
2079 L.head(ost,
2080 FALSE /* f_book */,
2081 TRUE /* f_title */,
2082 title, author,
2083 FALSE /*f_toc */,
2084 FALSE /* f_landscape */,
2085 FALSE /* f_12pt */,
2086 TRUE /*f_enlarged_page */,
2087 TRUE /* f_pagenumbers*/,
2088 NULL /* extra_praeamble */);
2089
2090
2091 int field_orders[] = {2,4,8,16,32,64};
2092 int nb_of_fields = sizeof(field_orders) / sizeof(int);
2093 int i, j, c;
2094 int I, N;
2095
2096 N = (141 + 24) / 25;
2097 for (I = 0; I < N; I++) {
2098
2099 ost << "$$" << endl;
2100 ost << "\\begin{array}{|r|*{" << nb_of_fields << "}{r|}}" << endl;
2101 ost << "\\hline" << endl;
2102 ost << "\\ \\ D-i \\ \\ ";
2103 for (j = 0; j < nb_of_fields; j++) {
2104 ost << "&\\ \\ " << field_orders[j] << "\\ \\ ";
2105 }
2106 ost << "\\\\" << endl;
2107 ost << "\\hline" << endl;
2108 for (i = 0; i < 25; i++) {
2109 c = I * 25 + i;
2110
2111
2112 if (c >= 141) {
2113 continue;
2114 }
2115
2116 cout << "creating line " << c << endl;
2117
2118 ost << c << " " << endl;
2119
2120
2121 for (j = 0; j < nb_of_fields; j++) {
2122
2123 string fname_base;
2124 string fname_tex;
2125 string fname_pdf;
2126 string fname_surface_report;
2127
2128
2129 char str[1000];
2130
2131
2132 sprintf(str, "Orb%d_q%d", c, field_orders[j]);
2133 fname_base.assign(str);
2134 fname_tex.assign(fname_base);
2135 fname_tex.append(".tex");
2136 fname_pdf.assign(fname_base);
2137 fname_pdf.append(".pdf");
2138 fname_surface_report.assign(fname_base);
2139 fname_surface_report.append(".pdf");
2140
2141
2142 ost << " & " << endl;
2143 ost << "%%tth: \\begin{html} <a href=\"" << fname_surface_report << "\"> " << fname_surface_report << " </a> \\end{html}" << endl;
2144
2145
2146 if (Fio.file_size(fname_tex.c_str()) > 0) {
2147
2148 if (Fio.file_size(fname_pdf.c_str()) <= 0) {
2149 string cmd;
2150
2151 cmd.assign("pdflatex ");
2152 cmd.append(fname_tex);
2153 cmd.append(" ");
2154 system(cmd.c_str());
2155 }
2156 }
2157
2158 }
2159 ost << "\\\\" << endl;
2160 ost << "\\hline" << endl;
2161 }
2162
2163 //
2164
2165 ost << "\\end{array}" << endl;
2166
2167 ost << "$$" << endl;
2168 }
2169
2170 L.foot(ost);
2171 }
2173
2174 cout << "Written file " << fname_report << " of size "
2175 << Fio.file_size(fname_report) << endl;
2176
2177
2178 }
2179
2180
2181 if (f_v) {
2182 cout << "surface_domain_high_level::do_create_dickson_atlas done" << endl;
2183 }
2184}
2185
2186
2187
2188
2189void surface_domain_high_level::make_fname_surface_report_tex(std::string &fname, int q, int ocn)
2190{
2191 char str[1000];
2192
2193 sprintf(str, "_q%d_iso%d_with_group", q, ocn);
2194 fname.assign("surface_catalogue");
2195 fname.append(str);
2196 fname.append(".tex");
2197}
2198
2199void surface_domain_high_level::make_fname_surface_report_pdf(std::string &fname, int q, int ocn)
2200{
2201 char str[1000];
2202
2203 sprintf(str, "_q%d_iso%d_with_group", q, ocn);
2204 fname.assign("surface_catalogue");
2205 fname.append(str);
2206 fname.append(".pdf");
2207}
2208
2209
2210
2211
2212
2213
2214}}}}
2215
2216
information about the Eckardt points of a surface derived from a six-arc
void init(field_theory::finite_field *F, int verbose_level)
a collection of functions related to sorted vectors
functions related to strings and character arrays
a statistical analysis of data consisting of single integers
void init(int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:72
void print_file_tex_we_are_in_math_mode(std::ostream &ost, int f_backwards)
Definition: tally.cpp:358
void init_lint(long int *data, int data_length, int f_second, int verbose_level)
Definition: tally.cpp:123
void print_naked_tex(std::ostream &ost, int f_backwards)
Definition: tally.cpp:413
void get_class_by_value(int *&Pts, int &nb_pts, int value, int verbose_level)
Definition: tally.cpp:644
void finite_field_init(int q, int f_without_tables, int verbose_level)
void PG_element_unrank_modified_lint(int *v, int stride, int len, long int a)
various functions related to geometries
Definition: geometry.h:721
algebraic_geometry::eckardt_point_info * compute_eckardt_point_info(projective_space *P2, long int *arc6, int verbose_level)
provides access to pre-computed combinatorial data in encoded form
void lint_matrix_read_csv(std::string &fname, long int *&M, int &m, int &n, int verbose_level)
Definition: file_io.cpp:1558
void lint_vec_array_write_csv(int nb_vecs, long int **Vec, int len, std::string &fname, const char **column_label)
Definition: file_io.cpp:1270
void head(std::ostream &ost, int f_book, int f_title, const char *title, const char *author, int f_toc, int f_landscape, int f_12pt, int f_enlarged_page, int f_pagenumbers, const char *extras_for_preamble)
a class to represent arbitrary precision integers
Definition: ring_theory.h:366
DISCRETA class related to class domain.
Definition: discreta.h:1413
void report(std::ostream &ost, int f_sims, groups::sims *S, int f_strong_gens, groups::strong_generators *SG, graphics::layered_graph_draw_options *LG_Draw_options, int verbose_level)
Definition: action_io.cpp:22
to control the behavior of the poset classification algorithm
void get_stabilizer_order(int level, int orbit_at_level, ring_theory::longinteger_object &go)
void classify(poset_classification::poset_classification_control *Control1, poset_classification::poset_classification_control *Control2, int verbose_level)
void do_sweep_4_15_lines(projective_geometry::projective_space_with_action *PA, surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void do_sweep_F_beta_9_lines(projective_geometry::projective_space_with_action *PA, surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void classify_surfaces_with_double_sixes(projective_geometry::projective_space_with_action *PA, poset_classification::poset_classification_control *Control, cubic_surfaces_and_double_sixes::surface_classify_wedge *&SCW, int verbose_level)
void do_classify_surfaces_through_arcs_and_two_lines(projective_geometry::projective_space_with_action *PA, poset_classification::poset_classification_control *Control_six_arcs, int f_test_nb_Eckardt_points, int nb_E, int verbose_level)
void report_surfaces_by_lines(std::ostream &ost, struct cubic_surface_data_set *Data, data_structures::tally &T, int verbose_level)
void do_cubic_surface_properties_analyze(projective_geometry::projective_space_with_action *PA, std::string &fname_csv, int defining_q, int verbose_level)
void do_create_surface_atlas_q_e(int q_max, struct table_surfaces_field_order *T, int nb_e, int *Idx, int nb, std::string &fname_report_tex, int verbose_level)
void report_non_singular_surfaces(std::ostream &ost, struct cubic_surface_data_set *Data, int nb_orbits, int verbose_level)
void do_six_arcs(projective_geometry::projective_space_with_action *PA, poset_classification::poset_classification_control *Control_six_arcs, int f_filter_by_nb_Eckardt_points, int nb_Eckardt_points, int verbose_level)
void prepare_surface_classify_wedge(field_theory::finite_field *F, projective_geometry::projective_space_with_action *PA, poset_classification::poset_classification_control *Control, algebraic_geometry::surface_domain *&Surf, surface_with_action *&Surf_A, cubic_surfaces_and_double_sixes::surface_classify_wedge *&SCW, int verbose_level)
void do_cubic_surface_properties(projective_geometry::projective_space_with_action *PA, std::string &fname_csv, int defining_q, int column_offset, int verbose_level)
void do_sweep_4_27(projective_geometry::projective_space_with_action *PA, surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void do_classify_surfaces_through_arcs_and_trihedral_pairs(projective_geometry::projective_space_with_action *PA, poset_classification::poset_classification_control *Control1, poset_classification::poset_classification_control *Control2, poset_classification::poset_classification_control *Control_six_arcs, int f_test_nb_Eckardt_points, int nb_E, int verbose_level)
void report_singular_surfaces(std::ostream &ost, struct cubic_surface_data_set *Data, int nb_orbits, int verbose_level)
void do_sweep_6_9_lines(projective_geometry::projective_space_with_action *PA, surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void classify_surfaces_through_arcs_and_trihedral_pairs(poset_classification::poset_classification_control *Control_six_arcs, cubic_surfaces_in_general::surface_with_action *Surf_A, int f_test_nb_Eckardt_points, int nb_E, int verbose_level)
void init(cubic_surfaces_in_general::surface_with_action *Surf_A, poset_classification::poset_classification_control *Control, int verbose_level)
void create_report(int f_with_stabilizers, graphics::layered_graph_draw_options *draw_options, poset_classification::poset_classification_report_options *Opt, int verbose_level)
void init(cubic_surfaces_in_general::surface_with_action *Surf_A, poset_classification::poset_classification_control *Control_six_arcs, int f_test_nb_Eckardt_points, int nb_E, int verbose_level)
void init(apps_geometry::arc_generator_description *Descr, projective_geometry::projective_space_with_action *PA, int f_test_nb_Eckardt_points, int nb_E, int verbose_level)
void sweep_4_27(surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void sweep_6_9_lines(surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void sweep_F_beta_9_lines(surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
void init(algebraic_geometry::surface_domain *Surf, projective_geometry::projective_space_with_action *PA, int f_recoordinatize, int verbose_level)
void sweep_4_15_lines(surface_create_description *Surface_Descr, std::string &sweep_fname, int verbose_level)
to create a cubic surface from a description using class surface_create_description
void compute_group(projective_geometry::projective_space_with_action *PA, int verbose_level)
void init(surface_create_description *Descr, surface_with_action *Surf_A, int verbose_level)
description of a classification problem of arcs in a geometry
Definition: tl_geometry.h:27
poset_classification::poset_classification_control * Control
Definition: tl_geometry.h:32
projective_geometry::projective_space_with_action * PA
Definition: tl_geometry.h:81
poset_classification::poset_classification * gen
Definition: tl_geometry.h:104
projective space PG(n,q) with automorphism group PGGL(n+1,q)
void init(field_theory::finite_field *F, int n, int f_semilinear, int f_init_incidence_structure, int verbose_level)
void setup_surface_with_action(applications_in_algebraic_geometry::cubic_surfaces_in_general::surface_with_action *&Surf_A, int verbose_level)
#define Int_vec_scan(A, B, C)
Definition: foundations.h:716
#define FREE_int(p)
Definition: foundations.h:640
#define NEW_OBJECT(type)
Definition: foundations.h:638
#define FREE_OBJECT(p)
Definition: foundations.h:651
#define NEW_int(n)
Definition: foundations.h:625
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define FREE_lint(p)
Definition: foundations.h:642
#define NEW_lint(n)
Definition: foundations.h:628
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
orbiter_kernel_system::orbiter_session * Orbiter
global Orbiter session
the orbiter library for the classification of combinatorial objects