1987 {
1989
1992
1993 double time = OP::getFEMethod()->ts_t;
1996 }
1997
1998
1999 EntityHandle fe_ent = OP::getFEEntityHandle();
2000
2002
2003 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2005 int nb_integration_pts = OP::getGaussPts().size2();
2006 auto t_w = OP::getFTensor0IntegrationWeight();
2007
2008 int nb_base_functions = data.
getN().size2();
2010
2011
2012
2013
2014
2015
2016
2018
2019 auto get_rotation_angle = [&]() {
2020 double theta = bc.theta;
2023 }
2024 return theta;
2025 };
2026
2027 auto get_rotation = [&](auto theta) {
2029 if (bc.vals.size() == 7) {
2030 t_omega(0) = bc.vals[4];
2031 t_omega(1) = bc.vals[5];
2032 t_omega(2) = bc.vals[6];
2033 } else {
2034
2035 t_omega(
i) = OP::getFTensor1Normal()(
i);
2036 }
2037 if (t_omega.
l2() > std::numeric_limits<double>::epsilon()) {
2039 }
2040 t_omega(
i) *= theta;
2042 RotSelector::SMALL_ROT
2043 ? 0.
2044 : t_omega.l2());
2045 };
2046
2047 auto area = getMeasure();
2048 auto t_R = get_rotation(get_rotation_angle());
2049 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
2050 auto t_disp_val =
2052 *this->sourceVec, nb_integration_pts)();
2053
2054 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2055 auto tau_scale =
2056 area * t_w * OP::betaCoeff(t_coords(0), t_coords(1), t_coords(2));
2057
2059 t_delta(
i) = t_center(
i) - t_coords(
i);
2061 t_bc_disp(
i) = t_delta(
i) - t_R(
i,
j) * t_delta(
j);
2062
2063 auto t_nf = getFTensor1FromPtr<3>(&*OP::locF.begin());
2064 int bb = 0;
2065 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
2067 (tau_scale * t_row_base_fun) * (t_disp_val(
i) - t_bc_disp(
i));
2068 ++t_nf;
2069 ++t_row_base_fun;
2070 }
2071 for (; bb != nb_base_functions; ++bb)
2072 ++t_row_base_fun;
2073
2074 ++t_w;
2075 ++t_coords;
2076 ++t_disp_val;
2077 }
2078 }
2079 }
2080
2082}
#define FTENSOR_INDEX(DIM, I)
Tensor1< T, Tensor_Dim > normalize()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
FTensor::Index< 'i', SPACE_DIM > i
FTensor::Index< 'j', 3 > j
DataLayoutTraits< DataLayout::GaussByCoeffs > DL
decltype(GetFTensor1FromMatImpl< Tensor_Dim, S, DL, M >::get(std::declval< M & >(), 0, 0)) GetFTensor1FromMatType
static enum RotSelector rotSelector
static PetscBool physicalTimeFlg
static double currentPhysicalTime
static auto exp(A &&t_w_vee, B &&theta)
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 VectorInt & getIndices() const
Get global indices of degrees of freedom on entity.