[cig-commits] commit: Finished working on solvertest geometry fig. Fixed generatefigs.sh script to use pdfcrop.

Mercurial hg at geodynamics.org
Mon Apr 9 16:30:19 PDT 2012


changeset:   94:82e4ed43ad18
tag:         tip
user:        Brad Aagaard <baagaard at usgs.gov>
date:        Mon Apr 09 16:30:07 2012 -0700
files:       figs/cohesivecell.pdf figs/generatefigs.sh figs/solvertest_geometry.tex
description:
Finished working on solvertest geometry fig. Fixed generatefigs.sh script to use pdfcrop.


diff -r 93cea2d31475 -r 82e4ed43ad18 figs/cohesivecell.pdf
Binary file figs/cohesivecell.pdf has changed
diff -r 93cea2d31475 -r 82e4ed43ad18 figs/generatefigs.sh
--- a/figs/generatefigs.sh	Thu Apr 05 17:09:36 2012 -0700
+++ b/figs/generatefigs.sh	Mon Apr 09 16:30:07 2012 -0700
@@ -1,25 +1,9 @@
 #!/bin/bash
 
-pgffiles=cohesivecell
+pgffiles="cohesivecell solvertest_geometry"
 
 for f in $pgffiles; do
-  latex $f.tex && dvips -o $f.ps $f.dvi
+  pdflatex $f.tex
+  pdfcrop --margins 2 $f.pdf $f.tmp && mv -f $f.tmp $f.pdf
+  rm $f.aux $f.log
 done
-
-cat <<EOF > eps.sed
-s/%!PS-Adobe-2.0/%!PS-Adobe-2.0 EPSF-2.0/g
-/%%DocumentPaperSizes: Letter/d
-/%%Pages: 1/d
-/%%PageOrder: Ascend/d
-/%%BeginPaperSize:/{N;N;N;N;N;d;}
-EOF
-
-f=cohesivecell
-sed -e "s/%%BoundingBox: 0 0 612 792/%%BoundingBox: 148 412 595 670/g" $f.ps > $f.tmp
-
-for f in $pgffiles; do
-  sed -f eps.sed $f.tmp > $f.eps
-  epstopdf $f.eps
-  #rm $f.ps $f.tmp $f.eps
-done
-
diff -r 93cea2d31475 -r 82e4ed43ad18 figs/solvertest_geometry.tex
--- a/figs/solvertest_geometry.tex	Thu Apr 05 17:09:36 2012 -0700
+++ b/figs/solvertest_geometry.tex	Mon Apr 09 16:30:07 2012 -0700
@@ -27,13 +27,18 @@
 \tikzstyle{faultleft}=[fill=colleft,line width=0.75pt,opacity=0.7]
 \tikzstyle{faultright}=[fill=colright,line width=0.75pt,opacity=0.7]
 \tikzstyle{faultmiddle}=[fill=colmiddle,line width=0.75pt,opacity=0.7]
+\tikzstyle{slip}=[color=black,line width=1.0pt]
 
-\tikzstyle{boxstyle}=[fill=colbox,opacity=0.5,draw=black,line join=round,shade]
+\tikzstyle{dispbc}=[color=black,line width=2.0pt]
+\tikzstyle{label}=[color=black,font=\bfseries\large]
+
+
+\tikzstyle{boxstyle}=[fill=colbox,opacity=0.4,draw=black,line join=round,shade]
 \tikzstyle{boxshade}=[top color=mdslate,bottom color=ltslate]
 
 \begin{tikzpicture}[>=latex,line width=0.75pt,
-  x  = {(-0.5cm,-0.5cm)},
-  y  = {(0.9659cm,-0.25882cm)},
+  x  = {(+0.5cm,+0.5cm)},
+  y  = {(-0.9659cm,+0.25882cm)},
   z  = {(0cm,1cm)}]
 
 % DOMAIN
@@ -42,44 +47,47 @@
   \path[boxstyle,boxshade] (-3.6,-3.6) rectangle (+3.6,+3.6);
 \end{scope}
 % back 
-\begin{scope}[canvas is zy plane at x=-3.6]
+\begin{scope}[canvas is zy plane at x=+3.6]
   \path[boxstyle,boxshade] (-3.6,-3.6) rectangle (0.0,+3.6);
 \end{scope}
 % left
