| 455 | } // End setDataOnPatchHierarchy |
| 456 | |
| 457 | void |
| 458 | CFINSForcing::setDataOnPatchLevel(const int data_idx, |
| 459 | Pointer<Variable<NDIM>> var, |
| 460 | Pointer<PatchLevel<NDIM>> level, |
| 461 | const double data_time, |
| 462 | const bool initial_time) |
| 463 | { |
| 464 | if (initial_time) |
| 465 | { |
| 466 | // The integrators do not call setDataOnPatchHierarchy for the initial |
| 467 | // iteration. We need to allocate draw and scratch data here at the |
| 468 | // initial time. |
| 469 | if (!level->checkAllocated(d_C_scratch_idx)) level->allocatePatchData(d_C_scratch_idx); |
| 470 | if (d_conform_draw && !level->checkAllocated(d_conform_idx_draw)) level->allocatePatchData(d_conform_idx_draw); |
| 471 | if (d_stress_draw && !level->checkAllocated(d_stress_idx_draw)) level->allocatePatchData(d_stress_idx_draw); |
| 472 | if ((d_div_sig_idx_draw != IBTK::invalid_index) && !level->checkAllocated(d_div_sig_idx_draw)) |
| 473 | level->allocatePatchData(d_div_sig_idx_draw); |
| 474 | d_init_conds->setDataOnPatchLevel(d_C_scratch_idx, d_C_cc_var, level, data_time, initial_time); |
| 475 | } |
| 476 | for (PatchLevel<NDIM>::Iterator p(level); p; p++) |
| 477 | { |
| 478 | Pointer<Patch<NDIM>> patch = level->getPatch(p()); |
| 479 | setDataOnPatch(data_idx, var, patch, data_time, initial_time, level); |
| 480 | } |
| 481 | return; |
| 482 | } |
| 483 | |
| 484 | void |
| 485 | CFINSForcing::setDataOnPatch(const int data_idx, |
no test coverage detected