[Users] easy question
Steven R. Brandt
sbrandt at cct.lsu.edu
Wed Aug 24 11:46:27 CDT 2011
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
}
Cheers,
Steve
On 08/24/2011 11:37 AM, Erik Schnetter wrote:
> You can ask Carpet to loop over all timelevels in the scheduler, so
> that your scheduled functions are called multiple times. If you set
> the variables to zero, all timelevels will be zero. You can also ask
> Carpet to copy the current timelevel to all past timelevels after
> initialisation.
>
> Your other alternative is to set the _p and _p_p variables to zero manually.
>
> -erik
>
> On Wed, Aug 24, 2011 at 12:18 PM, Steven R. Brandt<sbrandt at cct.lsu.edu> wrote:
>> Is there an easy way to initialize all variables to zero (including _p _pp)?
>>
>> Cheers,
>> Steve
>> _______________________________________________
>> Users mailing list
>> Users at einsteintoolkit.org
>> http://lists.einsteintoolkit.org/mailman/listinfo/users
>>
>
>
More information about the Users
mailing list