| 319 | } // activateLagrangianStructures |
| 320 | |
| 321 | void |
| 322 | IBMethod::preprocessIntegrateData(double current_time, double new_time, int /*num_cycles*/) |
| 323 | { |
| 324 | d_current_time = current_time; |
| 325 | d_new_time = new_time; |
| 326 | d_half_time = current_time + 0.5 * (new_time - current_time); |
| 327 | |
| 328 | int ierr; |
| 329 | const int coarsest_ln = 0; |
| 330 | const int finest_ln = d_hierarchy->getFinestLevelNumber(); |
| 331 | const double start_time = d_ib_solver->getStartTime(); |
| 332 | const bool initial_time = IBTK::rel_equal_eps(current_time, start_time); |
| 333 | |
| 334 | if (d_ib_force_fcn) |
| 335 | { |
| 336 | if (d_ib_force_fcn_needs_init) |
| 337 | { |
| 338 | resetLagrangianForceFunction(current_time, initial_time); |
| 339 | d_ib_force_fcn_needs_init = false; |
| 340 | } |
| 341 | d_ib_force_fcn->setTimeInterval(current_time, new_time); |
| 342 | } |
| 343 | if (d_ib_source_fcn) |
| 344 | { |
| 345 | if (d_ib_source_fcn_needs_init) |
| 346 | { |
| 347 | resetLagrangianSourceFunction(current_time, initial_time); |
| 348 | d_ib_source_fcn_needs_init = false; |
| 349 | } |
| 350 | d_ib_source_fcn->setTimeInterval(current_time, new_time); |
| 351 | } |
| 352 | |
| 353 | // Look-up or allocate Lagangian data. |
| 354 | d_X_current_data.resize(finest_ln + 1); |
| 355 | d_X_new_data.resize(finest_ln + 1); |
| 356 | d_X_half_data.resize(finest_ln + 1); |
| 357 | d_X_jac_data.resize(finest_ln + 1); |
| 358 | d_U_current_data.resize(finest_ln + 1); |
| 359 | d_U_new_data.resize(finest_ln + 1); |
| 360 | d_U_half_data.resize(finest_ln + 1); |
| 361 | d_U_jac_data.resize(finest_ln + 1); |
| 362 | d_F_current_data.resize(finest_ln + 1); |
| 363 | d_F_new_data.resize(finest_ln + 1); |
| 364 | d_F_half_data.resize(finest_ln + 1); |
| 365 | d_F_jac_data.resize(finest_ln + 1); |
| 366 | if (d_use_fixed_coupling_ops) |
| 367 | { |
| 368 | d_X_LE_new_data.resize(finest_ln + 1); |
| 369 | d_X_LE_half_data.resize(finest_ln + 1); |
| 370 | } |
| 371 | for (int ln = coarsest_ln; ln <= finest_ln; ++ln) |
| 372 | { |
| 373 | if (!d_l_data_manager->levelContainsLagrangianData(ln)) continue; |
| 374 | d_X_current_data[ln] = d_l_data_manager->getLData(LDataManager::POSN_DATA_NAME, ln); |
| 375 | d_X_new_data[ln] = d_l_data_manager->createLData("X_new", ln, NDIM); |
| 376 | d_X_half_data[ln] = d_l_data_manager->createLData("X_half", ln, NDIM); |
| 377 | d_U_current_data[ln] = d_l_data_manager->getLData(LDataManager::VEL_DATA_NAME, ln); |
| 378 | d_U_new_data[ln] = d_l_data_manager->createLData("U_new", ln, NDIM); |
no test coverage detected