1991 {
1993
1995
1997 int nb_integration_pts = getGaussPts().size2();
1998 int nb_base_functions = data.
getN().size2();
1999
2000 double time = getFEMethod()->ts_t;
2003 }
2004
2005#ifndef NDEBUG
2006 if (this->locF.size() != nb_dofs)
2008 "Size of locF %ld != nb_dofs %d", this->locF.size(), nb_dofs);
2009#endif
2010
2011 auto integrate_rhs = [&](auto &bc, auto calc_tau, double time_scale) {
2013
2014 auto val = bc.val;
2016 auto t_w = getFTensor0IntegrationWeight();
2017 auto t_coords = getFTensor1CoordsAtGaussPts();
2018 auto t_tangent1 = getFTensor1Tangent1AtGaussPts();
2019 auto t_tangent2 = getFTensor1Tangent2AtGaussPts();
2020
2022
2024
2025 for (int gg = 0; gg != nb_integration_pts; ++gg) {
2026
2032
2036
2039 } else {
2041 (t_tangent1(
j) + t_grad_gamma_u(
j, N0))) *
2042 (t_tangent2(
k) + t_grad_gamma_u(
k, N1));
2043 }
2044 auto tau = calc_tau(t_coords(0), t_coords(1), t_coords(2));
2046 t_val(
i) = (time_scale * t_w * tau *
scale * val) * t_normal(
i);
2047
2049 int rr = 0;
2050 for (; rr != nb_dofs /
SPACE_DIM; ++rr) {
2051 t_f(
i) += t_row_base * t_val(
i);
2052 ++t_row_base;
2053 ++t_f;
2054 }
2055
2056 for (; rr != nb_base_functions; ++rr)
2057 ++t_row_base;
2058 ++t_w;
2059 ++t_coords;
2060 ++t_tangent1;
2061 ++t_tangent2;
2062 ++t_grad_gamma_u;
2063 }
2064 this->locF /= 2.;
2065
2067 };
2068
2069
2071 for (
auto &bc : *(
bcData)) {
2072 if (bc.faces.find(fe_ent) != bc.faces.end()) {
2073
2074 double time_scale = 1;
2077 }
2078
2080 if (nb_dofs) {
2082 bc, [](double, double, double) { return 1; }, time_scale);
2083 }
2084 }
2085 }
2087}
#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
constexpr std::enable_if<(Dim0<=2 &&Dim1<=2), Tensor2_Expr< Levi_Civita< T >, T, Dim0, Dim1, i, j > >::type levi_civita(const Index< i, Dim0 > &, const Index< j, Dim1 > &)
levi_civita functions to make for easy adhoc use
FTensor::Tensor2< FTensor::PackPtr< double *, 1 >, Tensor_Dim1, Tensor_Dim2 > getFTensor2FromMat(MatrixDouble &data)
Get tensor rank 2 (matrix) form data matrix.
FTensor::Tensor1< FTensor::PackPtr< double *, S >, DIM > getFTensor1FromPtr(double *ptr)
Make Tensor1 from pointer.
static double dynamicTime
static enum StretchSelector stretchSelector
static enum RotSelector gradApproximator
static PetscBool dynamicRelaxation
boost::shared_ptr< double > piolaScalePtr
boost::shared_ptr< PressureBcVec > bcData
boost::shared_ptr< MatrixDouble > hybridGradDispPtr
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
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