1089 auto t_normal = getFTensor1Normal();
1090 const double nrm2 = sqrt(t_normal(
i) * t_normal(
i));
1092 t_unit_normal(
i) = t_normal(
i) / nrm2;
1094 int nb_integration_pts = data.
getN().size1();
1095 int nb_base_functions = data.
getN().size2() / 3;
1096 double ts_t = getFEMethod()->ts_t;
1098 auto integrate_matrix = [&]() {
1101 auto t_w = getFTensor0IntegrationWeight();
1102 matPP.resize(nb_dofs / 3, nb_dofs / 3,
false);
1106 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1109 for (; rr != nb_dofs / 3; ++rr) {
1110 const double a = t_row_base_fun(
i) * t_unit_normal(
i);
1112 for (
int cc = 0; cc != nb_dofs / 3; ++cc) {
1113 const double b = t_col_base_fun(
i) * t_unit_normal(
i);
1114 matPP(rr, cc) += t_w *
a * b;
1120 for (; rr != nb_base_functions; ++rr)
1129 auto integrate_rhs = [&](
auto &bc) {
1132 auto t_w = getFTensor0IntegrationWeight();
1133 vecPv.resize(3, nb_dofs / 3,
false);
1137 double ts_t = getFEMethod()->ts_t;
1139 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1141 for (; rr != nb_dofs / 3; ++rr) {
1142 const double t = ts_t * t_w * t_row_base_fun(
i) * t_unit_normal(
i);
1143 for (
int dd = 0;
dd != 3; ++
dd)
1148 for (; rr != nb_base_functions; ++rr)
1155 auto integrate_rhs_cook = [&](
auto &bc) {
1158 vecPv.resize(3, nb_dofs / 3,
false);
1161 auto t_w = getFTensor0IntegrationWeight();
1163 auto t_coords = getFTensor1CoordsAtGaussPts();
1165 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1167 auto calc_tau = [](
double y) {
1170 return -y * (y - 1) / 0.25;
1173 const double tau = calc_tau(t_coords(1));
1176 for (; rr != nb_dofs / 3; ++rr) {
1177 const double t = ts_t * t_w * t_row_base_fun(
i) * t_unit_normal(
i);
1178 for (
int dd = 0;
dd != 3; ++
dd)
1184 for (; rr != nb_base_functions; ++rr)
1195 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1200 CHKERR integrate_matrix();
1201 if (std::regex_match(bc.blockName, std::regex(
".*COOK.*")))
1202 CHKERR integrate_rhs_cook(bc);
1204 CHKERR integrate_rhs(bc);
1208 nb_dofs / 3, &*
vecPv.data().begin(), nb_dofs / 3);
1211 "The leading minor of order %i is "
1212 "not positive; definite;\nthe "
1213 "solution could not be computed",
1216 for (
int dd = 0;
dd != 3; ++
dd)
1218 for (
int rr = 0; rr != nb_dofs / 3; ++rr)