|
|
|
@@ -299,28 +299,6 @@ bssn_class::bssn_class(double Couranti, double StartTimei, double TotalTimei,
|
|
|
|
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
|
|
|
|
MPI_Comm_size(MPI_COMM_WORLD, &nprocs);
|
|
|
|
MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
|
|
|
|
MPI_Comm_rank(MPI_COMM_WORLD, &myrank);
|
|
|
|
|
|
|
|
|
|
|
|
// Derived classes override Initialize(), so ownership-sensitive members must
|
|
|
|
|
|
|
|
// be in a known state before any specialized setup path runs.
|
|
|
|
|
|
|
|
GH = 0;
|
|
|
|
|
|
|
|
SH = 0;
|
|
|
|
|
|
|
|
PhysTime = 0.0;
|
|
|
|
|
|
|
|
BH_num = 0;
|
|
|
|
|
|
|
|
BH_num_input = 0;
|
|
|
|
|
|
|
|
Porg0 = 0;
|
|
|
|
|
|
|
|
Porgbr = 0;
|
|
|
|
|
|
|
|
Porg = 0;
|
|
|
|
|
|
|
|
Porg1 = 0;
|
|
|
|
|
|
|
|
Porg_rhs = 0;
|
|
|
|
|
|
|
|
Mass = 0;
|
|
|
|
|
|
|
|
Pmom = 0;
|
|
|
|
|
|
|
|
Spin = 0;
|
|
|
|
|
|
|
|
sync_cache_pre = 0;
|
|
|
|
|
|
|
|
sync_cache_cor = 0;
|
|
|
|
|
|
|
|
sync_cache_rp_coarse = 0;
|
|
|
|
|
|
|
|
sync_cache_rp_fine = 0;
|
|
|
|
|
|
|
|
sync_cache_restrict = 0;
|
|
|
|
|
|
|
|
sync_cache_outbd = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// setup Monitors
|
|
|
|
// setup Monitors
|
|
|
|
{
|
|
|
|
{
|
|
|
|
stringstream a_stream;
|
|
|
|
stringstream a_stream;
|
|
|
|
@@ -1008,7 +986,13 @@ void bssn_class::Initialize()
|
|
|
|
Setup_Black_Hole_position();
|
|
|
|
Setup_Black_Hole_position();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
setup_transfer_caches();
|
|
|
|
// Initialize sync caches (per-level, for predictor and corrector)
|
|
|
|
|
|
|
|
sync_cache_pre = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_cor = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_rp_coarse = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_rp_fine = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_restrict = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_outbd = new Parallel::SyncCache[GH->levels];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//================================================================================================
|
|
|
|
//================================================================================================
|
|
|
|
@@ -1263,7 +1247,30 @@ bssn_class::~bssn_class()
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
// Destroy sync caches before GH
|
|
|
|
// Destroy sync caches before GH
|
|
|
|
destroy_transfer_caches();
|
|
|
|
if (sync_cache_pre)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_pre[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_pre;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sync_cache_cor)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_cor[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_cor;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sync_cache_rp_coarse)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_rp_coarse[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_rp_coarse;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sync_cache_rp_fine)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_rp_fine[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_rp_fine;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
delete GH;
|
|
|
|
delete GH;
|
|
|
|
#ifdef WithShell
|
|
|
|
#ifdef WithShell
|
|
|
|
@@ -2482,7 +2489,7 @@ void bssn_class::Evolve(int Steps)
|
|
|
|
GH->Regrid(Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
GH->Regrid(Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
fgt(PhysTime - dT_mon, StartTime, dT_mon / 2), ErrorMonitor);
|
|
|
|
fgt(PhysTime - dT_mon, StartTime, dT_mon / 2), ErrorMonitor);
|
|
|
|
invalidate_transfer_caches();
|
|
|
|
for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); }
|
|
|
|
STEP_TIMER_ADD(TB_REGRID, timer_regrid);
|
|
|
|
STEP_TIMER_ADD(TB_REGRID, timer_regrid);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
@@ -2723,7 +2730,7 @@ void bssn_class::RecursiveStep(int lev)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (ConstraintRefreshLevels)
|
|
|
|
if (ConstraintRefreshLevels)
|
|
|
|
ConstraintRefreshLevels[lev] = 1;
|
|
|
|
ConstraintRefreshLevels[lev] = 1;
|
|
|
|
invalidate_transfer_caches();
|
|
|
|
for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
STEP_TIMER_ADD(TB_REGRID, timer_regrid_onelevel);
|
|
|
|
STEP_TIMER_ADD(TB_REGRID, timer_regrid_onelevel);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@@ -2904,7 +2911,7 @@ void bssn_class::ParallelStep()
|
|
|
|
if (GH->Regrid_Onelevel(GH->mylev, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
if (GH->Regrid_Onelevel(GH->mylev, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
fgt(PhysTime - dT_lev, StartTime, dT_lev / 2), ErrorMonitor))
|
|
|
|
fgt(PhysTime - dT_lev, StartTime, dT_lev / 2), ErrorMonitor))
|
|
|
|
invalidate_transfer_caches();
|
|
|
|
for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); }
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -3068,10 +3075,10 @@ void bssn_class::ParallelStep()
|
|
|
|
if (lev + 1 >= GH->movls)
|
|
|
|
if (lev + 1 >= GH->movls)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
// GH->Regrid_Onelevel_aux(lev,Symmetry,BH_num,Porgbr,Porg0,
|
|
|
|
// GH->Regrid_Onelevel_aux(lev,Symmetry,BH_num,Porgbr,Porg0,
|
|
|
|
if (GH->Regrid_Onelevel(lev + 1, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
if (GH->Regrid_Onelevel(lev + 1, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
fgt(PhysTime - dT_levp1, StartTime, dT_levp1 / 2), ErrorMonitor))
|
|
|
|
fgt(PhysTime - dT_levp1, StartTime, dT_levp1 / 2), ErrorMonitor))
|
|
|
|
invalidate_transfer_caches();
|
|
|
|
for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); }
|
|
|
|
|
|
|
|
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.str("");
|
|
|
|
// a_stream.str("");
|
|
|
|
@@ -3086,7 +3093,7 @@ void bssn_class::ParallelStep()
|
|
|
|
if (GH->Regrid_Onelevel(lev, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
if (GH->Regrid_Onelevel(lev, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
fgt(PhysTime - dT_lev, StartTime, dT_lev / 2), ErrorMonitor))
|
|
|
|
fgt(PhysTime - dT_lev, StartTime, dT_lev / 2), ErrorMonitor))
|
|
|
|
invalidate_transfer_caches();
|
|
|
|
for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); }
|
|
|
|
|
|
|
|
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.str("");
|
|
|
|
// a_stream.str("");
|
|
|
|
@@ -3105,7 +3112,7 @@ void bssn_class::ParallelStep()
|
|
|
|
if (GH->Regrid_Onelevel(lev - 1, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
if (GH->Regrid_Onelevel(lev - 1, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
fgt(PhysTime - dT_lev, StartTime, dT_levm1 / 2), ErrorMonitor))
|
|
|
|
fgt(PhysTime - dT_lev, StartTime, dT_levm1 / 2), ErrorMonitor))
|
|
|
|
invalidate_transfer_caches();
|
|
|
|
for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); }
|
|
|
|
|
|
|
|
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.str("");
|
|
|
|
// a_stream.str("");
|
|
|
|
@@ -3121,7 +3128,7 @@ void bssn_class::ParallelStep()
|
|
|
|
if (GH->Regrid_Onelevel(lev - 1, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
if (GH->Regrid_Onelevel(lev - 1, Symmetry, BH_num, Porgbr, Porg0,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
SynchList_cor, OldStateList, StateList, SynchList_pre,
|
|
|
|
fgt(PhysTime - dT_lev, StartTime, dT_levm1 / 2), ErrorMonitor))
|
|
|
|
fgt(PhysTime - dT_lev, StartTime, dT_levm1 / 2), ErrorMonitor))
|
|
|
|
invalidate_transfer_caches();
|
|
|
|
for (int il = 0; il < GH->levels; il++) { sync_cache_pre[il].invalidate(); sync_cache_cor[il].invalidate(); sync_cache_rp_coarse[il].invalidate(); sync_cache_rp_fine[il].invalidate(); sync_cache_restrict[il].invalidate(); sync_cache_outbd[il].invalidate(); }
|
|
|
|
|
|
|
|
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.str("");
|
|
|
|
// a_stream.str("");
|
|
|
|
@@ -3652,7 +3659,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
|
|
|
|
|
|
|
|
STEP_TIMER_DECL(timer_predictor_sync);
|
|
|
|
STEP_TIMER_DECL(timer_predictor_sync);
|
|
|
|
Parallel::AsyncSyncState async_pre;
|
|
|
|
Parallel::AsyncSyncState async_pre;
|
|
|
|
sync_predictor_start(lev, SynchList_pre, async_pre);
|
|
|
|
Parallel::Sync_start(GH->PatL[lev], SynchList_pre, Symmetry, sync_cache_pre[lev], async_pre);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WithShell
|
|
|
|
#ifdef WithShell
|
|
|
|
if (lev == 0)
|
|
|
|
if (lev == 0)
|
|
|
|
@@ -3671,7 +3678,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
sync_predictor_finish(lev, async_pre, SynchList_pre);
|
|
|
|
Parallel::Sync_finish(sync_cache_pre[lev], async_pre, SynchList_pre, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WithShell
|
|
|
|
#ifdef WithShell
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
@@ -4017,7 +4024,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
|
|
|
|
|
|
|
|
STEP_TIMER_DECL(timer_corrector_sync);
|
|
|
|
STEP_TIMER_DECL(timer_corrector_sync);
|
|
|
|
Parallel::AsyncSyncState async_cor;
|
|
|
|
Parallel::AsyncSyncState async_cor;
|
|
|
|
sync_corrector_start(lev, SynchList_cor, async_cor);
|
|
|
|
Parallel::Sync_start(GH->PatL[lev], SynchList_cor, Symmetry, sync_cache_cor[lev], async_cor);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WithShell
|
|
|
|
#ifdef WithShell
|
|
|
|
if (lev == 0)
|
|
|
|
if (lev == 0)
|
|
|
|
@@ -4036,7 +4043,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
sync_corrector_finish(lev, async_cor, SynchList_cor);
|
|
|
|
Parallel::Sync_finish(sync_cache_cor[lev], async_cor, SynchList_cor, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WithShell
|
|
|
|
#ifdef WithShell
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
@@ -4525,7 +4532,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::AsyncSyncState async_pre;
|
|
|
|
Parallel::AsyncSyncState async_pre;
|
|
|
|
sync_predictor_start(lev, SynchList_pre, async_pre);
|
|
|
|
Parallel::Sync_start(GH->PatL[lev], SynchList_pre, Symmetry, sync_cache_pre[lev], async_pre);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WithShell
|
|
|
|
#ifdef WithShell
|
|
|
|
if (lev == 0)
|
|
|
|
if (lev == 0)
|
|
|
|
@@ -4544,7 +4551,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
sync_predictor_finish(lev, async_pre, SynchList_pre);
|
|
|
|
Parallel::Sync_finish(sync_cache_pre[lev], async_pre, SynchList_pre, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WithShell
|
|
|
|
#ifdef WithShell
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
@@ -4873,7 +4880,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::AsyncSyncState async_cor;
|
|
|
|
Parallel::AsyncSyncState async_cor;
|
|
|
|
sync_corrector_start(lev, SynchList_cor, async_cor);
|
|
|
|
Parallel::Sync_start(GH->PatL[lev], SynchList_cor, Symmetry, sync_cache_cor[lev], async_cor);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WithShell
|
|
|
|
#ifdef WithShell
|
|
|
|
if (lev == 0)
|
|
|
|
if (lev == 0)
|
|
|
|
@@ -4892,7 +4899,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
sync_corrector_finish(lev, async_cor, SynchList_cor);
|
|
|
|
Parallel::Sync_finish(sync_cache_cor[lev], async_cor, SynchList_cor, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef WithShell
|
|
|
|
#ifdef WithShell
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
@@ -5284,7 +5291,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
|
|
|
|
|
|
|
|
// misc::tillherecheck(GH->Commlev[lev],GH->start_rank[lev],"before Predictor sync");
|
|
|
|
// misc::tillherecheck(GH->Commlev[lev],GH->start_rank[lev],"before Predictor sync");
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev, SynchList_pre, sync_cache_pre);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev], SynchList_pre, Symmetry, sync_cache_pre[lev]);
|
|
|
|
|
|
|
|
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
// Complete non-blocking error reduction and check
|
|
|
|
MPI_Wait(&err_req, MPI_STATUS_IGNORE);
|
|
|
|
MPI_Wait(&err_req, MPI_STATUS_IGNORE);
|
|
|
|
@@ -5485,7 +5492,7 @@ void bssn_class::Step(int lev, int YN)
|
|
|
|
|
|
|
|
|
|
|
|
// misc::tillherecheck(GH->Commlev[lev],GH->start_rank[lev],"before Corrector sync");
|
|
|
|
// misc::tillherecheck(GH->Commlev[lev],GH->start_rank[lev],"before Corrector sync");
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev, SynchList_cor, sync_cache_cor);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev], SynchList_cor, Symmetry, sync_cache_cor[lev]);
|
|
|
|
|
|
|
|
|
|
|
|
// misc::tillherecheck(GH->Commlev[lev],GH->start_rank[lev],"after Corrector sync");
|
|
|
|
// misc::tillherecheck(GH->Commlev[lev],GH->start_rank[lev],"after Corrector sync");
|
|
|
|
|
|
|
|
|
|
|
|
@@ -6074,92 +6081,6 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB,
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// SynchList_cor old -----------
|
|
|
|
// SynchList_cor old -----------
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if (ABEtype == 1)
|
|
|
|
|
|
|
|
#if (PSTR == 1 || PSTR == 2)
|
|
|
|
|
|
|
|
// stringstream a_stream;
|
|
|
|
|
|
|
|
// a_stream.setf(ios::left);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (lev > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MyList<Patch> *Pp, *Ppc;
|
|
|
|
|
|
|
|
if (lev > trfls && YN == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pp = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (BB)
|
|
|
|
|
|
|
|
Parallel::prepare_inter_time_level(Pp->data, SL, OL, corL,
|
|
|
|
|
|
|
|
SynchList_pre, 0);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Parallel::prepare_inter_time_level(Pp->data, SL, OL,
|
|
|
|
|
|
|
|
SynchList_pre, 0);
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, Symmetry);
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, GH->rsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev - 1], SynchList_pre, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Ppc = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Ppc)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pp = GH->PatL[lev];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi(Ppc->data, Pp->data, SynchList_pre, SL, Symmetry);
|
|
|
|
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Himix(Ppc->data, Pp->data, SynchList_pre, SL, Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Ppc = Ppc->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SL, GH->bdsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry);
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, GH->rsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev - 1], SL, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Ppc = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Ppc)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pp = GH->PatL[lev];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi(Ppc->data, Pp->data, SL, SL, Symmetry);
|
|
|
|
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Himix(Ppc->data, Pp->data, SL, SL, Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Ppc = Ppc->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, GH->bdsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev], SL, Symmetry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
STEP_TIMER_DECL(timer_restrict_prolong);
|
|
|
|
STEP_TIMER_DECL(timer_restrict_prolong);
|
|
|
|
#if (PSTR == 1 || PSTR == 2)
|
|
|
|
#if (PSTR == 1 || PSTR == 2)
|
|
|
|
// stringstream a_stream;
|
|
|
|
// stringstream a_stream;
|
|
|
|
@@ -6202,7 +6123,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB,
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
restrict_evolution(lev, SL, SynchList_pre);
|
|
|
|
Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, Symmetry, sync_cache_restrict[lev]);
|
|
|
|
#elif (RPB == 1)
|
|
|
|
#elif (RPB == 1)
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SL,SynchList_pre,Symmetry);
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SL,SynchList_pre,Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, GH->rsul[lev], Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, GH->rsul[lev], Symmetry);
|
|
|
|
@@ -6215,7 +6136,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB,
|
|
|
|
// misc::tillherecheck(GH->Commlev[GH->mylev],GH->start_rank[GH->mylev],a_stream.str());
|
|
|
|
// misc::tillherecheck(GH->Commlev[GH->mylev],GH->start_rank[GH->mylev],a_stream.str());
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev - 1, SynchList_pre, sync_cache_rp_coarse);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev - 1], SynchList_pre, Symmetry, sync_cache_rp_coarse[lev]);
|
|
|
|
|
|
|
|
|
|
|
|
#if (PSTR == 1 || PSTR == 2)
|
|
|
|
#if (PSTR == 1 || PSTR == 2)
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.clear();
|
|
|
|
@@ -6226,7 +6147,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB,
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
outbdlow2hi_evolution(lev, SynchList_pre, SL);
|
|
|
|
Parallel::OutBdLow2Hi_cached(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SL, Symmetry, sync_cache_outbd[lev]);
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SL, Symmetry);
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SL, Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@@ -6253,7 +6174,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB,
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
restrict_evolution(lev, SL, SL);
|
|
|
|
Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry, sync_cache_restrict[lev]);
|
|
|
|
#elif (RPB == 1)
|
|
|
|
#elif (RPB == 1)
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SL,SL,Symmetry);
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SL,SL,Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, GH->rsul[lev], Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, GH->rsul[lev], Symmetry);
|
|
|
|
@@ -6266,7 +6187,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB,
|
|
|
|
// misc::tillherecheck(GH->Commlev[GH->mylev],GH->start_rank[GH->mylev],a_stream.str());
|
|
|
|
// misc::tillherecheck(GH->Commlev[GH->mylev],GH->start_rank[GH->mylev],a_stream.str());
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev - 1, SL, sync_cache_rp_coarse);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev - 1], SL, Symmetry, sync_cache_rp_coarse[lev]);
|
|
|
|
|
|
|
|
|
|
|
|
#if (PSTR == 1 || PSTR == 2)
|
|
|
|
#if (PSTR == 1 || PSTR == 2)
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.clear();
|
|
|
|
@@ -6277,7 +6198,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB,
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
outbdlow2hi_evolution(lev, SL, SL);
|
|
|
|
Parallel::OutBdLow2Hi_cached(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry, sync_cache_outbd[lev]);
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry);
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@@ -6294,7 +6215,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB,
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev, SL, sync_cache_rp_fine);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev], SL, Symmetry, sync_cache_rp_fine[lev]);
|
|
|
|
|
|
|
|
|
|
|
|
#if (PSTR == 1 || PSTR == 2)
|
|
|
|
#if (PSTR == 1 || PSTR == 2)
|
|
|
|
// a_stream.clear();
|
|
|
|
// a_stream.clear();
|
|
|
|
@@ -6323,91 +6244,6 @@ void bssn_class::RestrictProlong_aux(int lev, int YN, bool BB,
|
|
|
|
//
|
|
|
|
//
|
|
|
|
// SynchList_cor old -----------
|
|
|
|
// SynchList_cor old -----------
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if (ABEtype == 1)
|
|
|
|
|
|
|
|
if (lev >= GH->levels - 1)
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
lev = lev + 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (lev > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MyList<Patch> *Pp, *Ppc;
|
|
|
|
|
|
|
|
if (lev > trfls && YN == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pp = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (BB)
|
|
|
|
|
|
|
|
Parallel::prepare_inter_time_level(Pp->data, SL, OL, corL,
|
|
|
|
|
|
|
|
SynchList_pre, 0);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Parallel::prepare_inter_time_level(Pp->data, SL, OL,
|
|
|
|
|
|
|
|
SynchList_pre, 0);
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, Symmetry);
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, GH->rsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev - 1], SynchList_pre, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Ppc = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Ppc)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pp = GH->PatL[lev];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi(Ppc->data, Pp->data, SynchList_pre, SL, Symmetry);
|
|
|
|
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Himix(Ppc->data, Pp->data, SynchList_pre, SL, Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Ppc = Ppc->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SL, GH->bdsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry);
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, GH->rsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev - 1], SL, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Ppc = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Ppc)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pp = GH->PatL[lev];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi(Ppc->data, Pp->data, SL, SL, Symmetry);
|
|
|
|
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Himix(Ppc->data, Pp->data, SL, SL, Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Ppc = Ppc->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, GH->bdsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev], SL, Symmetry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
STEP_TIMER_DECL(timer_restrict_prolong);
|
|
|
|
STEP_TIMER_DECL(timer_restrict_prolong);
|
|
|
|
// misc::tillherecheck(GH->Commlev[lev],GH->start_rank[lev],"starting RestrictProlong_aux");
|
|
|
|
// misc::tillherecheck(GH->Commlev[lev],GH->start_rank[lev],"starting RestrictProlong_aux");
|
|
|
|
|
|
|
|
|
|
|
|
@@ -6433,17 +6269,17 @@ void bssn_class::RestrictProlong_aux(int lev, int YN, bool BB,
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
restrict_evolution(lev, SL, SynchList_pre);
|
|
|
|
Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, Symmetry, sync_cache_restrict[lev]);
|
|
|
|
#elif (RPB == 1)
|
|
|
|
#elif (RPB == 1)
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SL,SynchList_pre,Symmetry);
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SL,SynchList_pre,Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, GH->rsul[lev], Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SynchList_pre, GH->rsul[lev], Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev - 1, SynchList_pre, sync_cache_rp_coarse);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev - 1], SynchList_pre, Symmetry, sync_cache_rp_coarse[lev]);
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
outbdlow2hi_evolution(lev, SynchList_pre, SL);
|
|
|
|
Parallel::OutBdLow2Hi_cached(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SL, Symmetry, sync_cache_outbd[lev]);
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SL, Symmetry);
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SL, Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@@ -6455,17 +6291,17 @@ void bssn_class::RestrictProlong_aux(int lev, int YN, bool BB,
|
|
|
|
else // no time refinement levels and for all same time levels
|
|
|
|
else // no time refinement levels and for all same time levels
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
restrict_evolution(lev, SL, SL);
|
|
|
|
Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry, sync_cache_restrict[lev]);
|
|
|
|
#elif (RPB == 1)
|
|
|
|
#elif (RPB == 1)
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SL,SL,Symmetry);
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SL,SL,Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, GH->rsul[lev], Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, GH->rsul[lev], Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev - 1, SL, sync_cache_rp_coarse);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev - 1], SL, Symmetry, sync_cache_rp_coarse[lev]);
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
outbdlow2hi_evolution(lev, SL, SL);
|
|
|
|
Parallel::OutBdLow2Hi_cached(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry, sync_cache_outbd[lev]);
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry);
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SL, SL, Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@@ -6475,11 +6311,7 @@ void bssn_class::RestrictProlong_aux(int lev, int YN, bool BB,
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if (ABEtype == 1)
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev], SL, Symmetry, sync_cache_rp_fine[lev]);
|
|
|
|
Parallel::Sync(GH->PatL[lev], SL, Symmetry);
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
sync_evolution(lev, SL, sync_cache_rp_fine);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
STEP_TIMER_ADD(TB_RESTRICT_PROLONG, timer_restrict_prolong);
|
|
|
|
STEP_TIMER_ADD(TB_RESTRICT_PROLONG, timer_restrict_prolong);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -6492,93 +6324,8 @@ void bssn_class::RestrictProlong_aux(int lev, int YN, bool BB,
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::RestrictProlong(int lev, int YN, bool BB)
|
|
|
|
void bssn_class::RestrictProlong(int lev, int YN, bool BB)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
double dT_lev = dT * pow(0.5, Mymax(lev, trfls));
|
|
|
|
|
|
|
|
#if (ABEtype == 1)
|
|
|
|
|
|
|
|
if (lev > 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MyList<Patch> *Pp, *Ppc;
|
|
|
|
|
|
|
|
if (lev > trfls && YN == 0)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (myrank == 0)
|
|
|
|
|
|
|
|
cout << "/=: " << GH->Lt[lev - 1] << "," << GH->Lt[lev] + dT_lev << endl;
|
|
|
|
|
|
|
|
Pp = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (BB)
|
|
|
|
|
|
|
|
Parallel::prepare_inter_time_level(Pp->data, StateList, OldStateList, SynchList_cor,
|
|
|
|
|
|
|
|
SynchList_pre, 0);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Parallel::prepare_inter_time_level(Pp->data, StateList, OldStateList,
|
|
|
|
|
|
|
|
SynchList_pre, 0);
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, SynchList_pre, Symmetry);
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, SynchList_pre, GH->rsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev - 1], SynchList_pre, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Ppc = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Ppc)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pp = GH->PatL[lev];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi(Ppc->data, Pp->data, SynchList_pre, SynchList_cor, Symmetry);
|
|
|
|
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Himix(Ppc->data, Pp->data, SynchList_pre, SynchList_cor, Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Ppc = Ppc->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SynchList_cor, GH->bdsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (myrank == 0)
|
|
|
|
|
|
|
|
cout << "===: " << GH->Lt[lev - 1] << "," << GH->Lt[lev] + dT_lev << endl;
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, Symmetry);
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, GH->rsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev - 1], StateList, Symmetry);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
|
|
|
|
Ppc = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Ppc)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Pp = GH->PatL[lev];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi(Ppc->data, Pp->data, StateList, SynchList_cor, Symmetry);
|
|
|
|
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Himix(Ppc->data, Pp->data, StateList, SynchList_cor, Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Ppc = Ppc->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#elif (RPB == 1)
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi_bam(GH->PatL[lev - 1], GH->PatL[lev], StateList, SynchList_cor, GH->bdsul[lev], Symmetry);
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev], SynchList_cor, Symmetry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
STEP_TIMER_DECL(timer_restrict_prolong);
|
|
|
|
STEP_TIMER_DECL(timer_restrict_prolong);
|
|
|
|
|
|
|
|
double dT_lev = dT * pow(0.5, Mymax(lev, trfls));
|
|
|
|
// we assume for fine
|
|
|
|
// we assume for fine
|
|
|
|
// SynchList_cor 1 -----------
|
|
|
|
// SynchList_cor 1 -----------
|
|
|
|
//
|
|
|
|
//
|
|
|
|
@@ -6611,17 +6358,17 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
restrict_evolution(lev, SynchList_cor, SynchList_pre);
|
|
|
|
Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, SynchList_pre, Symmetry, sync_cache_restrict[lev]);
|
|
|
|
#elif (RPB == 1)
|
|
|
|
#elif (RPB == 1)
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SynchList_cor,SynchList_pre,Symmetry);
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SynchList_cor,SynchList_pre,Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, SynchList_pre, GH->rsul[lev], Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, SynchList_pre, GH->rsul[lev], Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev - 1, SynchList_pre, sync_cache_rp_coarse);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev - 1], SynchList_pre, Symmetry, sync_cache_rp_coarse[lev]);
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
outbdlow2hi_evolution(lev, SynchList_pre, SynchList_cor);
|
|
|
|
Parallel::OutBdLow2Hi_cached(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SynchList_cor, Symmetry, sync_cache_outbd[lev]);
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SynchList_cor, Symmetry);
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SynchList_cor, Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@@ -6635,17 +6382,17 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB)
|
|
|
|
if (myrank == 0)
|
|
|
|
if (myrank == 0)
|
|
|
|
cout << "===: " << GH->Lt[lev - 1] << "," << GH->Lt[lev] + dT_lev << endl;
|
|
|
|
cout << "===: " << GH->Lt[lev - 1] << "," << GH->Lt[lev] + dT_lev << endl;
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
restrict_evolution(lev, SynchList_cor, StateList);
|
|
|
|
Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, Symmetry, sync_cache_restrict[lev]);
|
|
|
|
#elif (RPB == 1)
|
|
|
|
#elif (RPB == 1)
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SynchList_cor,StateList,Symmetry);
|
|
|
|
// Parallel::Restrict_bam(GH->PatL[lev-1],GH->PatL[lev],SynchList_cor,StateList,Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, GH->rsul[lev], Symmetry);
|
|
|
|
Parallel::Restrict_bam(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, GH->rsul[lev], Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev - 1, StateList, sync_cache_rp_coarse);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev - 1], StateList, Symmetry, sync_cache_rp_coarse[lev]);
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
outbdlow2hi_evolution(lev, StateList, SynchList_cor);
|
|
|
|
Parallel::OutBdLow2Hi_cached(GH->PatL[lev - 1], GH->PatL[lev], StateList, SynchList_cor, Symmetry, sync_cache_outbd[lev]);
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], StateList, SynchList_cor, Symmetry);
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], StateList, SynchList_cor, Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@@ -6655,7 +6402,7 @@ void bssn_class::RestrictProlong(int lev, int YN, bool BB)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev, SynchList_cor, sync_cache_rp_fine);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev], SynchList_cor, Symmetry, sync_cache_rp_fine[lev]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
STEP_TIMER_ADD(TB_RESTRICT_PROLONG, timer_restrict_prolong);
|
|
|
|
STEP_TIMER_ADD(TB_RESTRICT_PROLONG, timer_restrict_prolong);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@@ -6687,7 +6434,7 @@ void bssn_class::ProlongRestrict(int lev, int YN, bool BB)
|
|
|
|
|
|
|
|
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
outbdlow2hi_evolution(lev, SynchList_pre, SynchList_cor);
|
|
|
|
Parallel::OutBdLow2Hi_cached(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SynchList_cor, Symmetry, sync_cache_outbd[lev]);
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SynchList_cor, Symmetry);
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], SynchList_pre, SynchList_cor, Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@@ -6700,7 +6447,7 @@ void bssn_class::ProlongRestrict(int lev, int YN, bool BB)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (RPB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
#if (MIXOUTB == 0)
|
|
|
|
outbdlow2hi_evolution(lev, StateList, SynchList_cor);
|
|
|
|
Parallel::OutBdLow2Hi_cached(GH->PatL[lev - 1], GH->PatL[lev], StateList, SynchList_cor, Symmetry, sync_cache_outbd[lev]);
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
#elif (MIXOUTB == 1)
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], StateList, SynchList_cor, Symmetry);
|
|
|
|
Parallel::OutBdLow2Himix(GH->PatL[lev - 1], GH->PatL[lev], StateList, SynchList_cor, Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
@@ -6719,10 +6466,10 @@ void bssn_class::ProlongRestrict(int lev, int YN, bool BB)
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
Parallel::Restrict_after(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, Symmetry);
|
|
|
|
Parallel::Restrict_after(GH->PatL[lev - 1], GH->PatL[lev], SynchList_cor, StateList, Symmetry);
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
sync_evolution(lev - 1, StateList, sync_cache_rp_coarse);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev - 1], StateList, Symmetry, sync_cache_rp_coarse[lev]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
sync_evolution(lev, SynchList_cor, sync_cache_rp_fine);
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev], SynchList_cor, Symmetry, sync_cache_rp_fine[lev]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
#undef MIXOUTB
|
|
|
|
#undef MIXOUTB
|
|
|
|
@@ -7452,169 +7199,6 @@ void bssn_class::compute_Porg_rhs(double **BH_PS, double **BH_RHS, var *forx, va
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool bssn_class::use_transfer_cache() const
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
#if BSSN_USE_TRANSFER_CACHE
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
#else
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::setup_transfer_caches()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
sync_cache_pre = 0;
|
|
|
|
|
|
|
|
sync_cache_cor = 0;
|
|
|
|
|
|
|
|
sync_cache_rp_coarse = 0;
|
|
|
|
|
|
|
|
sync_cache_rp_fine = 0;
|
|
|
|
|
|
|
|
sync_cache_restrict = 0;
|
|
|
|
|
|
|
|
sync_cache_outbd = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!use_transfer_cache() || !GH)
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sync_cache_pre = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_cor = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_rp_coarse = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_rp_fine = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_restrict = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
sync_cache_outbd = new Parallel::SyncCache[GH->levels];
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::invalidate_transfer_caches()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (!use_transfer_cache() || !GH || !sync_cache_pre || !sync_cache_cor ||
|
|
|
|
|
|
|
|
!sync_cache_rp_coarse || !sync_cache_rp_fine || !sync_cache_restrict || !sync_cache_outbd)
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (int il = 0; il < GH->levels; il++)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
sync_cache_pre[il].invalidate();
|
|
|
|
|
|
|
|
sync_cache_cor[il].invalidate();
|
|
|
|
|
|
|
|
sync_cache_rp_coarse[il].invalidate();
|
|
|
|
|
|
|
|
sync_cache_rp_fine[il].invalidate();
|
|
|
|
|
|
|
|
sync_cache_restrict[il].invalidate();
|
|
|
|
|
|
|
|
sync_cache_outbd[il].invalidate();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::destroy_transfer_caches()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (sync_cache_pre)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache() && GH)
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_pre[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_pre;
|
|
|
|
|
|
|
|
sync_cache_pre = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sync_cache_cor)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache() && GH)
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_cor[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_cor;
|
|
|
|
|
|
|
|
sync_cache_cor = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sync_cache_rp_coarse)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache() && GH)
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_rp_coarse[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_rp_coarse;
|
|
|
|
|
|
|
|
sync_cache_rp_coarse = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sync_cache_rp_fine)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache() && GH)
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_rp_fine[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_rp_fine;
|
|
|
|
|
|
|
|
sync_cache_rp_fine = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sync_cache_restrict)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache() && GH)
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_restrict[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_restrict;
|
|
|
|
|
|
|
|
sync_cache_restrict = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sync_cache_outbd)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache() && GH)
|
|
|
|
|
|
|
|
for (int i = 0; i < GH->levels; i++)
|
|
|
|
|
|
|
|
sync_cache_outbd[i].destroy();
|
|
|
|
|
|
|
|
delete[] sync_cache_outbd;
|
|
|
|
|
|
|
|
sync_cache_outbd = 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::sync_predictor_start(int lev, MyList<var> *VarList, Parallel::AsyncSyncState &async_state)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache())
|
|
|
|
|
|
|
|
Parallel::Sync_start(GH->PatL[lev], VarList, Symmetry, sync_cache_pre[lev], async_state);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev], VarList, Symmetry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::sync_predictor_finish(int lev, Parallel::AsyncSyncState &async_state, MyList<var> *VarList)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache())
|
|
|
|
|
|
|
|
Parallel::Sync_finish(sync_cache_pre[lev], async_state, VarList, Symmetry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::sync_corrector_start(int lev, MyList<var> *VarList, Parallel::AsyncSyncState &async_state)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache())
|
|
|
|
|
|
|
|
Parallel::Sync_start(GH->PatL[lev], VarList, Symmetry, sync_cache_cor[lev], async_state);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev], VarList, Symmetry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::sync_corrector_finish(int lev, Parallel::AsyncSyncState &async_state, MyList<var> *VarList)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache())
|
|
|
|
|
|
|
|
Parallel::Sync_finish(sync_cache_cor[lev], async_state, VarList, Symmetry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::sync_evolution(int lev, MyList<var> *VarList, Parallel::SyncCache *cache_array)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache() && cache_array)
|
|
|
|
|
|
|
|
Parallel::Sync_cached(GH->PatL[lev], VarList, Symmetry, cache_array[lev]);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Parallel::Sync(GH->PatL[lev], VarList, Symmetry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::restrict_evolution(int lev, MyList<var> *src_var_list, MyList<var> *dst_var_list)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache())
|
|
|
|
|
|
|
|
Parallel::Restrict_cached(GH->PatL[lev - 1], GH->PatL[lev], src_var_list, dst_var_list, Symmetry, sync_cache_restrict[lev]);
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
Parallel::Restrict(GH->PatL[lev - 1], GH->PatL[lev], src_var_list, dst_var_list, Symmetry);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void bssn_class::outbdlow2hi_evolution(int lev, MyList<var> *src_var_list, MyList<var> *dst_var_list)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
if (use_transfer_cache())
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi_cached(GH->PatL[lev - 1], GH->PatL[lev], src_var_list, dst_var_list, Symmetry, sync_cache_outbd[lev]);
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
MyList<Patch> *Ppc = GH->PatL[lev - 1];
|
|
|
|
|
|
|
|
while (Ppc)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
MyList<Patch> *Pp = GH->PatL[lev];
|
|
|
|
|
|
|
|
while (Pp)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
Parallel::OutBdLow2Hi(Ppc->data, Pp->data, src_var_list, dst_var_list, Symmetry);
|
|
|
|
|
|
|
|
Pp = Pp->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Ppc = Ppc->next;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
//================================================================================================
|
|
|
|
//================================================================================================
|