Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 07468628 authored by muralikrishnan's avatar muralikrishnan
Browse files

Merge branch '85-fix-local-to-global-index-conversion-in-test-cases' into 'master'

Resolve "Fix local to global index conversion in test cases"

Closes #85

See merge request !85
parents d2edc375 f756c947
No related branches found
No related tags found
1 merge request!85Resolve "Fix local to global index conversion in test cases"
......@@ -86,12 +86,12 @@ int main(int argc, char *argv[]) {
const int k)
{
//local to global index conversion
const size_t ig = i + lDom[0].first() + nghost;
const size_t jg = j + lDom[1].first() + nghost;
const size_t kg = k + lDom[2].first() + nghost;
double x = (ig + 0.5) * hx[0];
double y = (jg + 0.5) * hx[1];
double z = (kg + 0.5) * hx[2];
const size_t ig = i + lDom[0].first() - nghost;
const size_t jg = j + lDom[1].first() - nghost;
const size_t kg = k + lDom[2].first() - nghost;
double x = origin[0] + (ig + 0.5) * hx[0];
double y = origin[1] + (jg + 0.5) * hx[1];
double z = origin[2] + (kg + 0.5) * hx[2];
//view(i, j, k) = 3.0*pow(x,1) + 4.0*pow(y,1) + 5.0*pow(z,1);
//view(i, j, k) = sin(pi * x) * cos(pi * y) * exp(z);
......
......@@ -71,12 +71,12 @@ int main(int argc, char *argv[]) {
const int k)
{
//local to global index conversion
const size_t ig = i + lDom[0].first() + nghost;
//const size_t jg = j + lDom[1].first() + nghost;
//const size_t kg = k + lDom[2].first() + nghost;
double x = (ig + 0.5) * hx[0];
//double y = (jg + 0.5) * hx[1];
//double z = (kg + 0.5) * hx[2];
const size_t ig = i + lDom[0].first() - nghost;
//const size_t jg = j + lDom[1].first() - nghost;
//const size_t kg = k + lDom[2].first() - nghost;
double x = origin[0] + (ig + 0.5) * hx[0];
//double y = origin[1] + (jg + 0.5) * hx[1];
//double z = origin[2] + (kg + 0.5) * hx[2];
//view(i, j, k) = 3.0*pow(x,1) + 4.0*pow(y,1) + 5.0*pow(z,1);
//view(i, j, k) = sin(pi * x) * cos(pi * y) * exp(z);
......
......@@ -206,9 +206,9 @@ public:
KOKKOS_LAMBDA(const size_t i, const size_t j, const size_t k){
//local to global index conversion
const size_t ig = i + lDom[0].first() + nghost;
const size_t jg = j + lDom[1].first() + nghost;
const size_t kg = k + lDom[2].first() + nghost;
const size_t ig = i + lDom[0].first() - nghost;
const size_t jg = j + lDom[1].first() - nghost;
const size_t kg = k + lDom[2].first() - nghost;
view(i, j, k)[0] = -scale_fact*2.0*pi*phi0 *
cos(2.0*pi*(ig+0.5)*hr[0]) *
......@@ -225,8 +225,8 @@ public:
KOKKOS_LAMBDA(const size_t i, const size_t j, const size_t k){
//local to global index conversion
const size_t ig = i + lDom[0].first() + nghost;
const size_t jg = j + lDom[1].first() + nghost;
const size_t ig = i + lDom[0].first() - nghost;
const size_t jg = j + lDom[1].first() - nghost;
view(i, j, k)[1] = scale_fact*4.0*pi*phi0 *
sin(2.0*pi*(ig+0.5)*hr[0]) *
......@@ -242,8 +242,8 @@ public:
KOKKOS_LAMBDA(const size_t i, const size_t j, const size_t k){
//local to global index conversion
const size_t ig = i + lDom[0].first() + nghost;
const size_t jg = j + lDom[1].first() + nghost;
const size_t ig = i + lDom[0].first() - nghost;
const size_t jg = j + lDom[1].first() - nghost;
view(i, j, k)[2] = scale_fact*4.0*pi*phi0 *
sin(2.0*pi*(ig+0.5)*hr[0]) *
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment