[cig-commits] [commit] master: Fix a bug that gives wrong velocity near the poles. (64af8ca)

cig_noreply at geodynamics.org cig_noreply at geodynamics.org
Wed Oct 29 06:08:46 PDT 2014


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

On branch  : master
Link       : https://github.com/geodynamics/aspect/compare/a4d34fe709bd538894313ef1f1b5ab7a0e67791f...aad39993908bfd5cc020de4548464f6027d37173

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

commit 64af8ca62a85aada7c86ec769196105eb56aec38
Author: Siqi Zhang <siqi.zhang at mq.edu.au>
Date:   Mon Oct 27 11:15:32 2014 +1100

    Fix a bug that gives wrong velocity near the poles.


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

64af8ca62a85aada7c86ec769196105eb56aec38
 source/velocity_boundary_conditions/gplates.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/source/velocity_boundary_conditions/gplates.cc b/source/velocity_boundary_conditions/gplates.cc
index d3cadf3..b0477bc 100644
--- a/source/velocity_boundary_conditions/gplates.cc
+++ b/source/velocity_boundary_conditions/gplates.cc
@@ -239,7 +239,8 @@ namespace aspect
 
             // Currently it would not be necessary to update the grid positions at every timestep
             // since they are not allowed to change. In case we allow this later, do it anyway.
-            const Tensor<1,3> spherical_position = get_grid_point_position(idx_theta,idx_phi,false);
+            Tensor<1,3> spherical_position = get_grid_point_position(idx_theta,idx_phi,false);
+            if(idx_theta==0 || idx_theta==n_theta-1)spherical_position[1]=0.;
             velocity_positions[idx_theta][idx_phi] = cartesian_surface_coordinates(spherical_position);
             (*velocity_values)[idx_theta][idx_phi] = sphere_to_cart_velocity(spherical_velocities,spherical_position)
                                                      / cmyr_si;



More information about the CIG-COMMITS mailing list