| 504 | } // initializeLevelData |
| 505 | |
| 506 | void |
| 507 | CIBMethod::initializePatchHierarchy(Pointer<PatchHierarchy<NDIM>> hierarchy, |
| 508 | Pointer<GriddingAlgorithm<NDIM>> gridding_alg, |
| 509 | int u_data_idx, |
| 510 | const std::vector<Pointer<CoarsenSchedule<NDIM>>>& u_synch_scheds, |
| 511 | const std::vector<Pointer<RefineSchedule<NDIM>>>& u_ghost_fill_scheds, |
| 512 | int integrator_step, |
| 513 | double init_data_time, |
| 514 | bool initial_time) |
| 515 | { |
| 516 | // Initialize various Lagrangian data objects required by the conventional |
| 517 | // IB method. |
| 518 | IBMethod::initializePatchHierarchy(hierarchy, |
| 519 | gridding_alg, |
| 520 | u_data_idx, |
| 521 | u_synch_scheds, |
| 522 | u_ghost_fill_scheds, |
| 523 | integrator_step, |
| 524 | init_data_time, |
| 525 | initial_time); |
| 526 | |
| 527 | // Set structure index info. |
| 528 | const int struct_ln = getStructuresLevelNumber(); |
| 529 | std::vector<int> structIDs = d_l_data_manager->getLagrangianStructureIDs(struct_ln); |
| 530 | std::sort(structIDs.begin(), structIDs.end()); |
| 531 | const auto structs_on_this_ln = static_cast<unsigned>(structIDs.size()); |
| 532 | |
| 533 | for (unsigned struct_no = 0; struct_no < structs_on_this_ln; ++struct_no) |
| 534 | { |
| 535 | d_struct_lag_idx_range[struct_no] = |
| 536 | d_l_data_manager->getLagrangianStructureIndexRange(structIDs[struct_no], struct_ln); |
| 537 | } |
| 538 | |
| 539 | // Initialize Lagrangian and Eulerian lambda at initial time. |
| 540 | const int coarsest_ln = 0; |
| 541 | const int finest_ln = d_hierarchy->getFinestLevelNumber(); |
| 542 | if (initial_time) |
| 543 | { |
| 544 | // Initialize Lagrangian lambda. |
| 545 | setInitialLambda(finest_ln); |
| 546 | |
| 547 | // Initialize Eulerian lambda (S[lambda]) variable. |
| 548 | for (int ln = coarsest_ln; ln <= finest_ln; ++ln) |
| 549 | { |
| 550 | Pointer<PatchLevel<NDIM>> level = d_hierarchy->getPatchLevel(ln); |
| 551 | for (PatchLevel<NDIM>::Iterator p(level); p; p++) |
| 552 | { |
| 553 | Pointer<Patch<NDIM>> patch = level->getPatch(p()); |
| 554 | Pointer<CellData<NDIM, double>> lambda_data = patch->getPatchData(d_eul_lambda_idx); |
| 555 | lambda_data->fillAll(0.0); |
| 556 | } |
| 557 | } |
| 558 | } |
| 559 | |
| 560 | // Register plot quantities. |
| 561 | if (d_silo_writer) |
| 562 | { |
| 563 | for (int ln = coarsest_ln; ln <= finest_ln; ++ln) |
nothing calls this directly
no test coverage detected