1485 {
1487
1491
1492 double time = OP::getFEMethod()->ts_t;
1495 }
1496
1497
1499
1501
1502 if (bc.faces.find(fe_ent) != bc.faces.end()) {
1504 int nb_integration_pts = OP::getGaussPts().size2();
1505 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
1506 auto t_w = OP::getFTensor0IntegrationWeight();
1507
1508 int nb_base_functions = data.
getN().size2() / 3;
1510
1511 auto get_ftensor1 = [](
auto &
v) {
1514 };
1515
1516
1517
1518
1519
1520
1521
1523
1524 auto get_rotation_angle = [&]() {
1525 double theta = bc.theta;
1528 }
1529 return theta;
1530 };
1531
1532 auto get_rotation = [&](auto theta) {
1534 if (bc.vals.size() == 7) {
1535 t_omega(0) = bc.vals[4];
1536 t_omega(1) = bc.vals[5];
1537 t_omega(2) = bc.vals[6];
1538 } else {
1539
1540 t_omega(
i) = OP::getFTensor1Normal()(
i);
1541 }
1543 t_omega(
i) *= theta;
1546 ? 0.
1548 };
1549
1550 auto t_R = get_rotation(get_rotation_angle());
1551 auto t_coords = OP::getFTensor1CoordsAtGaussPts();
1552
1553 for (int gg = 0; gg != nb_integration_pts; ++gg) {
1555 t_delta(
i) = t_center(
i) - t_coords(
i);
1557 t_disp(
i) = t_delta(
i) - t_R(
i,
j) * t_delta(
j);
1558
1560 int bb = 0;
1561 for (; bb != nb_dofs / 3; ++bb) {
1562 t_nf(
i) += t_w * (t_row_base_fun(
j) * t_normal(
j)) * t_disp(
i) * 0.5;
1563 ++t_nf;
1564 ++t_row_base_fun;
1565 }
1566 for (; bb != nb_base_functions; ++bb)
1567 ++t_row_base_fun;
1568
1569 ++t_w;
1570 ++t_normal;
1571 ++t_coords;
1572 }
1573 }
1574 }
1576}
#define FTENSOR_INDEX(DIM, I)
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()
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
FTensor::Tensor1< FTensor::PackPtr< double *, S >, DIM > getFTensor1FromPtr(double *ptr)
Make Tensor1 from pointer.
static double dynamicTime
static enum RotSelector rotSelector
static PetscBool dynamicRelaxation
std::map< std::string, boost::shared_ptr< ScalingMethod > > scalingMethodsMap
boost::shared_ptr< BcRotVec > bcRotPtr
static auto exp(A &&t_w_vee, B &&theta)
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.