fix logic bug

This commit is contained in:
Axel Kohlmeyer
2024-08-31 07:01:44 -04:00
parent 70a62d5ebf
commit 7d176cb66e

View File

@ -2752,11 +2752,12 @@ for an example where checking ghost communication is necessary.
int Atom::find_custom_ghost(const char *name, int &flag, int &cols, int &ghost) int Atom::find_custom_ghost(const char *name, int &flag, int &cols, int &ghost)
{ {
int i = find_custom(name, flag, cols); int i = find_custom(name, flag, cols);
ghost = 0;
if (i == -1) return i; if (i == -1) return i;
if ((flag == 0) && (cols == 0)) ghost = ivghost[i]; if ((flag == 0) && (cols == 0)) ghost = ivghost[i];
else if ((flag == 1) && (cols == 0)) ghost = dvghost[i]; else if ((flag == 1) && (cols == 0)) ghost = dvghost[i];
else if ((flag == 0) && (cols == 1)) ghost = iaghost[i]; else if ((flag == 0) && (cols > 0)) ghost = iaghost[i];
else if ((flag == 1) && (cols == 1)) ghost = daghost[i]; else if ((flag == 1) && (cols > 0)) ghost = daghost[i];
return i; return i;
} }