simplify CarpetLib's data.cc file

Issue #1808 new
Roland Haas created an issue

CarpetLib's data.cc file contains a number of very large and complex switch statements inside of its transfer_prolongate and transfer_restrict routines (the prolongate one is about 500 lines long and is only one half of an #if CAPRET_DIM preprocessor if statement). The two switch statements also have to be kept in sync with each other whenever a new transport operator is added.

It may be good to instead define some type of "operator package" object that contains the list of prolongation, restrict, time interpolation operators that correspond to a particular choice of transport operator and refinement centering as chosen in the parameter file and interface.ccl.

This way the complex logic could be collected in only a single place. This would be useful since we seem to plan to add more new transport operators to Carpet.

Keyword:

Comments (0)

  1. Log in to comment