[cig-commits] [commit] rajesh-petsc-schur: Eliminated the 2nd argument of expand_tracer_arrays, which was set to the caps_per_proc loop variable (54f0526)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Wed Nov 5 19:08:40 PST 2014
Repository : https://github.com/geodynamics/citcoms
On branch : rajesh-petsc-schur
Link : https://github.com/geodynamics/citcoms/compare/464e1b32299b15819f93efd98d969cddb84dfe51...f97ae655a50bdbd6dac1923a3471ee4dae178fbd
>---------------------------------------------------------------
commit 54f052688297b93cc11d45bb870333d0281eaa4a
Author: Rajesh Kommu <rajesh.kommu at gmail.com>
Date: Wed Sep 17 16:00:27 2014 -0700
Eliminated the 2nd argument of expand_tracer_arrays, which was set to the caps_per_proc loop variable
>---------------------------------------------------------------
54f052688297b93cc11d45bb870333d0281eaa4a
lib/Full_tracer_advection.c | 3 ++-
lib/Regional_tracer_advection.c | 2 +-
lib/Tracer_setup.c | 16 ++++------------
lib/prototypes.h | 2 +-
4 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/lib/Full_tracer_advection.c b/lib/Full_tracer_advection.c
index 5e93e6b..98926d2 100644
--- a/lib/Full_tracer_advection.c
+++ b/lib/Full_tracer_advection.c
@@ -713,7 +713,8 @@ void full_lost_souls(struct All_variables *E)
for (kk=0;kk<irec[CPPR];kk++) {
E->trace.ntracers[CPPR]++;
- if (E->trace.ntracers[CPPR]>(E->trace.max_ntracers[CPPR]-5)) expand_tracer_arrays(E,j);
+ if (E->trace.ntracers[CPPR]>(E->trace.max_ntracers[CPPR]-5))
+ expand_tracer_arrays(E);
ireceive_position=kk*E->trace.number_of_tracer_quantities;
diff --git a/lib/Regional_tracer_advection.c b/lib/Regional_tracer_advection.c
index 913381e..fa99e7e 100644
--- a/lib/Regional_tracer_advection.c
+++ b/lib/Regional_tracer_advection.c
@@ -812,7 +812,7 @@ static void put_found_tracers(struct All_variables *E,
ilast = E->trace.ntracers[CPPR];
if (E->trace.ntracers[CPPR] > (E->trace.max_ntracers[CPPR]-5))
- expand_tracer_arrays(E, CPPR);
+ expand_tracer_arrays(E);
for (pp=0; pp<E->trace.number_of_basic_quantities; pp++)
E->trace.basicq[CPPR][pp][ilast] = recv[ipos+pp];
diff --git a/lib/Tracer_setup.c b/lib/Tracer_setup.c
index f364435..7cc0755 100644
--- a/lib/Tracer_setup.c
+++ b/lib/Tracer_setup.c
@@ -57,7 +57,7 @@ void gzip_file(char *);
int icheck_that_processor_shell(struct All_variables *E,
int j, int nprocessor, double rad);
void expand_later_array(struct All_variables *E);
-void expand_tracer_arrays(struct All_variables *E, int j);
+void expand_tracer_arrays(struct All_variables *E);
void tracer_post_processing(struct All_variables *E);
void allocate_tracer_arrays(struct All_variables *E, int number_of_tracers);
void count_tracers_of_flavors(struct All_variables *E);
@@ -947,7 +947,8 @@ static void read_tracer_file(struct All_variables *E)
E->trace.ntracers[CPPR]++;
- if (E->trace.ntracers[CPPR]>=(E->trace.max_ntracers[CPPR]-5)) expand_tracer_arrays(E,j);
+ if (E->trace.ntracers[CPPR]>=(E->trace.max_ntracers[CPPR]-5))
+ expand_tracer_arrays(E);
E->trace.basicq[CPPR][0][E->trace.ntracers[CPPR]]=theta;
E->trace.basicq[CPPR][1][E->trace.ntracers[CPPR]]=phi;
@@ -1400,15 +1401,13 @@ void allocate_tracer_arrays(struct All_variables *E, int number_of_tracers)
fprintf(E->trace.fpt,"Physical size of tracer arrays (max_ntracers): %d\n",
E->trace.max_ntracers[CPPR]);
fflush(E->trace.fpt);
-
- return;
}
/****** EXPAND TRACER ARRAYS *****************************************/
-void expand_tracer_arrays(struct All_variables *E, int j)
+void expand_tracer_arrays(struct All_variables *E)
{
int inewsize;
@@ -1448,8 +1447,6 @@ void expand_tracer_arrays(struct All_variables *E, int j)
inewsize,E->trace.max_ntracers[CPPR]);
E->trace.max_ntracers[CPPR]=inewsize;
-
- return;
}
@@ -1558,9 +1555,6 @@ static void put_away_later(struct All_variables *E, int j, int it)
for (kk=0;kk<=((E->trace.number_of_extra_quantities)-1);kk++)
E->trace.rlater[CPPR][E->trace.number_of_basic_quantities+kk][E->trace.ilater[CPPR]]=E->trace.extraq[CPPR][kk][it];
-
-
- return;
}
@@ -1699,5 +1693,3 @@ int icheck_that_processor_shell(struct All_variables *E,
return 0;
}
-
-
diff --git a/lib/prototypes.h b/lib/prototypes.h
index 79385c4..0535410 100644
--- a/lib/prototypes.h
+++ b/lib/prototypes.h
@@ -511,7 +511,7 @@ void cart_to_sphere(struct All_variables *, double, double, double, double *, do
void sphere_to_cart(struct All_variables *, double, double, double, double *, double *, double *);
void get_neighboring_caps(struct All_variables *);
void allocate_tracer_arrays(struct All_variables *, int);
-void expand_tracer_arrays(struct All_variables *, int);
+void expand_tracer_arrays(struct All_variables *);
void expand_later_array(struct All_variables *);
int icheck_processor_shell(struct All_variables *, int, double);
int icheck_that_processor_shell(struct All_variables *, int, int, double);
More information about the CIG-COMMITS
mailing list