[cig-commits] r21055 - mc/1D/hc/trunk
becker at geodynamics.org
becker at geodynamics.org
Mon Nov 19 16:55:44 PST 2012
Author: becker
Date: 2012-11-19 16:55:43 -0800 (Mon, 19 Nov 2012)
New Revision: 21055
Modified:
mc/1D/hc/trunk/hc.h
mc/1D/hc/trunk/hc_init.c
mc/1D/hc/trunk/hc_solve.c
mc/1D/hc/trunk/main.c
Log:
Some bookkeeping.
Modified: mc/1D/hc/trunk/hc.h
===================================================================
--- mc/1D/hc/trunk/hc.h 2012-11-19 17:12:38 UTC (rev 21054)
+++ mc/1D/hc/trunk/hc.h 2012-11-20 00:55:43 UTC (rev 21055)
@@ -205,6 +205,7 @@
hc_boolean sol_binary_out; /* binary or ASCII output of SH expansion */
hc_boolean print_spatial; /* print the spatial solution */
hc_boolean compute_geoid; /* compute and print the geoid */
+ hc_boolean print_density_field; /* print the scaled density field */
hc_boolean compute_geoid_correlations; /* compute correlations only */
int solution_mode; /* velocity or stress */
Modified: mc/1D/hc/trunk/hc_init.c
===================================================================
--- mc/1D/hc/trunk/hc_init.c 2012-11-19 17:12:38 UTC (rev 21054)
+++ mc/1D/hc/trunk/hc_init.c 2012-11-20 00:55:43 UTC (rev 21055)
@@ -47,7 +47,10 @@
p->verbose = 0; /* debugging output? (0,1,2,3,4...) */
p->sol_binary_out = TRUE; /* binary or ASCII output of SH expansion */
- p->solution_mode = HC_VEL; /* default: velocity */
+ p->solution_mode = HC_VEL; /* default: velocity output */
+
+ p->print_density_field = TRUE; /* print the scaled density field (useful for debugging) */
+
p->solver_mode = HC_SOLVER_MODE_DEFAULT ;
p->print_pt_sol = FALSE;
Modified: mc/1D/hc/trunk/hc_solve.c
===================================================================
--- mc/1D/hc/trunk/hc_solve.c 2012-11-19 17:12:38 UTC (rev 21054)
+++ mc/1D/hc/trunk/hc_solve.c 2012-11-20 00:55:43 UTC (rev 21055)
@@ -12,7 +12,7 @@
solve_mode: solution mode, used for summing the solutions
compute_geoid: compute the geoid (this is done half-way anyway, and
- should not add much computation time)
+ should not add much computation time)
geoid: geoid expansion, needs to be initialized
Modified: mc/1D/hc/trunk/main.c
===================================================================
--- mc/1D/hc/trunk/main.c 2012-11-19 17:12:38 UTC (rev 21054)
+++ mc/1D/hc/trunk/main.c 2012-11-20 00:55:43 UTC (rev 21055)
@@ -174,7 +174,9 @@
*/
/*
+
output of spherical harmonics solution
+
*/
switch(p->solution_mode){
case HC_VEL:
@@ -198,24 +200,27 @@
p->solution_mode,
p->sol_binary_out,p->verbose);
fclose(out);
- /*
- print the density field
- */
- sprintf(file_prefix,"dscaled");
- if(p->sol_binary_out)
- sprintf(filename,"%s.%s",file_prefix,HC_SOLOUT_FILE_BINARY);
- else
- sprintf(filename,"%s.%s",file_prefix,HC_SOLOUT_FILE_ASCII);
- if(p->verbose)
- fprintf(stderr,"%s: writing scaled density anomaly field to %s\n",
- argv[0],filename);
-
- out = ggrd_open(filename,"w","main");
- hc_print_dens_anom(model,out,p->sol_binary_out,p->verbose);
- fclose(out);
+ /* */
+ if(p->print_density_field){
+ /*
+ print the density field
+ */
+ sprintf(file_prefix,"dscaled");
+ if(p->sol_binary_out)
+ sprintf(filename,"%s.%s",file_prefix,HC_SOLOUT_FILE_BINARY);
+ else
+ sprintf(filename,"%s.%s",file_prefix,HC_SOLOUT_FILE_ASCII);
+ if(p->verbose)
+ fprintf(stderr,"%s: writing scaled density anomaly field to %s\n",
+ argv[0],filename);
+
+ out = ggrd_open(filename,"w","main");
+ hc_print_dens_anom(model,out,p->sol_binary_out,p->verbose);
+ fclose(out);
+ }
- /* */
+ /* compute the geoid? */
if(p->compute_geoid){
if(p->compute_geoid_correlations){
if(p->compute_geoid == 2){ /* check if all geoids were computed */
More information about the CIG-COMMITS
mailing list