fmihpc/dccrg

Request: return face neighbors of non-local cells

Closed this issue · 4 comments

For Vlasiator, it would be useful to be able to evaluate face neighbors of non-local cells as well, e.g. in the innermost row of ghost cells.

Could get_face_neighbors_of() be changed to return also these? It should be enough to remove the locality check.

iljah commented

I guess it should work, if you remove this->cell_data.count(cell) == 0 check does it seem to work? :)
If neighborhood is large enough this should even return all face neighbors of some remote cells.

Yep, that's how I've been testing it. I'd just like to be able to compile against the proper master version, not a slightly edited one :)
If you want to keep the check in, it could perhaps be behind a boolean argument check, so I can turn it off for this purpose?

Also, I might need access to face neighbors with non-standard neighborhoods soon... :)

iljah commented

Cool, I'll try to come up with couple of simple tests for this. It did occur that boolean flag with default value of disallowing remote cells wouldn't break existing api but neither would adding support for remote cells. I'll probably just remove the check once I have basic tests for this.

For face neighbors with other neighborhoods you can check things manually as e.g. advection test solver does: https://github.com/fmihpc/dccrg/blob/master/tests/advection/solve.hpp#L73
Eventually I'll probably change get_face_neighbors() to work like that anyway which should also trivially support non-default neighborhoods.

iljah commented

Should be fixed by b5ecae2