Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ static KOKKOS_INLINE_FUNCTION void nodeApplyAscOrthoCircleTake(const int i_r, co
const bool DirBC_Interior, ConstVector<double>& x,
ConstVector<double>& rhs, Vector<double>& result,
ConstVector<double>& arr, ConstVector<double>& att,
ConstVector<double>& art, ConstVector<double>& detDF)
ConstVector<double>& art)
{
KOKKOS_ASSERT(i_r >= 0 && i_r <= grid.numberSmootherCircles());

Expand Down Expand Up @@ -188,7 +188,7 @@ static KOKKOS_INLINE_FUNCTION void nodeApplyAscOrthoRadialTake(const int i_r, co
const bool DirBC_Interior, ConstVector<double>& x,
ConstVector<double>& rhs, Vector<double>& result,
ConstVector<double>& arr, ConstVector<double>& att,
ConstVector<double>& art, ConstVector<double>& detDF)
ConstVector<double>& art)
{
assert(i_r >= grid.numberSmootherCircles() - 1 && i_r < grid.nr());

Expand Down Expand Up @@ -472,10 +472,9 @@ void ExtrapolatedSmootherTake<LevelCacheType>::applyAscOrthoBlackCircleSection(C

assert(level_cache.cacheDomainGeometry());

ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();
ConstVector<double> detDF = level_cache.detDF();
ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();

/* The outer most circle next to the radial section is defined to be black. */
const int start_black_circles = (grid.numberSmootherCircles() % 2 == 0) ? 1 : 0;
Expand All @@ -490,7 +489,7 @@ void ExtrapolatedSmootherTake<LevelCacheType>::applyAscOrthoBlackCircleSection(C
// Kokkos lambda function to execute for each point in the index space
KOKKOS_LAMBDA(const int circle_task, const int i_theta) {
int i_r = start_black_circles + circle_task * 2;
nodeApplyAscOrthoCircleTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art, detDF);
nodeApplyAscOrthoCircleTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art);
});

Kokkos::fence();
Expand All @@ -509,10 +508,9 @@ void ExtrapolatedSmootherTake<LevelCacheType>::applyAscOrthoWhiteCircleSection(C

assert(level_cache.cacheDomainGeometry());

ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();
ConstVector<double> detDF = level_cache.detDF();
ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();

/* The outer most circle next to the radial section is defined to be black. */
const int start_white_circles = (grid.numberSmootherCircles() % 2 == 0) ? 0 : 1;
Expand All @@ -527,7 +525,7 @@ void ExtrapolatedSmootherTake<LevelCacheType>::applyAscOrthoWhiteCircleSection(C
// Kokkos lambda function to execute for each point in the index space
KOKKOS_LAMBDA(const int circle_task, const int i_theta) {
const int i_r = start_white_circles + circle_task * 2;
nodeApplyAscOrthoCircleTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art, detDF);
nodeApplyAscOrthoCircleTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art);
});

Kokkos::fence();
Expand All @@ -546,10 +544,9 @@ void ExtrapolatedSmootherTake<LevelCacheType>::applyAscOrthoBlackRadialSection(C

assert(level_cache.cacheDomainGeometry());

ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();
ConstVector<double> detDF = level_cache.detDF();
ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();

assert(grid.ntheta() % 2 == 0);
const int start_black_radials = 0;
Expand All @@ -564,7 +561,7 @@ void ExtrapolatedSmootherTake<LevelCacheType>::applyAscOrthoBlackRadialSection(C
// Kokkos lambda function to execute for each point in the index space
KOKKOS_LAMBDA(const int radial_task, const int i_r) {
const int i_theta = start_black_radials + radial_task * 2;
nodeApplyAscOrthoRadialTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art, detDF);
nodeApplyAscOrthoRadialTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art);
});

Kokkos::fence();
Expand All @@ -583,10 +580,9 @@ void ExtrapolatedSmootherTake<LevelCacheType>::applyAscOrthoWhiteRadialSection(C

assert(level_cache.cacheDomainGeometry());

ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();
ConstVector<double> detDF = level_cache.detDF();
ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();

assert(grid.ntheta() % 2 == 0);
const int start_white_radials = 1;
Expand All @@ -601,7 +597,7 @@ void ExtrapolatedSmootherTake<LevelCacheType>::applyAscOrthoWhiteRadialSection(C
// Kokkos lambda function to execute for each point in the index space
KOKKOS_LAMBDA(const int radial_task, const int i_r) {
const int i_theta = start_white_radials + radial_task * 2;
nodeApplyAscOrthoRadialTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art, detDF);
nodeApplyAscOrthoRadialTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art);
});

