[Users] easy question
Roland Haas
roland.haas at physics.gatech.edu
Wed Aug 24 16:00:56 CDT 2011
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
Url : http://lists.einsteintoolkit.org/pipermail/users/attachments/20110824/5fd470a3/attachment.bin
More information about the Users
mailing list