Perform only spatial prolongation when using a single timelevel and tag 'prolongation="copy"'

Create issue
Issue #2086 open
Miguel Zilhão created an issue

Sometimes it is useful to set a grid function that does not evolve at all. However, using a single timelevel and tag 'prolongation="copy"' results in a Carpet assertion failure.

This is fixed in the following commit d13a6e245a3d7d2b575094fd0def540d510a166c, as discussed in the following thread:

Could this be merged to master?


Comments (5)

  1. Erik Schnetter
    • removed comment
    We can introduce a new prolongation operator and/or introduce a way to set the desired time prolongation order per grid function group.
  2. Roland Haas

    This seems to be correct to apply. op_copy appears in data<T>::transfer_prolongate like so:

      switch (transport_operator) {
      case op_copy:
      case op_Lagrange: {
        static HighResTimer::HighResTimer timer("prolongate_Lagrange");
        auto timer_clock = timer.start();
        // enum centering { vertex_centered, cell_centered };
        switch (cent) {
        case vertex_centered: {
          static void (*the_operators[])(
              T const *restrict const src, ivect3 const &restrict srcpadext,
              ivect3 const &restrict srcext, T *restrict const dst,
              ivect3 const &restrict dstpadext, ivect3 const &restrict dstext,
              ibbox3 const &restrict srcbbox, ibbox3 const &restrict dstbbox,
              ibbox3 const &restrict srcregbbox, ibbox3 const &restrict dstregbbox,
              void *const extraargs) = {
              NULL, &prolongate_3d_rf2<T, 1>, NULL, &prolongate_3d_rf2<T, 3>,
              NULL, &prolongate_3d_rf2<T, 5>, NULL, &prolongate_3d_rf2<T, 7>,
              NULL, &prolongate_3d_rf2<T, 9>, NULL, &prolongate_3d_rf2<T, 11>,

    i.e. it interpolates in space the same way the op_Lagrange does. It also appears in GroupStorageCheck like so

        if (op != op_none and op != op_sync and op != op_restrict and
            op != op_copy) {
          int const tls = groupdata.AT(group).activetimelevels.AT(ml).AT(rl);
          if (tls != 0 and tls < prolongation_order_time + 1) {
            static vector<bool> didwarn;
            didwarn.resize(CCTK_NumGroups(), false);
            if (not didwarn.AT(group)) {
              // Warn only once per group
              didwarn.AT(group) = true;
              char *const groupname = CCTK_GroupName(group);
                         "There are not enough time levels for the desired "
                         "temporal prolongation order in the grid function group "
                         "\"%s\".  With Carpet::prolongation_order_time=%d, you "
                         "need at least %d time levels.",
                         groupname, (int)prolongation_order_time,
                         (int)(prolongation_order_time + 1));

    i.e. it does need only a single timelevel.

    No thorn in the toolkit currently uses op_copy so the change would be harmless.

  3. Log in to comment