[cig-commits] commit: Fix HRS_Erosion so that it works when there are processors that do not touch the top of the mesh

Mercurial hg at geodynamics.org
Mon Jun 28 01:05:20 PDT 2010


changeset:   847:a83707404c17
tag:         tip
user:        Walter Landry <wlandry at caltech.edu>
date:        Mon Jun 28 01:03:07 2010 -0700
files:       plugins/HRS_Erosion/HRS_Erosion.c
description:
Fix HRS_Erosion so that it works when there are processors that do not touch the top of the mesh


diff -r 8c1c069c7f4f -r a83707404c17 plugins/HRS_Erosion/HRS_Erosion.c
--- a/plugins/HRS_Erosion/HRS_Erosion.c	Wed May 26 22:47:37 2010 -0700
+++ b/plugins/HRS_Erosion/HRS_Erosion.c	Mon Jun 28 01:03:07 2010 -0700
@@ -142,6 +142,8 @@ void Underworld_HRS_Erosion_Execute( Tim
   /* Get the coordinates on the left for where the height rises above
      the base height */
   base_height=DBL_MAX;
+  y_left=DBL_MAX;
+  x_left=DBL_MAX;
 
   if(on_top)
     {
@@ -194,6 +196,9 @@ void Underworld_HRS_Erosion_Execute( Tim
   x_left=temp;
   MPI_Allreduce( &y_left, &temp, 1, MPI_DOUBLE, MPI_MIN, comm );
   y_left=temp;
+  MPI_Allreduce( &base_height, &temp, 1, MPI_DOUBLE, MPI_MIN, comm );
+  base_height=temp;
+
 
   /* Leave if no one found the rise */
 



More information about the CIG-COMMITS mailing list