54 for (
int k = 0; k <
problem->liftfield.size(); k++)
59 for (
int k = 0; k <
problem->NUmodes; k++)
64 for (
int k = 0; k <
problem->NPmodes; k++)
69 for (
int k = 0; k <
problem->NFluxmodes; k++)
114 for (
int k = 0; k <
problem->liftfieldT.size(); k++)
119 for (
int k = 0; k <
problem->NTmodes; k++)
150 for (
int k = 0; k <
problem->Ufield.size(); k++)
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);
200 Eigen::VectorXd M1 =
problem->B_matrix * a_tmp *
nu;
202 Eigen::VectorXd M2 =
problem->K_matrix * b_tmp;
204 Eigen::VectorXd M5 =
problem->M_matrix * a_dot;
206 Eigen::VectorXd M3 =
problem->D_matrix * b_tmp;
208 Eigen::VectorXd M6 =
problem->BC1_matrix * a_tmp *
nu;
210 Eigen::VectorXd M7 =
problem->BC3_matrix * a_tmp *
nu;
214 cc = a_tmp.transpose() *
problem->C_matrix[
i] * a_tmp;
215 fvec(
i) = -M5(
i) + M1(
i) - cc(0, 0) - M2(
i);
221 gg = a_tmp.transpose() *
problem->G_matrix[
i] * a_tmp;
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
300 Eigen::VectorXd F_dot =
problem->MF_matrix * c_dot *
iv;
302 Eigen::MatrixXd lf(1, 1);
304 Eigen::MatrixXd pf(1, 1);
306 Eigen::MatrixXd af(1, 1);
308 Eigen::VectorXd F3_1 =
problem->PS1_matrix * d1_tmp *
l1;
309 Eigen::VectorXd F3_2 =
problem->PS2_matrix * d2_tmp *
l2;
310 Eigen::VectorXd F3_3 =
problem->PS3_matrix * d3_tmp *
l3;
311 Eigen::VectorXd F3_4 =
problem->PS4_matrix * d4_tmp *
l4;
312 Eigen::VectorXd F3_5 =
problem->PS5_matrix * d5_tmp *
l5;
313 Eigen::VectorXd F3_6 =
problem->PS6_matrix * d6_tmp *
l6;
314 Eigen::VectorXd F3_7 =
problem->PS7_matrix * d7_tmp *
l7;
315 Eigen::VectorXd F3_8 =
problem->PS8_matrix * d8_tmp *
l8;
317 Eigen::VectorXd Pdot_1 =
problem->MP1_matrix * d1_dot;
318 Eigen::VectorXd Pdot_2 =
problem->MP2_matrix * d2_dot;
319 Eigen::VectorXd Pdot_3 =
problem->MP3_matrix * d3_dot;
320 Eigen::VectorXd Pdot_4 =
problem->MP4_matrix * d4_dot;
321 Eigen::VectorXd Pdot_5 =
problem->MP5_matrix * d5_dot;
322 Eigen::VectorXd Pdot_6 =
problem->MP6_matrix * d6_dot;
323 Eigen::VectorXd Pdot_7 =
problem->MP7_matrix * d7_dot;
324 Eigen::VectorXd Pdot_8 =
problem->MP8_matrix * d8_dot;
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);
335 Eigen::VectorXd P1_1 =
problem->LP1_matrix * d1_tmp * (
nu /
Sc);
336 Eigen::VectorXd P1_2 =
problem->LP2_matrix * d2_tmp * (
nu /
Sc);
337 Eigen::VectorXd P1_3 =
problem->LP3_matrix * d3_tmp * (
nu /
Sc);
338 Eigen::VectorXd P1_4 =
problem->LP4_matrix * d4_tmp * (
nu /
Sc);
339 Eigen::VectorXd P1_5 =
problem->LP5_matrix * d5_tmp * (
nu /
Sc);
340 Eigen::VectorXd P1_6 =
problem->LP6_matrix * d6_tmp * (
nu /
Sc);
341 Eigen::VectorXd P1_7 =
problem->LP7_matrix * d7_tmp * (
nu /
Sc);
342 Eigen::VectorXd P1_8 =
problem->LP8_matrix * d8_tmp * (
nu /
Sc);
344 Eigen::VectorXd P2_1 =
problem->MP1_matrix * d1_tmp *
l1;
345 Eigen::VectorXd P2_2 =
problem->MP2_matrix * d2_tmp *
l2;
346 Eigen::VectorXd P2_3 =
problem->MP3_matrix * d3_tmp *
l3;
347 Eigen::VectorXd P2_4 =
problem->MP4_matrix * d4_tmp *
l4;
348 Eigen::VectorXd P2_5 =
problem->MP5_matrix * d5_tmp *
l5;
349 Eigen::VectorXd P2_6 =
problem->MP6_matrix * d6_tmp *
l6;
350 Eigen::VectorXd P2_7 =
problem->MP7_matrix * d7_tmp *
l7;
351 Eigen::VectorXd P2_8 =
problem->MP8_matrix * d8_tmp *
l8;
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);
364 lf =
d_c.transpose() *
problem->LF_matrix[
i] * c_tmp;
366 af =
a_c.transpose() *
problem->AF_matrix[
i] * c_tmp;
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);
490 Eigen::VectorXd T_dot =
problem->TM_matrix * e_dot;
492 Eigen::MatrixXd tt(1, 1);
494 Eigen::VectorXd T1 =
problem->LT_matrix * e_tmp *
nu /
Pr;
496 Eigen::MatrixXd xsf(1, 1);
498 Eigen::MatrixXd dhs1(1, 1);
499 Eigen::MatrixXd dhs2(1, 1);
500 Eigen::MatrixXd dhs3(1, 1);
502 Eigen::VectorXd DHdot_1 =
problem->MD1_matrix * f1_dot;
503 Eigen::VectorXd DHdot_2 =
problem->MD2_matrix * f2_dot;
504 Eigen::VectorXd DHdot_3 =
problem->MD3_matrix * f3_dot;
506 Eigen::MatrixXd dh1(1, 1);
507 Eigen::MatrixXd dh2(1, 1);
508 Eigen::MatrixXd dh3(1, 1);
510 Eigen::VectorXd DH1_1 =
problem->LD1_matrix * f1_tmp *
nu /
Sc;
511 Eigen::VectorXd DH1_2 =
problem->LD2_matrix * f2_tmp *
nu /
Sc;
512 Eigen::VectorXd DH1_3 =
problem->LD3_matrix * f3_tmp *
nu /
Sc;
514 Eigen::VectorXd DH2_1 =
problem->MD1_matrix * f1_tmp *
dl1;
515 Eigen::VectorXd DH2_2 =
problem->MD2_matrix * f2_tmp *
dl2;
516 Eigen::VectorXd DH2_3 =
problem->MD3_matrix * f3_tmp *
dl3;
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);
747 v_c0(
i) =
problem->rbfsplines_v[
i]->eval(tv0);
748 d_c0(
i) =
problem->rbfsplines_D[
i]->eval(tv0);
749 nsf_c0(
i) =
problem->rbfsplines_NSF[
i]->eval(tv0);
750 a_c0(
i) =
problem->rbfsplines_A[
i]->eval(tv0);
751 sp_c0(
i) =
problem->rbfsplines_SP[
i]->eval(tv0);
752 txs_c0(
i) =
problem->rbfsplines_TXS[
i]->eval(tv0);
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.
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
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