1893 {
1895
1897
1899 int nb_integration_pts = getGaussPts().size2();
1900 int nb_base_functions = data.
getN().size2();
1901
1902 double time = getFEMethod()->ts_t;
1905 }
1906
1907#ifndef NDEBUG
1908 if (this->locF.size() != nb_dofs)
1910 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
1911#endif
1912
1913 auto integrate_rhs = [&](auto &bc, auto calc_tau, double time_scale) {
1915
1916 auto t_val = getFTensor1FromPtr<3>(&*bc.vals.begin());
1918 auto t_w = getFTensor0IntegrationWeight();
1919 auto t_coords = getFTensor1CoordsAtGaussPts();
1920
1922
1923 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1924
1925 const auto tau = calc_tau(t_coords(0), t_coords(1), t_coords(2));
1926 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
1927 int rr = 0;
1928 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
1929 t_f(
i) -= (time_scale * t_w * t_row_base * tau) * (t_val(
i) *
scale);
1930 ++t_row_base;
1931 ++t_f;
1932 }
1933
1934 for (; rr != nb_base_functions; ++rr)
1935 ++t_row_base;
1936 ++t_w;
1937 ++t_coords;
1938 }
1939 this->locF *= getMeasure();
1941 };
1942
1943
1945 for (
auto &bc : *(
bcData)) {
1946 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1947
1948 double time_scale = 1;
1951 }
1952
1954 if (nb_dofs) {
1955
1956 if (std::regex_match(bc.blockName, std::regex(".*COOK.*"))) {
1958 y -= 44;
1959 y /= (60 - 44);
1960 return -y * (y - 1) / 0.25;
1961 };
1962 CHKERR integrate_rhs(bc, calc_tau, time_scale);
1963 } else {
1965 bc, [](double, double, double) { return 1; }, time_scale);
1966 }
1967 }
1968 }
1969 }
1971}
#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.