]> https://gitweb.dealii.org/ - release-papers.git/commitdiff
Fix python code indentation broken 9cd9120
authorMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 2 Jun 2020 06:02:05 +0000 (08:02 +0200)
committerMartin Kronbichler <kronbichler@lnm.mw.tum.de>
Tue, 2 Jun 2020 06:02:05 +0000 (08:02 +0200)
9.2/paper.tex

index c5337456f1694ff2e859714575e279a403e99f45..0fc1b2a70f58f48dbcdd77b1eee8d694bcc0dc7e 100644 (file)
@@ -1083,24 +1083,23 @@ and parameters related to the boundary, manifold, and material
 identifiers are assigned. The following listing gives an idea of how
 such code looks:
 \begin{python}
-  import PyDealII.Release as dealii
+import PyDealII.Release as dealii
 
-  triangulation = dealii.Triangulation('2D')
-  triangulation.generate_hyper_shell(center = dealii.Point([0, 0]),
-  inner_radius = 0.5, outer_radius = 1.,
-  n_cells = 0, colorize = True)
+triangulation = dealii.Triangulation('2D')
+triangulation.generate_hyper_shell(center = dealii.Point([0, 0]),
+                                   inner_radius = 0.5, outer_radius = 1.,
+                                   n_cells = 0, colorize = True)
 
-  triangulation.refine_global(2)
+triangulation.refine_global(2)
 
-  for cell in triangulation.active_cells():
-  cell.material_id = 1 if cell.center().x > 0 else 2
+for cell in triangulation.active_cells():
+    cell.material_id = 1 if cell.center().x > 0 else 2
 
-  for face in cell.faces():
-  if face.at_boundary() and\
-  face.boundary_id == 1:
-  cell.refine_flag ='isotropic'
+    for face in cell.faces():
+        if face.at_boundary() and face.boundary_id == 1:
+            cell.refine_flag = 'isotropic'
 
-  triangulation.execute_coarsening_and_refinement()
+triangulation.execute_coarsening_and_refinement()
 \end{python}
 The mesh that results from this code is shown in Fig.~\ref{fig:pymesh}.
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.