-\begin{scope}[canvas is zx plane at y=-3.6]
+\begin{scope}[canvas is zx plane at y=+3.6]
   \path[boxstyle,boxshade] (-3.6,-3.6) rectangle (0.0,+3.6);
 \end{scope}
+
+% Right BC
+\draw[dispbc,->] (+3.6,+1.2,-1.8) --  (+3.6,-1.2,-1.8) node[label,right] {2.0 m};
 
 % FAULTS
 % right
 \draw[faultright]
- (+1.0,+1.5,+0.0) -- 
- (+1.0,+1.5,-1.8) -- 
- (+2.0,-1.5,-1.8) -- 
- (+2.0,-1.5,+0.0) -- 
+ (+0.5072,+1.8928,+0.0) -- 
+ (+0.5072,+1.8928,-1.2) -- 
+ (+3.6,-1.2,-1.2) -- 
+ (+3.6,-1.2,+0.0) -- 
  cycle ;
 % middle
 \draw[faultmiddle]
- (-1.0,-1.5,+0.0) -- 
- (-1.0,-1.5,-1.8) -- 
- (+1.0,+1.5,-1.8) -- 
- (+1.0,+1.5,+0.0) -- 
+ (-0.5072,-1.8928,+0.0) -- 
+ (-0.5072,-1.8928,-1.2) -- 
+ (+0.5072,+1.8928,-1.2) -- 
+ (+0.5072,+1.8928,+0.0) -- 
  cycle ;
 % left
 \draw[faultleft]
- (-1.0,-1.5,+0.0) -- 
- (-1.0,-1.5,-1.8) -- 
- (-2.0,+1.5,-1.8) -- 
- (-2.0,+1.5,+0.0) -- 
+ (-0.5072,-1.8928,+0.0) -- 
+ (-0.5072,-1.8928,-1.2) -- 
+ (-3.6,+1.2,-1.2) -- 
+ (-3.6,+1.2,+0.0) -- 
  cycle ;
 
 % DOMAIN
 % front
-\begin{scope}[canvas is zy plane at x=+3.6]
+\begin{scope}[canvas is zy plane at x=-3.6]
   \path[boxstyle,boxshade] (-3.6,-3.6) rectangle (0.0,+3.6);
 \end{scope}
 % right
-\begin{scope}[canvas is zx plane at y=+3.6]
+\begin{scope}[canvas is zx plane at y=-3.6]
   \path[boxstyle,boxshade] (-3.6,-3.6) rectangle (0.0,+3.6);
 \end{scope}
 % top
@@ -87,9 +95,24 @@
   \path[boxstyle,boxshade] (-3.6,-3.6) rectangle (+3.6,+3.6);
 \end{scope}
 
-% Boundary conditions
+% Left BC
+\draw[dispbc,->] (-3.6,-1.2,-1.8) -- (-3.6,+1.2,-1.8) node[label,left] {2.0 m};
 
 % Fault slip vectors
+\draw[slip,->] ($(-0.1268,-0.4732,0.0)+(-0.09690,0.02588,0.0)$) -- 
+               ($(+0.1268,+0.4732,0.0)+(-0.09690,0.02588,0.0)$);
+\draw[slip,->] ($(+0.1268,+0.4732,0.0)-(-0.09690,0.02588,0.0)$) -- 
+               ($(-0.1268,-0.4732,0.0)-(-0.09690,0.02588,0.0)$);
+
+\draw[slip,->] ($(-2.4402,+0.0402,0.0)-(+0.07071,+0.07071,0.0)$) --
+               ($(-1.6670,-0.7330,0.0)-(+0.07071,+0.07071,0.0)$);
+\draw[slip,->] ($(-1.6670,-0.7330,0.0)+(+0.07071,+0.07071,0.0)$) --
+               ($(-2.4402,+0.0402,0.0)+(+0.07071,+0.07071,0.0)$);
+
+\draw[slip,->] ($(+1.6670,+0.7330,0.0)+(+0.07071,+0.07071,0.0)$) -- 
+               ($(+2.4402,-0.0402,0.0)+(+0.07071,+0.07071,0.0)$);
+\draw[slip,->] ($(+2.4402,-0.0402,0.0)-(+0.07071,+0.07071,0.0)$) -- 
+               ($(+1.6670,+0.7330,0.0)-(+0.07071,+0.07071,0.0)$);
 
 \end{tikzpicture}
 \end{document}



More information about the CIG-COMMITS mailing list