[aspect-devel] hacking aspect
geenen at gmail.com
Mon Jan 9 01:32:36 PST 2012
actually reading the documentation is not such a bad idea.....
building my own postprocessor class for the Simple model now and using the
@time i solved my issue with const GeometryModel::SphericalShell<dim>
*geometry = NULL;
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
> 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...
> 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...
More information about the Aspect-devel