From: Martin Kronbichler Date: Tue, 2 Jun 2020 06:02:05 +0000 (+0200) Subject: Fix python code indentation broken 9cd9120 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=866ca5d1a6dada569d7651b123c170ff6850b20c;p=release-papers.git Fix python code indentation broken 9cd9120 --- diff --git a/9.2/paper.tex b/9.2/paper.tex index c533745..0fc1b2a 100644 --- a/9.2/paper.tex +++ b/9.2/paper.tex @@ -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}.