[cig-commits] [commit] devel, master: added a test to check that the center of mass of the model is located in zero when computing Roland_Sylvain integrals (3ecbc57)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Thu Nov 6 08:28:02 PST 2014


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

On branches: devel,master
Link       : https://github.com/geodynamics/specfem3d_globe/compare/bc58e579b3b0838a0968725a076f5904845437ca...be63f20cbb6f462104e949894dbe205d2398cd7f

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

commit 3ecbc57e23f5586d304cd9e20b86a30bd1ed65e4
Author: Dimitri Komatitsch <komatitsch at lma.cnrs-mrs.fr>
Date:   Wed Jul 30 01:23:20 2014 +0200

    added a test to check that the center of mass of the model is located in zero when computing Roland_Sylvain integrals


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

3ecbc57e23f5586d304cd9e20b86a30bd1ed65e4
 src/meshfem3D/finalize_mesher.f90 | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/meshfem3D/finalize_mesher.f90 b/src/meshfem3D/finalize_mesher.f90
index 8d03930..924f568 100644
--- a/src/meshfem3D/finalize_mesher.f90
+++ b/src/meshfem3D/finalize_mesher.f90
@@ -47,7 +47,7 @@
   double precision, parameter :: scaling_factor_gi = GRAV * nondimensionalizing_factor_gi
   double precision, parameter :: scaling_factor_Gij_Eotvos = GRAV * nondimensionalizing_factor_Gij * SI_UNITS_TO_EOTVOS
 
-  double precision :: real_altitude_of_observ_point
+  double precision :: real_altitude_of_observ_point,distance_to_center_in_km
 
   integer :: ixval,iyval,ichunkval
 
@@ -125,8 +125,11 @@
       write(IMAIN,*) '   x = ',(Earth_center_of_mass_x_total / Earth_mass_total) / 1000.d0,' km'
       write(IMAIN,*) '   y = ',(Earth_center_of_mass_y_total / Earth_mass_total) / 1000.d0,' km'
       write(IMAIN,*) '   z = ',(Earth_center_of_mass_z_total / Earth_mass_total) / 1000.d0,' km'
-      write(IMAIN,*) '   distance to center = ',(sqrt(Earth_center_of_mass_x_total**2 + Earth_center_of_mass_y_total**2 + &
-                                                      Earth_center_of_mass_z_total**2) / Earth_mass_total) / 1000.d0,' km'
+      distance_to_center_in_km = (sqrt(Earth_center_of_mass_x_total**2 + Earth_center_of_mass_y_total**2 + &
+                                                      Earth_center_of_mass_z_total**2) / Earth_mass_total) / 1000.d0
+      write(IMAIN,*) '   distance to center = ',distance_to_center_in_km,' km'
+      if(ROLAND_SYLVAIN .and. .not. ONLY_COMPUTE_CENTER_OF_MASS .and. distance_to_center_in_km > 0.01d0) &
+        stop 'error: center of mass of the model is not located in zero for Roland_Sylvain integrals, aborting...'
       write(IMAIN,*)
     endif
 



More information about the CIG-COMMITS mailing list