Skip to content

Commit

Permalink
Merge pull request #131 from kwschultz/master
Browse files Browse the repository at this point in the history
Ready for new version release
  • Loading branch information
kwschultz committed Jan 21, 2016
2 parents 0ec2c1e + 85655f2 commit ecc036e
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
11 changes: 6 additions & 5 deletions PyVQ/pyvq/pyvq.py
Original file line number Diff line number Diff line change
Expand Up @@ -1986,16 +1986,16 @@ def scatter_and_error_polygon(self, fig, log_y, x_data, y_data, err_x, err_y, y_
widths = [x_bounds[i][1] - x_bounds[i][0]for i in range(len(x_bounds))]
heigths = [y_bounds[i][1] - y_bounds[i][0]for i in range(len(y_bounds))]
for i in range(len(x_bounds)):
if i==0: ax.add_patch(mpatches.Rectangle(x0_y0[i], widths[i], heigths[i], alpha=0.55, facecolor='r', label='{} 95% confidence bounds'.format(err_label)))
else: ax.add_patch(mpatches.Rectangle(x0_y0[i], widths[i], heigths[i], alpha=0.55, facecolor='r'))
if i==0: ax.add_patch(mpatches.Rectangle(x0_y0[i], widths[i], heigths[i], alpha=0.4, facecolor='r', label='{} 95% confidence bounds'.format(err_label)))
else: ax.add_patch(mpatches.Rectangle(x0_y0[i], widths[i], heigths[i], alpha=0.4, facecolor='r'))

ax.scatter(x_data, y_data, label=label, alpha=SCATTER_ALPHA, color=STAT_COLOR_CYCLE[0], s=SCATTER_SIZE, zorder=10)
if add_x is not None:
if log_y: ax.semilogy(add_x, add_y, label = add_label, c = 'r', zorder=5)
if not log_y: ax.plot(add_x, add_y, label = add_label, c = 'r', zorder=5)
plt.gca().get_xaxis().get_major_formatter().set_useOffset(False)
#if args.max_magnitude is None:
# plt.xlim(plt.xlim()[0], max(x_data))
if args.max_magnitude is None:
plt.xlim(plt.xlim()[0], max(max(x_data),8.05))
#ax.legend(loc = "best")
#plt.savefig(filename,dpi=100)
#sys.stdout.write("Plot saved: {}\n".format(filename))
Expand Down Expand Up @@ -3034,7 +3034,8 @@ def leonard_2010(self, type, min_mag, max_mag, num=5):
raise BaseException("Must specify a fault model with --model_file.")
else:
units = "Pa"
if float(args.reference) == 1e6: units = "MPa"
if args.reference is not None:
if float(args.reference) == 1e6: units = "MPa"
fig = plt.figure()
model_file = args.model_file
drops = geometry.get_stress_drops()
Expand Down
6 changes: 3 additions & 3 deletions doc/vq.tex
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%% Lyx Title Page
\title{Virtual Quake User Manual}
\author{Kasey W. Schultz\\Eric M. Heien\\Michael K. Sachs\\Mark R. Yoder\\John M. Wilson\\John B. Rundle\\Donald L. Turcotte\\\\ \copyright University of California, Davis\\
Version 2.1.0}
Version 2.1.1}
%\date{\noindent \today}


Expand Down Expand Up @@ -107,7 +107,7 @@
\hfill{\Huge \fontfamily{\sfdefault}\selectfont User Manual \\
% FILL: manual version
% e.g. 1.0
\raggedleft \huge \fontfamily{\sfdefault}\selectfont Version {2.1.0}\\}
\raggedleft \huge \fontfamily{\sfdefault}\selectfont Version {2.1.1}\\}

%AUTHOR(S) & WEBSITE%
\null
Expand Down Expand Up @@ -207,7 +207,7 @@ \section*{Citation}

And to cite the manual:
\begin{itemize}
\item K. W. Schultz, E. M. Heien, M. K. Sachs, M. R. Yoder, J. M. Wilson, J. B. Rundle, D. L. Turcotte (2015), Virtual Quake User Manual, Version 2.1.0. Davis, California, USA: Computational Infrastructure for Geodynamics. URL: \href{http://geodynamics.org/cig/software/github/vq/v2.1.0/vq_manual_2.1.0.pdf}{geodynamics.org/cig/software/github/vq/v2.1.0/vq\_manual\_2.1.0.pdf}
\item K. W. Schultz, E. M. Heien, M. K. Sachs, M. R. Yoder, J. M. Wilson, J. B. Rundle, D. L. Turcotte (2015), Virtual Quake User Manual, Version 2.1.1. Davis, California, USA: Computational Infrastructure for Geodynamics. URL: \href{http://geodynamics.org/cig/software/github/vq/v2.1.1/vq_manual_2.1.1.pdf}{geodynamics.org/cig/software/github/vq/v2.1.1/vq\_manual\_2.1.1.pdf}
\end{itemize}

The developers also request that in your oral presentations and in
Expand Down
2 changes: 1 addition & 1 deletion quakelib/src/QuakeLibIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2204,7 +2204,7 @@ int quakelib::ModelWorld::read_files_eqsim(const std::string &geom_file_name, co
for (it=sit->second.rectangles.begin(); it!=sit->second.rectangles.end(); ++it) {
quakelib::ModelElement new_element;
unsigned int i;

// Initialize fault slip rate tapering data structures
section_taper_flow[sit->second.sid()] = 0.0;
section_taper_full[sit->second.sid()] = 0.0;
Expand Down
12 changes: 6 additions & 6 deletions src/mesher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ int main (int argc, char **argv) {
std::string eqsim_geom_out_file, eqsim_fric_out_file, eqsim_cond_out_file;
std::string stat_out_file;
std::vector<std::string> files[2], types[2];
std::string taper_fault_method;
std::string taper_fault_method;
std::vector<double> trace_element_sizes;
double stress_drop_factor = 0.3; // default value is a reasonable 0.3
int ch, res;
Expand Down Expand Up @@ -329,11 +329,11 @@ int main (int argc, char **argv) {
}

// Check that the taper methods are valid
if (taper_fault_method != "none" && taper_fault_method != "taper"
&& taper_fault_method != "taper_full" && taper_fault_method != "taper_renorm") {
std::cerr << "ERROR: Taper method " << taper_fault_method << " must be one of: none, taper, taper_full, taper_renorm." << std::endl;
arg_error = true;
}
if (taper_fault_method != "none" && taper_fault_method != "taper"
&& taper_fault_method != "taper_full" && taper_fault_method != "taper_renorm") {
std::cerr << "ERROR: Taper method " << taper_fault_method << " must be one of: none, taper, taper_full, taper_renorm." << std::endl;
arg_error = true;
}

if (!(compute_stress_drops) && (eqsim_fric_in_file.empty() || eqsim_geom_in_file.empty() )) {
std::cerr << "ERROR: If not computing stress drops, must specify EQSim geometry and EQSim friction file. EQSim friction should contain stress drops." << std::endl;
Expand Down
2 changes: 1 addition & 1 deletion src/simulation/UpdateBlockStress.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void UpdateBlockStress::init(SimFramework *_sim) {

sim->setDynamicVal(gid, sim->getDynamic());
sim->setFailed(gid, false);

// Set stresses to their specified initial values
sim->setShearStress(gid, sim->getInitShearStress(gid));
sim->setNormalStress(gid, sim->getInitNormalStress(gid));
Expand Down

0 comments on commit ecc036e

Please sign in to comment.