[aspect-devel] hacking aspect

Thomas Geenen geenen at gmail.com
Mon Jan 9 07:55:11 PST 2012

it seems that per timestep there are multiple lines written to
for the tables model 3 lines per timestep.
each line contains a subset of the results with all other values zero. (the
correct number of columns)

also i added a postprocessor class that recomputes some of the quantities
from the heat_flux_statistics.cc class.
i would like to be able to skip this postprocessor. at the moment it loops
over all postprocessors.
it would be nice if i can set which postprocessor to use from the input


On Mon, Jan 9, 2012 at 10:32 AM, Thomas Geenen <geenen at gmail.com> wrote:

> ok
> actually reading the documentation is not such a bad idea.....
> building my own postprocessor class for the Simple model now and using the
> statistics object.
> @time i solved my issue with const GeometryModel::SphericalShell<dim>
> *geometry = NULL;
> cheers
> Thomas
> On Sat, Jan 7, 2012 at 1:28 AM, Wolfgang Bangerth <bangerth at math.tamu.edu>wrote:
>> Hi Thomas,
>> I've taken a look at the changes you made and I think you're making your
>> life much harder than necessary. If I see this right, for every piece of
>> data you want to compute, you open (or keep open) a file and litter the
>> output directory with a bunch of different files. The idea of these
>> postprocessors is different, however: simply put the data you generate into
>> the statistics object every postprocessor function gets as argument, and it
>> will show up in the statistics file in the output directory chosen in the
>> input file. The data you produce will then simply be one column in this
>> file.
>> For example, rather than writing code like
>>   if (this->Vrmsout== NULL) this->Vrmsout = fopen("bin/Vrms.dat", "w");
>>      fprintf(Vrmsout,"%e %e\n", this->get_time(), vrms);
>> and having the Vrmsout handle as a member variable, simply do
>>   statistics.add_value("vrms", vrms);
>> If you run this, take a look at bin/statistics (or whichever directory
>> this is for you) and find a column labeled "vrms" that you can then plot
>> just as easily as the data above.
>> The reason to do it this way is (i) it's simpler, no need to deal with
>> output files by hand; (ii) it's designed to also work in the case where you
>> checkpoint the program and restart it later, which in your scheme will lead
>> to a loss of the data you've generated so far.
>> I think it would be useful to transition the code you wrote in revisions
>> 569 and following to the scheme above. Let me know if you have questions
>> about this and we'll try to help out. I guess I should also write a bit of
>> text in section 7.1.6 of the manual on how this is all supposed to work...
>> Cheers
>>  W.
>> ------------------------------**------------------------------**
>> ------------
>> Wolfgang Bangerth               email:            bangerth at math.tamu.edu
>>                                www: http://www.math.tamu.edu/~**bangerth/<http://www.math.tamu.edu/~bangerth/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://geodynamics.org/pipermail/aspect-devel/attachments/20120109/3f63f8e5/attachment.htm 

More information about the Aspect-devel mailing list