MCPcopy Create free account
hub / github.com/IBAMR/IBAMR / midpointStep

Method midpointStep

src/IB/IBMethod.cpp:769–795  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

767} // backwardEulerStep
768
769void
770IBMethod::midpointStep(const double current_time, const double new_time)
771{
772 int ierr;
773 const int coarsest_ln = 0;
774 const int finest_ln = d_hierarchy->getFinestLevelNumber();
775 const double dt = new_time - current_time;
776 std::vector<Pointer<LData>>* U_data;
777 getVelocityData(&U_data, current_time + 0.5 * dt);
778 for (int ln = coarsest_ln; ln <= finest_ln; ++ln)
779 {
780 if (!d_l_data_manager->levelContainsLagrangianData(ln)) continue;
781 ierr = VecWAXPY(d_X_new_data[ln]->getVec(), dt, (*U_data)[ln]->getVec(), d_X_current_data[ln]->getVec());
782 IBTK_CHKERRQ(ierr);
783 }
784 d_X_new_needs_ghost_fill = true;
785
786 std::vector<Pointer<LData>>* X_half_data = nullptr;
787 bool* X_half_needs_ghost_fill = nullptr;
788 getPositionData(&X_half_data, &X_half_needs_ghost_fill, d_half_time);
789 TBOX_ASSERT(X_half_data);
790 reinitMidpointData(d_X_current_data, d_X_new_data, *X_half_data);
791 TBOX_ASSERT(X_half_needs_ghost_fill);
792 *X_half_needs_ghost_fill = true;
793
794 return;
795} // midpointStep
796
797void
798IBMethod::trapezoidalStep(const double current_time, const double new_time)

Callers 8

IBFunction_velocityMethod · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 3

getVecMethod · 0.80
getFinestLevelNumberMethod · 0.45

Tested by

no test coverage detected