MCPcopy Create free account
hub / github.com/AMReX-Codes/amrex / InterpAddBox

Method InterpAddBox

Src/Amr/AMReX_StateData.cpp:590–662  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

588}
589
590void
591StateData::InterpAddBox (MultiFabCopyDescriptor& multiFabCopyDesc,
592 Vector<MultiFabId>& mfid,
593 BoxList* unfillableBoxes,
594 Vector<FillBoxId>& returnedFillBoxIds,
595 const Box& subbox,
596 Real time,
597 int src_comp,
598 int dest_comp,
599 int num_comp,
600 bool extrap)
601{
602 if (desc->timeType() == StateDescriptor::Point)
603 {
604 if (old_data == nullptr)
605 {
606 returnedFillBoxIds.resize(1);
607 returnedFillBoxIds[0] = multiFabCopyDesc.AddBox(mfid[MFNEWDATA],
608 subbox,
609 unfillableBoxes,
610 src_comp,
611 dest_comp,
612 num_comp);
613 }
614 else
615 {
616 amrex::InterpAddBox(multiFabCopyDesc,
617 unfillableBoxes,
618 returnedFillBoxIds,
619 subbox,
620 mfid[MFOLDDATA],
621 mfid[MFNEWDATA],
622 old_time.start,
623 new_time.start,
624 time,
625 src_comp,
626 dest_comp,
627 num_comp,
628 extrap);
629 }
630 }
631 else
632 {
633 const Real teps = (new_time.start - old_time.start)*1.e-3_rt;
634
635 if (time > new_time.start-teps && time < new_time.stop+teps)
636 {
637 returnedFillBoxIds.resize(1);
638 returnedFillBoxIds[0] = multiFabCopyDesc.AddBox(mfid[MFNEWDATA],
639 subbox,
640 unfillableBoxes,
641 src_comp,
642 dest_comp,
643 num_comp);
644 }
645 else if (old_data != nullptr &&
646 time > old_time.start-teps &&
647 time < old_time.stop+teps)

Callers 1

InitializeMethod · 0.80

Calls 4

InterpAddBoxFunction · 0.85
timeTypeMethod · 0.80
AddBoxMethod · 0.80
resizeMethod · 0.45

Tested by

no test coverage detected