Skip to content

FxAdv / uc_contra_conrers: damping parameter override #58

@romanc

Description

@romanc

Description

In the stencil FiniteVolumeFluxPrep, known as FxAdv, we have stencil code that looks like this

   with computation(PARALLEL), interval(...):
        damp = # something
        with horizontal(region[...]):
            ...
        damp = # something else
        with horizontal(region[...]):
            ...
        damp = # something else again
        with horizontal(region[...]):
            ...
        damp = # yet another something else
        with horizontal(region[...]):
            ...

inside the function uc_contra_corners (and vc_contra_corners).

In codegen, this looks weird because the horizontal regions might not apply, thus be skipped and then it looks like damp is overwriting itself a bunch of times, e.g.

Image

What needs to be done here

We should check if can move damp inside the respective horizontal region. If that causes an issue, log a follow-up issue to be investigated.

Notes

FxAdv is covered by a translate test. We are thus be able to numerically validate the proposed code change.

/cc @FlorianDeconinck as discussed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions