[aspect-devel] The output of nonadiabatic_temperature

Juliane Dannberg dannberg at gfz-potsdam.de
Tue Oct 25 11:08:38 PDT 2016

Hi Nan,

> I spent a long time to understand the namespace in aspect, and finally 
> defined a global array to transfer the average temperature 
> into compute_derived_quantities_vector(). I passed the compiling, and 
> am doing the calculation test.
> While, I still have a question for the virtual 
> function compute_derived_quantities_vector(). I found that it is never 
> called directly either in the visualization or the simulator, by grep 
> -r "compute_derived_quantities_vector" . under the source directory. I 
> could guess where it is called in the visualization.cc. But, could you 
> accurately point me where it is called. I want to understand the logic 
> flow more clearly.
In visualization.cc in the execute() function is where the data of the 
individual postprocessors is computed and added to the output. However, 
much of that happens within deal.ii. That is also why you don't find the 
call to the compute_derived_quantities_vector() function within the 
source directory of Aspect, it's called from deal.ii. I think 
compute_derived_quantities_vector() is called from 
data_out.build_patches() (line 439).  If you want to know more about how 
exactly that works, you can have a look at the documentation of the 
DataOut class in deal.ii.


> On Tue, Oct 25, 2016 at 9:48 AM, Juliane Dannberg 
> <dannberg at gfz-potsdam.de <mailto:dannberg at gfz-potsdam.de>> wrote:
>     Hi Nan,
>     from what I see, you might have declared your ave_temp vector in a
>     place that you can not access from where you want to use it (in
>     your postprocessor). You declared it within the Visualization
>     class, and try to access it in a different class (which is also
>     not derived from Visualization).
>     So you probably would want to declare and fill your average
>     temperature vector in a different place in the code. The
>     Visualization class is used just to generate graphical output for
>     all visualization postprocessors, and it doesn't compute any of
>     the output quantities for the individual postprocessors.
>     So the very easy to implement (but also very slow) option would be
>     to call the function that does the lateral averaging directly
>     within compute_derived_quantities_vector().
>     Alternatively, you could have a look at the "Dynamic Topography"
>     postprocessor that demonstrates how you would write a
>     visualization postprocessor that has to loop over all cells for
>     the computation of the output.
>     In general, it is always helpful if you send the whole patch (or a
>     link to a version of the code that reproduces the error, e.g. on
>     github) because then we can reproduce the error and it's easier to
>     fix it.
>     Best,
>     Juliane

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20161025/1a8d054e/attachment.html>

More information about the Aspect-devel mailing list