1652 {
1654 int nb_integration_pts = getGaussPts().size2();
1655 int row_nb_dofs = row_data.
getIndices().size();
1656 int col_nb_dofs = col_data.
getIndices().size();
1657
1660 &
m(r + 0,
c), &
m(r + 1,
c), &
m(r + 2,
c));
1661 };
1662
1668
1669 auto v = getVolume();
1670 auto t_w = getFTensor0IntegrationWeight();
1671 auto t_levi_kirchoff_dP =
1672 getFTensor3FromMat<3, 3, 3>(
dataAtPts->leviKirchoffdPAtPts);
1673
1674 int row_nb_base_functions = row_data.
getN().size2();
1676
1677 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1679 int rr = 0;
1680 for (; rr != row_nb_dofs / 3; ++rr) {
1681 double b =
a * t_row_base_fun;
1682 auto t_col_base_fun = col_data.
getFTensor2N<3, 3>(gg, 0);
1683 auto t_m = get_ftensor1(
K, 3 * rr, 0);
1684 for (int cc = 0; cc != col_nb_dofs; ++cc) {
1685 t_m(
k) +=
b * (t_levi_kirchoff_dP(
i,
j,
k) * t_col_base_fun(
i,
j));
1686 ++t_m;
1687 ++t_col_base_fun;
1688 }
1689 ++t_row_base_fun;
1690 }
1691
1692 for (; rr != row_nb_base_functions; ++rr) {
1693 ++t_row_base_fun;
1694 }
1695 ++t_w;
1696 ++t_levi_kirchoff_dP;
1697 }
1699}
#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 c
speed of light (cm/ns)
const double v
phase velocity of light in medium (cm/ns)
FTensor::Index< 'l', 3 > l
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
MatrixDouble K
local tangent matrix
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts
FTensor::Tensor2< FTensor::PackPtr< double *, Tensor_Dim0 *Tensor_Dim1 >, Tensor_Dim0, Tensor_Dim1 > getFTensor2N(FieldApproximationBase base)
Get base functions for Hdiv/Hcurl spaces.
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 dofs on entity.