pecos / tps

Torch Plasma Simulator
BSD 3-Clause "New" or "Revised" License
8 stars 2 forks source link

Pfield interpolation utility #61

Closed trevilo closed 3 years ago

trevilo commented 3 years ago

This PR adds a utility to enable interpolation of tps state from one mesh to another. Relevant changes include the following:

  1. A utils directory has been added to house utilities related to tps
  2. The source file utils/pfield_interpolator.cpp implementing the utility has been added
  3. The build system has been updated to check for gslib support (b/c the interpolator requires it) and build an executable utils/interp if it is found
  4. A basic unit test is added in test/cyl3d.interp.test

The command to use the interpolator is as follows:

interp -r1 source.run -r2 target.run

where source.run and target.run are tps configuration files corresponding to the source and target meshes, respectively. The source configuration should specify RESTART_CYCLE so that the restart files are read when a M2ulPhyS object is constructed. The target configuration must not set RESTART_CYCLE, because the restart files do not exist at construction. After successful exectution, restart files for the target mesh are written.

The interp utility may be run in parallel. The number of mpi tasks must correspond to the number of tasks used to write the restart files.