Variables made parameters in Cactus
1. Remove the declaration of the variable
2. In the param.ccl from ~/Cactus/arrangements/CactusShrimp/Shrimp/ declare the variables you want to make as Cactus parameters
i.e.
PRIVATE:
( !!Access level)
INT endday "The last day of the simulation or the number of days"
(!!The parameter type and name)
{
1:365::"range for the endday"
(!! The range or the allowed values)
} 80
(!!default value)
3. In the parameter file specify the value of the variable (~/Cactus/exe/shrimp.par):
i.e. - add this line:
Shrimp::endday=12
4. In the main file ( inside the code) :
- include the following library:
#include "cctk_Parameters.h"
- in the subroutines where the variable is used, add:
DECLARE_CCTK_PARAMETERS
(that would be after the implicit none)

0 Comments:
Post a Comment
<< Home