Kokkos::fence();
Expand Down
40 changes: 18 additions & 22 deletions include/Smoother/SmootherTake/applyAscOrtho.inl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ static KOKKOS_INLINE_FUNCTION void nodeApplyAscOrthoCircleTake(const int i_r, co
bool DirBC_Interior, ConstVector<double>& x,
ConstVector<double>& rhs, Vector<double>& result,
ConstVector<double>& arr, ConstVector<double>& att,
ConstVector<double>& art, ConstVector<double>& detDF)
ConstVector<double>& art)
{
KOKKOS_ASSERT(i_r >= 0 && i_r < grid.numberSmootherCircles());

Expand Down Expand Up @@ -59,7 +59,7 @@ static KOKKOS_INLINE_FUNCTION void nodeApplyAscOrthoRadialTake(const int i_r, co
bool DirBC_Interior, ConstVector<double>& x,
ConstVector<double>& rhs, Vector<double>& result,
ConstVector<double>& arr, ConstVector<double>& att,
ConstVector<double>& art, ConstVector<double>& detDF)
ConstVector<double>& art)
{
KOKKOS_ASSERT(i_r >= grid.numberSmootherCircles() && i_r < grid.nr());

Expand Down Expand Up @@ -128,10 +128,9 @@ void SmootherTake<LevelCacheType>::applyAscOrthoBlackCircleSection(ConstVector<d

assert(level_cache.cacheDomainGeometry());

ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();
ConstVector<double> detDF = level_cache.detDF();
ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();

/* The outer most circle next to the radial section is defined to be black. */
const int start_black_circles = (grid.numberSmootherCircles() % 2 == 0) ? 1 : 0;
Expand All @@ -146,7 +145,7 @@ void SmootherTake<LevelCacheType>::applyAscOrthoBlackCircleSection(ConstVector<d
// Kokkos lambda function to execute for each point in the index space
KOKKOS_LAMBDA(const int circle_task, const int i_theta) {
int i_r = start_black_circles + circle_task * 2;
nodeApplyAscOrthoCircleTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art, detDF);
nodeApplyAscOrthoCircleTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art);
});

Kokkos::fence();
Expand All @@ -164,10 +163,9 @@ void SmootherTake<LevelCacheType>::applyAscOrthoWhiteCircleSection(ConstVector<d

assert(level_cache.cacheDomainGeometry());

ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();
ConstVector<double> detDF = level_cache.detDF();
ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();

/* The outer most circle next to the radial section is defined to be black. */
const int start_white_circles = (grid.numberSmootherCircles() % 2 == 0) ? 0 : 1;
Expand All @@ -182,7 +180,7 @@ void SmootherTake<LevelCacheType>::applyAscOrthoWhiteCircleSection(ConstVector<d
// Kokkos lambda function to execute for each point in the index space
KOKKOS_LAMBDA(const int circle_task, const int i_theta) {
const int i_r = start_white_circles + circle_task * 2;
nodeApplyAscOrthoCircleTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art, detDF);
nodeApplyAscOrthoCircleTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art);
});

Kokkos::fence();
Expand All @@ -200,10 +198,9 @@ void SmootherTake<LevelCacheType>::applyAscOrthoBlackRadialSection(ConstVector<d

assert(level_cache.cacheDomainGeometry());

ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();
ConstVector<double> detDF = level_cache.detDF();
ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();

assert(grid.ntheta() % 2 == 0);
const int start_black_radials = 0;
Expand All @@ -218,7 +215,7 @@ void SmootherTake<LevelCacheType>::applyAscOrthoBlackRadialSection(ConstVector<d
// Kokkos lambda function to execute for each point in the index space
KOKKOS_LAMBDA(const int radial_task, const int i_r) {
const int i_theta = start_black_radials + radial_task * 2;
nodeApplyAscOrthoRadialTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art, detDF);
nodeApplyAscOrthoRadialTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art);
});

Kokkos::fence();
Expand All @@ -236,10 +233,9 @@ void SmootherTake<LevelCacheType>::applyAscOrthoWhiteRadialSection(ConstVector<d

assert(level_cache.cacheDomainGeometry());

ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();
ConstVector<double> detDF = level_cache.detDF();
ConstVector<double> arr = level_cache.arr();
ConstVector<double> att = level_cache.att();
ConstVector<double> art = level_cache.art();

assert(grid.ntheta() % 2 == 0);
const int start_white_radials = 1;
Expand All @@ -254,7 +250,7 @@ void SmootherTake<LevelCacheType>::applyAscOrthoWhiteRadialSection(ConstVector<d
// Kokkos lambda function to execute for each point in the index space
KOKKOS_LAMBDA(const int radial_task, const int i_r) {
const int i_theta = start_white_radials + radial_task * 2;
nodeApplyAscOrthoRadialTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art, detDF);
nodeApplyAscOrthoRadialTake(i_r, i_theta, grid, DirBC_Interior, x, rhs, temp, arr, att, art);
});

Kokkos::fence();
Expand Down
Loading