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

Remove external references to CG #546

Open timspainNERSC opened 4 months ago

timspainNERSC commented 4 months ago

The use of Continuous Galerkin mathematics is currently necessary to ensure fluxes remain well defined. However, this is only a mathematical convenience internal to the ice dynamics part of nextSIM-DG. The finite element variation of the fields can be stored either as DG polynomial coefficients or as CG samples. The two representations can be converted into one another losslessly. Therefore, it is possible to eliminate all reference to CG arrays outside of the parts of the dynamics that depend on them.

Fields such as the ice velocity components will be stored in DG form within the restart files. The data will also be transmitted as the DG coefficients through to the setData() function calls of the dynamics. Here, the data set within the CG arrays will be received by the CG parts of the dynamics kernel and the data, held as DG components will be interpolated and stored as CG arrays.

On output for a restart file, the CG array will be fitted to obtain the DG components. This DG field is all that is ever seen by the rest of the model and the restart file.

timspainNERSC commented 4 months ago

Task list