590 {
592
594
596
597 if (bc.faces.find(fe_ent) != bc.faces.end()) {
599 int nb_integration_pts = data.
getN().size1();
600 auto t_normal = getFTensor1Normal();
601 auto t_w = getFTensor0IntegrationWeight();
602
603 int nb_base_functions = data.
getN().size2() / 3;
608 auto get_ftensor1 = [](
auto &
v) {
611 };
612
613
615
616 double theta = bc.theta;
617 theta *= getFEMethod()->ts_t;
618
620 const double a = sqrt(t_normal(
i) * t_normal(
i));
621 t_omega(
i) = t_normal(
i) * (theta /
a);
623 auto t_coords = getFTensor1CoordsAtGaussPts();
624
625 for (int gg = 0; gg != nb_integration_pts; ++gg) {
627 t_delta(
i) = t_center(
i) - t_coords(
i);
629 t_disp(
i) = t_delta(
i) - t_R(
i,
j) * t_delta(
j);
630
631 auto t_nf = get_ftensor1(
nF);
632 int bb = 0;
633 for (; bb != nb_dofs / 3; ++bb) {
634 t_nf(
i) -= t_w * (t_row_base_fun(
j) * t_normal(
j)) * t_disp(
i) * 0.5;
635 ++t_nf;
636 ++t_row_base_fun;
637 }
638 for (; bb != nb_base_functions; ++bb)
639 ++t_row_base_fun;
640
641 ++t_w;
642 ++t_coords;
643 }
644 }
645 }
647}
#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
const double v
phase velocity of light in medium (cm/ns)
FTensor::Index< 'j', 3 > j
FTensor::Index< 'k', 3 > k
static FTensor::Tensor2< typename TensorTypeExtractor< T >::Type, 3, 3 > get_rotation_form_vector(FTensor::Tensor1< T, 3 > &t_omega)
VectorDouble nF
local right hand side vector
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.