186 Eigen::VectorXd& fvec)
const
188 Eigen::VectorXd a_tmp(
Nphi_u);
189 Eigen::VectorXd b_tmp(
Nphi_p);
192 Eigen::VectorXd a_dot(
Nphi_u);
196 Eigen::MatrixXd cc(1, 1);
197 Eigen::MatrixXd gg(1, 1);
198 Eigen::MatrixXd bb(1, 1);
215 fvec(
i) = -M5(
i) + M1(
i) - cc(0, 0) - M2(
i);
223 fvec(k) = M3(
i, 0) + gg(0, 0) - M7(
i, 0);
226 for (
int j = 0; j <
N_BC; j++)
228 fvec(j) = x(j) -
BC(j);
235 Eigen::MatrixXd& fjac)
const
237 Eigen::NumericalDiff<newton_usmsr_fd> numDiff(*
this);
244 Eigen::VectorXd& fvecn)
const
302 Eigen::MatrixXd lf(1, 1);
304 Eigen::MatrixXd pf(1, 1);
306 Eigen::MatrixXd af(1, 1);
326 Eigen::MatrixXd pp1(1, 1);
327 Eigen::MatrixXd pp2(1, 1);
328 Eigen::MatrixXd pp3(1, 1);
329 Eigen::MatrixXd pp4(1, 1);
330 Eigen::MatrixXd pp5(1, 1);
331 Eigen::MatrixXd pp6(1, 1);
332 Eigen::MatrixXd pp7(1, 1);
333 Eigen::MatrixXd pp8(1, 1);
353 Eigen::MatrixXd fs1(1, 1);
354 Eigen::MatrixXd fs2(1, 1);
355 Eigen::MatrixXd fs3(1, 1);
356 Eigen::MatrixXd fs4(1, 1);
357 Eigen::MatrixXd fs5(1, 1);
358 Eigen::MatrixXd fs6(1, 1);
359 Eigen::MatrixXd fs7(1, 1);
360 Eigen::MatrixXd fs8(1, 1);
367 fvecn(
i) = -F_dot(
i) + lf(0, 0) + pf(0, 0) - af(0,
368 0) + F3_1(
i) + F3_2(
i) + F3_3(
i) + F3_4(
i) + F3_5(
i) + F3_6(
i) + F3_7(
i) + F3_8(
379 fvecn(k) = -Pdot_1(
i) - pp1(0, 0) + P1_1(
i) - P2_1(
i) + fs1(0, 0);
389 fvecn(k) = -Pdot_2(
i) - pp2(0, 0) + P1_2(
i) - P2_2(
i) + fs2(0, 0);
399 fvecn(k) = -Pdot_3(
i) - pp3(0, 0) + P1_3(
i) - P2_3(
i) + fs3(0, 0);
409 fvecn(k) = -Pdot_4(
i) - pp4(0, 0) + P1_4(
i) - P2_4(
i) + fs4(0, 0);
419 fvecn(k) = -Pdot_5(
i) - pp5(0, 0) + P1_5(
i) - P2_5(
i) + fs5(0, 0);
429 fvecn(k) = -Pdot_6(
i) - pp6(0, 0) + P1_6(
i) - P2_6(
i) + fs6(0, 0);
439 fvecn(k) = -Pdot_7(
i) - pp7(0, 0) + P1_7(
i) - P2_7(
i) + fs7(0, 0);
449 fvecn(k) = -Pdot_8(
i) - pp8(0, 0) + P1_8(
i) - P2_8(
i) + fs8(0, 0);
456 Eigen::MatrixXd& fjacn)
const
458 Eigen::NumericalDiff<newton_usmsr_n> numDiff(*
this);
459 numDiff.df(n, fjacn);
464 Eigen::VectorXd& fvect)
const
466 Eigen::VectorXd e_tmp(
Nphi_T);
477 Eigen::VectorXd e_dot(
Nphi_T);
492 Eigen::MatrixXd tt(1, 1);
496 Eigen::MatrixXd xsf(1, 1);
498 Eigen::MatrixXd dhs1(1, 1);
499 Eigen::MatrixXd dhs2(1, 1);
500 Eigen::MatrixXd dhs3(1, 1);
506 Eigen::MatrixXd dh1(1, 1);
507 Eigen::MatrixXd dh2(1, 1);
508 Eigen::MatrixXd dh3(1, 1);
518 Eigen::MatrixXd dfs1(1, 1);
519 Eigen::MatrixXd dfs2(1, 1);
520 Eigen::MatrixXd dfs3(1, 1);
529 fvect(
i) = -T_dot(
i) - tt(0, 0) + T1(
i) + xsf(0, 0) + dhs1(0, 0) + dhs2(0,
540 fvect(k) = -DHdot_1(
i) - dh1(0, 0) + DH1_1(
i) - DH2_1(
i) + dfs1(0, 0);
550 fvect(k) = -DHdot_2(
i) - dh2(0, 0) + DH1_2(
i) - DH2_2(
i) + dfs2(0, 0);
560 fvect(k) = -DHdot_3(
i) - dh3(0, 0) + DH1_3(
i) - DH2_3(
i) + dfs3(0, 0);
572 Eigen::MatrixXd& fjact)
const
574 Eigen::NumericalDiff<newton_usmsr_t> numDiff(*
this);
575 numDiff.df(t, fjact);
581 Eigen::MatrixXd temp_now, Eigen::VectorXd mu_online,
int startSnap)
583 Info <<
"\n Starting online stage...\n" << endl;
596 for (
int j = 0; j <
N_BC; j++)
598 y(j) = vel_now(j, 0);
638 for (
int j = 0; j <
N_BCt; j++)
640 z(j) = temp_now(j, 0);
648 for (
int j = 0; j <
N_BC; j++)
696 for (
int j = 0; j <
N_BCt; j++)
713 tmp_sol_fd(0) =
time;
714 tmp_sol_fd.col(0).tail(
y.rows()) =
y;
718 tmp_sol_n.col(0).tail(
w.rows()) =
w;
721 tmp_sol_t.col(0).tail(
z.rows()) =
z;
722 Eigen::MatrixXd tmp_sol_C(6 *
Nphi_const + 1, 1);
724 Eigen::VectorXd v_c0;
725 Eigen::VectorXd d_c0;
726 Eigen::VectorXd nsf_c0;
727 Eigen::VectorXd a_c0;
728 Eigen::VectorXd sp_c0;
729 Eigen::VectorXd txs_c0;
736 std::vector<double> tv0;
737 tv0.resize(mu_online.size() + 1);
740 for (
int k = 1; k < tv0.size(); k++)
742 tv0[k] = mu_online(k - 1);
756 tmp_sol_C.col(0).segment(pos_c,
Nphi_const) = v_c0;
758 tmp_sol_C.col(0).segment(pos_c,
Nphi_const) = d_c0;
760 tmp_sol_C.col(0).segment(pos_c,
Nphi_const) = nsf_c0;
762 tmp_sol_C.col(0).segment(pos_c,
Nphi_const) = a_c0;
764 tmp_sol_C.col(0).segment(pos_c,
Nphi_const) = sp_c0;
766 tmp_sol_C.col(0).segment(pos_c,
Nphi_const) = txs_c0;
783 std::vector<double> tv;
784 tv.resize(mu_online.size() + 1);
787 for (
int k = 1; k < tv.size(); k++)
789 tv[k] = mu_online(k - 1);
802 Eigen::VectorXd res_fd(
y);
803 Eigen::VectorXd res_n(
w);
804 Eigen::VectorXd res_t(
z);
810 for (
int j = 0; j <
N_BC; j++)
812 y(j) = vel_now(j, 0);
821 for (
int j = 0; j <
N_BCt; j++)
823 z(j) = temp_now(j, 0);
833 " ##################" << std::endl;
834 Info <<
"Time = " <<
time << endl;
836 if (res_fd.norm() /
y.norm() < 1e-5)
838 std::cout << green <<
"|F_fd(x)| = " << res_fd.norm() /
y.norm() <<
839 " - Minimun reached in " << hnls_fd.iter <<
" iterations " << def << std::endl
844 std::cout << red <<
"|F_fd(x)| = " << res_fd.norm() /
y.norm() <<
845 " - Minimun reached in " << hnls_fd.iter <<
" iterations " << def << std::endl
849 if (res_n.norm() /
w.norm() < 1e-5)
851 std::cout << green <<
"|F_n(x)| = " << res_n.norm() /
w.norm() <<
852 " - Minimun reached in " << hnls_n.iter <<
" iterations " << def << std::endl <<
857 std::cout << red <<
"|F_n(x)| = " << res_n.norm() /
w.norm() <<
858 " - Minimun reached in " << hnls_n.iter <<
" iterations " << def << std::endl <<
862 if (res_t.norm() /
z.norm() < 1e-5)
864 std::cout << green <<
"|F_t(x)| = " << res_t.norm() /
z.norm() <<
865 " - Minimun reached in " << hnls_t.iter <<
" iterations " << def << std::endl <<
870 std::cout << red <<
"|F_t(x)| = " << res_t.norm() /
z.norm() <<
871 " - Minimun reached in " << hnls_t.iter <<
" iterations " << def << std::endl <<
876 tmp_sol_fd(0) =
time;
877 tmp_sol_fd.col(0).tail(
y.rows()) =
y;
889 tmp_sol_n.col(0).tail(
w.rows()) =
w;
901 tmp_sol_t.col(0).tail(
z.rows()) =
z;
939 "./ITHACAoutput/red_coeff_fd");
941 "./ITHACAoutput/red_coeff_n");
943 "./ITHACAoutput/red_coeff_t");
945 "./ITHACAoutput/red_coeff_C");
967 Info <<
"Reconstructing online solution | fluid-dynamics" << endl;
974 if (counter == nextwrite)
976 volVectorField U_rec(
"U",
Umodes[0] * 0);
978 for (
int j = 0; j <
Nphi_u; j++)
984 volScalarField P_rec(
"p",
Pmodes[0] * 0);
986 for (
int j = 0; j <
Nphi_p; j++)
992 std::ofstream of(folder +
"/" + name(counter2) +
"/" + name(
994 nextwrite += printevery;
996 UREC.append(U_rec.clone());
997 PREC.append(P_rec.clone());
1003 Info <<
"End" << endl;
1014 Info <<
"Reconstructing online solution | neutronics" << endl;
1021 if (counter == nextwrite)
1023 volScalarField Flux_rec(
"flux",
Fluxmodes[0] * 0);
1032 volScalarField Prec1_rec(
"prec1",
Prec1modes[0] * 0);
1041 volScalarField Prec2_rec(
"prec2",
Prec2modes[0] * 0);
1050 volScalarField Prec3_rec(
"prec3",
Prec3modes[0] * 0);
1059 volScalarField Prec4_rec(
"prec4",
Prec4modes[0] * 0);
1068 volScalarField Prec5_rec(
"prec5",
Prec5modes[0] * 0);
1077 volScalarField Prec6_rec(
"prec6",
Prec6modes[0] * 0);
1086 volScalarField Prec7_rec(
"prec7",
Prec7modes[0] * 0);
1095 volScalarField Prec8_rec(
"prec8",
Prec8modes[0] * 0);
1103 std::ofstream of(folder +
"/" + name(counter2) +
"/" + name(
1105 nextwrite += printevery;
1107 FLUXREC.append(Flux_rec.clone());
1108 PREC1REC.append(Prec1_rec.clone());
1109 PREC2REC.append(Prec2_rec.clone());
1110 PREC3REC.append(Prec3_rec.clone());
1111 PREC4REC.append(Prec4_rec.clone());
1112 PREC5REC.append(Prec5_rec.clone());
1113 PREC6REC.append(Prec6_rec.clone());
1114 PREC7REC.append(Prec7_rec.clone());
1115 PREC8REC.append(Prec8_rec.clone());
1121 Info <<
"End" << endl;
1132 Info <<
"Reconstructing online solution | thermal" << endl;
1136 dimensionedScalar
decLam1(
"decLam1", dimensionSet(0, 0, -1, 0, 0, 0, 0),
dl1);
1137 dimensionedScalar
decLam2(
"decLam2", dimensionSet(0, 0, -1, 0, 0, 0, 0),
dl2);
1138 dimensionedScalar
decLam3(
"decLam3", dimensionSet(0, 0, -1, 0, 0, 0, 0),
dl3);
1142 if (counter == nextwrite)
1144 volScalarField T_rec(
"T",
Tmodes[0] * 0);
1146 for (
int j = 0; j <
Nphi_T; j++)
1154 volScalarField Dec1_rec(
"dec1",
Dec1modes[0] * 0);
1164 volScalarField Dec2_rec(
"dec2",
Dec2modes[0] * 0);
1174 volScalarField Dec3_rec(
"dec3",
Dec3modes[0] * 0);
1185 std::ofstream of(folder +
"/" + name(counter2) +
"/" + name(
1187 nextwrite += printevery;
1189 TREC.append(T_rec.clone());
1190 DEC1REC.append(Dec1_rec.clone());
1191 DEC2REC.append(Dec2_rec.clone());
1192 DEC3REC.append(Dec3_rec.clone());
1199 Info <<
"End" << endl;
1210 Info <<
"Reconstructing temperature changing constants" << endl;
1217 if (counter == nextwrite)
1219 volScalarField v_rec(
"v",
vmodes[0] * 0);
1228 volScalarField D_rec(
"D",
Dmodes[0] * 0);
1237 volScalarField NSF_rec(
"NSF",
NSFmodes[0] * 0);
1246 volScalarField A_rec(
"A",
Amodes[0] * 0);
1255 volScalarField SP_rec(
"SP",
SPmodes[0] * 0);
1264 volScalarField TXS_rec(
"TXS",
TXSmodes[0] * 0);
1272 std::ofstream of(folder +
"/" + name(counter2) +
"/" + name(
1274 nextwrite += printevery;
1276 vREC.append(v_rec.clone());
1277 DREC.append(D_rec.clone());
1278 NSFREC.append(NSF_rec.clone());
1279 AREC.append(A_rec.clone());
1280 SPREC.append(SP_rec.clone());
1281 TXSREC.append(TXS_rec.clone());
1287 Info <<
"End" << endl;
Class to change color to the output stream.
Eigen::MatrixXd MP7_matrix
precursor mass term-7
Eigen::MatrixXd MD1_matrix
decay heat mass term-1
List< Eigen::MatrixXd > ST5_matrix
precursor stream term-5
PtrList< volScalarField > Prec6field
List of pointers used to form the prec6 snapshots matrix.
List< Eigen::MatrixXd > THS2_matrix
temperature decay heat source term-2
Eigen::MatrixXd LP3_matrix
precursor laplacian term-3
List< Eigen::MatrixXd > SD1_matrix
decay heat stream term-1
Eigen::MatrixXd BC1_matrix
PPE BC1.
PtrList< volScalarField > NSFmodes
List of pointers used to form the NSF snapshosts matrix.
PtrList< volScalarField > Prec5modes
List of pointers used to form the prec1 modes.
List< Eigen::MatrixXd > PF_matrix
production flux
PtrList< volScalarField > Prec4modes
List of pointers used to form the prec1 modes.
List< Eigen::MatrixXd > FS3_matrix
precursor flux source term-3
List< Eigen::MatrixXd > ST7_matrix
precursor stream term-7
PtrList< volScalarField > Prec8field
List of pointers used to form the prec8 snapshots matrix.
List< Eigen::MatrixXd > FS1_matrix
precursor flux source term-1
PtrList< volScalarField > Prec1modes
List of pointers used to form the prec1 modes.
List< Eigen::MatrixXd > TXS_matrix
temperature flux source term TXS
List< Eigen::MatrixXd > LF_matrix
laplacian_flux
PtrList< volScalarField > Pmodes
List of pointers used to form the pressure modes.
label NUmodes
Number of modes adopted during Galerkin projection.
Eigen::MatrixXd MP1_matrix
precursor mass term-1
List< Eigen::MatrixXd > ST8_matrix
precursor stream term-8
List< Eigen::MatrixXd > ST4_matrix
precursor stream term-4
PtrList< volScalarField > Prec7modes
List of pointers used to form the prec1 modes.
PtrList< volScalarField > vFields
List of pointers used to form the v snapshosts matrix.
Eigen::MatrixXd PS3_matrix
prec_source 3
PtrList< volScalarField > Tmodes
List of pointers used to form the temperature modes.
Eigen::MatrixXd K_matrix
Gradient of pressure matrix.
List< Eigen::MatrixXd > G_matrix
Divergence of momentum PPE.
List< Eigen::MatrixXd > AF_matrix
absorption flux
std::vector< SPLINTER::RBFSpline * > rbfsplines_A
Eigen::MatrixXd MP2_matrix
precursor mass term-2
List< Eigen::MatrixXd > FS2_matrix
precursor flux source term-2
Eigen::MatrixXd LP8_matrix
precursor laplacian term-8
Eigen::MatrixXd PS6_matrix
prec_source 6
PtrList< volScalarField > Prec8modes
List of pointers used to form the prec1 modes.
List< Eigen::MatrixXd > FS4_matrix
precursor flux source term-4
PtrList< volScalarField > Fluxfield
List of pointers used to form the flux snapshots matrix.
Eigen::MatrixXd BC3_matrix
PPE BC3.
Eigen::MatrixXd LP4_matrix
precursor laplacian term-4
Eigen::MatrixXd LP7_matrix
precursor laplacian term-7
Eigen::MatrixXd TM_matrix
temperature mass term
std::vector< SPLINTER::RBFSpline * > rbfsplines_NSF
List< Eigen::MatrixXd > SD3_matrix
decay heat stream term-3
PtrList< volScalarField > Prec2modes
List of pointers used to form the prec1 modes.
Eigen::MatrixXd LP6_matrix
precursor laplacian term-6
List< Eigen::MatrixXd > TS_matrix
temperature stream term
Eigen::MatrixXd MF_matrix
mass flux
PtrList< volScalarField > Prec4field
List of pointers used to form the prec4 snapshots matrix.
Eigen::MatrixXd MP3_matrix
precursor mass term-3
PtrList< volScalarField > DFields
List of pointers used to form the D snapshosts matrix.
Eigen::MatrixXd D_matrix
Laplacian term PPE.
List< Eigen::MatrixXd > DFS2_matrix
decay heat flux source term-2
PtrList< volScalarField > AFields
List of pointers used to form the A snapshosts matrix.
Eigen::MatrixXd PS7_matrix
prec_source 7
List< Eigen::MatrixXd > FS7_matrix
precursor flux source term-7
List< Eigen::MatrixXd > ST6_matrix
precursor stream term-6
Eigen::MatrixXd LP1_matrix
precursor laplacian term-1
PtrList< volScalarField > Dec1modes
List of pointers used to form the dec1 modes.
List< Eigen::MatrixXd > THS1_matrix
temperature decay heat source term-1
PtrList< volScalarField > Dec3field
List of pointers used to form the dec3 snapshots matrix.
List< Eigen::MatrixXd > ST1_matrix
precursor stream term-1
Eigen::MatrixXd LT_matrix
temperature laplacian term
PtrList< volScalarField > Prec6modes
List of pointers used to form the prec1 modes.
List< Eigen::MatrixXd > FS6_matrix
precursor flux source term-6
std::vector< SPLINTER::RBFSpline * > rbfsplines_v
PtrList< volScalarField > vmodes
List of pointers used to form the v modes.
PtrList< volScalarField > Dec1field
List of pointers used to form the dec1 snapshots matrix.
PtrList< volScalarField > TXSmodes
List of pointers used to form the SP snapshosts matrix.
Eigen::MatrixXd LD1_matrix
decay heat laplacian term-1
List< Eigen::MatrixXd > SD2_matrix
decay heat stream term-2
Eigen::MatrixXd MP5_matrix
precursor mass term-5
PtrList< volScalarField > Prec3modes
List of pointers used to form the prec1 modes.
Eigen::MatrixXd LP2_matrix
precursor laplacian term-2
Eigen::MatrixXd LD2_matrix
decay heat laplacian term-2
PtrList< volScalarField > Prec7field
List of pointers used to form the prec7 snapshots matrix.
Eigen::MatrixXd PS8_matrix
prec_source 8
Eigen::MatrixXd MP8_matrix
precursor mass term-8
Eigen::MatrixXd MD2_matrix
decay heat mass term-2
PtrList< volScalarField > liftfieldT
List of pointers used to form the list of lifting functions.
PtrList< volScalarField > Dec2modes
List of pointers used to form the dec2 modes.
PtrList< volVectorField > liftfield
List of pointers used to form the list of lifting functions.
Eigen::MatrixXd PS4_matrix
prec_source 4
PtrList< volScalarField > Pfield
List of pointers used to form the pressure snapshots matrix.
Eigen::MatrixXd MP6_matrix
precursor mass term-6
PtrList< volScalarField > NSFFields
List of pointers used to form the NSF snapshosts matrix.
PtrList< volScalarField > Prec3field
List of pointers used to form the prec3 snapshots matrix.
PtrList< volVectorField > Umodes
List of pointers used to form the velocity modes.
PtrList< volScalarField > Dec3modes
List of pointers used to form the dec3 modes.
PtrList< volScalarField > Tfield
List of pointers used to form the temperature snapshots matrix.
Eigen::MatrixXd B_matrix
Diffusion term.
PtrList< volVectorField > Ufield
List of pointers used to form the velocity snapshots matrix.
PtrList< volScalarField > Prec1field
List of pointers used to form the prec1 snapshots matrix.
std::vector< SPLINTER::RBFSpline * > rbfsplines_SP
Eigen::MatrixXd M_matrix
Mass Matrix.
Eigen::MatrixXd MP4_matrix
precursor mass term-4
PtrList< volScalarField > SPmodes
List of pointers used to form the SP snapshosts matrix.
List< Eigen::MatrixXd > ST2_matrix
precursor stream term-2
List< Eigen::MatrixXd > FS8_matrix
precursor flux source term-8
PtrList< volScalarField > SPFields
List of pointers used to form the SP snapshosts matrix.
Eigen::MatrixXd PS1_matrix
prec_source 1
List< Eigen::MatrixXd > DFS1_matrix
decay heat flux source term-1
List< Eigen::MatrixXd > DFS3_matrix
decay heat flux source term-3
List< Eigen::MatrixXd > FS5_matrix
precursor flux source term-5
List< Eigen::MatrixXd > THS3_matrix
temperature decay heat source term-3
PtrList< volScalarField > Dec2field
List of pointers used to form the dec2 snapshots matrix.
PtrList< volScalarField > Prec5field
List of pointers used to form the prec5 snapshots matrix.
Eigen::MatrixXd LD3_matrix
decay heat laplacian term-3
List< Eigen::MatrixXd > C_matrix
Non linear term.
PtrList< volScalarField > TXSFields
List of pointers used to form the SP snapshosts matrix.
Eigen::MatrixXd LP5_matrix
precursor laplacian term-5
Eigen::MatrixXd MD3_matrix
decay heat mass term-3
PtrList< volScalarField > Amodes
List of pointers used to form the A snapshosts matrix.
Eigen::MatrixXd PS2_matrix
prec_source 2
PtrList< volScalarField > Fluxmodes
List of pointers used to form the flux modes.
PtrList< volScalarField > Prec2field
List of pointers used to form the prec2 snapshots matrix.
PtrList< volScalarField > Dmodes
List of pointers used to form the D modes.
std::vector< SPLINTER::RBFSpline * > rbfsplines_D
std::vector< SPLINTER::RBFSpline * > rbfsplines_TXS
List< Eigen::MatrixXd > ST3_matrix
precursor stream term-3
Eigen::MatrixXd PS5_matrix
prec_source 5
PtrList< volScalarField > NSFREC
PtrList< volScalarField > Tsnapshots
PtrList< volScalarField > DEC3REC
PtrList< volScalarField > vREC
PtrList< volScalarField > DEC2REC
PtrList< volScalarField > Dec1modes
PtrList< volScalarField > Pmodes
PtrList< volVectorField > Usnapshots
List of pointers to store the snapshots for each field.
PtrList< volScalarField > Psnapshots
PtrList< volScalarField > FLUXREC
PtrList< volVectorField > Umodes
List of pointers to store the modes for each field.
PtrList< volScalarField > Prec8snapshots
PtrList< volScalarField > Dec2modes
scalar nu
characteristic constants of the problem
PtrList< volScalarField > TXSREC
PtrList< volScalarField > PREC4REC
PtrList< volScalarField > Prec2modes
PtrList< volScalarField > Prec6snapshots
PtrList< volScalarField > PREC3REC
PtrList< volScalarField > vsnapshots
PtrList< volVectorField > UREC
Recontructed fields.
List< Eigen::MatrixXd > online_solution_n
PtrList< volScalarField > Prec7modes
PtrList< volScalarField > Prec6modes
PtrList< volScalarField > SPmodes
PtrList< volScalarField > Prec5snapshots
PtrList< volScalarField > TXSsnapshots
PtrList< volScalarField > Dec3snapshots
PtrList< volScalarField > Prec3modes
PtrList< volScalarField > Prec3snapshots
PtrList< volScalarField > Prec7snapshots
PtrList< volScalarField > Amodes
void loadConstants(msrProblem *problem)
Method to load all the constants needed in the ROM from ///the FOM.
PtrList< volScalarField > DEC1REC
PtrList< volScalarField > NSFmodes
PtrList< volScalarField > Fluxsnapshots
int N_BC
Number of parametrized boundary conditions.
PtrList< volScalarField > Dec1snapshots
PtrList< volScalarField > SPsnapshots
PtrList< volScalarField > Asnapshots
PtrList< volScalarField > Prec4modes
PtrList< volScalarField > PREC1REC
PtrList< volScalarField > Prec1snapshots
PtrList< volScalarField > Dsnapshots
PtrList< volScalarField > Prec8modes
List< Eigen::MatrixXd > online_solution_fd
List of Eigen matrices to store the online solution.
PtrList< volScalarField > POWERDENSREC
PtrList< volScalarField > PREC6REC
PtrList< volScalarField > TREC
PtrList< volScalarField > NSFsnapshots
PtrList< volScalarField > TXSmodes
PtrList< volScalarField > Dec3modes
int count_online_solve
Counter to count the online solutions.
PtrList< volScalarField > AREC
PtrList< volScalarField > vmodes
PtrList< volScalarField > Prec4snapshots
PtrList< volScalarField > PREC2REC
PtrList< volScalarField > Tmodes
PtrList< volScalarField > Dmodes
int Nphi_u
Number of modes for each field.
List< Eigen::MatrixXd > online_solution_t
PtrList< volScalarField > Prec5modes
PtrList< volScalarField > Prec2snapshots
PtrList< volScalarField > PREC
PtrList< volScalarField > SPREC
PtrList< volScalarField > Dec2snapshots
PtrList< volScalarField > Prec1modes
Eigen::VectorXd y
Vector to store the solution during the Newton procedure.
PtrList< volScalarField > PREC5REC
PtrList< volScalarField > Fluxmodes
PtrList< volScalarField > PREC8REC
PtrList< volScalarField > DREC
List< Eigen::MatrixXd > online_solution_C
PtrList< volScalarField > PREC7REC
virtual void solveOnline()
Virtual Method to perform and online Solve.
void reconstructAP(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
void reconstruct_fd(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
newton_usmsr_n newton_object_n
void reconstruct_t(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
void reconstruct_C(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
void reconstruct_n(fileName folder="./ITHACAOutput/online_rec", int printevery=1)
newton_usmsr_fd newton_object_fd
newton_usmsr_t newton_object_t
Eigen::MatrixXi inletIndexT
Eigen::MatrixXi inletIndex
Matrix that contains informations about the inlet boundaries.
dimensionedScalar & decLam1
dimensionedScalar & decLam3
dimensionedScalar & decLam2
void exportSolution(GeometricField< Type, PatchField, GeoMesh > &s, fileName subfolder, fileName folder, word fieldName)
Export a field to file in a certain folder and subfolder.
void exportMatrix(Eigen::Matrix< T, -1, dim > &matrix, word Name, word type, word folder)
Export the reduced matrices in numpy (type=python), matlab (type=matlab) and txt (type=eigen) format ...
Eigen::VectorXd getCoeffs(GeometricField< Type, PatchField, GeoMesh > &snapshot, PtrList< GeometricField< Type, PatchField, GeoMesh > > &modes, label Nmodes, bool consider_volumes)
Projects a snapshot on a basis function and gets the coefficients of the projection.
void createSymLink(word folder)
Creates symbolic links to 0, system and constant.
int operator()(const Eigen::VectorXd &x, Eigen::VectorXd &fvec) const
int df(const Eigen::VectorXd &x, Eigen::MatrixXd &fjac) const
int operator()(const Eigen::VectorXd &n, Eigen::VectorXd &fvecn) const
int df(const Eigen::VectorXd &n, Eigen::MatrixXd &fjacn) const
int operator()(const Eigen::VectorXd &t, Eigen::VectorXd &fvect) const
int df(const Eigen::VectorXd &t, Eigen::MatrixXd &fjact) const