Class dedicated to integrate operator.
92 {
94
95 const double vol = getMeasure();
96 auto t_w = getFTensor0IntegrationWeight();
97 auto t_row_base = row_data.getFTensor0N();
98 auto t_row_diff_base = row_data.getFTensor1DiffN<3>();
99 auto t_dot_u = getFTensor1FromMat<3>(*
uDotPtr);
100 auto t_u = getFTensor1FromMat<3>(*
uPtr);
101 auto t_grad_u = getFTensor2FromMat<3, 3>(*
uGradPtr);
102 auto t_grad_h = getFTensor1FromMat<3>(*
hGradPtr);
103 auto t_coords = getFTensor1CoordsAtGaussPts();
104 auto t_normal = getFTensor1NormalsAtGaussPts();
105
107
108 const double alpha = t_w * vol;
109 auto t_nf = getFTensor1FromArray<3, 3>(
locF);
110
113
114 const auto a = std::sqrt(t_coords(
i) * t_coords(
i));
115 const auto sin_fi = t_coords(2) /
a;
116 const auto f = 2 *
omega * sin_fi;
117
119 t_r(
i) = t_normal(
i);
121
124 t_P(
i,
j) = t_r(
i) * t_r(
j);
126
129
130 t_rhs(
m) = t_Q(
m,
i) * (t_dot_u(
i) + t_grad_u(
i,
j) * t_u(
j) +
131 f * t_A(
i,
j) * t_u(
j) +
g * t_grad_h(
i));
132 t_rhs_grad(
m,
j) = t_Q(
m,
i) * (
mu * t_grad_u(
i,
j));
133
134 t_rhs(
m) += t_P(
m,
j) * t_u(
j);
135
136 int rr = 0;
137 for (; rr !=
nbRows / 3; ++rr) {
138 t_nf(
i) +=
alpha * t_row_base * t_rhs(
i);
139 t_nf(
i) +=
alpha * t_row_diff_base(
j) * t_rhs_grad(
i,
j);
140 ++t_row_base;
141 ++t_row_diff_base;
142 ++t_nf;
143 }
145 ++t_row_base;
146 ++t_row_diff_base;
147 }
148
149 ++t_w;
150 ++t_u;
151 ++t_dot_u;
152 ++t_grad_u;
153 ++t_grad_h;
154 ++t_coords;
155 ++t_normal;
156 }
157
159 }
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()
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::Index< 'j', 3 > j
FTensor::Index< 'i', 3 > i
FTensor::Index< 'm', 3 > m
VectorDouble locF
local entity vector
int nbRows
number of dofs on rows
int nbIntegrationPts
number of integration points
int nbRowBaseFunctions
number or row base functions