867 int nb_integration_pts = getGaussPts().size2();
868 int nb_base_functions = data.
getN().size2();
869 double ts_t = getFEMethod()->ts_t;
872 if (this->locF.size() != nb_dofs)
874 "Size of locF %d != nb_dofs %d", this->locF.size(), nb_dofs);
877 auto integrate_rhs = [&](
auto &bc) {
880 auto t_val = getFTensor1FromPtr<3>(&*bc.vals.begin());
882 auto t_w = getFTensor0IntegrationWeight();
884 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
885 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
887 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
888 t_f(
i) -= ts_t * t_w * t_row_base * t_val(
i);
892 for (; rr != nb_base_functions; ++rr)
897 this->locF *= getMeasure();
901 auto integrate_rhs_cook = [&](
auto &bc) {
904 auto t_val = getFTensor1FromPtr<3>(&*bc.vals.begin());
906 auto t_w = getFTensor0IntegrationWeight();
907 auto t_coords = getFTensor1CoordsAtGaussPts();
909 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
911 auto calc_tau = [](
double y) {
914 return -y * (y - 1) / 0.25;
917 const auto tau = calc_tau(t_coords(1));
918 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
920 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
921 t_f(
i) -= ts_t * t_w * t_row_base * tau * t_val(
i);
926 for (; rr != nb_base_functions; ++rr)
934 this->locF *= 2. * getMeasure();
941 for (
auto &bc : *(
bcData)) {
942 if (bc.faces.find(fe_ent) != bc.faces.end()) {
947 if (std::regex_match(bc.blockName, std::regex(
".*COOK.*")))
948 CHKERR integrate_rhs_cook(bc);