240 Eigen::VectorXd& fvecn)
const
242 Eigen::VectorXd c_tmp(Nphi_flux);
243 Eigen::VectorXd d1_tmp(Nphi_prec1);
244 Eigen::VectorXd d2_tmp(Nphi_prec2);
245 Eigen::VectorXd d3_tmp(Nphi_prec3);
246 Eigen::VectorXd d4_tmp(Nphi_prec4);
247 Eigen::VectorXd d5_tmp(Nphi_prec5);
248 Eigen::VectorXd d6_tmp(Nphi_prec6);
249 Eigen::VectorXd d7_tmp(Nphi_prec7);
250 Eigen::VectorXd d8_tmp(Nphi_prec8);
251 c_tmp = n.head(Nphi_flux);
253 d1_tmp = n.segment(pos, Nphi_prec1);
254 pos = pos + Nphi_prec1;
255 d2_tmp = n.segment(pos, Nphi_prec2);
256 pos = pos + Nphi_prec2;
257 d3_tmp = n.segment(pos, Nphi_prec3);
258 pos = pos + Nphi_prec3;
259 d4_tmp = n.segment(pos, Nphi_prec4);
260 pos = pos + Nphi_prec4;
261 d5_tmp = n.segment(pos, Nphi_prec5);
262 pos = pos + Nphi_prec5;
263 d6_tmp = n.segment(pos, Nphi_prec6);
264 pos = pos + Nphi_prec6;
265 d7_tmp = n.segment(pos, Nphi_prec7);
266 pos = pos + Nphi_prec7;
267 d8_tmp = n.segment(pos, Nphi_prec8);
270 Eigen::MatrixXd lf(1, 1);
272 Eigen::MatrixXd pf(1, 1);
274 Eigen::MatrixXd af(1, 1);
276 Eigen::VectorXd F3_1 = problem->PS1_matrix * d1_tmp * l1;
277 Eigen::VectorXd F3_2 = problem->PS2_matrix * d2_tmp * l2;
278 Eigen::VectorXd F3_3 = problem->PS3_matrix * d3_tmp * l3;
279 Eigen::VectorXd F3_4 = problem->PS4_matrix * d4_tmp * l4;
280 Eigen::VectorXd F3_5 = problem->PS5_matrix * d5_tmp * l5;
281 Eigen::VectorXd F3_6 = problem->PS6_matrix * d6_tmp * l6;
282 Eigen::VectorXd F3_7 = problem->PS7_matrix * d7_tmp * l7;
283 Eigen::VectorXd F3_8 = problem->PS8_matrix * d8_tmp * l8;
285 Eigen::MatrixXd pp1(1, 1);
286 Eigen::MatrixXd pp2(1, 1);
287 Eigen::MatrixXd pp3(1, 1);
288 Eigen::MatrixXd pp4(1, 1);
289 Eigen::MatrixXd pp5(1, 1);
290 Eigen::MatrixXd pp6(1, 1);
291 Eigen::MatrixXd pp7(1, 1);
292 Eigen::MatrixXd pp8(1, 1);
294 Eigen::VectorXd P1_1 = problem->LP1_matrix * d1_tmp * (nu / Sc);
295 Eigen::VectorXd P1_2 = problem->LP2_matrix * d2_tmp * (nu / Sc);
296 Eigen::VectorXd P1_3 = problem->LP3_matrix * d3_tmp * (nu / Sc);
297 Eigen::VectorXd P1_4 = problem->LP4_matrix * d4_tmp * (nu / Sc);
298 Eigen::VectorXd P1_5 = problem->LP5_matrix * d5_tmp * (nu / Sc);
299 Eigen::VectorXd P1_6 = problem->LP6_matrix * d6_tmp * (nu / Sc);
300 Eigen::VectorXd P1_7 = problem->LP7_matrix * d7_tmp * (nu / Sc);
301 Eigen::VectorXd P1_8 = problem->LP8_matrix * d8_tmp * (nu / Sc);
303 Eigen::VectorXd P2_1 = problem->MP1_matrix * d1_tmp * l1;
304 Eigen::VectorXd P2_2 = problem->MP2_matrix * d2_tmp * l2;
305 Eigen::VectorXd P2_3 = problem->MP3_matrix * d3_tmp * l3;
306 Eigen::VectorXd P2_4 = problem->MP4_matrix * d4_tmp * l4;
307 Eigen::VectorXd P2_5 = problem->MP5_matrix * d5_tmp * l5;
308 Eigen::VectorXd P2_6 = problem->MP6_matrix * d6_tmp * l6;
309 Eigen::VectorXd P2_7 = problem->MP7_matrix * d7_tmp * l7;
310 Eigen::VectorXd P2_8 = problem->MP8_matrix * d8_tmp * l8;
312 Eigen::MatrixXd fs1(1, 1);
313 Eigen::MatrixXd fs2(1, 1);
314 Eigen::MatrixXd fs3(1, 1);
315 Eigen::MatrixXd fs4(1, 1);
316 Eigen::MatrixXd fs5(1, 1);
317 Eigen::MatrixXd fs6(1, 1);
318 Eigen::MatrixXd fs7(1, 1);
319 Eigen::MatrixXd fs8(1, 1);
321 for (
int i = 0; i < Nphi_flux; i++)
323 lf = d_c.transpose() * problem->LF_matrix[i] * c_tmp;
324 pf = nsf_c.transpose() * problem->PF_matrix[i] * c_tmp * (1 - btot);
325 af = a_c.transpose() * problem->AF_matrix[i] * c_tmp;
326 fvecn(i) = lf(0, 0) + pf(0, 0) - af(0,
327 0) + F3_1(i) + F3_2(i) + F3_3(i) + F3_4(i) + F3_5(i) + F3_6(i) + F3_7(i) + F3_8(
331 int pfvecn = Nphi_flux;
333 for (
int i = 0; i < Nphi_prec1; i++)
336 pp1 = a_tmp.transpose() * problem->ST1_matrix[i] * d1_tmp;
337 fs1 = nsf_c.transpose() * problem->FS1_matrix[i] * c_tmp * b1;
338 fvecn(k) = -pp1(0, 0) + P1_1(i) - P2_1(i) + fs1(0, 0);
341 pfvecn += Nphi_prec1;
343 for (
int i = 0; i < Nphi_prec2; i++)
346 pp2 = a_tmp.transpose() * problem->ST2_matrix[i] * d2_tmp;
347 fs2 = nsf_c.transpose() * problem->FS2_matrix[i] * c_tmp * b2;
348 fvecn(k) = -pp2(0, 0) + P1_2(i) - P2_2(i) + fs2(0, 0);
351 pfvecn += Nphi_prec2;
353 for (
int i = 0; i < Nphi_prec3; i++)
356 pp3 = a_tmp.transpose() * problem->ST3_matrix[i] * d3_tmp;
357 fs3 = nsf_c.transpose() * problem->FS3_matrix[i] * c_tmp * b3;
358 fvecn(k) = -pp3(0, 0) + P1_3(i) - P2_3(i) + fs3(0, 0);
361 pfvecn += Nphi_prec3;
363 for (
int i = 0; i < Nphi_prec4; i++)
366 pp4 = a_tmp.transpose() * problem->ST4_matrix[i] * d4_tmp;
367 fs4 = nsf_c.transpose() * problem->FS4_matrix[i] * c_tmp * b4;
368 fvecn(k) = -pp4(0, 0) + P1_4(i) - P2_4(i) + fs4(0, 0);
371 pfvecn += Nphi_prec4;
373 for (
int i = 0; i < Nphi_prec5; i++)
376 pp5 = a_tmp.transpose() * problem->ST5_matrix[i] * d5_tmp;
377 fs5 = nsf_c.transpose() * problem->FS5_matrix[i] * c_tmp * b5;
378 fvecn(k) = -pp5(0, 0) + P1_5(i) - P2_5(i) + fs5(0, 0);
381 pfvecn += Nphi_prec5;
383 for (
int i = 0; i < Nphi_prec6; i++)
386 pp6 = a_tmp.transpose() * problem->ST6_matrix[i] * d6_tmp;
387 fs6 = nsf_c.transpose() * problem->FS6_matrix[i] * c_tmp * b6;
388 fvecn(k) = -pp6(0, 0) + P1_6(i) - P2_6(i) + fs6(0, 0);
391 pfvecn += Nphi_prec6;
393 for (
int i = 0; i < Nphi_prec7; i++)
396 pp7 = a_tmp.transpose() * problem->ST7_matrix[i] * d7_tmp;
397 fs7 = nsf_c.transpose() * problem->FS7_matrix[i] * c_tmp * b7;
398 fvecn(k) = -pp7(0, 0) + P1_7(i) - P2_7(i) + fs7(0, 0);
401 pfvecn += Nphi_prec7;
403 for (
int i = 0; i < Nphi_prec8; i++)
406 pp8 = a_tmp.transpose() * problem->ST8_matrix[i] * d8_tmp;
407 fs8 = nsf_c.transpose() * problem->FS8_matrix[i] * c_tmp * b8;
408 fvecn(k) = -pp8(0, 0) + P1_8(i) - P2_8(i) + fs8(0, 0);
423 Eigen::VectorXd& fvect)
const
425 Eigen::VectorXd e_tmp(Nphi_T);
426 Eigen::VectorXd f1_tmp(Nphi_dec1);
427 Eigen::VectorXd f2_tmp(Nphi_dec2);
428 Eigen::VectorXd f3_tmp(Nphi_dec3);
429 e_tmp = t.head(Nphi_T);
431 f1_tmp = t.segment(pos, Nphi_dec1);
433 f2_tmp = t.segment(pos, Nphi_dec2);
435 f3_tmp = t.segment(pos, Nphi_dec3);
438 Eigen::MatrixXd tt(1, 1);
440 Eigen::VectorXd T1 = problem->LT_matrix * e_tmp * nu / Pr;
442 Eigen::MatrixXd xsf(1, 1);
444 Eigen::MatrixXd dhs1(1, 1);
445 Eigen::MatrixXd dhs2(1, 1);
446 Eigen::MatrixXd dhs3(1, 1);
448 Eigen::MatrixXd dh1(1, 1);
449 Eigen::MatrixXd dh2(1, 1);
450 Eigen::MatrixXd dh3(1, 1);
452 Eigen::VectorXd DH1_1 = problem->LD1_matrix * f1_tmp * nu / Sc;
453 Eigen::VectorXd DH1_2 = problem->LD2_matrix * f2_tmp * nu / Sc;
454 Eigen::VectorXd DH1_3 = problem->LD3_matrix * f3_tmp * nu / Sc;
456 Eigen::VectorXd DH2_1 = problem->MD1_matrix * f1_tmp * dl1;
457 Eigen::VectorXd DH2_2 = problem->MD2_matrix * f2_tmp * dl2;
458 Eigen::VectorXd DH2_3 = problem->MD3_matrix * f3_tmp * dl3;
460 Eigen::MatrixXd dfs1(1, 1);
461 Eigen::MatrixXd dfs2(1, 1);
462 Eigen::MatrixXd dfs3(1, 1);
464 for (
int i = 0; i < Nphi_T; i++)
466 tt = a_tmp.transpose() * problem->TS_matrix[i] * e_tmp;
467 xsf = txs_c.transpose() * problem->TXS_matrix[i] * c_tmp * ((1 - dbtot) / cp);
468 dhs1 = v_c.transpose() * problem->THS1_matrix[i] * f1_tmp * (dl1 / cp);
469 dhs2 = v_c.transpose() * problem->THS2_matrix[i] * f2_tmp * (dl2 / cp);
470 dhs3 = v_c.transpose() * problem->THS3_matrix[i] * f3_tmp * (dl3 / cp);
471 fvect(i) = -tt(0, 0) + T1(i) + xsf(0, 0) + dhs1(0, 0) + dhs2(0, 0) + dhs3(0, 0);
476 for (
int i = 0; i < Nphi_dec1; i++)
479 dh1 = a_tmp.transpose() * problem->SD1_matrix[i] * f1_tmp;
480 dfs1 = sp_c.transpose() * problem->DFS1_matrix[i] * c_tmp * db1;
481 fvect(k) = -dh1(0, 0) + DH1_1(i) - DH2_1(i) + dfs1(0, 0);
486 for (
int i = 0; i < Nphi_dec2; i++)
489 dh2 = a_tmp.transpose() * problem->SD2_matrix[i] * f2_tmp;
490 dfs2 = sp_c.transpose() * problem->DFS2_matrix[i] * c_tmp * db2;
491 fvect(k) = -dh2(0, 0) + DH1_2(i) - DH2_2(i) + dfs2(0, 0);
496 for (
int i = 0; i < Nphi_dec3; i++)
499 dh3 = a_tmp.transpose() * problem->SD3_matrix[i] * f3_tmp;
500 dfs3 = sp_c.transpose() * problem->DFS3_matrix[i] * c_tmp * db3;
501 fvect(k) = -dh3(0, 0) + DH1_3(i) - DH2_3(i) + dfs3(0, 0);
504 for (
int i = 0; i < N_BCt; i++)
506 fvect(i) = t(i) - BCt(i);
522 Eigen::VectorXd mu_online)
524 Info <<
"\n Starting online stage...\n" << endl;
527 w.resize(Nphi_flux + Nphi_prec1 + Nphi_prec2 + Nphi_prec3 + Nphi_prec4 +
528 Nphi_prec5 + Nphi_prec6 + Nphi_prec7 + Nphi_prec8, 1);
530 z.resize(Nphi_T + Nphi_dec1 + Nphi_dec2 + Nphi_dec3, 1);
533 for (
int j = 0; j <
N_BC; j++)
535 y(j) = vel_now(j, 0);
538 for (
int j = 0; j < N_BCt; j++)
540 z(j) = temp_now(j, 0);
543 for (
int i = 0; i < Nphi_const; i++)
545 newton_object_n.d_c(i) =
problem->rbfsplines_D[i]->eval(mu_online);
546 newton_object_n.nsf_c(i) =
problem->rbfsplines_NSF[i]->eval(mu_online);
547 newton_object_n.a_c(i) =
problem->rbfsplines_A[i]->eval(mu_online);
548 newton_object_t.v_c(i) =
problem->rbfsplines_v[i]->eval(mu_online);
549 newton_object_t.sp_c(i) =
problem->rbfsplines_SP[i]->eval(mu_online);
550 newton_object_t.txs_c(i) =
problem->rbfsplines_TXS[i]->eval(mu_online);
554 online_solution_n.resize(1);
555 online_solution_t.resize(1);
556 online_solution_C.resize(1);
558 online_solution_n[0].resize(w.rows() + 1, 1);
559 online_solution_t[0].resize(z.rows() + 1, 1);
560 online_solution_C[0].resize(6 * Nphi_const + 1, 1);
565 Eigen::HybridNonLinearSolver<newton_msr_n> hnls_n(newton_object_n);
566 Eigen::HybridNonLinearSolver<newton_msr_t> hnls_t(newton_object_t);
569 for (
int j = 0; j <
N_BC; j++)
575 newton_object_n.nu =
nu;
576 newton_object_n.iv = iv;
577 newton_object_n.l1 = l1;
578 newton_object_n.l2 = l2;
579 newton_object_n.l3 = l3;
580 newton_object_n.l4 = l4;
581 newton_object_n.l5 = l5;
582 newton_object_n.l6 = l6;
583 newton_object_n.l7 = l7;
584 newton_object_n.l8 = l8;
585 newton_object_n.b1 = b1;
586 newton_object_n.b2 = b2;
587 newton_object_n.b3 = b3;
588 newton_object_n.b4 = b4;
589 newton_object_n.b5 = b5;
590 newton_object_n.b6 = b6;
591 newton_object_n.b7 = b7;
592 newton_object_n.b8 = b8;
593 newton_object_n.btot = btot;
594 newton_object_t.nu =
nu;
595 newton_object_t.cp = cp;
596 newton_object_t.dl1 = dl1;
597 newton_object_t.dl2 = dl2;
598 newton_object_t.dl3 = dl3;
599 newton_object_t.db1 = db1;
600 newton_object_t.db2 = db2;
601 newton_object_t.db3 = db3;
602 newton_object_t.dbtot = dbtot;
603 newton_object_t.BCt.resize(N_BCt);
605 for (
int j = 0; j < N_BCt; j++)
607 newton_object_t.BCt(j) = temp_now(j, 0);
611 Eigen::VectorXd res_fd(
y);
612 newton_object_n.a_tmp =
y.head(
Nphi_u);
614 Eigen::VectorXd res_n(w);
615 newton_object_t.a_tmp =
y.head(
Nphi_u);
616 newton_object_t.c_tmp = w.head(Nphi_flux);
618 Eigen::VectorXd res_t(z);
620 newton_object_n.operator()(w, res_n);
621 newton_object_t.operator()(z, res_t);
623 " ##################" << endl;
625 if (res_fd.norm() /
y.norm() < 1e-5)
627 Info << green <<
"|F_fd(x)| = " << res_fd.norm() /
y.norm() <<
628 " - Minimun reached in " << hnls_fd.iter <<
" iterations " << def << endl
633 Info << red <<
"|F_fd(x)| = " << res_fd.norm() /
y.norm() <<
634 " - Minimun reached in " << hnls_fd.iter <<
" iterations " << def << endl
638 if (res_n.norm() / w.norm() < 1e-5)
640 Info << green <<
"|F_n(x)| = " << res_n.norm() / w.norm() <<
641 " - Minimun reached in " << hnls_n.iter <<
" iterations " << def << endl <<
646 Info << red <<
"|F_n(x)| = " << res_n.norm() / w.norm() <<
647 " - Minimun reached in " << hnls_n.iter <<
" iterations " << def << endl <<
651 if (res_t.norm() / z.norm() < 1e-5)
653 Info << green <<
"|F_t(x)| = " << res_t.norm() / z.norm() <<
654 " - Minimun reached in " << hnls_t.iter <<
" iterations " << def << endl <<
659 Info << red <<
"|F_t(x)| = " << res_t.norm() / z.norm() <<
660 " - Minimun reached in " << hnls_t.iter <<
" iterations " << def << endl <<
667 online_solution_n[0].col(0).tail(w.rows()) = w;
669 online_solution_t[0].col(0).tail(z.rows()) = z;
672 online_solution_C[0].col(0).segment(pos_c, Nphi_const) = newton_object_t.v_c;
674 online_solution_C[0].col(0).segment(pos_c, Nphi_const) = newton_object_n.d_c;
676 online_solution_C[0].col(0).segment(pos_c, Nphi_const) = newton_object_n.nsf_c;
678 online_solution_C[0].col(0).segment(pos_c, Nphi_const) = newton_object_n.a_c;
680 online_solution_C[0].col(0).segment(pos_c, Nphi_const) = newton_object_t.sp_c;
682 online_solution_C[0].col(0).segment(pos_c, Nphi_const) = newton_object_t.txs_c;
684 "./ITHACAoutput/red_coeff_fd");
686 "./ITHACAoutput/red_coeff_n");
688 "./ITHACAoutput/red_coeff_t");
690 "./ITHACAoutput/red_coeff_C");
759 Info <<
"Reconstructing online solution | neutronics" << endl;
766 if (counter == nextwrite)
768 volScalarField Flux_rec(
"flux", Fluxmodes[0] * 0);
770 for (
int j = 0; j < Nphi_flux; j++)
772 Flux_rec += Fluxmodes[j] * online_solution_n[i](j + 1, 0);
777 volScalarField Prec1_rec(
"prec1", Prec1modes[0] * 0);
779 for (
int j = 0; j < Nphi_prec1; j++)
781 Prec1_rec += Prec1modes[j] * online_solution_n[i](j + pos + 1, 0);
786 volScalarField Prec2_rec(
"prec2", Prec2modes[0] * 0);
788 for (
int j = 0; j < Nphi_prec2; j++)
790 Prec2_rec += Prec2modes[j] * online_solution_n[i](j + pos + 1, 0);
795 volScalarField Prec3_rec(
"prec3", Prec3modes[0] * 0);
797 for (
int j = 0; j < Nphi_prec3; j++)
799 Prec3_rec += Prec3modes[j] * online_solution_n[i](j + pos + 1, 0);
804 volScalarField Prec4_rec(
"prec4", Prec4modes[0] * 0);
806 for (
int j = 0; j < Nphi_prec4; j++)
808 Prec4_rec += Prec4modes[j] * online_solution_n[i](j + pos + 1, 0);
813 volScalarField Prec5_rec(
"prec5", Prec5modes[0] * 0);
815 for (
int j = 0; j < Nphi_prec5; j++)
817 Prec5_rec += Prec5modes[j] * online_solution_n[i](j + pos + 1, 0);
822 volScalarField Prec6_rec(
"prec6", Prec6modes[0] * 0);
824 for (
int j = 0; j < Nphi_prec6; j++)
826 Prec6_rec += Prec6modes[j] * online_solution_n[i](j + pos + 1, 0);
831 volScalarField Prec7_rec(
"prec7", Prec7modes[0] * 0);
833 for (
int j = 0; j < Nphi_prec7; j++)
835 Prec7_rec += Prec7modes[j] * online_solution_n[i](j + pos + 1, 0);
840 volScalarField Prec8_rec(
"prec8", Prec8modes[0] * 0);
842 for (
int j = 0; j < Nphi_prec8; j++)
844 Prec8_rec += Prec8modes[j] * online_solution_n[i](j + pos + 1, 0);
848 nextwrite += printevery;
850 FLUXREC.append(Flux_rec.clone());
851 PREC1REC.append(Prec1_rec.clone());
852 PREC2REC.append(Prec2_rec.clone());
853 PREC3REC.append(Prec3_rec.clone());
854 PREC4REC.append(Prec4_rec.clone());
855 PREC5REC.append(Prec5_rec.clone());
856 PREC6REC.append(Prec6_rec.clone());
857 PREC7REC.append(Prec7_rec.clone());
858 PREC8REC.append(Prec8_rec.clone());
864 Info <<
"End" << endl;
875 Info <<
"Reconstructing online solution | thermal" << endl;
879 dimensionedScalar decLam1(
"decLam1", dimensionSet(0, 0, -1, 0, 0, 0, 0), dl1);
880 dimensionedScalar decLam2(
"decLam2", dimensionSet(0, 0, -1, 0, 0, 0, 0), dl2);
881 dimensionedScalar decLam3(
"decLam3", dimensionSet(0, 0, -1, 0, 0, 0, 0), dl3);
883 for (
int i = 0; i < online_solution_t.size(); i++)
885 if (counter == nextwrite)
887 volScalarField T_rec(
"T", Tmodes[0] * 0);
889 for (
int j = 0; j < Nphi_T; j++)
891 T_rec += Tmodes[j] * online_solution_t[i](j + 1, 0);
896 volScalarField PowerDens_rec(
"powerDens", Dec1modes[0] * 0 * decLam1);
897 volScalarField Dec1_rec(
"dec1", Dec1modes[0] * 0);
899 for (
int j = 0; j < Nphi_dec1; j++)
901 Dec1_rec += Dec1modes[j] * online_solution_t[i](j + pos + 1, 0);
902 PowerDens_rec += Dec1modes[j] * online_solution_t[i](j + pos + 1, 0) * decLam1;
907 volScalarField Dec2_rec(
"dec2", Dec2modes[0] * 0);
909 for (
int j = 0; j < Nphi_dec2; j++)
911 Dec2_rec += Dec2modes[j] * online_solution_t[i](j + pos + 1, 0);
912 PowerDens_rec += Dec2modes[j] * online_solution_t[i](j + pos + 1, 0) * decLam2;
917 volScalarField Dec3_rec(
"dec3", Dec3modes[0] * 0);
919 for (
int j = 0; j < Nphi_dec3; j++)
921 Dec3_rec += Dec3modes[j] * online_solution_t[i](j + pos + 1, 0);
922 PowerDens_rec += Dec3modes[j] * online_solution_t[i](j + pos + 1, 0) * decLam3;
926 PowerDens_rec += (1 - dbtot) * SPREC[counter2 - 1] * FLUXREC[counter2 - 1];
928 nextwrite += printevery;
930 TREC.append(T_rec.clone());
931 DEC1REC.append(Dec1_rec.clone());
932 DEC2REC.append(Dec2_rec.clone());
933 DEC3REC.append(Dec3_rec.clone());
934 POWERDENSREC.append(PowerDens_rec.clone());
940 Info <<
"End" << endl;
951 Info <<
"Reconstructing temperature changing constants" << endl;
956 for (
int i = 0; i < online_solution_C.size(); i++)
958 if (counter == nextwrite)
960 volScalarField v_rec(
"v", vmodes[0] * 0);
962 for (
int j = 0; j < Nphi_const; j++)
964 v_rec += vmodes[j] * online_solution_C[i](j + 1, 0);
968 int pos = Nphi_const;
969 volScalarField D_rec(
"D", Dmodes[0] * 0);
971 for (
int j = 0; j < Nphi_const; j++)
973 D_rec += Dmodes[j] * online_solution_C[i](j + pos + 1, 0);
978 volScalarField NSF_rec(
"NSF", NSFmodes[0] * 0);
980 for (
int j = 0; j < Nphi_const; j++)
982 NSF_rec += NSFmodes[j] * online_solution_C[i](j + pos + 1, 0);
987 volScalarField A_rec(
"A", Amodes[0] * 0);
989 for (
int j = 0; j < Nphi_const; j++)
991 A_rec += Amodes[j] * online_solution_C[i](j + pos + 1, 0);
996 volScalarField SP_rec(
"SP", SPmodes[0] * 0);
998 for (
int j = 0; j < Nphi_const; j++)
1000 SP_rec += SPmodes[j] * online_solution_C[i](j + pos + 1, 0);
1005 volScalarField TXS_rec(
"TXS", TXSmodes[0] * 0);
1007 for (
int j = 0; j < Nphi_const; j++)
1009 TXS_rec += TXSmodes[j] * online_solution_C[i](j + pos + 1, 0);
1013 std::ofstream of(folder +
"/" + name(counter2) +
"/" + name(
1014 online_solution_C[i](0)));
1015 nextwrite += printevery;
1017 vREC.append(v_rec.clone());
1018 DREC.append(D_rec.clone());
1019 NSFREC.append(NSF_rec.clone());
1020 AREC.append(A_rec.clone());
1021 SPREC.append(SP_rec.clone());
1022 TXSREC.append(TXS_rec.clone());
1028 Info <<
"End" << endl;