[aspect-devel] Questions about Integrating the GyPSuM Tomography Model into ASPECT
Hafter,David Phillip
dhafter at ufl.edu
Thu Nov 9 13:09:19 PST 2017
Hi Wolfgang,
Thanks for the reply.
> I think you're trying to do too many things at once :-) When developing
> software, you want to do this in small increments that you can then
> independently test. For example, if you're seeing very large numbers that are
> clearly wrong in a parallel code, try to test things in a sequential setting
> first -- does it work correctly there? That is, does it *produce reasonable
> numbers*, and are these numbers *correct*?
The code that was inserted into ASPECT was tested independently and sequentially. It wasn't until we confirmed that the code was working correctly that we tried to integrate it into ASPECT.
> When testing these things, it's ok to hard-code the inner and outer radius for
> a moment. You can later generalize this by reading parameters from some model
> at run-time, but first make sure that the results you get are actually correct
> before you start making the code more complicated.
We did hardcode the inner and outer radii for testing purposes, but I figured I'd ask about that functionality as part of this thread since it was something that was going to have to be resolved at some point. I'm also generally curious about the proper way to call parameters that are being read by other modules.
> So, concretely:
> * Can you read in the GyPSuM files?
These are being read correctly.
> * When you run the code on one processor, does it run through in debug mode
> without errors?
When all of the calculations were in the template, the code would compile in debug mode, but the coefficients were inaccurate and ASPECT would crash shortly after the runs were started (the temperature perturbations were being reported as inf). After moving the calculations to the SphericalHarmonicsLookup class, the code compiles and the coefficients are correct (any depth-dependent calculations were done at a hardcoded depth rather than at the position in the mesh that ASPECT is populating). However, I haven't been able to test whether ASPECT will run with these calculations because I don't know how to pass the mesh position to the class (so these coefficients are only being tested at one point).
> * If it runs, do the initial temperature fields look reasonable?
> * Have you verified that they are in fact correct, for example by comparing
> the numerical values with those obtained with another program? For this
> step, it's also ok to not run a time-dependent simulation -- just do one
> time step and output initial temperature and other fields via their
> respective visualization postprocessors.
> If you've made it this far, you're already 3/4 there and adding some run-time
> parameters such as radii as well as parallelization will be easy. But first
> steps first -- how far down this list above can you make it?
I make it about halfway down the list. If I leave the code in the template, I gain access to the mesh position, but the coefficients are inaccurate. When I move the code into the SphericalHarmonicsLookup class, the coefficients are accurate, but I can't make any depth dependent calculations because I don't know how to pass the mesh position to the class.
Thanks again for the help.
David Hafter
<https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.geodynamics.org_cgi-2Dbin_mailman_listinfo_aspect-2Ddevel&d=DwIGaQ&c=pZJPUDQ3SB9JplYbifm4nt2lEVG5pWx2KikqINpWlZM&r=k8VUufC8-pa5aLNMXlgSfA&m=rbUU0Hy0OgFhRtAh66EIz6YcsVng5CNPf9sDJ2Y_rD0&s=J1iY2X4eSBDMBbrkaS8gveVCVVw1IKdmZRovXR9_ldI&e=>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geodynamics.org/pipermail/aspect-devel/attachments/20171109/5c1ed1be/attachment.html>
More information about the Aspect-devel
mailing list