32template <
typename AssembleOp>
38 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
39 boost::shared_ptr<TopologicalData> topo_ptr,
40 boost::shared_ptr<double> J_ptr, SmartPetscObj<Vec> assemble_vec,
48 double *vec_ptr = OP::nF.data().data();
50 int *ind_ptr = data.
getIndices().data().data();
58 std::vector<EntityHandle> ents(field_ents.size());
59 std::transform(field_ents.begin(), field_ents.end(), ents.begin(),
60 [](
const auto *fe) { return fe->getEnt(); });
61 if (field_ents.empty())
63 if (type_from_handle(ents[0]) != MBVERTEX)
65 auto &moab = OP::getMoab();
66 VectorDouble topo_values(OP::nF.size());
68 topo_values.data().data());
69 noalias(topo_values) += OP::nF;
71 OP::nF.data().data());
78 boost::shared_ptr<double>
JPtr;
98 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
100 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
104 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
105 boost::shared_ptr<TopologicalData> topo_ptr,
106 boost::shared_ptr<double> J_ptr,
107 SmartPetscObj<Vec> assemble_vec,
109 boost::shared_ptr<Range> ents_ptr =
nullptr)
110 :
OP(broken_base_side_data, ents_ptr),
JPtr(J_ptr),
117 double *vec_ptr = OP::locF.data().data();
119 int *ind_ptr = data.
getIndices().data().data();
124 std::vector<EntityHandle> ents(field_ents.size());
125 std::transform(field_ents.begin(), field_ents.end(), ents.begin(),
126 [](
const auto *fe) { return fe->getEnt(); });
127 if (field_ents.empty())
129 if (type_from_handle(ents[0]) != MBVERTEX)
131 auto &moab = getMoab();
132 VectorDouble topo_values(OP::locF.size());
134 topo_values.data().data());
135 topo_values += OP::locF;
137 OP::locF.data().data());
143 boost::shared_ptr<double>
JPtr;
151 OpAssembleVolumeTopologicalDerivativeImpl;
158 OpAssembleVolumeTopologicalDerivativeImpl;
165 OpAssembleVolumeTopologicalDerivativeImpl;
172 OpAssembleFaceTopologicalDerivativeImpl;
180 OpAssembleBrokenFaceTopologicalDerivativeImplBase;
188 OpAssembleVolumeTopologicalDerivativeImpl;
196 OpAssembleVolumeTopologicalDerivativeImpl;
203 OpAssembleVolumeTopologicalDerivativeImpl;
210 OpAssembleVolumeTopologicalDerivativeImpl;
216 :
public ForcesAndSourcesCore::UserDataOperator {
217 using OP = ForcesAndSourcesCore::UserDataOperator;
220 boost::shared_ptr<DataAtIntegrationPts> data_at_pts_ptr,
221 boost::shared_ptr<TopologicalData> topo_p,
222 boost::shared_ptr<ObjectiveFunctionData> python_ptr)
226 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
242 "DataAtIntegrationPts pointer is null");
245 "Topological data pointer is null");
248 "ObjectiveFunctionData pointer is null");
252 const int nb_gauss_pts = getGaussPts().size2();
256 auto stress_full_ptr = boost::make_shared<MatrixDouble>();
257 stress_full_ptr->resize(size_full, nb_gauss_pts,
false);
258 stress_full_ptr->clear();
259 auto strain_full_ptr = boost::make_shared<MatrixDouble>();
260 strain_full_ptr->resize(size_full, nb_gauss_pts,
false);
261 strain_full_ptr->clear();
263 auto t_stress = getFTensor2FromMat<3, 3>(*stress_full_ptr);
264 auto t_strain = getFTensor2FromMat<3, 3>(*strain_full_ptr);
266 auto t_P = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->approxPAtPts);
268 getFTensor2SymmetricFromMat<3>(
dataAtPts->logStretchTensorAtPts);
280 for (
auto gg = 0; gg != nb_gauss_pts; ++gg) {
283 t_stress(
i,
j) = t_P(
i,
j);
284 t_strain(
i,
j) = t_log_u(
i,
j);
288 auto &coords = OP::getCoordsAtGaussPts();
290 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
294 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
295 topoData->getObjDStrainAtPts(),
false);
298 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
299 topoData->getObjDDisplacementAtPts(),
false);
302 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
303 topoData->getObjDStressAtPts(),
false);
314 "Topological data pointer is null");
321 const int nb_integration_pts = data.
getN().size1();
322 auto obj_at_pts =
topoData->getObjAtPts();
325 if (obj_at_pts->size() !=
static_cast<size_t>(nb_integration_pts))
327 "objAtPts size (%d) != nb integration points (%d)",
328 static_cast<int>(obj_at_pts->size()), nb_integration_pts);
329 if (
topoData->detJacobianAtPts.size() !=
330 static_cast<size_t>(nb_integration_pts))
332 "detJacobianAtPts size (%d) != nb integration points (%d)",
333 static_cast<int>(
topoData->detJacobianAtPts.size()),
335 if (
topoData->invJacobianAtPtr.size2() !=
336 static_cast<size_t>(nb_integration_pts))
338 "invJacobianAtPtr columns (%d) != nb integration points (%d)",
339 static_cast<int>(
topoData->invJacobianAtPtr.size2()),
343 "invJacobianAtPtr row size is %d, expected %d",
344 static_cast<int>(
topoData->invJacobianAtPtr.size1()),
350 auto t_obj = getFTensor0FromVec(*obj_at_pts);
351 auto t_det = getFTensor0FromVec(
topoData->detJacobianAtPts);
353 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
topoData->invJacobianAtPtr);
355 const int nb_base_functions = data.
getN().size2();
361 auto get_ftensor1 = [](
auto &
v) {
363 &
v[0], &
v[1], &
v[2]);
368 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
369 const double a =
v * t_w;
374 t_cof(
i,
j) = t_det * t_inv_jac(
j,
i);
376 auto t_nf = get_ftensor1(
nF);
378 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
379 t_nf(
i) +=
a * t_obj * t_cof(
i,
j) * t_base_diff(
j);
383 for (; bb != nb_base_functions; ++bb)
401 "Topological data pointer is null");
408 const int nb_integration_pts = data.
getN().size1();
411 const int stress_rows =
topoData->objDStressAtPts.size1();
412 const int stress_cols =
topoData->objDStressAtPts.size2();
413 if (stress_cols != nb_integration_pts)
415 "objDStressAtPts columns (%d) != nb integration points (%d)",
416 stress_cols, nb_integration_pts);
420 "objDStressAtPts row size is %d, expected %d (3x3 Piola gradient)",
427 const int nb_base_functions = data.
getN().size2() /
SPACE_DIM;
433 auto get_ftensor1 = [](
auto &
v) {
435 &
v[0], &
v[1], &
v[2]);
439 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
topoData->objDStressAtPts);
441 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
442 const double a =
v * t_w;
443 auto t_nf = get_ftensor1(
nF);
446 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
447 t_nf(
i) +=
a * t_row_base_fun(
j) * t_obj_dP(
i,
j);
451 for (; bb != nb_base_functions; ++bb)
467 "Topological data pointer is null");
474 const int nb_integration_pts = data.
getN().size1();
477 const int stress_rows =
topoData->objDStressAtPts.size1();
478 const int stress_cols =
topoData->objDStressAtPts.size2();
479 if (stress_cols != nb_integration_pts)
481 "objDStressAtPts columns (%d) != nb integration points (%d)",
482 stress_cols, nb_integration_pts);
486 "objDStressAtPts row size is %d, expected %d (3x3 Piola gradient)",
496 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
topoData->objDStressAtPts);
501 auto get_ftensor0 = [](
auto &
v) {
505 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
506 const double a =
v * t_w;
507 auto t_nf = get_ftensor0(
nF);
510 for (; bb != nb_dofs; ++bb) {
511 t_nf +=
a * t_row_base_fun(
i,
j) * t_obj_dP(
i,
j);
515 for (; bb != nb_base_functions; ++bb)
531 "Topological data pointer is null");
538 const int nb_integration_pts = data.
getN().size1();
541 const int disp_rows =
topoData->objDDisplacementAtPts.size1();
542 const int disp_cols =
topoData->objDDisplacementAtPts.size2();
543 if (disp_cols != nb_integration_pts)
545 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
546 disp_cols, nb_integration_pts);
550 "objDDisplacementAtPts row size is %d, expected %d", disp_rows,
557 const int nb_base_functions = data.
getN().size2();
560 getFTensor1FromMat<SPACE_DIM>(
topoData->objDDisplacementAtPts);
564 auto get_ftensor1 = [](
auto &
v) {
566 &
v[0], &
v[1], &
v[2]);
569 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
570 const double a =
v * t_w;
571 auto t_nf = get_ftensor1(
nF);
574 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
575 t_nf(
i) +=
a * t_row_base_fun * t_obj_dw(
i);
579 for (; bb != nb_base_functions; ++bb)
595 "Topological data pointer is null");
602 const int nb_integration_pts = data.
getN().size1();
605 const int disp_rows =
topoData->objDDisplacementAtPts.size1();
606 const int disp_cols =
topoData->objDDisplacementAtPts.size2();
607 if (disp_cols != nb_integration_pts)
609 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
610 disp_cols, nb_integration_pts);
614 "objDDisplacementAtPts row size is %d, expected %d", disp_rows,
619 auto t_w = getFTensor0IntegrationWeight();
620 const int nb_base_functions = data.
getN().size2();
622 auto t_obj_du_gamma =
623 getFTensor1FromMat<SPACE_DIM>(
topoData->objDDisplacementAtPts);
627 auto get_ftensor1 = [](
auto &
v) {
629 &
v[0], &
v[1], &
v[2]);
632 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
633 const double a = t_w * getMeasure();
634 auto t_nf = get_ftensor1(
nF);
637 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
638 t_nf(
i) +=
a * t_row_base_fun * t_obj_du_gamma(
i);
642 for (; bb != nb_base_functions; ++bb)
658 "Topological data pointer is null");
665 const int nb_integration_pts = OP::getGaussPts().size2();
668 const int traction_rows =
topoData->objDDisplacementAtPts.size1();
669 const int traction_cols =
topoData->objDDisplacementAtPts.size2();
670 if (traction_cols != nb_integration_pts)
672 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
673 traction_cols, nb_integration_pts);
677 "objDDisplacementAtPts row size is %d, expected %d", traction_rows,
682 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
683 auto t_w = OP::getFTensor0IntegrationWeight();
684 const int nb_base_functions = data.
getN().size2() /
SPACE_DIM;
686 auto t_obj_dtraction =
687 getFTensor1FromMat<SPACE_DIM>(
topoData->objDDisplacementAtPts);
692 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
693 auto t_nf = getFTensor1FromPtr<SPACE_DIM>(&*OP::locF.begin());
695 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
697 t_w * (t_row_base_fun(
j) * t_normal(
j)) * t_obj_dtraction(
i) * 0.5;
701 for (; bb != nb_base_functions; ++bb)
718 "Topological data pointer is null");
721 "DataAtIntegrationPts pointer is null");
728 const int nb_integration_pts = data.
getN().size1();
731 const int strain_rows =
topoData->objDStrainAtPts.size1();
732 const int strain_cols =
topoData->objDStrainAtPts.size2();
733 if (strain_cols != nb_integration_pts)
735 "objDStrainAtPts columns (%d) != nb integration points (%d)",
736 strain_cols, nb_integration_pts);
740 "objDStrainAtPts row size is %d, expected %d", strain_rows,
749 "wrong matD size, should be %d by %d but is %d by %d",
size_symm,
750 size_symm, (
int)mat_d.size1(), (
int)mat_d.size2());
756 const int nb_base_functions = data.
getN().size2() /
SPACE_DIM;
760 getFTensor2SymmetricFromMat<SPACE_DIM>(
topoData->objDStrainAtPts);
762 getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(mat_d.data().data());
769 auto get_ftensor1 = [](
auto &
v) {
771 &
v[0], &
v[1], &
v[2]);
774 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
775 const double a =
v * t_w;
776 auto t_nf = get_ftensor1(
nF);
779 t_dj_dp_no_streach(
i,
j) = t_obj_dstrain(
k,
l) * t_D(
k,
l,
i,
j);
782 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
783 t_nf(
i) +=
a * t_row_base_fun(
j) * t_dj_dp_no_streach(
i,
j);
787 for (; bb != nb_base_functions; ++bb)
803 "Topological data pointer is null");
806 "DataAtIntegrationPts pointer is null");
813 const int nb_integration_pts = data.
getN().size1();
816 const int strain_rows =
topoData->objDStrainAtPts.size1();
817 const int strain_cols =
topoData->objDStrainAtPts.size2();
818 if (strain_cols != nb_integration_pts)
820 "objDStrainAtPts columns (%d) != nb integration points (%d)",
821 strain_cols, nb_integration_pts);
825 "objDStrainAtPts row size is %d, expected %d", strain_rows,
834 "wrong matD size, should be %d by %d but is %d by %d",
size_symm,
835 size_symm, (
int)mat_d.size1(), (
int)mat_d.size2());
845 getFTensor2SymmetricFromMat<SPACE_DIM>(
topoData->objDStrainAtPts);
847 getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(mat_d.data().data());
854 auto get_ftensor0 = [](
auto &
v) {
858 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
859 const double a =
v * t_w;
860 auto t_nf = get_ftensor0(
nF);
863 t_dj_dp_no_streach(
i,
j) = t_obj_dstrain(
k,
l) * t_D(
k,
l,
i,
j);
866 for (; bb != nb_dofs; ++bb) {
867 t_nf +=
a * t_row_base_fun(
i,
j) * t_dj_dp_no_streach(
i,
j);
871 for (; bb != nb_base_functions; ++bb)
887 "Topological data pointer is null");
894 const int nb_integration_pts = data.
getN().size1();
897 const int strain_rows =
topoData->objDStrainAtPts.size1();
898 const int strain_cols =
topoData->objDStrainAtPts.size2();
899 if (strain_cols != nb_integration_pts)
901 "objDStrainAtPts columns (%d) != nb integration points (%d)",
902 strain_cols, nb_integration_pts);
906 "objDStrainAtPts row size is %d, expected %d", strain_rows,
913 const int nb_base_functions = data.
getN().size2();
917 getFTensor2SymmetricFromMat<SPACE_DIM>(
topoData->objDStrainAtPts);
924 auto get_ftensor1 = [](
auto &
v) {
926 &
v[0], &
v[1], &
v[2], &
v[3], &
v[4], &
v[5]);
929 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
930 const double a =
v * t_w;
931 auto t_nf = get_ftensor1(
nF);
934 t_obj_dU(L) = t_L(
i,
j, L) * t_obj_dstrain(
i,
j);
937 for (; bb != nb_dofs /
size_symm; ++bb) {
938 t_nf(L) +=
a * t_row_base_fun * t_obj_dU(L);
942 for (; bb != nb_base_functions; ++bb)
956 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
957 boost::shared_ptr<TopologicalData> topo_ptr,
958 SmartPetscObj<Vec> assemble_vec,
const double alpha,
959 const double rho,
const double alpha_omega = 0)
962 assemble_vec,
Tag()),
971 "DataAtIntegrationPts pointer is null");
978 const int nb_integration_pts = data.
getN().size1();
981 if (
dataAtPts->divPAtPts.size2() != nb_integration_pts)
983 "divPAtPts columns (%d) != nb integration points (%d)",
984 static_cast<int>(
dataAtPts->divPAtPts.size2()),
986 if (
dataAtPts->wL2DotAtPts.size2() != nb_integration_pts)
988 "wL2DotAtPts columns (%d) != nb integration points (%d)",
989 static_cast<int>(
dataAtPts->wL2DotAtPts.size2()),
991 if (
dataAtPts->varWL2.size2() != nb_integration_pts)
993 "varWL2 columns (%d) != nb integration points (%d)",
994 static_cast<int>(
dataAtPts->varWL2.size2()), nb_integration_pts);
995 if (
dataAtPts->varRotAxis.size2() != nb_integration_pts)
997 "varRotAxis columns (%d) != nb integration points (%d)",
998 static_cast<int>(
dataAtPts->varRotAxis.size2()),
1000 if (
dataAtPts->varGradRotAxis.size2() != nb_integration_pts)
1002 "varGradRotAxis columns (%d) != nb integration points (%d)",
1003 static_cast<int>(
dataAtPts->varGradRotAxis.size2()),
1004 nb_integration_pts);
1005 if (
dataAtPts->varPiola.size2() != nb_integration_pts)
1007 "varPiola columns (%d) != nb integration points (%d)",
1008 static_cast<int>(
dataAtPts->varPiola.size2()),
1009 nb_integration_pts);
1010 if (
dataAtPts->varDivPiola.size2() != nb_integration_pts)
1012 "varDivPiola columns (%d) != nb integration points (%d)",
1013 static_cast<int>(
dataAtPts->varDivPiola.size2()),
1014 nb_integration_pts);
1019 auto t_div_P = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->divPAtPts);
1020 auto t_w_l2 = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->wL2AtPts);
1021 auto t_s_dot_w = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->wL2DotAtPts);
1022 auto t_s_dot_dot_w =
1023 getFTensor1FromMat<SPACE_DIM>(
dataAtPts->wL2DotDotAtPts);
1024 auto t_h = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->hAtPts);
1025 auto t_levi_kirchhoff =
1026 getFTensor1FromMat<SPACE_DIM>(
dataAtPts->leviKirchhoffAtPts);
1027 auto t_omega_grad_dot =
1028 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->rotAxisGradDotAtPts);
1029 auto t_R = getFTensor2FromMat<3, 3>(
dataAtPts->rotMatAtPts);
1030 auto t_u = getFTensor2SymmetricFromMat<3>(
dataAtPts->stretchTensorAtPts);
1032 auto t_var_w = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->varWL2);
1033 auto t_var_omega = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->varRotAxis);
1034 auto t_var_grad_omega =
1035 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->varGradRotAxis);
1036 auto t_var_P = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->varPiola);
1037 auto t_var_div_P = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->varDivPiola);
1039 auto t_det = getFTensor0FromVec(
topoData->detJacobianAtPts);
1041 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
topoData->invJacobianAtPtr);
1043 if (
dataAtPts->wL2DotDotAtPts.size1() == 0 &&
1044 dataAtPts->wL2DotDotAtPts.size2() != nb_integration_pts) {
1049 const auto piola_scale =
dataAtPts->piolaScale;
1050 const auto alpha_w =
alphaW / piola_scale;
1051 const auto alpha_rho =
alphaRho / piola_scale;
1053 const int nb_base_functions = data.
getN().size2();
1056 auto get_ftensor1 = [](
auto &
v) {
1058 &
v[0], &
v[1], &
v[2]);
1090 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1094 t_cof(
i,
j) = t_det * t_inv_jac(
j,
i);
1096 auto t_nf = get_ftensor1(
nF);
1098 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
1101 t_div_base(
i) = -(1 / t_det) * (t_inv_jac(
j,
i) * t_base_diff(
j));
1104 t_nf(
i) += (t_w *
v) *
1105 (t_var_w(
k) * (-t_div_P(
k) + alpha_w * t_s_dot_w(
k) +
1106 alpha_rho * t_s_dot_dot_w(
k))) *
1107 t_cof(
i,
j) * t_base_diff(
j);
1108 t_nf(
i) += (t_w *
v) * (-(t_var_w(
k) * t_div_P(
k))) * t_div_base(
i);
1111 t_nf(
i) += (t_w *
v) * (t_var_omega(
k) * (-t_levi_kirchhoff(
k))) *
1112 t_cof(
i,
j) * t_base_diff(
j);
1118 "OpSensitivity_dX with alpha_omega != 0 is not implemented yet");
1124 t_nf(
i) -= (t_w *
v) * (t_var_P(
i,
k) * (t_R(
i,
l) * t_u(
l,
k)) / 2) *
1125 t_cof(
i,
j) * t_base_diff(
j);
1126 t_nf(
i) -= (t_w *
v) * (t_var_P(
i,
l) * (t_R(
i,
k) * t_u(
l,
k)) / 2) *
1127 t_cof(
i,
j) * t_base_diff(
j);
1128 t_nf(
i) += (t_w *
v) * (t_var_P(
i,
j) *
t_kd(
i,
j)) * t_cof(
i,
j) *
1133 t_nf(
i) += (t_w *
v) * (t_var_P(
k,
m) * (-t_residuum_P(
k,
m))) *
1134 t_cof(
i,
j) * t_base_diff(
j);
1138 t_nf(
i) += (t_w *
v) * (t_var_div_P(
k) * (-t_w_l2(
k))) * t_cof(
i,
j) *
1140 t_nf(
i) += (t_w *
v) * (t_var_div_P(
k) * (-t_w_l2(
k))) * t_div_base(
i);
1145 for (; bb != nb_base_functions; ++bb)
#define FTENSOR_INDEX(DIM, I)
#define MoFEMFunctionReturnHot(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define MoFEMFunctionBegin
First executable line of each MoFEM function, used for error handling. Final line of MoFEM functions ...
@ MOFEM_DATA_INCONSISTENCY
#define MoFEMFunctionReturn(a)
Last executable line of each PETSc function used for error handling. Replaces return()
#define CHKERR
Inline error check.
FTensor::Index< 'i', SPACE_DIM > i
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
static constexpr auto size_symm
constexpr auto field_name
FTensor::Index< 'm', 3 > m
static enum RotSelector gradApproximator
MoFEMErrorCode aSsemble(EntData &data) override
boost::shared_ptr< TopologicalData > topoData
SmartPetscObj< Vec > assembleVec
OpAssembleBrokenFaceTopologicalDerivativeImplBase(boost::shared_ptr< std::vector< BrokenBaseSideData > > broken_base_side_data, boost::shared_ptr< TopologicalData > topo_ptr, boost::shared_ptr< double > J_ptr, SmartPetscObj< Vec > assemble_vec, Tag topo_tag, boost::shared_ptr< Range > ents_ptr=nullptr)
boost::shared_ptr< double > JPtr
OpAssembleTopologicalObjectiveDerivativeImplBase(const std::string &field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< TopologicalData > topo_ptr, boost::shared_ptr< double > J_ptr, SmartPetscObj< Vec > assemble_vec, Tag topo_tag)
MoFEMErrorCode assemble(EntData &data) override
boost::shared_ptr< double > JPtr
boost::shared_ptr< TopologicalData > topoData
SmartPetscObj< Vec > assembleVec
MoFEMErrorCode integrate(EntData &data)
MoFEMErrorCode integrate(EntData &data)
MoFEMErrorCode integrate(EntData &data)
MoFEMErrorCode integrate(EntData &data)
MoFEMErrorCode integrate(EntData &data)
MoFEMErrorCode integrate(EntData &data)
MoFEMErrorCode integrate(EntData &data)
OpSensitivityInteriorGradient(const std::string field_name, boost::shared_ptr< DataAtIntegrationPts > data_ptr, boost::shared_ptr< TopologicalData > topo_ptr, SmartPetscObj< Vec > assemble_vec, const double alpha, const double rho, const double alpha_omega=0)
MoFEMErrorCode integrate(EntData &data)
OpTopologicalObjectivePythonImpl(boost::shared_ptr< DataAtIntegrationPts > data_at_pts_ptr, boost::shared_ptr< TopologicalData > topo_p, boost::shared_ptr< ObjectiveFunctionData > python_ptr)
boost::shared_ptr< ObjectiveFunctionData > pythonPtr
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
MoFEMErrorCode doWork(int side, EntityType type, EntData &data)
ForcesAndSourcesCore::UserDataOperator OP
boost::shared_ptr< TopologicalData > topoData
MoFEMErrorCode iNtegrate(EntData &data)
MoFEMErrorCode integrate(EntData &data)
Data on single entity (This is passed as argument to DataOperator::doWork)
FTensor::Tensor1< FTensor::PackPtr< double *, Tensor_Dim >, Tensor_Dim > getFTensor1DiffN(const FieldApproximationBase base)
Get derivatives of base functions.
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.
const VectorFieldEntities & getFieldEntities() const
Get field entities (const version)
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 degrees of freedom on entity.
auto getFTensor0IntegrationWeight()
Get integration weights.
double getVolume() const
element volume (linear geometry)
VectorDouble nF
local right hand side vector
boost::shared_ptr< DataAtIntegrationPts > dataAtPts
data at integration pts