| 491 | } // computeLagrangianForce |
| 492 | |
| 493 | void |
| 494 | GeneralizedIBMethod::spreadForce(const int f_data_idx, |
| 495 | RobinPhysBdryPatchStrategy* f_phys_bdry_op, |
| 496 | const std::vector<Pointer<RefineSchedule<NDIM>>>& f_prolongation_scheds, |
| 497 | const double data_time) |
| 498 | { |
| 499 | IBMethod::spreadForce(f_data_idx, f_phys_bdry_op, f_prolongation_scheds, data_time); |
| 500 | |
| 501 | std::vector<Pointer<LData>>* N_data = nullptr; |
| 502 | bool* N_needs_ghost_fill = nullptr; |
| 503 | if (IBTK::rel_equal_eps(data_time, d_current_time)) |
| 504 | { |
| 505 | N_data = &d_N_current_data; |
| 506 | N_needs_ghost_fill = &d_N_current_needs_ghost_fill; |
| 507 | } |
| 508 | else if (IBTK::rel_equal_eps(data_time, d_half_time)) |
| 509 | { |
| 510 | TBOX_ERROR(d_object_name << "::spreadForce():\n" |
| 511 | << " time-stepping type MIDPOINT_RULE not supported by " |
| 512 | "class GeneralizedIBMethod;\n" |
| 513 | << " use TRAPEZOIDAL_RULE instead.\n"); |
| 514 | } |
| 515 | else if (IBTK::rel_equal_eps(data_time, d_new_time)) |
| 516 | { |
| 517 | N_data = &d_N_new_data; |
| 518 | N_needs_ghost_fill = &d_N_new_needs_ghost_fill; |
| 519 | } |
| 520 | TBOX_ASSERT(N_data); |
| 521 | TBOX_ASSERT(N_needs_ghost_fill); |
| 522 | |
| 523 | std::vector<Pointer<LData>>* X_LE_data; |
| 524 | bool* X_LE_needs_ghost_fill; |
| 525 | getLECouplingPositionData(&X_LE_data, &X_LE_needs_ghost_fill, data_time); |
| 526 | getVelocityHierarchyDataOps()->setToScalar(d_n_idx, 0.0, false); |
| 527 | d_l_data_manager->spread(d_n_idx, |
| 528 | *N_data, |
| 529 | *X_LE_data, |
| 530 | f_phys_bdry_op, |
| 531 | std::vector<Pointer<RefineSchedule<NDIM>>>(), |
| 532 | data_time, |
| 533 | *N_needs_ghost_fill, |
| 534 | *X_LE_needs_ghost_fill); |
| 535 | *N_needs_ghost_fill = false; |
| 536 | *X_LE_needs_ghost_fill = false; |
| 537 | const int coarsest_ln = 0; |
| 538 | const int finest_ln = d_hierarchy->getFinestLevelNumber(); |
| 539 | const std::vector<Pointer<RefineSchedule<NDIM>>>& n_ghostfill_scheds = |
| 540 | getGhostfillRefineSchedules(d_object_name + "::n"); |
| 541 | for (int ln = coarsest_ln; ln <= finest_ln; ++ln) |
| 542 | { |
| 543 | Pointer<PatchLevel<NDIM>> level = d_hierarchy->getPatchLevel(ln); |
| 544 | n_ghostfill_scheds[ln]->fillData(data_time); |
| 545 | } |
| 546 | Pointer<Variable<NDIM>> u_var = d_ib_solver->getVelocityVariable(); |
| 547 | Pointer<CellVariable<NDIM, double>> u_cc_var = u_var; |
| 548 | Pointer<SideVariable<NDIM, double>> u_sc_var = u_var; |
| 549 | if (u_cc_var) |
| 550 | { |
nothing calls this directly
no test coverage detected