403 {
406 int nb_integration_pts = data.
getN().size1();
407 auto v = getVolume();
408 auto t_w = getFTensor0IntegrationWeight();
409 auto t_R = getFTensor2FromMat<3, 3>(
dataAtPts->rotMatAtPts);
410 auto t_u = getFTensor2SymmetricFromMat<3>(
dataAtPts->streachTensorAtPts);
411 auto t_omega_dot = getFTensor1FromMat<3>(
dataAtPts->rotAxisDotAtPts);
412
413 int nb_base_functions = data.
getN().size2() / 3;
419
420 auto get_ftensor1 = [](
auto &
v) {
423 };
424
425 for (int gg = 0; gg != nb_integration_pts; ++gg) {
427 auto t_nf = get_ftensor1(
nF);
428
433 t_residuum_omega(
i,
j) =
435
436 int bb = 0;
437 for (; bb != nb_dofs / 3; ++bb) {
438 t_nf(
i) +=
a * t_row_base_fun(
j) * t_residuum(
i,
j);
439 t_nf(
i) +=
a * t_row_base_fun(
j) * t_residuum_omega(
i,
j);
440
441 ++t_nf;
442 ++t_row_base_fun;
443 }
444
445 for (; bb != nb_base_functions; ++bb)
446 ++t_row_base_fun;
447
448 ++t_w;
449 ++t_u;
450 ++t_R;
451 ++t_omega_dot;
452 }
453
455}
#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< 'm', SPACE_DIM > m
FTensor::Index< 'i', SPACE_DIM > i
const double v
phase velocity of light in medium (cm/ns)
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
VectorDouble nF
local right hand side vector
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
MatrixDouble & getN(const FieldApproximationBase base)
get base functions this return matrix (nb. of rows is equal to nb. of Gauss pts, nb....
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
const VectorInt & getIndices() const
Get global indices of dofs on entity.