Orbiter 2022
Combinatorial Objects
quartic_curve_activity.cpp
Go to the documentation of this file.
1/*
2 * quartic_curve_activity.cpp
3 *
4 * Created on: May 21, 2021
5 * Author: betten
6 */
7
8
9
10
11#include "orbiter.h"
12
13using namespace std;
14
15namespace orbiter {
16namespace layer5_applications {
17namespace applications_in_algebraic_geometry {
18namespace quartic_curves {
19
20
22{
23 Descr = NULL;
24 QC = NULL;
25}
26
28{
29}
30
31
32
34 quartic_curve_create *QC, int verbose_level)
35{
36 int f_v = (verbose_level >= 1);
37
38 if (f_v) {
39 cout << "quartic_curve_activity::init" << endl;
40 }
41 Descr = Quartic_curve_activity_description;
43
44 if (f_v) {
45 cout << "quartic_curve_activity::init done" << endl;
46 }
47}
48
50{
51 int f_v = (verbose_level >= 1);
52
53 if (f_v) {
54 cout << "quartic_curve_activity::perform_activity" << endl;
55 }
56
57 if (Descr->f_report) {
58
59 if (f_v) {
60 cout << "quartic_curve_activity::perform_activity before SC->Surf_A->do_report" << endl;
61 }
62 do_report(QC, verbose_level);
63 if (f_v) {
64 cout << "quartic_curve_activity::perform_activity after SC->Surf_A->do_report" << endl;
65 }
66
67 }
69
70 if (f_v) {
71 cout << "quartic_curve_activity::perform_activity before SC->Surf_A->report_with_group" << endl;
72 }
73#if 0
74 int f_has_control_six_arcs = FALSE;
75 poset_classification_control *Control_six_arcs = NULL;
76
77 SC->Surf_A->report_with_group(
78 SC,
79 f_has_control_six_arcs, Control_six_arcs,
80 verbose_level);
81#endif
82 if (f_v) {
83 cout << "quartic_curve_activity::perform_activity after SC->Surf_A->report_with_group" << endl;
84 }
85
86 }
88
89 if (f_v) {
90 cout << "quartic_curve_activity::perform_activity before SC->Surf_A->export_points" << endl;
91 }
92 //SC->Surf_A->export_points(SC, verbose_level);
93 if (f_v) {
94 cout << "quartic_curve_activity::perform_activity after SC->Surf_A->export_points" << endl;
95 }
96
97 }
99
100 int eqn20[20];
101
102 if (f_v) {
103 cout << "quartic_curve_activity::perform_activity before QC->QCDA->Dom->create_surface" << endl;
104 }
105 QC->QCDA->Dom->create_surface(QC->QO, eqn20, verbose_level);
106 if (f_v) {
107 cout << "quartic_curve_activity::perform_activity after QC->QCDA->Dom->create_surface" << endl;
108 }
109
110 if (f_v) {
111 cout << "quartic_curve_activity::perform_activity eqn20 = ";
112 Int_vec_print(cout, eqn20, 20);
113 cout << endl;
114
115 int i;
116
117 for (i = 0; i < 20; i++) {
118 if (eqn20[i]) {
119 cout << eqn20[i] << "," << i << ",";
120 }
121 }
122 cout << endl;
123 }
124
125
126 }
127
128
129 if (f_v) {
130 cout << "quartic_curve_activity::perform_activity done" << endl;
131 }
132
133}
134
135
138 int verbose_level)
139{
140 int f_v = (verbose_level >= 1);
141
142 if (f_v) {
143 cout << "quartic_curve_activity::do_report" << endl;
144 }
145
147
148 F = QC->QCDA->Dom->F;
149
150 {
151 string fname_report;
152
153 if (QC->Descr->f_label_txt) {
154 fname_report.assign(QC->label_txt);
155 fname_report.append(".tex");
156
157 }
158 else {
159 fname_report.assign("quartic_curve_");
160 fname_report.append(QC->label_txt);
161 fname_report.append("_report.tex");
162 }
163
164 {
165 ofstream ost(fname_report);
166
167
168 char title[1000];
169 char author[1000];
170
171 snprintf(title, 1000, "%s over GF(%d)", QC->label_tex.c_str(), F->q);
172 strcpy(author, "");
173
175
176 //latex_head_easy(fp);
177 L.head(ost,
178 FALSE /* f_book */,
179 TRUE /* f_title */,
180 title, author,
181 FALSE /*f_toc */,
182 FALSE /* f_landscape */,
183 FALSE /* f_12pt */,
184 TRUE /*f_enlarged_page */,
185 TRUE /* f_pagenumbers*/,
186 NULL /* extra_praeamble */);
187
188
189
190
191 //ost << "\\subsection*{The surface $" << SC->label_tex << "$}" << endl;
192
193
194 if (QC->QO->QP == NULL) {
195 cout << "quartic_curve_activity::do_report QC->QO->QP == NULL" << endl;
196 exit(1);
197 }
198
199
200 string summary_file_name;
201 string col_postfix;
202
203 if (QC->Descr->f_label_txt) {
204 summary_file_name.assign(QC->Descr->label_txt);
205 }
206 else {
207 summary_file_name.assign(QC->label_txt);
208 }
209 summary_file_name.append("_summary.csv");
210
211 char str[1000];
212
213 sprintf(str, "-Q%d", F->q);
214 col_postfix.assign(str);
215
216 if (f_v) {
217 cout << "quartic_curve_activity::do_report "
218 "before SC->SO->SOP->create_summary_file" << endl;
219 }
221 QC->QO->QP->create_summary_file(summary_file_name,
222 QC->Descr->label_for_summary, col_postfix, verbose_level);
223 }
224 else {
225 QC->QO->QP->create_summary_file(summary_file_name,
226 QC->label_txt, col_postfix, verbose_level);
227 }
228 if (f_v) {
229 cout << "quartic_curve_activity::do_report "
230 "after SC->SO->SOP->create_summary_file" << endl;
231 }
232
233
234#if 0
235 if (f_v) {
236 cout << "quartic_curve_activity::do_report "
237 "before QC->QO->QP->print_everything" << endl;
238 }
239 QC->QO->QP->print_everything(ost, verbose_level);
240 if (f_v) {
241 cout << "quartic_curve_activity::do_report "
242 "after QC->QO->QP->print_everything" << endl;
243 }
244#else
245 if (f_v) {
246 cout << "quartic_curve_activity::do_report "
247 "before SC->SO->SOP->report_properties_simple" << endl;
248 }
249 QC->QO->QP->report_properties_simple(ost, verbose_level);
250 if (f_v) {
251 cout << "quartic_curve_activity::do_report "
252 "after SC->SO->SOP->report_properties_simple" << endl;
253 }
254#endif
255
256
257 L.foot(ost);
258 }
260
261 cout << "Written file " << fname_report << " of size "
262 << Fio.file_size(fname_report) << endl;
263
264
265 }
266 if (f_v) {
267 cout << "quartic_curve_activity::do_report done" << endl;
268 }
269
270}
271
272
273
274
275
276}}}}
277
void create_surface(quartic_curve_object *Q, int *eqn20, int verbose_level)
void create_summary_file(std::string &fname, std::string &surface_label, std::string &col_postfix, int verbose_level)
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)
void init(quartic_curve_activity_description *Quartic_curve_activity_description, quartic_curve_create *QC, int verbose_level)
to create a quartic curve from a description using class quartic_curve_create_description
#define TRUE
Definition: foundations.h:231
#define FALSE
Definition: foundations.h:234
#define Int_vec_print(A, B, C)
Definition: foundations.h:685
the orbiter library for the classification of combinatorial objects