CT_MultiLevel implicitly requires CT_Analytic

Issue #2579 new
Gabriele Bozzola created an issue

I am trying to solve a Poisson equation with CT_MultiLevel but without including CT_Analytic (which is advertised as an helper thorn). I found that this cannot be done because CT_MultiLevel explicitly calls the restriction operations on grid functions defined in CT_Analytic. For example, in CT_RelaxError.cc:

      CT_Restrict(CCTK_PASS_CTOC, "CT_MultiLevel::psi"); 
      CT_Restrict(CCTK_PASS_CTOC, "CT_MultiLevel::coeffs"); 
      CT_Restrict(CCTK_PASS_CTOC, "CT_Analytic::CT_testK"); 
      CT_Restrict(CCTK_PASS_CTOC, "CT_Analytic::CT_testdxK"); 
      CT_Restrict(CCTK_PASS_CTOC, "CT_Analytic::CT_testdyK"); 
      CT_Restrict(CCTK_PASS_CTOC, "CT_Analytic::CT_testdzK"); 
      CT_Restrict(CCTK_PASS_CTOC, "CT_Analytic::CT_testc1"); 
      CT_Restrict(CCTK_PASS_CTOC, "CT_Analytic::CT_testc2");

If you don’t have CT_Analytic as an active thorn, the run will abort. (Are these restrictions needed?)

Comments (3)

  1. Gabriele Bozzola reporter

    A second instance is in the file CT_InitializeAuxiliaries.cc, where there are multiple references to variables defined in CT_Analytic.

  2. Eloisa Bentivegna

    Gabriele, Roland: I am afraid there isn’t an easy fix to this, without breaking some of the key use cases. If one is not interested in those cases, the offending lines can be simply commented out. The correct way to solve the problem would be to introduce a mechanism to register grid functions for restriction when necessary (moving the burden of ensuring correctness to the user). This has been on the thorn’s todo for a while, but has not been implemented yet.

  3. Log in to comment