For periodic domains, the graphs must have consistent relative spacing between nodes even for the nodes at the boundaries. However, from the nekRS mesh, dx computed along the interior of the domain will correspond to dx of neighboring GLL points, but dx computed out of the domain will have size L_x equal to the size of the domain.
To address this issue, the Dist-GNN Trainer class hard-codes a transformation to the position array such that the coordinates match the the periodic boundaries and dx computations match in both directions. This hard-coded fix however does not generalize to any domain, so this transformation should be moved to the gnn plugin such that the transformed node coordinates are written by the plugin.
The current hard-coded fix is found here:
|
def setup_local_graph(self): |
The plan would be to use boundary condition information within nekRS to determine when to perform this transformation and along which direction.
For periodic domains, the graphs must have consistent relative spacing between nodes even for the nodes at the boundaries. However, from the nekRS mesh, dx computed along the interior of the domain will correspond to dx of neighboring GLL points, but dx computed out of the domain will have size L_x equal to the size of the domain.
To address this issue, the Dist-GNN Trainer class hard-codes a transformation to the position array such that the coordinates match the the periodic boundaries and dx computations match in both directions. This hard-coded fix however does not generalize to any domain, so this transformation should be moved to the gnn plugin such that the transformed node coordinates are written by the plugin.
The current hard-coded fix is found here:
nekRS-ML/3rd_party/dist-gnn/trainer.py
Line 635 in db3cb4e
The plan would be to use boundary condition information within nekRS to determine when to perform this transformation and along which direction.