diff options
author | hawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2004-03-29 14:29:24 +0000 |
---|---|---|
committer | hawke <hawke@578cdeb0-5ea1-4b81-8215-5a3b8777ee0b> | 2004-03-29 14:29:24 +0000 |
commit | 0638bbc4a769521ea342c506d8a8be111ad32fe7 (patch) | |
tree | c7192588b0cfc8122858793cad18b49b5fe56959 /src | |
parent | 928f1a034cfa51e386739381dc0877f376028f57 (diff) |
Use the aliased function to en/dis able prolongation instead of linking direct through the header file.
Add parameter to say if we want to use this function (by default we do, so nothing changes).
git-svn-id: http://svn.cactuscode.org/arrangements/CactusNumerical/MoL/trunk@56 578cdeb0-5ea1-4b81-8215-5a3b8777ee0b
Diffstat (limited to 'src')
-rw-r--r-- | src/Counter.c | 37 |
1 files changed, 31 insertions, 6 deletions
diff --git a/src/Counter.c b/src/Counter.c index 83ae330..3b4b483 100644 --- a/src/Counter.c +++ b/src/Counter.c @@ -72,13 +72,25 @@ int MoL_SetCounter(CCTK_ARGUMENTS) *MoL_Intermediate_Step = MoL_Intermediate_Steps; -#ifdef HAVE_CARPET +/* #ifdef HAVE_CARPET */ if ((*MoL_Intermediate_Step)) { /* Disable prolongating during the iterations */ - CarpetEnableProlongating (0); +/* CarpetEnableProlongating (0); */ + if (disable_prolongation) + { + if (CCTK_IsFunctionAliased("EnableProlongating")) + { + EnableProlongating(0); + } + else + { + CCTK_WARN(2, "Cannot disable prolongation as function" + " \"EnableProlongating\" is not provided by any thorn!"); + } + } } -#endif +/* #endif */ @@ -104,16 +116,29 @@ int MoL_DecrementCounter(CCTK_ARGUMENTS) { DECLARE_CCTK_ARGUMENTS; + DECLARE_CCTK_PARAMETERS; (*MoL_Intermediate_Step) --; -#ifdef HAVE_CARPET +/* #ifdef HAVE_CARPET */ if (! (*MoL_Intermediate_Step)) { /* Re-enable prolongating before the final PostStep */ - CarpetEnableProlongating (1); +/* CarpetEnableProlongating (1); */ + if (disable_prolongation) + { + if (CCTK_IsFunctionAliased("EnableProlongating")) + { + EnableProlongating(1); + } + else + { + CCTK_WARN(2, "Cannot enable prolongation as function" + " \"EnableProlongating\" is not provided by any thorn!"); + } + } } -#endif +/* #endif */ return 0; } |