Christian, thanks so much !<br><br>Your code seems to contain everything I wanted to calculate.<br><br>There's one minor mismatched declaration in ML_ADMQuantities which should be fixed anyhow.<br><br>####<br><br>[khi@zenith src]$ diff ML_ADMQuantities.c.ori ML_ADMQuantities.c<br>
56c56<br>< const char *groups[] = {"grid::coordinates","Grid::coordinates","McLachlan::ML_curv","McLachlan::ML_Gamma","McLachlan::ML_lapse","McLachlan::ML_log_confac","McLachlan::ML_metric","McLachlan::ML_shift","McLachlan::ML_trace_curv","ML_ADMQuantities::ML_Jadm","ML_ADMQuantities::ML_Madm"};<br>
---<br>> const char *groups[] = {"grid::coordinates","Grid::coordinates","ML_BSSN::ML_curv","ML_BSSN::ML_Gamma","ML_BSSN::ML_lapse","ML_BSSN::ML_log_confac","ML_BSSN::ML_metric","ML_BSSN::ML_shift","ML_BSSN::ML_trace_curv","ML_ADMQuantities::ML_Jadm","ML_ADMQuantities::ML_Madm"};<br>
<br>####<br><br>Thanks again,<br><br>Hee Il<br><br><div class="gmail_quote">2011/1/5 Christian D. Ott <span dir="ltr"><<a href="mailto:cott@tapir.caltech.edu">cott@tapir.caltech.edu</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
Dear Hee Il,<br>
<br>
I agree that getting this right is tricky. You must set up your grid<br>
functions that you want to reduce in MoL_PseudoEvolution in local<br>
mode, then do the reduction in CCTK_Analysis in global mode.<br>
<br>
I am attaching a Thorn called ZelmaniAnalysis that I use for the<br>
kinds of things you want. The reduction works with Carpet.<br>
<br>
Best,<br>
<br>
- Christian<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On Wed, Jan 05, 2011 at 09:18:21PM +0900, Hee Il Kim wrote:<br>
> Hi,<br>
><br>
> Belated Happy New Year !<br>
><br>
> I am writing a simple code for the calculation of ADM mass and angular<br>
> momentum by using ML_ADMQuantities. As you know, it requires reduction<br>
> procedure for the summation of the integrand, e.g., density * volume<br>
> measure. I've tried various reduction APIs including old deprecated one, but<br>
> I could only succeed in the integration only over the coarsest grid level,<br>
> which was not accurate.<br>
><br>
> If I use the new reduction API in the reference manual of Cactus,<br>
> CCTK_ReduceGridArrays;<br>
><br>
> CCTK_ReduceGridArrays(const cGH *GH,<br>
> int dest_processor,<br>
> int local_reduce_handle,<br>
> int param_table_handle,<br>
> int N_input_arrays,<br>
> const CCTK_INT input_array_variable_indices[],<br>
> int M_output_values,<br>
> const CCTK_INT output_value_type_codes[],<br>
> void* const output_values[]);<br>
><br>
> , I encounter the following error<br>
> ....<br>
> WARNING[L3,P0] (Cactus): CCTK_ReduceGridArrays: no grid array reduction<br>
> registered<br>
> WARNING level 0 in thorn ML_Analysis processor 0 host compute-0-5.local<br>
> (line 159 of Evaluate_ADMQuantities.F90):<br>
> -> Failed to integrate J_z<br>
><br>
> Param_table_handle is not clear to me but it seems not causing the problem.<br>
> The reduction operators are registered by CactusBase/LocalReduce.<br>
><br>
> Could you let me know which reduction function I have to use for this<br>
> calculation? I mean the integration over the whole grid levels. Should I do<br>
> loop over refinenment levels;<br>
> ...<br>
> do loop over reflev<br>
> call CCTK_Reduce<br>
> enddo<br>
> ...<br>
><br>
> Thanks in advance,<br>
><br>
> Hee Il<br>
<br>
</div></div>> _______________________________________________<br>
> Users mailing list<br>
> <a href="mailto:Users@einsteintoolkit.org">Users@einsteintoolkit.org</a><br>
> <a href="http://lists.einsteintoolkit.org/mailman/listinfo/users" target="_blank">http://lists.einsteintoolkit.org/mailman/listinfo/users</a><br>
<br>
</blockquote></div><br>