Skip to content

regrid.m

Basic Information

  USAGE:  config = regrid(rg, zg, config0)
          config = regrid(nr, nz, config0)

  PURPOSE: Replace the grid in config0 with the grid rg, zg
           If first input is scalar (= nr) then:
             rg = linspace(config0.rg(1),config0.rg(end),nr)'
           If second input is scalar (= nz) then:
             zg = linspace(config0.zg(1),config0.zg(end),nz)'

  INPUTS: rg, radii of grid points [m]
          zg, height of grid points [m]
          config0, a.k.a. tok_data_struct or vac_objs
            a structure containing (TokSys) tokamak information

  OUTPUTS: config, like config0 but all grid quantities are for rg, zg

Dependencies