/[escript]/trunk/doc/user/pycad.tex
ViewVC logotype

Diff of /trunk/doc/user/pycad.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 3320 by caltinay, Mon Oct 25 05:09:13 2010 UTC revision 3321 by gross, Thu Oct 28 05:02:41 2010 UTC
# Line 231  l01=Line(p0,p1) Line 231  l01=Line(p0,p1)
231  l13=Line(p1,p3)  l13=Line(p1,p3)
232  l32=Line(p3,p2)  l32=Line(p3,p2)
233  l20=Line(p2,p0)  l20=Line(p2,p0)
234  bottom=PlaneSurface(CurveLoop(l01,l13,l32,l20))  bottom=PlaneSurface(-CurveLoop(l01,l13,l32,l20))
235  \end{python}  \end{python}
236  and  Similar to the definition of a \code{CurvedLoop} the orientation of the surfaces \code{SurfaceLoop} is relevant. In fact the surface normal direction defined by the the right hand rule needs to point outwards as indicated by the surface normals in
237    Figure~\ref{fig:PYCAD 2}. As the \code{bottom} face is directed upwards it is inserted with the minus sign
238    into the \code{SurfaceLoop} in order to adjust the orientation of the surface.
239    Similarly we set
240  \begin{python}  \begin{python}
241  l45=Line(p4,p5)  l45=Line(p4,p5)
242  l57=Line(p5,p7)  l57=Line(p5,p7)
# Line 264  right=PlaneSurface(CurveLoop(-l15,l13,l3 Line 267  right=PlaneSurface(CurveLoop(-l15,l13,l3
267  We can now put the six surfaces together to form a \class{SurfaceLoop} defining the  We can now put the six surfaces together to form a \class{SurfaceLoop} defining the
268  boundary of the volume of the cube:  boundary of the volume of the cube:
269  \begin{python}  \begin{python}
270  sl=SurfaceLoop(top,-bottom,front,back,left,right)  sl=SurfaceLoop(top,bottom,front,back,left,right)
271  v=Volume(sl)  v=Volume(sl)
272  \end{python}  \end{python}
 Similar to the definition of a \code{CurvedLoop} the orientation of the surfaces \code{SurfaceLoop} is relevant. In fact the surface normal direction defined by the the right hand rule needs to point outwards as indicated by the surface normals in  
 Figure~\ref{fig:PYCAD 2}. As the \code{bottom} face is directed upwards it is inserted with the minus sign  
 into the \code{SurfaceLoop} in order to adjust the orientation of the surface.  
   
273  As in the 2D case, the \class{Design} class is used to define the geometry:  As in the 2D case, the \class{Design} class is used to define the geometry:
274  \begin{python}  \begin{python}
275  from esys.pycad.gmsh import Design  from esys.pycad.gmsh import Design

Legend:
Removed from v.3320  
changed lines
  Added in v.3321

  ViewVC Help
Powered by ViewVC 1.1.26