nextsimhub / nextsimdg

neXtSIM_DG : next generation sea-ice model with DG
https://nextsim-dg.readthedocs.io/en/latest/?badge=latest
Apache License 2.0
10 stars 13 forks source link

WIP: Grid boundary handling #590

Closed timspainNERSC closed 3 months ago

timspainNERSC commented 5 months ago

Grid boundary handling

Fixes #537


Change Description

Periodic boundary

a periodic boundary element consists of

Dirichlet-type conditions:

the all have the interface std::array<std::vector, 4> where the outer index corresponds to elements that have boundary on the bottom, right, top, left and the inner index to corresponding id of the element.

Code changes

Handling of periodic boundaries required several changes in DGTransport.cpp and cgParametricMomentum.cpp This mostly includes restructuring code and adding the edge (bottom, right, top, left) as template parameter.

Further, code is added to deal with open and freeslip boundaries.


Test Description

There is a test in the (new) application folder.


Documentation Impact

TODO

timspainNERSC commented 5 months ago

@winzerle If we want to avoid divergence between you test cases and the dynamics used in nextSIM-DG, then not using ParametricMesh::readmesh() is essential.

winzerle commented 5 months ago

Ok, I’ll change that auch the mesh is directly created.Sent from my iPhoneOn 25. Jun 2024, at 11:30, Tim Spain @.***> wrote: @winzerle If we want to avoid divergence between you test cases and the dynamics used in nextSIM-DG, then not using ParametricMesh::readmesh() is essential.

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

timspainNERSC commented 3 months ago

Handling of periodic boundaries (and to an extent open boundaries) will be moved to MPI, rendering much of this pull request redundant.

The improvements related to edge handling will be moved to another PR.