| 662 | } // ~AdvDiffConservativeMassScalarTransportRKIntegrator |
| 663 | |
| 664 | void |
| 665 | AdvDiffConservativeMassScalarTransportRKIntegrator::integrate(double dt) |
| 666 | { |
| 667 | // Get hierarchy operation object |
| 668 | HierarchyDataOpsManager<NDIM>* hier_ops_manager = HierarchyDataOpsManager<NDIM>::getManager(); |
| 669 | d_hier_cc_data_ops = |
| 670 | hier_ops_manager->getOperationsDouble(new CellVariable<NDIM, double>("cc_var"), d_hierarchy, true); |
| 671 | d_hier_fc_data_ops = |
| 672 | hier_ops_manager->getOperationsDouble(new FaceVariable<NDIM, double>("fc_var"), d_hierarchy, true); |
| 673 | |
| 674 | IBAMR_TIMER_START(t_integrate) |
| 675 | #if !defined(NDEBUG) |
| 676 | if (!d_is_initialized) |
| 677 | { |
| 678 | TBOX_ERROR("AdvDiffConservativeMassScalarTransportRKIntegrator::integrate():\n" |
| 679 | << " time integrator must be initialized prior to call to " |
| 680 | "integrate()\n"); |
| 681 | } |
| 682 | |
| 683 | TBOX_ASSERT(d_rho_current_idx >= 0); |
| 684 | TBOX_ASSERT(d_Q_cc_current_idx >= 0); |
| 685 | TBOX_ASSERT(d_Q_cc_new_idx >= 0); |
| 686 | TBOX_ASSERT(d_V_old_idx >= 0); |
| 687 | TBOX_ASSERT(d_V_current_idx >= 0); |
| 688 | TBOX_ASSERT(d_V_new_idx >= 0); |
| 689 | #endif |
| 690 | |
| 691 | #if !defined(NDEBUG) |
| 692 | TBOX_ASSERT(MathUtilities<double>::equalEps(dt, getTimeStepSize())); |
| 693 | #endif |
| 694 | |
| 695 | if (d_V_old_idx == d_V_current_idx) |
| 696 | { |
| 697 | #if !defined(NDEBUG) |
| 698 | TBOX_ASSERT(d_dt_prev <= 0.0); |
| 699 | #endif |
| 700 | // Ensure that previous time step is set for initial times |
| 701 | d_dt_prev = dt; |
| 702 | } |
| 703 | #if !defined(NDEBUG) |
| 704 | if (!(dt > 0.0)) |
| 705 | { |
| 706 | TBOX_ERROR("AdvDiffConservativeMassScalarTransportRKIntegrator::integrate():\n" |
| 707 | << " invalid time step size dt = " << dt << "\n"); |
| 708 | } |
| 709 | #endif |
| 710 | |
| 711 | // Assertions for velocity interpolation and extrapolation |
| 712 | #if !defined(NDEBUG) |
| 713 | if (d_cycle_num < 0) |
| 714 | { |
| 715 | TBOX_ERROR("AdvDiffConservativeMassScalarTransportRKIntegrator::integrate():\n" |
| 716 | << " invalid cycle number = " << d_cycle_num << "\n"); |
| 717 | } |
| 718 | if (d_dt_prev <= 0.0 && d_density_time_stepping_type != FORWARD_EULER) |
| 719 | { |
| 720 | TBOX_ERROR("AdvDiffConservativeMassScalarTransportRKIntegrator::integrate():\n" |
| 721 | << " invalid previous time step size = " << d_dt_prev << "\n"); |
no test coverage detected