Automatically scale input scaling fields to global grid size
Overview
The following discussion from !110 (merged) should be addressed:
-
@sospinar started a discussion: (+2 comments)
I would like to get rid of the keyword
grid.extensions
: when working with several files it gets quite annoying to modify it knowing that it is information that it is already contained in the grid.Before this MR this keyword was used in a few places and I thought that we could move forward to remove it completely. Now, I would suggest calculating the grid extensions directly from the grid so that h5 files can still fit the grid.
Proposal
The keywords extensions
and offset
in the <scaling_section>
should become optional. If omitted, the input field will be automatically scaled to match the global grid size. This requires a grid view to be passed to the ScalingAdapter
, which could then adhere to the GridFunction
interface of PDELab.
Additionally, the grid view could be passed to the Interpolator
, to also make it a GridFunction
. I'm not completely sure where the grid extensions should be calculated.
How to test the implementation?
Write a unit tests where the keywords extensions
and offset
are omitted and check the results against using the keywords.
Related issues and MRs
- #110 (closed): Original implementation of global scaling fields (!110 (merged))