Move constraint recomputation onto GPU path
This commit is contained in:
@@ -31,6 +31,10 @@ using namespace std;
|
|||||||
#include "getnp4.h"
|
#include "getnp4.h"
|
||||||
#include "shellfunctions.h"
|
#include "shellfunctions.h"
|
||||||
#include "parameters.h"
|
#include "parameters.h"
|
||||||
|
#ifdef USE_GPU
|
||||||
|
#include "bssn_macro.h"
|
||||||
|
#include "bssn_gpu.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef With_AHF
|
#ifdef With_AHF
|
||||||
#include "derivatives.h"
|
#include "derivatives.h"
|
||||||
@@ -7285,6 +7289,9 @@ void bssn_class::Constraint_Out()
|
|||||||
Block *cg = BP->data;
|
Block *cg = BP->data;
|
||||||
if (myrank == cg->rank)
|
if (myrank == cg->rank)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_GPU
|
||||||
|
gpu_rhs(CALLED_BY_CONSTRAINT, myrank, RHS_PARA_CALLED_Constraint_Out);
|
||||||
|
#else
|
||||||
f_compute_rhs_bssn(cg->shape, TRK4, cg->X[0], cg->X[1], cg->X[2],
|
f_compute_rhs_bssn(cg->shape, TRK4, cg->X[0], cg->X[1], cg->X[2],
|
||||||
cg->fgfs[phi0->sgfn], cg->fgfs[trK0->sgfn],
|
cg->fgfs[phi0->sgfn], cg->fgfs[trK0->sgfn],
|
||||||
cg->fgfs[gxx0->sgfn], cg->fgfs[gxy0->sgfn], cg->fgfs[gxz0->sgfn],
|
cg->fgfs[gxx0->sgfn], cg->fgfs[gxy0->sgfn], cg->fgfs[gxz0->sgfn],
|
||||||
@@ -7319,6 +7326,7 @@ void bssn_class::Constraint_Out()
|
|||||||
cg->fgfs[Cons_Px->sgfn], cg->fgfs[Cons_Py->sgfn], cg->fgfs[Cons_Pz->sgfn],
|
cg->fgfs[Cons_Px->sgfn], cg->fgfs[Cons_Py->sgfn], cg->fgfs[Cons_Pz->sgfn],
|
||||||
cg->fgfs[Cons_Gx->sgfn], cg->fgfs[Cons_Gy->sgfn], cg->fgfs[Cons_Gz->sgfn],
|
cg->fgfs[Cons_Gx->sgfn], cg->fgfs[Cons_Gy->sgfn], cg->fgfs[Cons_Gz->sgfn],
|
||||||
Symmetry, lev, ndeps, pre);
|
Symmetry, lev, ndeps, pre);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (BP == Pp->data->ble)
|
if (BP == Pp->data->ble)
|
||||||
break;
|
break;
|
||||||
@@ -7788,6 +7796,9 @@ void bssn_class::Interp_Constraint(bool infg)
|
|||||||
Block *cg = BP->data;
|
Block *cg = BP->data;
|
||||||
if (myrank == cg->rank)
|
if (myrank == cg->rank)
|
||||||
{
|
{
|
||||||
|
#ifdef USE_GPU
|
||||||
|
gpu_rhs(CALLED_BY_CONSTRAINT, myrank, RHS_PARA_CALLED_Interp_Constraint);
|
||||||
|
#else
|
||||||
f_compute_rhs_bssn(cg->shape, TRK4, cg->X[0], cg->X[1], cg->X[2],
|
f_compute_rhs_bssn(cg->shape, TRK4, cg->X[0], cg->X[1], cg->X[2],
|
||||||
cg->fgfs[phi0->sgfn], cg->fgfs[trK0->sgfn],
|
cg->fgfs[phi0->sgfn], cg->fgfs[trK0->sgfn],
|
||||||
cg->fgfs[gxx0->sgfn], cg->fgfs[gxy0->sgfn], cg->fgfs[gxz0->sgfn],
|
cg->fgfs[gxx0->sgfn], cg->fgfs[gxy0->sgfn], cg->fgfs[gxz0->sgfn],
|
||||||
@@ -7822,6 +7833,7 @@ void bssn_class::Interp_Constraint(bool infg)
|
|||||||
cg->fgfs[Cons_Px->sgfn], cg->fgfs[Cons_Py->sgfn], cg->fgfs[Cons_Pz->sgfn],
|
cg->fgfs[Cons_Px->sgfn], cg->fgfs[Cons_Py->sgfn], cg->fgfs[Cons_Pz->sgfn],
|
||||||
cg->fgfs[Cons_Gx->sgfn], cg->fgfs[Cons_Gy->sgfn], cg->fgfs[Cons_Gz->sgfn],
|
cg->fgfs[Cons_Gx->sgfn], cg->fgfs[Cons_Gy->sgfn], cg->fgfs[Cons_Gz->sgfn],
|
||||||
Symmetry, lev, ndeps, pre);
|
Symmetry, lev, ndeps, pre);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (BP == Pp->data->ble)
|
if (BP == Pp->data->ble)
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user