1973 {
1975
1977
1979 int nb_integration_pts = getGaussPts().size2();
1980 int nb_base_functions = data.
getN().size2();
1981
1982 double time = getFEMethod()->ts_t;
1985 }
1986
1987#ifndef NDEBUG
1988 if (this->locF.size() != nb_dofs)
1990 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
1991#endif
1992
1993 auto integrate_rhs = [&](auto &bc, auto calc_tau, double time_scale) {
1995
1996 auto val = bc.val;
1998 auto t_w = getFTensor0IntegrationWeight();
1999 auto t_coords = getFTensor1CoordsAtGaussPts();
2000 auto t_tangent1 = getFTensor1Tangent1AtGaussPts();
2001 auto t_tangent2 = getFTensor1Tangent2AtGaussPts();
2002
2004
2006
2007 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2008
2014
2018
2019 t_normal(
i) = (FTensor::levi_civita<double>(
i,
j,
k) * t_tangent1(
j)) *
2021 } else {
2022 t_normal(
i) = (FTensor::levi_civita<double>(
i,
j,
k) *
2023 (t_tangent1(
j) + t_grad_gamma_u(
j, N0))) *
2024 (t_tangent2(
k) + t_grad_gamma_u(
k, N1));
2025 }
2026 auto tau = calc_tau(t_coords(0), t_coords(1), t_coords(2));
2028 t_val(
i) = (time_scale * t_w * tau *
scale * val) * t_normal(
i);
2029
2030 auto t_f = getFTensor1FromPtr<3>(&*this->locF.begin());
2031 int rr = 0;
2032 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
2033 t_f(
i) += t_row_base * t_val(
i);
2034 ++t_row_base;
2035 ++t_f;
2036 }
2037
2038 for (; rr != nb_base_functions; ++rr)
2039 ++t_row_base;
2040 ++t_w;
2041 ++t_coords;
2042 ++t_tangent1;
2043 ++t_tangent2;
2044 ++t_grad_gamma_u;
2045 }
2046 this->locF /= 2.;
2047
2049 };
2050
2051
2053 for (
auto &bc : *(
bcData)) {
2054 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2055
2056 double time_scale = 1;
2059 }
2060
2062 if (nb_dofs) {
2064 bc, [](double, double, double) { return 1; }, time_scale);
2065 }
2066 }
2067 }
2069}
#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::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static enum StretchSelector stretchSelector
static double dynamicTime
static enum RotSelector gradApproximator
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.