# Diff of /branches/doubleplusgood/doc/cookbook/example09.tex

revision 4344 by jfenwick, Wed Feb 27 03:42:40 2013 UTC revision 4345 by jfenwick, Fri Mar 29 07:09:41 2013 UTC
# Line 53  We now start to specify the components o Line 53  We now start to specify the components o
53  using the \verb!Point! primitive. These are then joined by lines in a regular  using the \verb!Point! primitive. These are then joined by lines in a regular
54  manner taking note of the right hand rule. Finally, the lines are turned into  manner taking note of the right hand rule. Finally, the lines are turned into
55  loops and then planar surfaces.  loops and then planar surfaces.
56  \footnote{Some code has been emmitted here for  \footnote{Some code has been omitted here for
57  simlpicity. For the full script please refer to the script referenced at the beginning of  simplicity. For the full script please refer to the script referenced at the beginning of
58  this section.}  this section.}
59  \begin{python}  \begin{python}
60  ####################################################DOMAIN CONSTRUCTION  ####################################################DOMAIN CONSTRUCTION
# Line 213  Now the data object \verb|stop| has the Line 213  Now the data object \verb|stop| has the
213  \verb!'stop'! and zero everywhere else.  \verb!'stop'! and zero everywhere else.
214  %  %
215   To apply our function to the boundary only on \verb|stop| we now   To apply our function to the boundary only on \verb|stop| we now
216   mulitply it by \verb|stop|   multiply it by \verb|stop|
217  \begin{python}  \begin{python}
218  xb=FunctionOnBoundary(domain).getX()  xb=FunctionOnBoundary(domain).getX()
219  yx=(cos(length(xb-xc)*3.1415/src_length)+1)*whereNegative(length(xb-xc)-src_length)  yx=(cos(length(xb-xc)*3.1415/src_length)+1)*whereNegative(length(xb-xc)-src_length)

Legend:
 Removed from v.4344 changed lines Added in v.4345