1911 {
1913
1915
1917 int nb_integration_pts = getGaussPts().size2();
1918 int nb_base_functions = data.
getN().size2();
1919
1920 double time = getFEMethod()->ts_t;
1923 }
1924
1925#ifndef NDEBUG
1926 if (this->locF.size() != nb_dofs)
1928 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
1929#endif
1930
1931 auto integrate_rhs = [&](auto &bc, auto calc_tau, double time_scale) {
1933
1936 auto t_w = getFTensor0IntegrationWeight();
1937 auto t_coords = getFTensor1CoordsAtGaussPts();
1938
1940
1941 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1942
1943 const auto tau = calc_tau(t_coords(0), t_coords(1), t_coords(2));
1945 int rr = 0;
1946 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
1947 t_f(
i) -= (time_scale * t_w * t_row_base * tau) * (t_val(
i) *
scale);
1948 ++t_row_base;
1949 ++t_f;
1950 }
1951
1952 for (; rr != nb_base_functions; ++rr)
1953 ++t_row_base;
1954 ++t_w;
1955 ++t_coords;
1956 }
1957 this->locF *= getMeasure();
1959 };
1960
1961
1963 for (
auto &bc : *(
bcData)) {
1964 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1965
1966 double time_scale = 1;
1969 }
1970
1972 if (nb_dofs) {
1973
1974 if (std::regex_match(bc.blockName, std::regex(".*COOK.*"))) {
1976 y -= 44;
1977 y /= (60 - 44);
1978 return -y * (y - 1) / 0.25;
1979 };
1980 CHKERR integrate_rhs(bc, calc_tau, time_scale);
1981 } else {
1983 bc, [](double, double, double) { return 1; }, time_scale);
1984 }
1985 }
1986 }
1987 }
1989}
#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
FTensor::Tensor1< FTensor::PackPtr< double *, S >, DIM > getFTensor1FromPtr(double *ptr)
Make Tensor1 from pointer.
static double dynamicTime
static PetscBool dynamicRelaxation
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
boost::shared_ptr< double > piolaScalePtr
boost::shared_ptr< TractionBcVec > bcData
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 dofs values