1897 {
1899
1901
1903 int nb_integration_pts = getGaussPts().size2();
1904 int nb_base_functions = data.
getN().size2();
1905
1906 double time = getFEMethod()->ts_t;
1909 }
1910
1911#ifndef NDEBUG
1912 if (this->locF.size() != nb_dofs)
1914 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
1915#endif
1916
1917 auto integrate_rhs = [&](auto &bc, auto calc_tau, double time_scale) {
1919
1920 auto t_val = getFTensor1FromPtr<3>(&*bc.vals.begin());
1922 auto t_w = getFTensor0IntegrationWeight();
1923 auto t_coords = getFTensor1CoordsAtGaussPts();
1924
1926
1927 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1928
1929 const auto tau = calc_tau(t_coords(0), t_coords(1), t_coords(2));
1930 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
1931 int rr = 0;
1932 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
1933 t_f(
i) -= (time_scale * t_w * t_row_base * tau) * (t_val(
i) *
scale);
1934 ++t_row_base;
1935 ++t_f;
1936 }
1937
1938 for (; rr != nb_base_functions; ++rr)
1939 ++t_row_base;
1940 ++t_w;
1941 ++t_coords;
1942 }
1943 this->locF *= getMeasure();
1945 };
1946
1947
1949 for (
auto &bc : *(
bcData)) {
1950 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1951
1952 double time_scale = 1;
1955 }
1956
1958 if (nb_dofs) {
1959
1960 if (std::regex_match(bc.blockName, std::regex(".*COOK.*"))) {
1962 y -= 44;
1963 y /= (60 - 44);
1964 return -y * (y - 1) / 0.25;
1965 };
1966 CHKERR integrate_rhs(bc, calc_tau, time_scale);
1967 } else {
1969 bc, [](double, double, double) { return 1; }, time_scale);
1970 }
1971 }
1972 }
1973 }
1975}
#define FTENSOR_INDEX(DIM, I)
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'i', SPACE_DIM > i
static double dynamicTime
static PetscBool dynamicRelaxation
FTensor::Tensor0< FTensor::PackPtr< double *, 1 > > getFTensor0N(const FieldApproximationBase base)
Get base function as Tensor0.
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
const VectorDouble & getFieldData() const
Get DOF values on entity.