19template <
typename AssembleOp>
25 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
26 boost::shared_ptr<TopologicalData> topo_ptr,
27 boost::shared_ptr<double> J_ptr, SmartPetscObj<Vec> assemble_vec,
35 double *vec_ptr = OP::nF.data().data();
37 int *ind_ptr = data.
getIndices().data().data();
45 std::vector<EntityHandle> ents(field_ents.size());
46 std::transform(field_ents.begin(), field_ents.end(), ents.begin(),
47 [](
const auto *fe) { return fe->getEnt(); });
48 if (field_ents.empty())
50 if (type_from_handle(ents[0]) != MBVERTEX)
52 auto &moab = OP::getMoab();
53 VectorDouble topo_values(OP::nF.size());
55 topo_values.data().data());
56 noalias(topo_values) += OP::nF;
58 OP::nF.data().data());
65 boost::shared_ptr<double>
JPtr;
85 :
public FormsIntegrators<FaceUserDataOperator>::Assembly<A>
::OpBrokenBase {
87 using OP =
typename FormsIntegrators<FaceUserDataOperator>::Assembly<
91 boost::shared_ptr<std::vector<BrokenBaseSideData>> broken_base_side_data,
92 boost::shared_ptr<TopologicalData> topo_ptr,
93 boost::shared_ptr<double> J_ptr,
94 SmartPetscObj<Vec> assemble_vec,
96 boost::shared_ptr<Range> ents_ptr =
nullptr)
97 :
OP(broken_base_side_data, ents_ptr),
JPtr(J_ptr),
104 double *vec_ptr = OP::locF.data().data();
106 int *ind_ptr = data.
getIndices().data().data();
111 std::vector<EntityHandle> ents(field_ents.size());
112 std::transform(field_ents.begin(), field_ents.end(), ents.begin(),
113 [](
const auto *fe) { return fe->getEnt(); });
114 if (field_ents.empty())
116 if (type_from_handle(ents[0]) != MBVERTEX)
118 auto &moab = getMoab();
119 VectorDouble topo_values(OP::locF.size());
121 topo_values.data().data());
122 topo_values += OP::locF;
124 OP::locF.data().data());
130 boost::shared_ptr<double>
JPtr;
138 OpAssembleVolumeTopologicalDerivativeImpl;
145 OpAssembleVolumeTopologicalDerivativeImpl;
152 OpAssembleVolumeTopologicalDerivativeImpl;
159 OpAssembleFaceTopologicalDerivativeImpl;
167 OpAssembleBrokenFaceTopologicalDerivativeImplBase;
175 OpAssembleVolumeTopologicalDerivativeImpl;
183 OpAssembleVolumeTopologicalDerivativeImpl;
190 OpAssembleVolumeTopologicalDerivativeImpl;
197 OpAssembleVolumeTopologicalDerivativeImpl;
203 :
public ForcesAndSourcesCore::UserDataOperator {
204 using OP = ForcesAndSourcesCore::UserDataOperator;
207 boost::shared_ptr<DataAtIntegrationPts> data_at_pts_ptr,
208 boost::shared_ptr<TopologicalData> topo_p,
209 boost::shared_ptr<ObjectiveFunctionData> python_ptr)
213 MoFEMErrorCode
doWork(
int side, EntityType type,
EntData &data);
229 "DataAtIntegrationPts pointer is null");
232 "Topological data pointer is null");
235 "ObjectiveFunctionData pointer is null");
239 const int nb_gauss_pts = getGaussPts().size2();
243 auto stress_full_ptr = boost::make_shared<MatrixDouble>();
244 stress_full_ptr->resize(size_full, nb_gauss_pts,
false);
245 stress_full_ptr->clear();
246 auto strain_full_ptr = boost::make_shared<MatrixDouble>();
247 strain_full_ptr->resize(size_full, nb_gauss_pts,
false);
248 strain_full_ptr->clear();
250 auto t_stress = getFTensor2FromMat<3, 3>(*stress_full_ptr);
251 auto t_strain = getFTensor2FromMat<3, 3>(*strain_full_ptr);
253 auto t_P = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->approxPAtPts);
255 getFTensor2SymmetricFromMat<3>(
dataAtPts->logStretchTensorAtPts);
267 for (
auto gg = 0; gg != nb_gauss_pts; ++gg) {
270 t_stress(
i,
j) = t_P(
i,
j);
271 t_strain(
i,
j) = t_log_u(
i,
j);
275 auto &coords = OP::getCoordsAtGaussPts();
277 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
281 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
282 topoData->getObjDStrainAtPts(),
false);
285 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
286 topoData->getObjDDisplacementAtPts(),
false);
289 coords,
dataAtPts->getSmallWL2AtPts(), stress_full_ptr, strain_full_ptr,
290 topoData->getObjDStressAtPts(),
false);
301 "Topological data pointer is null");
308 const int nb_integration_pts = data.
getN().size1();
309 auto obj_at_pts =
topoData->getObjAtPts();
312 if (obj_at_pts->size() !=
static_cast<size_t>(nb_integration_pts))
314 "objAtPts size (%d) != nb integration points (%d)",
315 static_cast<int>(obj_at_pts->size()), nb_integration_pts);
316 if (
topoData->detJacobianAtPts.size() !=
317 static_cast<size_t>(nb_integration_pts))
319 "detJacobianAtPts size (%d) != nb integration points (%d)",
320 static_cast<int>(
topoData->detJacobianAtPts.size()),
322 if (
topoData->invJacobianAtPtr.size2() !=
323 static_cast<size_t>(nb_integration_pts))
325 "invJacobianAtPtr columns (%d) != nb integration points (%d)",
326 static_cast<int>(
topoData->invJacobianAtPtr.size2()),
330 "invJacobianAtPtr row size is %d, expected %d",
331 static_cast<int>(
topoData->invJacobianAtPtr.size1()),
337 auto t_obj = getFTensor0FromVec(*obj_at_pts);
338 auto t_det = getFTensor0FromVec(
topoData->detJacobianAtPts);
340 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
topoData->invJacobianAtPtr);
342 const int nb_base_functions = data.
getN().size2();
348 auto get_ftensor1 = [](
auto &
v) {
350 &
v[0], &
v[1], &
v[2]);
355 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
356 const double a =
v * t_w;
361 t_cof(
i,
j) = t_det * t_inv_jac(
j,
i);
363 auto t_nf = get_ftensor1(
nF);
365 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
366 t_nf(
i) +=
a * t_obj * t_cof(
i,
j) * t_base_diff(
j);
370 for (; bb != nb_base_functions; ++bb)
388 "Topological data pointer is null");
395 const int nb_integration_pts = data.
getN().size1();
398 const int stress_rows =
topoData->objDStressAtPts.size1();
399 const int stress_cols =
topoData->objDStressAtPts.size2();
400 if (stress_cols != nb_integration_pts)
402 "objDStressAtPts columns (%d) != nb integration points (%d)",
403 stress_cols, nb_integration_pts);
407 "objDStressAtPts row size is %d, expected %d (3x3 Piola gradient)",
414 const int nb_base_functions = data.
getN().size2() /
SPACE_DIM;
420 auto get_ftensor1 = [](
auto &
v) {
422 &
v[0], &
v[1], &
v[2]);
426 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
topoData->objDStressAtPts);
428 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
429 const double a =
v * t_w;
430 auto t_nf = get_ftensor1(
nF);
433 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
434 t_nf(
i) +=
a * t_row_base_fun(
j) * t_obj_dP(
i,
j);
438 for (; bb != nb_base_functions; ++bb)
454 "Topological data pointer is null");
461 const int nb_integration_pts = data.
getN().size1();
464 const int stress_rows =
topoData->objDStressAtPts.size1();
465 const int stress_cols =
topoData->objDStressAtPts.size2();
466 if (stress_cols != nb_integration_pts)
468 "objDStressAtPts columns (%d) != nb integration points (%d)",
469 stress_cols, nb_integration_pts);
473 "objDStressAtPts row size is %d, expected %d (3x3 Piola gradient)",
483 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
topoData->objDStressAtPts);
488 auto get_ftensor0 = [](
auto &
v) {
492 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
493 const double a =
v * t_w;
494 auto t_nf = get_ftensor0(
nF);
497 for (; bb != nb_dofs; ++bb) {
498 t_nf +=
a * t_row_base_fun(
i,
j) * t_obj_dP(
i,
j);
502 for (; bb != nb_base_functions; ++bb)
518 "Topological data pointer is null");
525 const int nb_integration_pts = data.
getN().size1();
528 const int disp_rows =
topoData->objDDisplacementAtPts.size1();
529 const int disp_cols =
topoData->objDDisplacementAtPts.size2();
530 if (disp_cols != nb_integration_pts)
532 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
533 disp_cols, nb_integration_pts);
537 "objDDisplacementAtPts row size is %d, expected %d", disp_rows,
544 const int nb_base_functions = data.
getN().size2();
547 getFTensor1FromMat<SPACE_DIM>(
topoData->objDDisplacementAtPts);
551 auto get_ftensor1 = [](
auto &
v) {
553 &
v[0], &
v[1], &
v[2]);
556 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
557 const double a =
v * t_w;
558 auto t_nf = get_ftensor1(
nF);
561 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
562 t_nf(
i) +=
a * t_row_base_fun * t_obj_dw(
i);
566 for (; bb != nb_base_functions; ++bb)
582 "Topological data pointer is null");
589 const int nb_integration_pts = data.
getN().size1();
592 const int disp_rows =
topoData->objDDisplacementAtPts.size1();
593 const int disp_cols =
topoData->objDDisplacementAtPts.size2();
594 if (disp_cols != nb_integration_pts)
596 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
597 disp_cols, nb_integration_pts);
601 "objDDisplacementAtPts row size is %d, expected %d", disp_rows,
606 auto t_w = getFTensor0IntegrationWeight();
607 const int nb_base_functions = data.
getN().size2();
609 auto t_obj_du_gamma =
610 getFTensor1FromMat<SPACE_DIM>(
topoData->objDDisplacementAtPts);
614 auto get_ftensor1 = [](
auto &
v) {
616 &
v[0], &
v[1], &
v[2]);
619 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
620 const double a = t_w * getMeasure();
621 auto t_nf = get_ftensor1(
nF);
624 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
625 t_nf(
i) +=
a * t_row_base_fun * t_obj_du_gamma(
i);
629 for (; bb != nb_base_functions; ++bb)
645 "Topological data pointer is null");
652 const int nb_integration_pts = OP::getGaussPts().size2();
655 const int traction_rows =
topoData->objDDisplacementAtPts.size1();
656 const int traction_cols =
topoData->objDDisplacementAtPts.size2();
657 if (traction_cols != nb_integration_pts)
659 "objDDisplacementAtPts columns (%d) != nb integration points (%d)",
660 traction_cols, nb_integration_pts);
664 "objDDisplacementAtPts row size is %d, expected %d", traction_rows,
669 auto t_normal = OP::getFTensor1NormalsAtGaussPts();
670 auto t_w = OP::getFTensor0IntegrationWeight();
671 const int nb_base_functions = data.
getN().size2() /
SPACE_DIM;
673 auto t_obj_dtraction =
674 getFTensor1FromMat<SPACE_DIM>(
topoData->objDDisplacementAtPts);
679 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
680 auto t_nf = getFTensor1FromPtr<SPACE_DIM>(&*OP::locF.begin());
682 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
684 t_w * (t_row_base_fun(
j) * t_normal(
j)) * t_obj_dtraction(
i) * 0.5;
688 for (; bb != nb_base_functions; ++bb)
705 "Topological data pointer is null");
708 "DataAtIntegrationPts pointer is null");
715 const int nb_integration_pts = data.
getN().size1();
718 const int strain_rows =
topoData->objDStrainAtPts.size1();
719 const int strain_cols =
topoData->objDStrainAtPts.size2();
720 if (strain_cols != nb_integration_pts)
722 "objDStrainAtPts columns (%d) != nb integration points (%d)",
723 strain_cols, nb_integration_pts);
727 "objDStrainAtPts row size is %d, expected %d", strain_rows,
736 "wrong matD size, should be %d by %d but is %d by %d",
size_symm,
737 size_symm, (
int)mat_d.size1(), (
int)mat_d.size2());
743 const int nb_base_functions = data.
getN().size2() /
SPACE_DIM;
747 getFTensor2SymmetricFromMat<SPACE_DIM>(
topoData->objDStrainAtPts);
749 getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(mat_d.data().data());
756 auto get_ftensor1 = [](
auto &
v) {
758 &
v[0], &
v[1], &
v[2]);
761 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
762 const double a =
v * t_w;
763 auto t_nf = get_ftensor1(
nF);
766 t_dj_dp_no_streach(
i,
j) = t_obj_dstrain(
k,
l) * t_D(
k,
l,
i,
j);
769 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
770 t_nf(
i) +=
a * t_row_base_fun(
j) * t_dj_dp_no_streach(
i,
j);
774 for (; bb != nb_base_functions; ++bb)
790 "Topological data pointer is null");
793 "DataAtIntegrationPts pointer is null");
800 const int nb_integration_pts = data.
getN().size1();
803 const int strain_rows =
topoData->objDStrainAtPts.size1();
804 const int strain_cols =
topoData->objDStrainAtPts.size2();
805 if (strain_cols != nb_integration_pts)
807 "objDStrainAtPts columns (%d) != nb integration points (%d)",
808 strain_cols, nb_integration_pts);
812 "objDStrainAtPts row size is %d, expected %d", strain_rows,
821 "wrong matD size, should be %d by %d but is %d by %d",
size_symm,
822 size_symm, (
int)mat_d.size1(), (
int)mat_d.size2());
832 getFTensor2SymmetricFromMat<SPACE_DIM>(
topoData->objDStrainAtPts);
834 getFTensor4DdgFromPtr<SPACE_DIM, SPACE_DIM, 0>(mat_d.data().data());
841 auto get_ftensor0 = [](
auto &
v) {
845 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
846 const double a =
v * t_w;
847 auto t_nf = get_ftensor0(
nF);
850 t_dj_dp_no_streach(
i,
j) = t_obj_dstrain(
k,
l) * t_D(
k,
l,
i,
j);
853 for (; bb != nb_dofs; ++bb) {
854 t_nf +=
a * t_row_base_fun(
i,
j) * t_dj_dp_no_streach(
i,
j);
858 for (; bb != nb_base_functions; ++bb)
874 "Topological data pointer is null");
881 const int nb_integration_pts = data.
getN().size1();
884 const int strain_rows =
topoData->objDStrainAtPts.size1();
885 const int strain_cols =
topoData->objDStrainAtPts.size2();
886 if (strain_cols != nb_integration_pts)
888 "objDStrainAtPts columns (%d) != nb integration points (%d)",
889 strain_cols, nb_integration_pts);
893 "objDStrainAtPts row size is %d, expected %d", strain_rows,
900 const int nb_base_functions = data.
getN().size2();
904 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
topoData->objDStrainAtPts);
911 auto get_ftensor1 = [](
auto &
v) {
913 &
v[0], &
v[1], &
v[2], &
v[3], &
v[4], &
v[5]);
916 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
917 const double a =
v * t_w;
918 auto t_nf = get_ftensor1(
OP::nF);
922 t_L(
i,
j, L) * (t_obj_dstrain(
i,
j) || t_obj_dstrain(
j,
i)) / 2.;
925 for (; bb != nb_dofs /
size_symm; ++bb) {
926 t_nf(L) +=
a * t_row_base_fun * t_obj_dU(L);
930 for (; bb != nb_base_functions; ++bb)
944 boost::shared_ptr<DataAtIntegrationPts> data_ptr,
945 boost::shared_ptr<TopologicalData> topo_ptr,
946 SmartPetscObj<Vec> assemble_vec,
const double alpha,
const double rho,
947 const double alpha_omega = 0)
949 field_name, data_ptr, topo_ptr, nullptr, assemble_vec,
Tag()),
958 "DataAtIntegrationPts pointer is null");
965 const int nb_integration_pts = data.
getN().size1();
968 if (
dataAtPts->divPAtPts.size2() != nb_integration_pts)
970 "divPAtPts columns (%d) != nb integration points (%d)",
971 static_cast<int>(
dataAtPts->divPAtPts.size2()),
978 if (
dataAtPts->varWL2.size2() != nb_integration_pts)
980 "varWL2 columns (%d) != nb integration points (%d)",
981 static_cast<int>(
dataAtPts->varWL2.size2()), nb_integration_pts);
982 if (
dataAtPts->varRotAxis.size2() != nb_integration_pts)
984 "varRotAxis columns (%d) != nb integration points (%d)",
985 static_cast<int>(
dataAtPts->varRotAxis.size2()),
987 if (
dataAtPts->varGradRotAxis.size2() != nb_integration_pts)
989 "varGradRotAxis columns (%d) != nb integration points (%d)",
990 static_cast<int>(
dataAtPts->varGradRotAxis.size2()),
992 if (
dataAtPts->varPiola.size2() != nb_integration_pts)
994 "varPiola columns (%d) != nb integration points (%d)",
995 static_cast<int>(
dataAtPts->varPiola.size2()),
997 if (
dataAtPts->varDivPiola.size2() != nb_integration_pts)
999 "varDivPiola columns (%d) != nb integration points (%d)",
1000 static_cast<int>(
dataAtPts->varDivPiola.size2()),
1001 nb_integration_pts);
1006 auto t_div_P = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->divPAtPts);
1007 auto t_w_l2 = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->wL2AtPts);
1011 auto t_h = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->hAtPts);
1012 auto t_levi_kirchhoff =
1013 getFTensor1FromMat<SPACE_DIM>(
dataAtPts->leviKirchhoffAtPts);
1016 auto t_R = getFTensor2FromMat<3, 3>(
dataAtPts->rotMatAtPts);
1017 auto t_u = getFTensor2SymmetricFromMat<3>(
dataAtPts->stretchTensorAtPts);
1019 auto t_var_w = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->varWL2);
1020 auto t_var_omega = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->varRotAxis);
1021 auto t_var_grad_omega =
1022 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->varGradRotAxis);
1023 auto t_var_P = getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
dataAtPts->varPiola);
1024 auto t_var_div_P = getFTensor1FromMat<SPACE_DIM>(
dataAtPts->varDivPiola);
1026 auto t_det = getFTensor0FromVec(
topoData->detJacobianAtPts);
1028 getFTensor2FromMat<SPACE_DIM, SPACE_DIM>(
topoData->invJacobianAtPtr);
1030 if (
dataAtPts->wL2DotDotAtPts.size1() == 0 &&
1031 dataAtPts->wL2DotDotAtPts.size2() != nb_integration_pts) {
1036 const auto piola_scale =
dataAtPts->piolaScale;
1037 const auto alpha_w =
alphaW / piola_scale;
1038 const auto alpha_rho =
alphaRho / piola_scale;
1040 const int nb_base_functions = data.
getN().size2();
1043 auto get_ftensor1 = [](
auto &
v) {
1045 &
v[0], &
v[1], &
v[2]);
1077 for (
int gg = 0; gg != nb_integration_pts; ++gg) {
1081 t_cof(
i,
j) = t_det * t_inv_jac(
j,
i);
1083 auto t_nf = get_ftensor1(
nF);
1085 for (; bb != nb_dofs /
SPACE_DIM; ++bb) {
1088 t_div_base(
i) = -(1 / t_det) * (t_inv_jac(
j,
i) * t_base_diff(
j));
1091 t_nf(
i) += (t_w *
v) *
1092 (t_var_w(
k) * (-t_div_P(
k)
1094 t_cof(
i,
j) * t_base_diff(
j);
1095 t_nf(
i) += (t_w *
v) * (-(t_var_w(
k) * t_div_P(
k))) * t_div_base(
i);
1098 t_nf(
i) += (t_w *
v) * (t_var_omega(
k) * (-t_levi_kirchhoff(
k))) *
1099 t_cof(
i,
j) * t_base_diff(
j);
1105 "OpSensitivity_dX with alpha_omega != 0 is not implemented yet");
1111 t_nf(
i) -= (t_w *
v) * (t_var_P(
i,
k) * (t_R(
i,
l) * t_u(
l,
k)) / 2) *
1112 t_cof(
i,
j) * t_base_diff(
j);
1113 t_nf(
i) -= (t_w *
v) * (t_var_P(
i,
l) * (t_R(
i,
k) * t_u(
l,
k)) / 2) *
1114 t_cof(
i,
j) * t_base_diff(
j);
1115 t_nf(
i) += (t_w *
v) * (t_var_P(
i,
j) *
t_kd(
i,
j)) * t_cof(
i,
j) *
1120 t_nf(
i) += (t_w *
v) * (t_var_P(
k,
m) * (-t_residuum_P(
k,
m))) *
1121 t_cof(
i,
j) * t_base_diff(
j);
1125 t_nf(
i) += (t_w *
v) * (t_var_div_P(
k) * (-t_w_l2(
k))) * t_cof(
i,
j) *
1127 t_nf(
i) += (t_w *
v) * (t_var_div_P(
k) * (-t_w_l2(
k))) * t_div_base(
i);
1132 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