[aspect-devel] The output of nonadiabatic_temperature
Wolfgang Bangerth
bangerth at tamu.edu
Mon Oct 31 18:34:15 PDT 2016
> When I run my new aspect, I got errors like
> ****************************************************
> *** Timestep 100: t=1.18035e+08 years
> Solving temperature system... 16 iterations.
> Solving C_1 system ... 16 iterations.
> Rebuilding Stokes preconditioner...
> Solving Stokes system...
> Postprocessing:
> [125]PETSC ERROR: [127]PETSC ERROR: [126]PETSC ERROR:
> [...]
> I put my 3 modified file
> at https://github.com/NanZHANG-cuboulder/aspect_development/
> <https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_NanZHANG-2Dcuboulder_aspect-5Fdevelopment_&d=CwMFaQ&c=ODFT-G5SujMiGrKuoJJjVg&r=KkOrCga5IcWjxrpeTIn1nmQG6jJSnwzdZwfNniMeeCc&m=6_zs8lkRTl_7cBGlAWG99lVacBabuXWVn3Ko7lFCJ5Y&s=gonlTfzncua-2YtGNGDv7GDd7smM2LSpONCu0H3zzE0&e=>.
> The modifications are marked with nanzhang. I wonder if you guys could help me
> find the problem?
Nan -- you need to learn to use a debugger so you can figure out in what line
of your code the problem happens and, possibly, why.
That said, your problem is (as far as I can tell) caused by the fact that you
declare the ::aspect::ave_temp as 'static' in the header file. It would
require a lengthy email to describe what exactly that entails, but in short
what you need to do is mark it as 'extern' instead, i.e., in visualization.h,
write
extern std::vector<double> ave_temp;
Then, in visualization.cc, write
std::vector<double> ave_temp;
within namespace aspect at the top of the file. I think this will probably do.
Best
W.
--
------------------------------------------------------------------------
Wolfgang Bangerth email: bangerth at colostate.edu
www: http://www.math.colostate.edu/~bangerth/
More information about the Aspect-devel
mailing list