| 118 | } // IBExplicitHierarchyIntegrator |
| 119 | |
| 120 | void |
| 121 | IBExplicitHierarchyIntegrator::preprocessIntegrateHierarchy(const double current_time, |
| 122 | const double new_time, |
| 123 | const int num_cycles) |
| 124 | { |
| 125 | // preprocess our dependencies... |
| 126 | IBHierarchyIntegrator::preprocessIntegrateHierarchy(current_time, new_time, num_cycles); |
| 127 | |
| 128 | // Compute the Lagrangian forces and spread them to the Eulerian grid. |
| 129 | switch (d_time_stepping_type) |
| 130 | { |
| 131 | case FORWARD_EULER: |
| 132 | case BACKWARD_EULER: |
| 133 | case TRAPEZOIDAL_RULE: |
| 134 | if (d_enable_logging) plog << d_object_name << "::preprocessIntegrateHierarchy(): computing Lagrangian force\n"; |
| 135 | d_ib_method_ops->computeLagrangianForce(current_time); |
| 136 | if (d_enable_logging) |
| 137 | plog << d_object_name |
| 138 | << "::preprocessIntegrateHierarchy(): spreading Lagrangian force " |
| 139 | "to the Eulerian grid\n"; |
| 140 | d_hier_velocity_data_ops->setToScalar(d_f_idx, 0.0); |
| 141 | d_u_phys_bdry_op->setPatchDataIndex(d_f_idx); |
| 142 | d_u_phys_bdry_op->setHomogeneousBc(true); |
| 143 | d_ib_method_ops->spreadForce( |
| 144 | d_f_idx, d_u_phys_bdry_op, getProlongRefineSchedules(d_object_name + "::f"), current_time); |
| 145 | d_u_phys_bdry_op->setHomogeneousBc(false); |
| 146 | if (d_f_current_idx != invalid_index) d_hier_velocity_data_ops->copyData(d_f_current_idx, d_f_idx); |
| 147 | break; |
| 148 | case MIDPOINT_RULE: |
| 149 | case BDF2: |
| 150 | // intentionally blank |
| 151 | break; |
| 152 | default: |
| 153 | TBOX_ERROR(d_object_name << "::preprocessIntegrateHierarchy():\n" |
| 154 | << " unsupported time stepping type: " |
| 155 | << enum_to_string<TimeSteppingType>(d_time_stepping_type) << "\n" |
| 156 | << " supported time stepping types are: FORWARD_EULER, BACKWARD_EULER, BDF2, " |
| 157 | "MIDPOINT_RULE, TRAPEZOIDAL_RULE\n"); |
| 158 | } |
| 159 | |
| 160 | // Compute an initial prediction of the updated positions of the Lagrangian |
| 161 | // structure. |
| 162 | // |
| 163 | // NOTE: The velocity should already have been interpolated to the |
| 164 | // curvilinear mesh and should not need to be re-interpolated. |
| 165 | if (d_use_structure_predictor && d_time_stepping_type != BDF2) |
| 166 | { |
| 167 | if (d_enable_logging) |
| 168 | plog << d_object_name << "::preprocessIntegrateHierarchy(): performing Lagrangian forward Euler step\n"; |
| 169 | d_ib_method_ops->forwardEulerStep(current_time, new_time); |
| 170 | } |
| 171 | |
| 172 | // Execute any registered callbacks. |
| 173 | executePreprocessIntegrateHierarchyCallbackFcns(current_time, new_time, num_cycles); |
| 174 | return; |
| 175 | } // preprocessIntegrateHierarchy |
| 176 | |
| 177 | void |
nothing calls this directly
no test coverage detected