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

Method forwardEulerStep

src/IB/IBMethod.cpp:713–739  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

711} // interpolateLinearizedVelocity
712
713void
714IBMethod::forwardEulerStep(const double current_time, const double new_time)
715{
716 int ierr;
717 const int coarsest_ln = 0;
718 const int finest_ln = d_hierarchy->getFinestLevelNumber();
719 const double dt = new_time - current_time;
720 std::vector<Pointer<LData>>* U_data;
721 getVelocityData(&U_data, current_time);
722 for (int ln = coarsest_ln; ln <= finest_ln; ++ln)
723 {
724 if (!d_l_data_manager->levelContainsLagrangianData(ln)) continue;
725 ierr = VecWAXPY(d_X_new_data[ln]->getVec(), dt, (*U_data)[ln]->getVec(), d_X_current_data[ln]->getVec());
726 IBTK_CHKERRQ(ierr);
727 }
728 d_X_new_needs_ghost_fill = true;
729
730 std::vector<Pointer<LData>>* X_half_data = nullptr;
731 bool* X_half_needs_ghost_fill = nullptr;
732 getPositionData(&X_half_data, &X_half_needs_ghost_fill, d_half_time);
733 TBOX_ASSERT(X_half_data);
734 reinitMidpointData(d_X_current_data, d_X_new_data, *X_half_data);
735 TBOX_ASSERT(X_half_needs_ghost_fill);
736 *X_half_needs_ghost_fill = true;
737
738 return;
739} // forwardEulerStep
740
741void
742IBMethod::backwardEulerStep(const double current_time, const double new_time)

Callers 7

mainFunction · 0.45
mainFunction · 0.45
mainFunction · 0.45

Calls 3

getVecMethod · 0.80
getFinestLevelNumberMethod · 0.45

Tested by

no test coverage detected