[aspect-devel] Benchmark
I. van Zelst
i.vanzelst at students.uu.nl
Fri Jul 4 01:23:10 PDT 2014
Dear Wolfgang,
Thank you for freeing me! Enclosed, you will find the updated .cc file,
input file, .pdf file and .tex file.
Kind regards,
Iris
2014-07-03 17:31 GMT+02:00 Wolfgang Bangerth <bangerth at math.tamu.edu>:
>
> Hi Iris,
>
>
> The code now runs in parallel and I have written a bit about it.
>>
>
> Very nice. With one more round of small changes I'll be happy to add this
> to the manual. The changes are related to this:
>
>
>
> The final
>> version of the plugin, the figures and my writings are attached. A problem
>> that I solved very ungraciously is that the same parameter "Viscosity
>> parameter" has to be inserted twice by the user in the input file in both
>> the
>> Material Model and the Gravity Model. This might be something that could
>> be
>> improved in the .cc file, because it would be more user friendly, but I
>> do not
>> know how to do that.
>>
>
> It's actually quite simple once you realize that what you thought are the
> doors to your jail cell are not locked :-)
>
> In your .cc file, you have these two pieces of code:
> void
> BursteddeMaterial<dim>::declare_parameters (ParameterHandler &prm)
> {
> prm.enter_subsection("Material model");
> {
> prm.enter_subsection("Burstedde");
> {
> prm.declare_entry ("Viscosity parameter", "0",
> Patterns::Double (0),
> "Viscosity in the Burstedde.");
> }
> prm.leave_subsection();
> }
> prm.leave_subsection();
> }
> and
> void
> BursteddeGravity<dim>::declare_parameters (ParameterHandler &prm)
> {
> prm.enter_subsection("Gravity model");
> {
> prm.enter_subsection("BursteddeGravity");
> {
> prm.declare_entry ("Viscosity parameter", "0",
> Patterns::Double (0),
> "Viscosity in the Burstedde.");
> }
> prm.leave_subsection ();
> }
> prm.leave_subsection ();
> }
>
> You do this because you think that material parameters need to go into the
> parameter subsection "Material model" and gravity parameters into the
> "Gravity model" subsection. For parameters that are part of the Aspect
> distribution, this is good practice, but for parameters only accessible
> when you load a particular plugin, there is really no particular reason to
> do this. How about this:
>
> void
> BursteddeMaterial<dim>::declare_parameters (ParameterHandler &prm)
> {
> // create a global section in the parameter file for parameters
> // that describe this benchmark. note that we declare them here
> // in the material model, but other kinds of plugins (e.g., the
> gravity
> // model below) may also read these parameters even though they do
> not
> // declare them
> prm.enter_subsection("Burstedde benchmark");
> {
> prm.declare_entry ("Viscosity parameter", "0",
> Patterns::Double (0),
> "Viscosity in the Burstedde.");
> }
> prm.leave_subsection();
> }
> and
> void
> BursteddeGravity<dim>::declare_parameters (ParameterHandler &prm)
> {
> // nothing to declare here. this plugin will, however, read
> parameters
> // declared by the material model in the "Burstedde benchmark"
> section
> }
>
> Best
> W.
>
>
>
> --
> ------------------------------------------------------------------------
> Wolfgang Bangerth email: bangerth at math.tamu.edu
> www: http://www.math.tamu.edu/~bangerth/
>
> _______________________________________________
> Aspect-devel mailing list
> Aspect-devel at geodynamics.org
> http://lists.geodynamics.org/cgi-bin/mailman/listinfo/aspect-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20140704/939350eb/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: burstedde.cc
Type: application/octet-stream
Size: 22105 bytes
Desc: not available
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20140704/939350eb/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: burstedde_benchmark.pdf
Type: application/pdf
Size: 623905 bytes
Desc: not available
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20140704/939350eb/attachment-0001.pdf>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: burstedde_benchmark.tex
Type: application/x-tex
Size: 7236 bytes
Desc: not available
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20140704/939350eb/attachment-0001.tex>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: input_burstedde.prm
Type: application/octet-stream
Size: 3028 bytes
Desc: not available
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20140704/939350eb/attachment-0003.obj>
More information about the Aspect-devel
mailing list