[Users] easy question

Erik Schnetter schnetter at cct.lsu.edu
Wed Aug 24 19:35:57 CDT 2011


Yes, this is correct. You would call CCTK_ActiveTimeLevels instead of
CCTK_NumTimeLevels to find out how many time levels are active, not
how many are declared. The variable type needs to be
CCTK_VARIABLE_REAL, and the group type needs to be CCTK_GF.

-erik

On Wed, Aug 24, 2011 at 5:00 PM, Roland Haas
<roland.haas at physics.gatech.edu> wrote:
> Hello Steve,
>
>> I was wondering if there a way to do something like this (I'm making up
>> the function names, I don't know if there are real ones)
>>
>> for(int n=0;n<CCTK_Max_Variable_Index(cctkGH);n++) {
>>      CCTK_REAL *gf = CCTK_LookupCCTKRealGF(n);
>>      for(int i=....
>>          for(int j=...
>>              for(int k=...
>>                  gf[CCTK_GFINDEX3D(cctkGH, i, j, k)] = 0
>> }
> There is CCTK_NumVars, CCTK_NumTimeLevelsVI, CCTK_VarDataPtrI to get the
> number of Cactus variables, the number of timelevels for a variable, and
> the pointer to the data of this variable. Information on the type of the
> variable (GF, scalar, CCTK_REAL, CCTK_INT) is likely somehwere in
> GroupTypeFromVarI and CCTK_GroupData though those I have not used myself.
>
> Yours,
> Roland
>
>
> _______________________________________________
> Users mailing list
> Users at einsteintoolkit.org
> http://lists.einsteintoolkit.org/mailman/listinfo/users
>
>



-- 
Erik Schnetter <schnetter at cct.lsu.edu>   http://www.cct.lsu.edu/~eschnett/


More information about the Users mailing list