Exawind / nalu-wind

Solver for wind farm simulations targeting exascale computational platforms
https://exawind.github.io/nalu-wind/
Other
125 stars 85 forks source link

NGP conversion of field update algorithms #336

Closed sayerhs closed 2 months ago

sayerhs commented 5 years ago

This issue tracks the non-solver field updates that needs to be converted to run on device for wind-energy relevant simulations.

For a template of edge loop conversion, see conversion of AssembleNodalGradEdgeAlgorithm in

https://github.com/Exawind/nalu-wind/blob/d2d9b58929b9b201b04089dc5a296e8ccb3950ec/include/ngp_algorithms/NodalGradEdgeAlg.h#L20

Similarly the NodalGradElemAlg and NodalGradBndryElemAlg shows examples of element conversion. We will need all the boundary elem algorithms converted as they are common for both edge and elem solver options.

https://github.com/Exawind/nalu-wind/blob/d2d9b58929b9b201b04089dc5a296e8ccb3950ec/include/ngp_algorithms/NodalGradElemAlg.h#L23 https://github.com/Exawind/nalu-wind/blob/d2d9b58929b9b201b04089dc5a296e8ccb3950ec/include/ngp_algorithms/NodalGradBndryElemAlg.h#L23

Note, that the template arguments are not necessary for most Edge kernels. It was done for NodalGrad to collapse multiple classes into single class that deals with both vector and scalar fields whose projected nodal gradients are computed.

For node loops, an example is available in #335 and is pending merge. Unit tests for these examples are in the unit_tests/ngp_algorithms directory.

ABL Neutral simulation

Periodic BCs, with wall functions for terrain.

Static mesh airfoil/wing simulations

Moving mesh turbine simulations

Element algorithms

Misc.

sayerhs commented 4 years ago

@overfelt @alanw0 For the conversion of AssembleCourantReynoldsElemAlgorithm, here is what I had in mind:

https://github.com/Exawind/nalu-wind/blob/4c430563cd3b2c9443d871874b174132cd51fe4c/src/ngp_algorithms/MdotDensityAccumAlg.C#L84-L86

https://github.com/Exawind/nalu-wind/blob/4c430563cd3b2c9443d871874b174132cd51fe4c/include/ngp_utils/NgpReduceUtils.h#L115-L120

https://github.com/Exawind/nalu-wind/blob/4c430563cd3b2c9443d871874b174132cd51fe4c/unit_tests/ngp_kernels/UnitTestNgpLoops.C#L236-L245