1879 {
1881
1883
1885 int nb_integration_pts = getGaussPts().size2();
1886 int nb_base_functions = data.
getN().size2();
1887
1888 double time = getFEMethod()->ts_t;
1891 }
1892
1893#ifndef NDEBUG
1894 if (this->locF.size() != nb_dofs)
1896 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
1897#endif
1898
1899 auto integrate_rhs = [&](auto &bc, auto calc_tau, double time_scale) {
1901
1902 auto t_val = getFTensor1FromPtr<3>(&*bc.vals.begin());
1904 auto t_w = getFTensor0IntegrationWeight();
1905 auto t_coords = getFTensor1CoordsAtGaussPts();
1906
1908
1909 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1910
1911 const auto tau = calc_tau(t_coords(0), t_coords(1), t_coords(2));
1912 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
1913 int rr = 0;
1914 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
1915 t_f(
i) -= (time_scale * t_w * t_row_base * tau) * (t_val(
i) *
scale);
1916 ++t_row_base;
1917 ++t_f;
1918 }
1919
1920 for (; rr != nb_base_functions; ++rr)
1921 ++t_row_base;
1922 ++t_w;
1923 ++t_coords;
1924 }
1925 this->locF *= getMeasure();
1927 };
1928
1929
1931 for (
auto &bc : *(
bcData)) {
1932 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1933
1934 double time_scale = 1;
1937 }
1938
1940 if (nb_dofs) {
1941
1942 if (std::regex_match(bc.blockName, std::regex(".*COOK.*"))) {
1944 y -= 44;
1945 y /= (60 - 44);
1946 return -y * (y - 1) / 0.25;
1947 };
1948 CHKERR integrate_rhs(bc, calc_tau, time_scale);
1949 } else {
1951 bc, [](double, double, double) { return 1; }, time_scale);
1952 }
1953 }
1954 }
1955 }
1957}
#define FTENSOR_INDEX(DIM, I)
constexpr int SPACE_DIM
[Define dimension]
#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.