interpolators.rst 2.41 KB
 Lukas Riedel committed Apr 23, 2019 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 .. _man-interpolators: Interpolators ============= Interpolators are used at several points in DORiE to evaluate discrete input data at every physical location on the grid. Currently, interpolators are used in the :doc:Parameter File , and when loading an initial condition from data with the options given in the :doc:Configuration File . .. note:: The type of interpolator may change how the input data is interpreted. In particular, different interpolators require different input dataset shapes for the same grid configuration. Interpolator Types ------------------ Every interpolator assumes that the input data spans a rectangle (2D) or cuboid (3D). In case of initial conditions, the respective volume is streched to cover the entire grid. For scaling fields, users may specify extensions and offset of the volume, or opt for it to cover the entire grid by omitting the respective keys in the parameter file. .. object:: Nearest neighbor interpolator * interpolation: nearest Interprets dataset values as *cell values*. No extrapolation is applied.  Lukas Riedel committed Apr 23, 2019 32  The lowest supported dataset dimensions are (1, 1) (single value  Lukas Riedel committed Apr 23, 2019 33 34 35 36 37 38  everywhere). Use this interpolator for cell-centered data like :ref:scaling field values  and initial conditions for a finite volume solver.  Lukas Riedel committed Apr 23, 2019 39 40 41 42 43  .. tip:: To provide the exact scaling factors for each cell of a grid of :math:1 \times 10 cells, use the nearest interpolator with a dataset of shape (10, 1) (dimensions are inverted). The dataset value are the function values at the cell barycenters.  Lukas Riedel committed Apr 23, 2019 44 45 46 47 48 49 .. object:: Linear interpolator * interpolation: linear Interprets dataset values as *vertex values* and linearaly interpolates between them. No extrapolation is applied. The lowest supported dataset  Lukas Riedel committed Apr 23, 2019 50  dimensions are (2, 2) (one value in each corner).  Lukas Riedel committed Apr 23, 2019 51   Santiago Ospina De Los Ríos committed Apr 25, 2019 52  Use this interpolator if input data should be interpreted as  Lukas Riedel committed Apr 23, 2019 53  continuous functions like initial conditions for a DG solver.  Lukas Riedel committed Apr 23, 2019 54 55 56 57 58 59  .. tip:: To provide the initial condition for a DG solver with finite element polynomials of order :math:k = 1 on a grid of :math:1 \times 10 cells, use the linear interpolator with a dataset of shape (11, 2) (dimensions are inverted). The dataset values are the function values at the grid vertices.