322 if (
auto fe_method_ptr =
fePtr.lock()) {
327 const auto problem_name = fe_method_ptr->problemPtr->getName();
329 SmartPetscObj<IS> is_sum;
331 for (
auto bc : bc_mng->getBcMapByBlockName()) {
332 if (
auto disp_bc = bc.second->dispBcPtr) {
334 auto &bc_id = bc.first;
336 auto regex_str = (boost::format(
"%s_(.*)") % problem_name).str();
337 if (std::regex_match(bc_id, std::regex(regex_str))) {
343 <<
"Apply EssentialPreProc<DisplacementCubitBcData>: "
344 << problem_name <<
"_" <<
field_name <<
"_" << block_name;
346 const bool is_rotation =
347 disp_bc->data.flag4 || disp_bc->data.flag5 || disp_bc->data.flag6;
349 auto ents = bc.second->bcEnts;
351 std::array<SmartPetscObj<IS>, 3> is_xyz;
352 auto prb_name = fe_method_ptr->problemPtr->getName();
354 if (disp_bc->data.flag1 || is_rotation) {
355 CHKERR is_mng->isCreateProblemFieldAndRank(
358 if (disp_bc->data.flag2 || is_rotation) {
359 CHKERR is_mng->isCreateProblemFieldAndRank(
362 if (disp_bc->data.flag3 || is_rotation) {
363 CHKERR is_mng->isCreateProblemFieldAndRank(
367 auto get_is_sum = [](
auto is1,
auto is2) {
370 return SmartPetscObj<IS>(is);
373 for (
auto &is : is_xyz) {
378 is_sum = get_is_sum(is_sum, is);
387 if (
auto fe_ptr =
fePtr.lock()) {
388 SmartPetscObj<Mat> B =
389 vLhs ?
vLhs : SmartPetscObj<Mat>(fe_ptr->B,
true);
391 if ((*fe_ptr->matAssembleSwitch) && !
vLhs) {
392 if (*fe_ptr->matAssembleSwitch) {
393 CHKERR MatAssemblyBegin(B, MAT_FINAL_ASSEMBLY);
394 CHKERR MatAssemblyEnd(B, MAT_FINAL_ASSEMBLY);
395 *fe_ptr->matAssembleSwitch =
false;
399 MOFEM_LOG(
"WORLD", Sev::noisy) <<
"Apply AO to IS";
400 CHKERR AOApplicationToPetscIS(
vAO, is_sum);
403 CHKERR MatZeroRowsColumnsIS(B, is_sum,
vDiag, PETSC_NULL, PETSC_NULL);
409 "Can not lock shared pointer");