[cig-commits] [commit] master: iidom was undefined in this loop. This lead to crashes with (981debc)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Tue Jan 27 02:17:41 PST 2015


Repository : https://github.com/geodynamics/axisem

On branch  : master
Link       : https://github.com/geodynamics/axisem/compare/9aa15a777d459aecda723e8f03086df91f39d88c...9c8661b9b4b02503a38b62bc2f6e67336cfd8958

>---------------------------------------------------------------

commit 981debcb7ea423e48956864d0d7463ef917f0e45
Author: martinvandriel <vandriel at erdw.ethz.ch>
Date:   Tue Jan 27 11:15:28 2015 +0100

    iidom was undefined in this loop. This lead to crashes with
    
    external models and attenuation switched on. I did NOT test wether the model now makes
    sense in the netcdf file, but is was definitely nonsense before.


>---------------------------------------------------------------

981debcb7ea423e48956864d0d7463ef917f0e45
 SOLVER/get_model.F90 | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/SOLVER/get_model.F90 b/SOLVER/get_model.F90
index 0ee903e..f32a5af 100644
--- a/SOLVER/get_model.F90
+++ b/SOLVER/get_model.F90
@@ -258,7 +258,7 @@ subroutine read_model(rho, lambda, mu, xi_ani, phi_ani, eta_ani, &
                              fa_ani_phi, Q_mu_1d, Q_kappa_1d)
       else
          call plot_model_vtk(rho, lambda, mu, xi_ani, phi_ani, eta_ani, fa_ani_theta, &
-                                 fa_ani_phi)
+                             fa_ani_phi)
       endif
   end if
 
@@ -267,6 +267,7 @@ subroutine read_model(rho, lambda, mu, xi_ani, phi_ani, eta_ani, &
           do iel = 1, nelem     ! iel
              do ipol=0,npol     ! ipol
                 do jpol=0,npol  ! jpol
+                   iidom = ieldom(iel)
                    call compute_coordinates(s, z, r, theta, iel, ipol, jpol)
                    Q_mu(ipol,jpol,iel)    = velocity(r, 'Qmu', iidom, modelstring, lfbkgrdmodel)
                    Q_kappa(ipol,jpol,iel) = velocity(r, 'Qka', iidom, modelstring, lfbkgrdmodel)



More information about the CIG-COMMITS mailing list