343 ArrOfDouble coord_i, coord_j, coord_k;
344 build_local_coords(*
this, coord_i, coord_j, coord_k);
350 std::string expr(parser_expression_of_x_y_z_and_t);
360 parser.
setVar(3, current_time);
361 for (
int k = 0; k <
nk; k++)
363 double z = coord_k[k];
365 for (
int j = 0; j <
nj; j++)
367 double y = coord_j[j];
369 for (
int i = 0; i <
ni; i++)
371 double x = coord_i[i];
372 parser.
setVar((
int) 0, x);
374 int n = cut_cell_disc_->get_n(i, j, k);
377 double vol_l = input_f(i, j, k);
379 double dx = cut_cell_disc_->get_domaine().get_constant_delta(DIRECTION_I);
380 double dy = cut_cell_disc_->get_domaine().get_constant_delta(DIRECTION_J);
381 double dz = cut_cell_disc_->get_domaine().get_constant_delta(DIRECTION_K);
384 double bary_x = cut_cell_disc_->get_interfaces().get_barycentre_phase1_next()[0](i,j,k);
385 double bary_y = cut_cell_disc_->get_interfaces().get_barycentre_phase1_next()[1](i,j,k);
386 double bary_z = cut_cell_disc_->get_interfaces().get_barycentre_phase1_next()[2](i,j,k);
388 parser.
setVar((
int) 0, x + (bary_x - .5)*dx);
389 parser.
setVar(1, y + (bary_y - .5)*dy);
390 parser.
setVar(2, z + (bary_z - .5)*dz);
398 parser.
setVar((
int) 0, x + (opposing_bar_x - .5)*dx);
399 parser.
setVar(1, y + (opposing_bar_y - .5)*dy);
400 parser.
setVar(2, z + (opposing_bar_z - .5)*dz);
405 parser.
setVar((
int) 0, x);
411 parser.
setVar(4, input_f(i, j, k));
413 assert((input_f(i, j, k) == 0.) || (input_f(i, j, k) == 1.));
696 double norm_overall = 0.;
697 double norm_overall_l = 0.;
698 double norm_overall_v = 0.;
699 double norm_pure = 0.;
700 double norm_diph_l = 0.;
701 double norm_diph_v = 0.;
702 double norm_diph_small = 0.;
703 double norm_diph_regular = 0.;
704 double norm_diph_nascent = 0.;
705 double norm_diph_dying = 0.;
706 double count_overall = 0.;
707 double count_overall_l = 0.;
708 double count_overall_v = 0.;
709 double count_pure = 0.;
710 double count_diph_l = 0.;
711 double count_diph_v = 0.;
712 double count_diph_small = 0.;
713 double count_diph_regular = 0.;
714 double count_diph_nascent = 0.;
715 double count_diph_dying = 0.;
721 for (
int k=0; k < nz ; k++)
723 for (
int j=0; j< ny; j++)
725 for (
int i=0; i < nx; i++)
727 int n = cut_cell_disc_->get_n(i,j,k);
730 norm_overall += std::abs(
pure_(i,j,k));
733 norm_overall_l += (indic_old(i,j,k) == 0) ? 0. : std::abs(
pure_(i,j,k));
734 count_overall_l += (indic_old(i,j,k) == 0) ? 0 : 1;
736 norm_overall_v += (indic_old(i,j,k) == 0) ? std::abs(
pure_(i,j,k)) : 0.;
737 count_overall_v += (indic_old(i,j,k) == 0) ? 1 : 0;
739 norm_pure += std::abs(
pure_(i,j,k));
742 else if (
IJK_Interfaces::est_pure(.5*(cut_cell_disc_->get_interfaces().I(i,j,k) + cut_cell_disc_->get_interfaces().In(i,j,k))))
744 bool phase_invalide_l = (indic_old(i,j,k) == 0);
745 if (phase_invalide_l &&
diph_l_(n) != 0.)
747 Cerr <<
"compute_d_norm_cut_cell: There is a non-zero diph_l_(" << n <<
") in an invalid cell (in the non-existant phase of a purely monophasic cell)." << finl;
751 bool phase_invalide_v = (indic_old(i,j,k) == 1);
752 if (phase_invalide_v &&
diph_v_(n) != 0.)
754 Cerr <<
"compute_d_norm_cut_cell: There is a non-zero diph_v_(" << n <<
") in an invalid cell (in the non-existant phase of a purely monophasic cell)." << finl;
758 norm_overall += (indic_old(i,j,k) == 0) ? std::abs(
diph_v_(n)) : std::abs(
diph_l_(n));
761 norm_overall_l += (indic_old(i,j,k) == 0) ? 0. : std::abs(
diph_l_(n));
762 count_overall_l += (indic_old(i,j,k) == 0) ? 0 : 1;
764 norm_overall_v += (indic_old(i,j,k) == 0) ? std::abs(
diph_v_(n)) : 0.;
765 count_overall_v += (indic_old(i,j,k) == 0) ? 1 : 0;
767 norm_pure += (indic_old(i,j,k) == 0) ? std::abs(
diph_v_(n)) : std::abs(
diph_l_(n));
772 double chi_T_l = std::abs(
diph_l_(n));
773 double chi_T_v = std::abs(
diph_v_(n));
775 norm_overall += chi_T_l;
776 norm_overall += chi_T_v;
779 norm_overall_l += chi_T_l;
780 count_overall_l += 1;
782 norm_overall_v += chi_T_v;
783 count_overall_v += 1;
785 norm_diph_l += chi_T_l;
788 norm_diph_v += chi_T_v;
791 if (cut_cell_disc_->get_interfaces().devient_pure(i,j,k))
794 if (phase_dying == 1)
796 norm_diph_dying += chi_T_l;
797 count_diph_dying += 1;
801 norm_diph_dying += chi_T_v;
802 count_diph_dying += 1;
805 else if (cut_cell_disc_->get_interfaces().devient_diphasique(i,j,k))
808 if (phase_nascent == 1)
810 norm_diph_nascent += chi_T_l;
811 count_diph_nascent += 1;
815 norm_diph_nascent += chi_T_v;
816 count_diph_nascent += 1;
819 else if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(1, indic_old(i,j,k), indic_next(i,j,k)))
821 norm_diph_small += chi_T_l;
822 count_diph_small += 1;
824 norm_diph_regular += chi_T_v;
825 count_diph_regular += 1;
827 else if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(0, indic_old(i,j,k), indic_next(i,j,k)))
829 norm_diph_small += chi_T_v;
830 count_diph_small += 1;
832 norm_diph_regular += chi_T_l;
833 count_diph_regular += 1;
837 norm_diph_regular += chi_T_l;
838 norm_diph_regular += chi_T_v;
839 count_diph_regular += 1;
856 assert(count_overall == domaine_ref_->get_nb_items_global(
Domaine_IJK::ELEM, DIRECTION_I)
870 if (count_overall != 0) norm_overall /= count_overall;
871 if (count_overall_l != 0) norm_overall_l /= count_overall_l;
872 if (count_overall_v != 0) norm_overall_v /= count_overall_v;
873 if (count_pure != 0) norm_pure /= count_pure;
874 if (count_diph_l != 0) norm_diph_l /= count_diph_l;
875 if (count_diph_v != 0) norm_diph_v /= count_diph_v;
876 if (count_diph_small != 0) norm_diph_small /= count_diph_small;
877 if (count_diph_regular != 0) norm_diph_regular /= count_diph_regular;
878 if (count_diph_nascent != 0) norm_diph_nascent /= count_diph_nascent;
879 if (count_diph_dying != 0) norm_diph_dying /= count_diph_dying;
881 return {norm_overall, norm_overall_l, norm_overall_v, norm_pure, norm_diph_l, norm_diph_v, norm_diph_small, norm_diph_regular, norm_diph_nascent, norm_diph_dying};
887 double global_energy_overall = 0.;
888 double global_energy_overall_l = 0.;
889 double global_energy_overall_v = 0.;
890 double global_energy_pure = 0.;
891 double global_energy_diph_l = 0.;
892 double global_energy_diph_v = 0.;
893 double global_energy_diph_small = 0.;
894 double global_energy_diph_regular = 0.;
895 double global_energy_diph_nascent = 0.;
896 double global_energy_diph_dying = 0.;
897 double count_overall = 0.;
898 double count_overall_l = 0.;
899 double count_overall_v = 0.;
900 double count_pure = 0.;
901 double count_diph_l = 0.;
902 double count_diph_v = 0.;
903 double count_diph_small = 0.;
904 double count_diph_regular = 0.;
905 double count_diph_nascent = 0.;
906 double count_diph_dying = 0.;
914 for (
int k=0; k < nz ; k++)
916 for (
int j=0; j< ny; j++)
918 for (
int i=0; i < nx; i++)
920 int n = cut_cell_disc_->get_n(i,j,k);
923 global_energy_overall +=
pure_(i,j,k);
926 global_energy_overall_l += (indic_old(i,j,k) == 0) ? 0. :
pure_(i,j,k);
927 count_overall_l += (indic_old(i,j,k) == 0) ? 0 : 1;
929 global_energy_overall_v += (indic_old(i,j,k) == 0) ?
pure_(i,j,k) : 0.;
930 count_overall_v += (indic_old(i,j,k) == 0) ? 1 : 0;
932 global_energy_pure +=
pure_(i,j,k);
935 else if (
IJK_Interfaces::est_pure(.5*(cut_cell_disc_->get_interfaces().I(i,j,k) + cut_cell_disc_->get_interfaces().In(i,j,k))))
937 bool phase_invalide_l = (indic_old(i,j,k) == 0);
938 if (phase_invalide_l &&
diph_l_(n) != 0.)
940 Cerr <<
"compute_d_global_energy_cut_cell: There is a non-zero diph_l_(" << n <<
") in an invalid cell (in the non-existant phase of a purely monophasic cell)." << finl;
944 bool phase_invalide_v = (indic_old(i,j,k) == 1);
945 if (phase_invalide_v &&
diph_v_(n) != 0.)
947 Cerr <<
"compute_d_global_energy_cut_cell: There is a non-zero diph_v_(" << n <<
") in an invalid cell (in the non-existant phase of a purely monophasic cell)." << finl;
951 global_energy_overall += (indic_old(i,j,k) == 0) ?
diph_v_(n) :
diph_l_(n);
954 global_energy_overall_l += (indic_old(i,j,k) == 0) ? 0. :
diph_l_(n);
955 count_overall_l += (indic_old(i,j,k) == 0) ? 0 : 1;
957 global_energy_overall_v += (indic_old(i,j,k) == 0) ?
diph_v_(n) : 0.;
958 count_overall_v += (indic_old(i,j,k) == 0) ? 1 : 0;
960 global_energy_pure += (indic_old(i,j,k) == 0) ?
diph_v_(n) :
diph_l_(n);
968 global_energy_overall += chi_T_l;
969 global_energy_overall += chi_T_v;
972 global_energy_overall_l += chi_T_l;
973 count_overall_l += 1;
975 global_energy_overall_v += chi_T_v;
976 count_overall_v += 1;
978 global_energy_diph_l += chi_T_l;
981 global_energy_diph_v += chi_T_v;
984 if (cut_cell_disc_->get_interfaces().devient_pure(i,j,k))
987 if (phase_dying == 1)
989 global_energy_diph_dying += chi_T_l;
990 count_diph_dying += 1;
994 global_energy_diph_dying += chi_T_v;
995 count_diph_dying += 1;
998 else if (cut_cell_disc_->get_interfaces().devient_diphasique(i,j,k))
1001 if (phase_nascent == 1)
1003 global_energy_diph_nascent += chi_T_l;
1004 count_diph_nascent += 1;
1008 global_energy_diph_nascent += chi_T_v;
1009 count_diph_nascent += 1;
1012 else if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(1, indic_old(i,j,k), indic_next(i,j,k)))
1014 global_energy_diph_small += chi_T_l;
1015 count_diph_small += 1;
1017 global_energy_diph_regular += chi_T_v;
1018 count_diph_regular += 1;
1020 else if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(0, indic_old(i,j,k), indic_next(i,j,k)))
1022 global_energy_diph_small += chi_T_v;
1023 count_diph_small += 1;
1025 global_energy_diph_regular += chi_T_l;
1026 count_diph_regular += 1;
1030 global_energy_diph_regular += chi_T_l;
1031 global_energy_diph_regular += chi_T_v;
1032 count_diph_regular += 1;
1049 assert(count_overall == domaine_ref_->get_nb_items_global(
Domaine_IJK::ELEM, DIRECTION_I)
1053 global_energy_overall = vol_cell *
mp_sum(global_energy_overall);
1054 global_energy_overall_l = vol_cell *
mp_sum(global_energy_overall_l);
1055 global_energy_overall_v = vol_cell *
mp_sum(global_energy_overall_v);
1056 global_energy_pure = vol_cell *
mp_sum(global_energy_pure);
1057 global_energy_diph_l = vol_cell *
mp_sum(global_energy_diph_l);
1058 global_energy_diph_v = vol_cell *
mp_sum(global_energy_diph_v);
1059 global_energy_diph_small = vol_cell *
mp_sum(global_energy_diph_small);
1060 global_energy_diph_regular = vol_cell *
mp_sum(global_energy_diph_regular);
1061 global_energy_diph_nascent = vol_cell *
mp_sum(global_energy_diph_nascent);
1062 global_energy_diph_dying = vol_cell *
mp_sum(global_energy_diph_dying);
1063 return {global_energy_overall, global_energy_overall_l, global_energy_overall_v, global_energy_pure, global_energy_diph_l, global_energy_diph_v, global_energy_diph_small, global_energy_diph_regular, global_energy_diph_nascent, global_energy_diph_dying};
1069 double global_energy_overall = 0.;
1070 double global_energy_overall_l = 0.;
1071 double global_energy_overall_v = 0.;
1072 double global_energy_pure = 0.;
1073 double global_energy_diph_l = 0.;
1074 double global_energy_diph_v = 0.;
1075 double global_energy_diph_small = 0.;
1076 double global_energy_diph_regular = 0.;
1077 double global_energy_diph_nascent = 0.;
1078 double global_energy_diph_dying = 0.;
1079 double count_overall = 0.;
1080 double count_overall_l = 0.;
1081 double count_overall_v = 0.;
1082 double count_pure = 0.;
1083 double count_diph_l = 0.;
1084 double count_diph_v = 0.;
1085 double count_diph_small = 0.;
1086 double count_diph_regular = 0.;
1087 double count_diph_nascent = 0.;
1088 double count_diph_dying = 0.;
1096 for (
int k=0; k < nz ; k++)
1098 for (
int j=0; j< ny; j++)
1100 for (
int i=0; i < nx; i++)
1102 double chi_l = next ? cut_cell_disc_->get_interfaces().In(i,j,k) : cut_cell_disc_->get_interfaces().I(i,j,k);
1103 double chi_v = next ? 1-cut_cell_disc_->get_interfaces().In(i,j,k) : 1-cut_cell_disc_->get_interfaces().I(i,j,k);
1104 double chi_nonzero_l = next ? cut_cell_disc_->get_interfaces().In_nonzero(1,i,j,k) : cut_cell_disc_->get_interfaces().I_nonzero(1,i,j,k);
1105 double chi_nonzero_v = next ? cut_cell_disc_->get_interfaces().In_nonzero(0,i,j,k) : cut_cell_disc_->get_interfaces().I_nonzero(0,i,j,k);
1106 int n = cut_cell_disc_->get_n(i,j,k);
1109 global_energy_overall += (chi_l * constant_l + chi_v * constant_v) *
pure_(i,j,k);
1112 global_energy_overall_l += chi_l * constant_l *
pure_(i,j,k);
1113 count_overall_l += chi_l;
1115 global_energy_overall_v += chi_v * constant_v *
pure_(i,j,k);
1116 count_overall_v += chi_v;
1118 global_energy_pure += (chi_l * constant_l + chi_v * constant_v) *
pure_(i,j,k);
1121 else if (
IJK_Interfaces::est_pure(.5*(cut_cell_disc_->get_interfaces().I(i,j,k) + cut_cell_disc_->get_interfaces().In(i,j,k))))
1123 bool phase_invalide_l = (indic_old(i,j,k) == 0);
1124 if (phase_invalide_l &&
diph_l_(n) != 0.)
1126 Cerr <<
"compute_global_energy_cut_cell: There is a non-zero diph_l_(" << n <<
") in an invalid cell (in the non-existant phase of a purely monophasic cell)." << finl;
1130 bool phase_invalide_v = (indic_old(i,j,k) == 1);
1131 if (phase_invalide_v &&
diph_v_(n) != 0.)
1133 Cerr <<
"compute_global_energy_cut_cell: There is a non-zero diph_v_(" << n <<
") in an invalid cell (in the non-existant phase of a purely monophasic cell)." << finl;
1137 global_energy_overall += (chi_l * constant_l + chi_v * constant_v) * ((indic_old(i,j,k) == 0) ?
diph_v_(n) :
diph_l_(n));
1140 global_energy_overall_l += chi_l * constant_l *
diph_l_(n);
1141 count_overall_l += chi_l;
1143 global_energy_overall_v += chi_v * constant_v *
diph_v_(n);
1144 count_overall_v += chi_v;
1146 global_energy_pure += (chi_l * constant_l + chi_v * constant_v) * ((indic_old(i,j,k) == 0) ?
diph_v_(n) :
diph_l_(n));
1151 double chi_T_l = chi_nonzero_l *
diph_l_(n);
1152 double chi_T_v = chi_nonzero_v *
diph_v_(n);
1154 global_energy_overall += constant_l * chi_T_l;
1155 global_energy_overall += constant_v * chi_T_v;
1158 global_energy_overall_l += constant_l * chi_T_l;
1159 count_overall_l += 1;
1161 global_energy_overall_v += constant_v * chi_T_v;
1162 count_overall_v += 1;
1164 global_energy_diph_l += constant_l * chi_T_l;
1165 count_diph_l += chi_nonzero_l;
1167 global_energy_diph_v += constant_v * chi_T_v;
1168 count_diph_v += chi_nonzero_v;
1170 if (cut_cell_disc_->get_interfaces().devient_pure(i,j,k))
1173 if (phase_dying == 1)
1175 global_energy_diph_dying += constant_l * chi_T_l;
1176 count_diph_dying += chi_nonzero_l;
1180 global_energy_diph_dying += constant_v * chi_T_v;
1181 count_diph_dying += chi_nonzero_v;
1184 else if (cut_cell_disc_->get_interfaces().devient_diphasique(i,j,k))
1187 if (phase_nascent == 1)
1189 global_energy_diph_nascent += constant_l * chi_T_l;
1190 count_diph_nascent += chi_nonzero_l;
1194 global_energy_diph_nascent += constant_v * chi_T_v;
1195 count_diph_nascent += chi_nonzero_v;
1198 else if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(1, indic_old(i,j,k), indic_next(i,j,k)))
1200 global_energy_diph_small += constant_l * chi_T_l;
1201 count_diph_small += chi_nonzero_l;
1203 global_energy_diph_regular += constant_v * chi_T_v;
1204 count_diph_regular += chi_nonzero_v;
1206 else if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(0, indic_old(i,j,k), indic_next(i,j,k)))
1208 global_energy_diph_small += constant_v * chi_T_v;
1209 count_diph_small += chi_nonzero_v;
1211 global_energy_diph_regular += constant_l * chi_T_l;
1212 count_diph_regular += chi_nonzero_l;
1216 global_energy_diph_regular += constant_l * chi_T_l;
1217 global_energy_diph_regular += constant_v * chi_T_v;
1218 count_diph_regular += 1;
1235 assert(count_overall == domaine_ref_->get_nb_items_global(
Domaine_IJK::ELEM, DIRECTION_I)
1239 global_energy_overall = vol_cell *
mp_sum(global_energy_overall);
1240 global_energy_overall_l = vol_cell *
mp_sum(global_energy_overall_l);
1241 global_energy_overall_v = vol_cell *
mp_sum(global_energy_overall_v);
1242 global_energy_pure = vol_cell *
mp_sum(global_energy_pure);
1243 global_energy_diph_l = vol_cell *
mp_sum(global_energy_diph_l);
1244 global_energy_diph_v = vol_cell *
mp_sum(global_energy_diph_v);
1245 global_energy_diph_small = vol_cell *
mp_sum(global_energy_diph_small);
1246 global_energy_diph_regular = vol_cell *
mp_sum(global_energy_diph_regular);
1247 global_energy_diph_nascent = vol_cell *
mp_sum(global_energy_diph_nascent);
1248 global_energy_diph_dying = vol_cell *
mp_sum(global_energy_diph_dying);
1249 return {global_energy_overall, global_energy_overall_l, global_energy_overall_v, global_energy_pure, global_energy_diph_l, global_energy_diph_v, global_energy_diph_small, global_energy_diph_regular, global_energy_diph_nascent, global_energy_diph_dying};
1255 double Tmin_overall = 1.e20;
1256 double Tmin_overall_l = 1.e20;
1257 double Tmin_overall_v = 1.e20;
1258 double Tmin_pure = 1.e20;
1259 double Tmin_diph_l = 1.e20;
1260 double Tmin_diph_v = 1.e20;
1261 double Tmin_diph_small = 1.e20;
1262 double Tmin_diph_regular = 1.e20;
1263 double Tmin_diph_nascent = 1.e20;
1264 double Tmin_diph_dying = 1.e20;
1272 for (
int k=0; k < nz ; k++)
1274 for (
int j=0; j< ny; j++)
1276 for (
int i=0; i < nx; i++)
1278 double chi_l = indic(i,j,k);
1279 int n = cut_cell_disc_->get_n(i,j,k);
1282 Tmin_overall = std::min(Tmin_overall,
pure_(i,j,k));
1283 Tmin_overall_l = (chi_l == 0) ? Tmin_overall_l : std::min(Tmin_overall_l,
pure_(i,j,k));
1284 Tmin_overall_v = (chi_l == 1) ? Tmin_overall_v : std::min(Tmin_overall_v,
pure_(i,j,k));
1285 Tmin_pure = std::min(Tmin_pure,
pure_(i,j,k));
1287 else if (
IJK_Interfaces::est_pure(.5*(cut_cell_disc_->get_interfaces().I(i,j,k) + cut_cell_disc_->get_interfaces().In(i,j,k))))
1289 Tmin_overall = std::min(Tmin_overall, (chi_l == 0) ?
diph_v_(n) :
diph_l_(n));
1290 Tmin_overall_l = (chi_l == 0) ? Tmin_overall_l : std::min(Tmin_overall_l,
diph_l_(n));
1291 Tmin_overall_v = (chi_l == 1) ? Tmin_overall_v : std::min(Tmin_overall_v,
diph_v_(n));
1292 Tmin_pure = std::min(Tmin_pure, (chi_l == 0) ?
diph_v_(n) :
diph_l_(n));
1297 bool exclude_l = (next && (cut_cell_disc_->get_interfaces().phase_mourrante(1, i,j,k))) || ((!next) && (cut_cell_disc_->get_interfaces().phase_naissante(1, i,j,k)));
1298 bool exclude_v = (next && (cut_cell_disc_->get_interfaces().phase_mourrante(0, i,j,k))) || ((!next) && (cut_cell_disc_->get_interfaces().phase_naissante(0, i,j,k)));
1300 Tmin_overall = exclude_l ? Tmin_overall : std::min(Tmin_overall,
diph_l_(n));
1301 Tmin_overall = exclude_v ? Tmin_overall : std::min(Tmin_overall,
diph_v_(n));
1303 Tmin_overall_l = exclude_l ? Tmin_overall_l : std::min(Tmin_overall_l,
diph_l_(n));
1304 Tmin_overall_v = exclude_v ? Tmin_overall_v : std::min(Tmin_overall_v,
diph_v_(n));
1306 Tmin_diph_l = exclude_l ? Tmin_diph_l : std::min(Tmin_diph_l,
diph_l_(n));
1307 Tmin_diph_v = exclude_v ? Tmin_diph_v : std::min(Tmin_diph_v,
diph_v_(n));
1309 if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(1, indic_old(i,j,k), indic_next(i,j,k)))
1311 Tmin_diph_small = exclude_l ? Tmin_diph_small : std::min(Tmin_diph_small,
diph_l_(n));
1312 Tmin_diph_regular = exclude_v ? Tmin_diph_regular : std::min(Tmin_diph_regular,
diph_v_(n));
1314 else if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(0, indic_old(i,j,k), indic_next(i,j,k)))
1316 Tmin_diph_small = exclude_v ? Tmin_diph_small : std::min(Tmin_diph_small,
diph_v_(n));
1317 Tmin_diph_regular = exclude_l ? Tmin_diph_regular : std::min(Tmin_diph_regular,
diph_l_(n));
1321 Tmin_diph_regular = exclude_l ? Tmin_diph_regular : std::min(Tmin_diph_regular,
diph_l_(n));
1322 Tmin_diph_regular = exclude_v ? Tmin_diph_regular : std::min(Tmin_diph_regular,
diph_v_(n));
1325 if (cut_cell_disc_->get_interfaces().devient_pure(i,j,k))
1328 if (phase_dying == 1)
1330 Tmin_diph_dying = std::min(Tmin_diph_dying,
diph_l_(n));
1334 Tmin_diph_dying = std::min(Tmin_diph_dying,
diph_v_(n));
1338 if (cut_cell_disc_->get_interfaces().devient_diphasique(i,j,k))
1341 if (phase_nascent == 1)
1343 Tmin_diph_nascent = std::min(Tmin_diph_nascent,
diph_l_(n));
1347 Tmin_diph_nascent = std::min(Tmin_diph_nascent,
diph_v_(n));
1364 return {Tmin_overall, Tmin_overall_l, Tmin_overall_v, Tmin_pure, Tmin_diph_l, Tmin_diph_v, Tmin_diph_small, Tmin_diph_regular, Tmin_diph_nascent, Tmin_diph_dying};
1370 double Tmax_overall = -1.e20;
1371 double Tmax_overall_l = -1.e20;
1372 double Tmax_overall_v = -1.e20;
1373 double Tmax_pure = -1.e20;
1374 double Tmax_diph_l = -1.e20;
1375 double Tmax_diph_v = -1.e20;
1376 double Tmax_diph_small = -1.e20;
1377 double Tmax_diph_regular = -1.e20;
1378 double Tmax_diph_nascent = -1.e20;
1379 double Tmax_diph_dying = -1.e20;
1388 for (
int k=0; k < nz ; k++)
1390 for (
int j=0; j< ny; j++)
1392 for (
int i=0; i < nx; i++)
1394 double chi_l = indic(i,j,k);
1395 int n = cut_cell_disc_->get_n(i,j,k);
1398 Tmax_overall = std::max(Tmax_overall,
pure_(i,j,k));
1399 Tmax_overall_l = (chi_l == 0) ? Tmax_overall_l : std::max(Tmax_overall_l,
pure_(i,j,k));
1400 Tmax_overall_v = (chi_l == 1) ? Tmax_overall_v : std::max(Tmax_overall_v,
pure_(i,j,k));
1401 Tmax_pure = std::max(Tmax_pure,
pure_(i,j,k));
1403 else if (
IJK_Interfaces::est_pure(.5*(cut_cell_disc_->get_interfaces().I(i,j,k) + cut_cell_disc_->get_interfaces().In(i,j,k))))
1405 Tmax_overall = std::max(Tmax_overall, (chi_l == 0) ?
diph_v_(n) :
diph_l_(n));
1406 Tmax_overall_l = (chi_l == 0) ? Tmax_overall_l : std::max(Tmax_overall_l,
diph_l_(n));
1407 Tmax_overall_v = (chi_l == 1) ? Tmax_overall_v : std::max(Tmax_overall_v,
diph_v_(n));
1408 Tmax_pure = std::max(Tmax_pure, (chi_l == 0) ?
diph_v_(n) :
diph_l_(n));
1413 bool exclude_l = (next && (cut_cell_disc_->get_interfaces().phase_mourrante(1, i,j,k))) || ((!next) && (cut_cell_disc_->get_interfaces().phase_naissante(1, i,j,k)));
1414 bool exclude_v = (next && (cut_cell_disc_->get_interfaces().phase_mourrante(0, i,j,k))) || ((!next) && (cut_cell_disc_->get_interfaces().phase_naissante(0, i,j,k)));
1416 Tmax_overall = exclude_l ? Tmax_overall : std::max(Tmax_overall,
diph_l_(n));
1417 Tmax_overall = exclude_v ? Tmax_overall : std::max(Tmax_overall,
diph_v_(n));
1419 Tmax_overall_l = exclude_l ? Tmax_overall_l : std::max(Tmax_overall_l,
diph_l_(n));
1420 Tmax_overall_v = exclude_v ? Tmax_overall_v : std::max(Tmax_overall_v,
diph_v_(n));
1422 Tmax_diph_l = exclude_l ? Tmax_diph_l : std::max(Tmax_diph_l,
diph_l_(n));
1423 Tmax_diph_v = exclude_v ? Tmax_diph_v : std::max(Tmax_diph_v,
diph_v_(n));
1425 if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(1, indic_old(i,j,k), indic_next(i,j,k)))
1427 Tmax_diph_small = exclude_l ? Tmax_diph_small : std::max(Tmax_diph_small,
diph_l_(n));
1428 Tmax_diph_regular = exclude_v ? Tmax_diph_regular : std::max(Tmax_diph_regular,
diph_v_(n));
1430 else if (cut_cell_disc_->get_interfaces().next_below_small_threshold_for_phase(0, indic_old(i,j,k), indic_next(i,j,k)))
1432 Tmax_diph_small = exclude_v ? Tmax_diph_small : std::max(Tmax_diph_small,
diph_v_(n));
1433 Tmax_diph_regular = exclude_l ? Tmax_diph_regular : std::max(Tmax_diph_regular,
diph_l_(n));
1437 Tmax_diph_regular = exclude_l ? Tmax_diph_regular : std::max(Tmax_diph_regular,
diph_l_(n));
1438 Tmax_diph_regular = exclude_v ? Tmax_diph_regular : std::max(Tmax_diph_regular,
diph_v_(n));
1441 if (cut_cell_disc_->get_interfaces().devient_pure(i,j,k))
1444 if (phase_dying == 1)
1446 Tmax_diph_dying = std::max(Tmax_diph_dying,
diph_l_(n));
1450 Tmax_diph_dying = std::max(Tmax_diph_dying,
diph_v_(n));
1454 if (cut_cell_disc_->get_interfaces().devient_diphasique(i,j,k))
1457 if (phase_nascent == 1)
1459 Tmax_diph_nascent = std::max(Tmax_diph_nascent,
diph_l_(n));
1463 Tmax_diph_nascent = std::max(Tmax_diph_nascent,
diph_v_(n));
1480 return {Tmax_overall, Tmax_overall_l, Tmax_overall_v, Tmax_pure, Tmax_diph_l, Tmax_diph_v, Tmax_diph_small, Tmax_diph_regular, Tmax_diph_nascent, Tmax_diph_dying};
This class encapsulates all the information related to the eulerian mesh for TrioIJK.