├── .github └── workflows │ └── python-test.yml ├── LICENSE ├── README.md ├── examples ├── 0_annulus │ └── driver.py ├── 1_supersonic │ └── driver.py ├── 2_ringleb │ └── driver.py ├── 3_blobs │ └── driver.py ├── 4_annulus_acoustics │ └── driver.py ├── 5_circles │ └── driver.py ├── 6_channel │ └── driver.py ├── 7_doublemach │ └── driver.py ├── 8_argrun │ └── driver.py └── README.md ├── images ├── aligned.png ├── annulus.png ├── annulus_zoom.png ├── blobs.png ├── gridgen.png ├── ringleb.png ├── ringleb_zoom.png ├── split.png └── tunneled.png ├── pygrid2d ├── PyGrid2D.py ├── __init__.py ├── annulus.py ├── annulus_acoustics.py ├── bisection.py ├── blobs.py ├── channel.py ├── circles.py ├── domain.py ├── doublemach.py ├── output.py ├── plot_mesh.py ├── ringleb.py └── supersonic.py ├── setup.py └── tests ├── data ├── annulus_10_10_q1.ply ├── annulus_20_20_q2.ply ├── annulus_30_30_q3.ply ├── annulus_40_40_q4.ply ├── annulus_50_50_q5.ply ├── ringleb_10_10_q1.ply ├── ringleb_20_20_q2.ply ├── ringleb_30_30_q3.ply ├── ringleb_40_40_q4.ply ├── supersonic_10_10_q1.ply ├── supersonic_20_20_q2.ply ├── supersonic_30_30_q3.ply ├── supersonic_40_40_q4.ply └── supersonic_50_50_q5.ply └── test_PyGrid.py /.github/workflows/python-test.yml: -------------------------------------------------------------------------------- 1 | # This is a basic workflow to help you get started with Actions 2 | 3 | name: CI 4 | 5 | # Controls when the workflow will run 6 | on: 7 | # Triggers the workflow on push or pull request events but only for the main branch 8 | push: 9 | branches: [ main ] 10 | pull_request: 11 | branches: [ main ] 12 | 13 | # Allows you to run this workflow manually from the Actions tab 14 | workflow_dispatch: 15 | 16 | # A workflow run is made up of one or more jobs that can run sequentially or in parallel 17 | jobs: 18 | # This workflow contains a single job called "build" 19 | build: 20 | # The type of runner that the job will run on 21 | runs-on: ubuntu-latest 22 | 23 | # Steps represent a sequence of tasks that will be executed as part of the job 24 | steps: 25 | # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it 26 | - uses: actions/checkout@v2 27 | 28 | # Runs a set of commands using the runners shell 29 | - name: install 30 | run: | 31 | echo test, and deploy your project. 32 | pip install . 33 | 34 | - name: ls -l again 35 | run: | 36 | ls -l 37 | pwd 38 | 39 | - name: run test 40 | run: | 41 | cd tests 42 | ls -l 43 | pytest . 44 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 andrewgiuliani 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # PyGrid2D 2 | 3 | 4 |  5 | 6 | 7 | 8 | This is a short Python code that generates two dimensional high order embedded boundary grids. The code is fast, with most operations fully vectorized in Numpy. There are a number of domains already implemented from [1], that include an annulus domain as well as the domain used in Ringleb flow. 9 |
10 |
11 |
12 |
High order embedded boundary annulus (left) and Ringleb (right) domains. Each curved boundary segment has q+1 boundary points (red dots), where q = 3.
14 | 15 | 16 | ## Installation 17 | To install, navigate to the cloned github repository, and call 18 | ``` 19 | pip install -e . 20 | ``` 21 | 22 | ## Goal 23 | The goal of this work is to provide an easy to install, high order cut cell grid generator for simple boundary geometries that have a functional representation. PyGrid assumes that each cut cell has only one or two, possibly curved, edges associated to the embedded boundary. 24 | 25 |
26 |
27 |
28 |
Zooms onto cut cells of the annulus and Ringleb meshes. Cut cells can have either one (left) or two curved edges (right). Cut cells with two curved edges can occur on sharp corners of the embedded boundary.
30 | 31 | The code supports complex curved embedded boundaries (illustrated below), provided that it has a functional representation. We do not allow split or tunneled cells for ease of code development. This mesh generator does not handle mesh degeneracies, nor can it handle all types of cut cells, see the section entitled The sharp bits below for more information on the codes limitations. 32 | 33 |
34 |
35 |
Complex curved embedded boundaries are also supported. Here we embedded five `blobs' and request three interpolation points per cut cell edge ().
37 | 38 | 39 | ## How does it work? 40 | 1. The user provides a function, `in_domain`, that maps a spatial coordinate (x,y) to 1 if the point lies inside the domain or 0 if it does not. Using this function, the regular grid points that lie in and out of the domain are determined. For example, this is done in the figure below on the Ringleb domain. The regular grid points that lie in the domain are shown in orange, while the regular grid points that are outside the domain are shown in black. 41 | 42 | 2. When a regular grid point that lies outside the domain is adjacent another that is inside the domain, this means that between these two points, the embedded boundary crosses a Cartesian grid line. Using the method of bisection, the precise point of intersection is computed. On the Ringleb domain below, these points are plotted in red. Right now, the code assumes that the boundary does not cross the grid line more than once. 43 | 44 | 3. After these intersection points are computed, the cut cells are assembled. 45 | 46 | 4. If the user requests curved edges, then additional vertices that are approximately uniformly spaced (in arclength) along the embedded boundary are computed. For circular embedded boundaries, we have explicit formulae to accomplish this. Again, this is done using the method of bisection. 47 | 48 | 5. The cut cells are then written to file in the `.ply` format. See here for more information http://paulbourke.net/dataformats/ply/. 49 | 50 |
51 |
52 |
Regular grid points that lie inside and outside the domain are respectively orange and black, computed in step 1. Irregular grid points on the embedded boundary are red, computed in step 2.
54 |
55 | ## 🌲🌳 Into the weeds on curved edges
56 | If curved boundaries are requested, the code computes interpolation points that are equispaced in arclength (for circular boundaries) and approximately equispaced in arclength using the method of bisection otherwise. The approach for non-circular boundaries relies on a one-dimensional parametrization of the boundary .
57 | Say that a cut cell's curved edge is defined by the set of points
.
58 | In order to find additional interpolation points along the boundary, define the function
59 |
60 |
61 |
62 | for some
on
. This function is zero when
maps to a point,
, that is exactly
units away from
.
63 |
64 | Note that
and
. Provided that
is monotonically increasing on
,
will only have a single root in
, which can be found using the method of bisection. Therefore, when the user requests
interpolation points along the boundary, the code finds the roots of
when
. These
additional boundary points, along with the edge endpoints
and
, form a set of
edge interpolation points.
65 |
66 | Note that this is not a fully robust approach to determining interpolation points on the embedded boundary and is only appropriate when the boundary is sufficiently well-resolved.
67 |
68 | ## 🔪 The sharp bits
69 | This code only handles cut cells on which the boundary enters and leaves on different faces. Additionally, it cannot deal with tunnelled and split cells. It may be added in the future, and of course in 3D for real geometries this would be necessary.
70 |
71 |
72 |
73 |
On the left, the annulus domain is removed from the background grid, creating split cut cells. On the right, the complement of the annulus is removed from the background grid, creating tunnelled cut cells.
75 | 76 | Additionally, the code does not robustly (or gracefully) handle mesh degeneracies. For example, if the embedded geometry lies directly on a Cartesian grid line cell, the code will produce erroneous output and may, or may not output an error. 77 | 78 |
79 |
80 |
A square domain (black lines) is removed from the background grid (blue lines), where the domain is perfectly aligned with the Cartesian grid lines.
82 | 83 | We do not support the above scenarios for code simplicity, however, they must be addressed when moving to three dimensions and complex engineering geometries. This is the reason that the dimensions of some of the background grids in [1] are slighly perturbed from round numbers, as we aimed to avoid any of the above scenarios. 84 | 85 | ## 🏗 Grid generation 86 | 87 | Of the many examples included here, the script in `./examples/8_argrun/driver.py` accepts command line arguments, which are explained below: 88 | 89 | 90 | -Nx 91 | number of cells on the grid in the x-direction 92 | 93 | -Ny 94 | number of cells on the grid in the y-direction 95 | 96 | -fbody 97 | the ID of the embedded boundary to be used. 98 | * `0`: quarter annulus, for the supersonic vortex problem, 99 | * `1`: annulus for rotating pulse problem, 100 | * `2`: Ringleb, 101 | * `3`: random blobs. 102 | * `4`: annulus for acoustics problem, 103 | * `5`: circular obstacles, 104 | * `6`: channel, 105 | * `7`: double Mach. 106 | 107 | -plot 108 | display the generated cut cell grid 109 | 110 | -q 111 | add curved edges on the cut cells with q+1 interpolation points with the embedded boundary 112 | 113 | For example, the Ringleb domain can be generated and plotted by calling 114 | ``` 115 | ./examples/8_argrun/driver.py -Nx 10 -Ny 10 -fbody 2 -q 3 -plot 116 | ``` 117 | 118 | ## Contact 119 | For help running the code, or any other questions, send me an email at 120 | `giuliani AT cims DOT nyu DOT edu` 121 | 122 | ## Citing 123 | If you find this code useful in your work, you can cite it with 124 | 125 | Giuliani, Andrew. "A two-dimensional stabilized discontinuous Galerkin method on curvilinear embedded boundary grids". [https://arxiv.org/abs/2102.01857](https://arxiv.org/abs/2102.01857) 126 | 127 | ## 📓 License 128 | [](https://opensource.org/licenses/MIT) 129 | 130 | 131 | 132 | ## References 133 | [1] Giuliani, Andrew. "A two-dimensional stabilized discontinuous Galerkin method on curvilinear embedded boundary grids". [https://arxiv.org/abs/2102.01857](https://arxiv.org/abs/2102.01857) 134 | 135 | -------------------------------------------------------------------------------- /examples/0_annulus/driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import pygrid2d as pg2d 3 | 4 | Nx = 25 5 | Ny = 25 6 | plot_flag = True 7 | q = 5 # q = 5 means the mesh generator will compute 6 points on the embedded boundary, resulting in a degree 5 polynomial boundary interpolant 8 | bid = 0 # bodyID = 0 means annulus domain 9 | 10 | vertices, cell_list, domain, mesh_data, face_data = pg2d.PyGrid2D(Nx, Ny, plot_flag, q, bid) 11 | pg2d.output_unstructured(vertices, mesh_data, face_data, domain, Nx, Ny, q) 12 | pg2d.output_ply(vertices, cell_list, domain, Nx, Ny, q) 13 | -------------------------------------------------------------------------------- /examples/1_supersonic/driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import pygrid2d as pg2d 3 | 4 | Nx = 25 5 | Ny = 25 6 | plot_flag = True 7 | q = 5 # q = 5 means the mesh generator will compute 6 points on the embedded boundary, resulting in a degree 5 polynomial boundary interpolant 8 | bid = 1 # bodyID = 1 means supersonic domain 9 | 10 | vertices, cell_list, domain, mesh_data, face_data = pg2d.PyGrid2D(Nx, Ny, plot_flag, q, bid) 11 | pg2d.output_unstructured(vertices, mesh_data, face_data, domain, Nx, Ny, q) 12 | pg2d.output_nor(vertices, mesh_data, face_data, domain, Nx, Ny, q) 13 | pg2d.output_ply(vertices, cell_list, domain, Nx, Ny, q) 14 | -------------------------------------------------------------------------------- /examples/2_ringleb/driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import pygrid2d as pg2d 3 | 4 | Nx = 25 5 | Ny = 25 6 | plot_flag = True 7 | q = 5 # q = 5 means the mesh generator will compute 6 points on the embedded boundary, resulting in a degree 5 polynomial boundary interpolant 8 | bid = 2 # bodyID = 2 means Ringleb domain 9 | 10 | vertices, cell_list, domain, mesh_data, face_data = pg2d.PyGrid2D(Nx, Ny, plot_flag, q, bid) 11 | pg2d.output_unstructured(vertices, mesh_data, face_data, domain, Nx, Ny, q) 12 | pg2d.output_ply(vertices, cell_list, domain, Nx, Ny, q) 13 | -------------------------------------------------------------------------------- /examples/3_blobs/driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import pygrid2d as pg2d 3 | 4 | Nx = 26 5 | Ny = 26 6 | plot_flag = True 7 | q = 5 # q = 5 means the mesh generator will compute 6 points on the embedded boundary, resulting in a degree 5 polynomial boundary interpolant 8 | bid = 3 # bodyID = 3 means blob domain 9 | 10 | vertices, cell_list, domain, mesh_data, face_data = pg2d.PyGrid2D(Nx, Ny, plot_flag, q, bid) 11 | pg2d.output_unstructured(vertices, mesh_data, face_data, domain, Nx, Ny, q) 12 | pg2d.output_ply(vertices, cell_list, domain, Nx, Ny, q) 13 | -------------------------------------------------------------------------------- /examples/4_annulus_acoustics/driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import pygrid2d as pg2d 3 | 4 | Nx = 26 5 | Ny = 26 6 | plot_flag = True 7 | q = 5 # q = 5 means the mesh generator will compute 6 points on the embedded boundary, resulting in a degree 5 polynomial boundary interpolant 8 | bid = 4 # bodyID = 4 means the acoustics annulus domain 9 | 10 | vertices, cell_list, domain, mesh_data, face_data = pg2d.PyGrid2D(Nx, Ny, plot_flag, q, bid) 11 | pg2d.output_unstructured(vertices, mesh_data, face_data, domain, Nx, Ny, q) 12 | pg2d.output_ply(vertices, cell_list, domain, Nx, Ny, q) 13 | 14 | -------------------------------------------------------------------------------- /examples/5_circles/driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import pygrid2d as pg2d 3 | 4 | Nx = 26 5 | Ny = 26 6 | plot_flag = True 7 | q = 5 # q = 5 means the mesh generator will compute 6 points on the embedded boundary, resulting in a degree 5 polynomial boundary interpolant 8 | bid = 5 # bodyID = 5 means domain of circular obstacles 9 | 10 | 11 | vertices, cell_list, domain, mesh_data, face_data = pg2d.PyGrid2D(Nx, Ny, plot_flag, q, bid) 12 | pg2d.output_unstructured(vertices, mesh_data, face_data, domain, Nx, Ny, q) 13 | pg2d.output_ply(vertices, cell_list, domain, Nx, Ny, q) 14 | -------------------------------------------------------------------------------- /examples/6_channel/driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import pygrid2d as pg2d 3 | 4 | Nx = 26 5 | Ny = 26 6 | plot_flag = True 7 | q = 5 # q = 5 means the mesh generator will compute 6 points on the embedded boundary, resulting in a degree 5 polynomial boundary interpolant 8 | bid = 6 # bodyID = 6 means channel domain 9 | 10 | vertices, cell_list, domain, mesh_data, face_data = pg2d.PyGrid2D(Nx, Ny, plot_flag, q, bid) 11 | pg2d.output_unstructured(vertices, mesh_data, face_data, domain, Nx, Ny, q) 12 | pg2d.output_ply(vertices, cell_list, domain, Nx, Ny, q) 13 | -------------------------------------------------------------------------------- /examples/7_doublemach/driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import pygrid2d as pg2d 3 | 4 | Nx = 26 5 | Ny = 26 6 | plot_flag = True 7 | q = 5 # q = 5 means the mesh generator will compute 6 points on the embedded boundary, resulting in a degree 5 polynomial boundary interpolant 8 | bid = 7 # bodyID = 7 means double Mach domain 9 | 10 | vertices, cell_list, domain, mesh_data, face_data = pg2d.PyGrid2D(Nx, Ny, plot_flag, q, bid) 11 | pg2d.output_unstructured(vertices, mesh_data, face_data, domain, Nx, Ny, q) 12 | pg2d.output_ply(vertices, cell_list, domain, Nx, Ny, q) 13 | -------------------------------------------------------------------------------- /examples/8_argrun/driver.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | import argparse 3 | import pygrid2d as pg2d 4 | 5 | ## this driver lets you generate grids using the command line. For example: 6 | ## ./driver.py -Nx 10 -Ny 10 -fbody 2 -q 3 -plot 7 | ## generates a 10x10 grid on the Ringleb flow domain (fbody=2) with 4 interpolation points 8 | ## along the curved boundary, and plots it. You can 9 | ## avoid plotting by removing the -plot command line option: 10 | ## ./driver.py -Nx 10 -Ny 10 -fbody 2 -q 3 11 | 12 | 13 | 14 | 15 | parser = argparse.ArgumentParser() 16 | parser.add_argument("-Nx", "--Nx", type=int, help="number of elements in x-direction") 17 | parser.add_argument("-Ny", "--Ny", type=int, help="number of elements in y-direction") 18 | parser.add_argument("-fbody","--fbody", type=int, help="geometry type") 19 | parser.add_argument("-plot","--PLOT", action='store_true', help="plot") 20 | parser.add_argument("-q","--Q", type = int, default = 1, help="q is the degree of the curved boundary") 21 | args = parser.parse_args() 22 | Nx = args.Nx 23 | Ny = args.Ny 24 | plot_flag = args.PLOT 25 | q = args.Q 26 | bid = args.fbody 27 | 28 | vertices, cell_list, domain = pg2d.PyGrid2D(Nx, Ny, plot_flag, q, bid) 29 | pg2d.output_ply(vertices, cell_list, domain, Nx, Ny, q) 30 | -------------------------------------------------------------------------------- /examples/README.md: -------------------------------------------------------------------------------- 1 | ## 🧪 Examples 2 | 3 | This folder contains a number of examples to generate grids: 4 | - `0_annulus` 5 | - `1_supersonic` 6 | - `2_ringleb` 7 | - `3_blobs` 8 | - `4_annulus_acoustics` 9 | - `5_circles` 10 | - `6_channel` 11 | - `7_doublemach` 12 | - `8_argrun` 13 | 14 | For all of the above examples, there is a driver script that can be executed by calling `./driver.py`. The final driver script in `8_argrun` can be called to generate grids from command line input. 15 | -------------------------------------------------------------------------------- /images/aligned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewgiuliani/PyGrid2D/05a5580c1525ed30bd0b4211227467a9ef63ccbc/images/aligned.png -------------------------------------------------------------------------------- /images/annulus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewgiuliani/PyGrid2D/05a5580c1525ed30bd0b4211227467a9ef63ccbc/images/annulus.png -------------------------------------------------------------------------------- /images/annulus_zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewgiuliani/PyGrid2D/05a5580c1525ed30bd0b4211227467a9ef63ccbc/images/annulus_zoom.png -------------------------------------------------------------------------------- /images/blobs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewgiuliani/PyGrid2D/05a5580c1525ed30bd0b4211227467a9ef63ccbc/images/blobs.png -------------------------------------------------------------------------------- /images/gridgen.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewgiuliani/PyGrid2D/05a5580c1525ed30bd0b4211227467a9ef63ccbc/images/gridgen.png -------------------------------------------------------------------------------- /images/ringleb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewgiuliani/PyGrid2D/05a5580c1525ed30bd0b4211227467a9ef63ccbc/images/ringleb.png -------------------------------------------------------------------------------- /images/ringleb_zoom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewgiuliani/PyGrid2D/05a5580c1525ed30bd0b4211227467a9ef63ccbc/images/ringleb_zoom.png -------------------------------------------------------------------------------- /images/split.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewgiuliani/PyGrid2D/05a5580c1525ed30bd0b4211227467a9ef63ccbc/images/split.png -------------------------------------------------------------------------------- /images/tunneled.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/andrewgiuliani/PyGrid2D/05a5580c1525ed30bd0b4211227467a9ef63ccbc/images/tunneled.png -------------------------------------------------------------------------------- /pygrid2d/PyGrid2D.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import sys 3 | import argparse 4 | from .bisection import * 5 | from .plot_mesh import * 6 | from .output import * 7 | from .domain import Domain 8 | from .ringleb import Ringleb 9 | from .annulus import Annulus 10 | from .annulus_acoustics import Annulus_acoustics 11 | from .supersonic import Supersonic 12 | from .blobs import Blobs 13 | from .circles import Circles 14 | from .channel import Channel 15 | from .doublemach import DoubleMach 16 | from rich.console import Console 17 | from rich.table import Column, Table 18 | 19 | def PyGrid2D(Nx, Ny, plot_flag, q, bid): 20 | 21 | console = Console() 22 | 23 | if bid == 0: 24 | domain = Annulus() 25 | elif bid == 1: 26 | domain = Supersonic() 27 | elif bid == 2: 28 | domain = Ringleb() 29 | elif bid == 3: 30 | domain = Blobs() 31 | elif bid == 4: 32 | domain = Annulus_acoustics() 33 | elif bid == 5: 34 | domain = Circles() 35 | elif bid == 6: 36 | domain = Channel() 37 | elif bid == 7: 38 | domain = DoubleMach() 39 | else: 40 | quit() 41 | 42 | 43 | dom = np.array([domain.left, domain.bottom, domain.right, domain.top]) 44 | console.print("Embedded grid input", style="bold red") 45 | table = Table(show_header = False) 46 | table.add_column("Name", style="dim", width=15) 47 | table.add_column("Value",justify="right") 48 | table.add_row("(Nx,Ny)", '({},{})'.format(Nx,Ny)) 49 | table.add_row("Domain", '[{},{}] x [{},{}]'.format(dom[0],dom[2], dom[1], dom[3] )) 50 | table.add_row("Grid geometry", domain.name ) 51 | console.print(table) 52 | 53 | 54 | 55 | console.print("Generating the grid...", style="bold blue") 56 | X = np.linspace(dom[0], dom[2], Nx+1) 57 | Y = np.linspace(dom[1], dom[3], Ny+1) 58 | XX,YY = np.meshgrid(X,Y) 59 | XX = np.transpose(XX) 60 | YY = np.transpose(YY) 61 | 62 | 63 | vert_in = domain.in_domain(XX,YY) 64 | idx_vert_in = np.where(vert_in) 65 | num = vert_in[0:-1,0:-1] + vert_in[0:-1,1:] + vert_in[1:,0:-1] + vert_in[1:,1:] 66 | irr = np.equal(num,4).astype(int) 67 | 68 | 69 | cuts = np.logical_and(np.greater(num , 0) , np.less(num, 4) ).astype(int) 70 | num_cuts = np.sum(cuts) 71 | 72 | # grid of booleans that say if horizontal or vertical faces have irregular intersections 73 | # h_bool[0][0] is TRUE ==> cell 0 has a bottom irreg 74 | # h_bool[0][1] is TRUE ==> cell 0 has a top irreg 75 | h_bool = np.logical_xor(vert_in[0:-1,:],vert_in[1:,:]) 76 | v_bool = np.logical_xor(vert_in[:,0:-1],vert_in[:,1:]) 77 | h_idx = np.where( h_bool ) 78 | v_idx = np.where( v_bool ) 79 | 80 | console.print("Computing the x-intersections...", style="bold blue") 81 | xh1 = XX[h_idx[0] , h_idx[1]] 82 | xh2 = XX[h_idx[0]+1, h_idx[1]] 83 | xh = bisection(xh1, xh2, lambda xin : (domain.in_domain(xin,YY[h_idx])-0.5) ) 84 | 85 | console.print("Computing the y-intersections...", style="bold blue") 86 | yv1 = YY[v_idx] 87 | yv2 = YY[v_idx[0], v_idx[1]+1] 88 | yv = bisection(yv1, yv2, lambda yin : (domain.in_domain(XX[v_idx],yin)-0.5) ) 89 | 90 | whole_idx = np.where(irr) 91 | cut_idx = np.where(cuts) 92 | 93 | 94 | has_bot = h_bool[ cut_idx[0] , cut_idx[1] ] 95 | has_top = h_bool[ cut_idx[0] , cut_idx[1]+1] 96 | has_left = v_bool[ cut_idx[0] , cut_idx[1] ] 97 | has_right= v_bool[ cut_idx[0]+1, cut_idx[1] ] 98 | 99 | 100 | # make grid of irregular vertex indices 101 | h_vert_idx = np.cumsum(np.ravel(h_bool)).reshape(h_bool.shape)-1 102 | v_vert_idx = np.cumsum(np.ravel(v_bool)).reshape(v_bool.shape)-1 + (h_vert_idx[-1,-1]+1) 103 | 104 | num_regular_vertices = np.sum(vert_in) 105 | num_vertices = np.sum(vert_in) + xh.size + yv.size 106 | 107 | # assemble all the vertices in the grid 108 | v1 = whole_idx 109 | v2 = (v1[0]+1, v1[1] ) 110 | v3 = (v1[0]+1, v1[1]+1) 111 | v4 = (v1[0] , v1[1]+1) 112 | 113 | # grid of indices assigned to Cartesian vertices 114 | vertex_idx = np.cumsum(np.ravel(vert_in)).reshape(Nx+1,Ny+1)-1 115 | 116 | # compress out the unused Cartesian vertices 117 | regular_vertices = np.hstack( ( 118 | np.compress(np.ravel(vert_in).astype(bool),np.ravel(XX))[:,None], 119 | np.compress(np.ravel(vert_in).astype(bool),np.ravel(YY))[:,None] 120 | ) ) 121 | vertices = np.vstack( ( 122 | regular_vertices, 123 | np.hstack((xh[:,None], YY[h_idx][:,None] )), 124 | np.hstack((XX[v_idx][:,None], yv[:,None])) 125 | ) ) 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | # assemble the whole cells 136 | cells_whole = np.hstack( ( 137 | vertex_idx[v1][:,None], 138 | vertex_idx[v2][:,None], 139 | vertex_idx[v3][:,None], 140 | vertex_idx[v4][:,None] 141 | ) ) 142 | 143 | 144 | 145 | # assemble the cut cells 146 | h_vert_idx = h_vert_idx + np.sum(vert_in) 147 | v_vert_idx = v_vert_idx + np.sum(vert_in) 148 | 149 | v1 = cut_idx 150 | v2 = (v1[0]+1, v1[1] ) 151 | v3 = (v1[0]+1, v1[1]+1) 152 | v4 = (v1[0] , v1[1]+1) 153 | 154 | v1_idx = np.where( vert_in[v1][:,None], vertex_idx[v1][:,None], -np.ones((num_cuts,1)).astype(int) ) 155 | v12_idx = np.where(has_bot,h_vert_idx[v1],-np.ones(num_cuts) )[:,None] 156 | 157 | v2_idx = np.where( vert_in[v2][:,None], vertex_idx[v2][:,None], -np.ones((num_cuts,1)).astype(int) ) 158 | v23_idx = np.where(has_right,v_vert_idx[v2],-np.ones(num_cuts) )[:,None] 159 | 160 | v3_idx = np.where( vert_in[v3][:,None], vertex_idx[v3][:,None], -np.ones((num_cuts,1)).astype(int) ) 161 | v34_idx = np.where(has_top,h_vert_idx[v4],-np.ones(num_cuts) )[:,None] 162 | 163 | v4_idx = np.where( vert_in[v4][:,None], vertex_idx[v4][:,None], -np.ones((num_cuts,1)).astype(int) ) 164 | v41_idx = np.where(has_left,v_vert_idx[v1],-np.ones(num_cuts) )[:,None] 165 | 166 | cut_vertices = np.hstack( ( v1_idx,v12_idx,v2_idx,v23_idx,v3_idx,v34_idx,v4_idx,v41_idx) ).astype(int) 167 | cut_nv = np.sum( cut_vertices != -1, axis = 1) 168 | 169 | 170 | 171 | 172 | 173 | console.print("Shifting the cut cell vertices...", style="bold blue") 174 | 175 | s_idx = np.argsort(cut_nv) 176 | cut_nv = cut_nv[s_idx] 177 | cut_vertices = cut_vertices[s_idx,:] 178 | cut_idx = (cut_idx[0][s_idx], cut_idx[1][s_idx]) 179 | 180 | irreg_edges = np.zeros( ( num_cuts, 2 ) ).astype(int) 181 | 182 | 183 | 184 | min_nv = np.min(cut_nv) 185 | max_nv = np.max(cut_nv) 186 | cut_cells = [np.array([]) for vv in np.arange(min_nv,max_nv+1)] 187 | cell_list_idx = [ () for vv in np.arange(min_nv,max_nv+1)] 188 | 189 | count = 0 190 | for nv in np.arange(min_nv,max_nv+1): 191 | idx = np.where(cut_nv == nv)[0] 192 | cells_nv = np.ravel(cut_vertices[idx,:]) 193 | 194 | pos_vals = cells_nv > -1 195 | cell_nv = np.compress(pos_vals, cells_nv).reshape((-1,nv)) 196 | 197 | # this is another shift to make sure first and last vertices are edge vertices 198 | cont = 1 199 | while cont: 200 | shift = cell_nv[:,0] < regular_vertices.shape[0] 201 | cell_nv[shift,:] = np.roll(cell_nv[shift,:],1,axis=1) 202 | cont = np.sum(shift) > 0 203 | shift = cell_nv[:,-1] < regular_vertices.shape[0] 204 | cell_nv[shift,:] = np.roll(cell_nv[shift,:],-1,axis=1) 205 | 206 | 207 | cut_cells[nv-min_nv] = cell_nv 208 | cell_list_idx[nv-min_nv] = (cut_idx[0][idx], cut_idx[1][idx]) 209 | irreg_edges[count:count+cell_nv.shape[0],:] = cell_nv[:,(0,-1)] 210 | count = count + cell_nv.shape[0] 211 | 212 | cell_list = [cells_whole] + cut_cells 213 | vertex_count = [4] + list(np.arange(min_nv,max_nv+1)) 214 | cell_ij = [whole_idx] + cell_list_idx 215 | ncf = [0] + [1] * len(cut_cells) 216 | 217 | 218 | console.print("Computing the curved and corner boundaries...", style="bold blue") 219 | corners_flag = domain.is_corner(irreg_edges, vertices) 220 | num_corners = np.sum(corners_flag) 221 | regular_idx = np.where(np.logical_not(corners_flag))[0] 222 | corner_idx = np.where(corners_flag)[0] 223 | 224 | corner_cell_ij = [ () ] * len(cell_list) 225 | corner_cell_list = [np.array([])] * len(cell_list) 226 | corner_cut_nv = cut_nv[corner_idx] 227 | corner_vertex_count = [ v for v in vertex_count] 228 | # remove the corner cells 229 | for c in range(1,len(cell_list)): 230 | idx = np.where( cut_nv == vertex_count[c] )[0] 231 | 232 | keep = np.where(np.logical_not(corners_flag[idx]))[0] 233 | cidx = np.where(corners_flag[idx])[0] 234 | 235 | corner_cell_list[c] = cell_list[c][cidx, :] 236 | corner_cell_ij[c] = (cell_ij[c][0][cidx],cell_ij[c][1][cidx]) 237 | 238 | 239 | cell_list[c] = cell_list[c][keep, :] 240 | cell_ij[c] = (cell_ij[c][0][keep],cell_ij[c][1][keep]) 241 | 242 | cut_nv = cut_nv[regular_idx] 243 | 244 | 245 | if q > 1: 246 | # compute regular high order edges 247 | new_vertices, new_cells = domain.compute_curved(irreg_edges[regular_idx,:], vertices,q) 248 | shift = vertices.shape[0] 249 | new_cells = new_cells + shift 250 | vertices = np.vstack( (vertices, new_vertices) ) 251 | for c in range(1,len(cell_list)): 252 | idx = np.where( cut_nv == vertex_count[c] )[0] 253 | cell_list[c] = np.hstack( (cell_list[c], new_cells[idx,:]) ) 254 | vertex_count[c] = vertex_count[c] + q-1 255 | 256 | 257 | 258 | 259 | 260 | if np.sum(corners_flag) > 0 : 261 | # deal with the corners 262 | 263 | 264 | new_vertices, new_cells = domain.compute_corner(irreg_edges[corner_idx,:], vertices,q) 265 | shift = vertices.shape[0] 266 | new_cells = new_cells + shift 267 | vertices = np.vstack( (vertices, new_vertices) ) 268 | 269 | count = 0 270 | for c in range(1,len(corner_cell_list)): 271 | if corner_cell_list[c].size == 0 : 272 | continue 273 | 274 | idx = corner_cell_list[c].shape[0] 275 | corner_cell_list[c] = np.hstack( (corner_cell_list[c], new_cells[count:count + idx,:]) ) 276 | corner_vertex_count[c] = corner_cell_list[c].shape[1] 277 | count = count + idx 278 | 279 | # append corner bins 280 | cell_list = cell_list + corner_cell_list 281 | vertex_count = vertex_count + corner_vertex_count 282 | cell_ij = cell_ij + corner_cell_ij 283 | ncf = ncf + len(corner_cell_list) * [2] 284 | 285 | 286 | # cell_list - bins of cells 287 | # vertex_count - number of vertices of cells in each bin 288 | # ncf - number of irregular faces associated to cells in each bin 289 | mesh_data = [] 290 | for bin_idx, (c, num_curved_faces) in enumerate(zip(cell_list, ncf)): 291 | cut = bin_idx!=0 292 | for idx in range(c.shape[0]): 293 | faces = [] 294 | 295 | if num_curved_faces == 0: 296 | for vidx in range(c.shape[1]): 297 | v1 = c[idx,vidx] 298 | v2 = c[idx,(vidx+1)%4] 299 | faces.append([v1,v2]) 300 | else: 301 | num_extra = (q-1)*num_curved_faces+(num_curved_faces-1) 302 | final_vidx = c.shape[1]-num_extra 303 | 304 | for vidx in range(final_vidx-1): 305 | v1 = c[idx,vidx] 306 | v2 = c[idx,vidx+1] 307 | faces.append([v1, v2]) 308 | 309 | vertices_extra = list(c[idx,final_vidx-1:]) + [c[idx,0]] 310 | v1 = 0 311 | v2 =q+1 312 | for fidx in range(num_curved_faces): 313 | faces.append( vertices_extra[v1:v2] ) 314 | v1 = v2-1 315 | v2 = v1 + q+1 316 | mesh_data.append({'vertices': c[idx,:], 'num_curved_faces': num_curved_faces, 'faces':faces, 'cut':cut}) 317 | 318 | # order cells by number of faces 319 | face_number = [len(cell['faces']) for cell in mesh_data] 320 | elem_order = np.argsort(face_number) 321 | mesh_data = [mesh_data[idx] for idx in elem_order] 322 | for idx,elem in enumerate(mesh_data): 323 | elem['idx'] = idx 324 | 325 | face_hash = {} 326 | for elem in mesh_data: 327 | for f in elem['faces']: 328 | fkey = tuple(np.sort(f)) 329 | if fkey not in face_hash: 330 | face_hash[fkey] = {'lr':[elem['idx'], -1], 'vertices':f, 'cut':elem['cut']} 331 | else: 332 | face_hash[fkey]['lr'][1] = elem['idx'] 333 | prev_cut = face_hash[fkey]['cut'] 334 | face_hash[fkey]['cut'] = elem['cut'] if prev_cut==0 else prev_cut 335 | 336 | for f in face_hash: 337 | if face_hash[f]['lr'][1] > -1: 338 | continue 339 | x = vertices[f, 0] 340 | y = vertices[f, 1] 341 | bc = domain.vertex2bc(x,y) # returns zero if vertex is a member of multiple or no EBs 342 | final_bc = np.min(bc) # 0 or a negative number 343 | assert final_bc != 0 344 | face_hash[f]['lr'][1] = final_bc 345 | 346 | 347 | face_data = [] 348 | for f in face_hash: 349 | face_data.append(face_hash[f]) 350 | 351 | vertex_number = [len(face['vertices']) for face in face_data] 352 | face_order = np.argsort(vertex_number) 353 | face_data = [face_data[idx] for idx in face_order] 354 | for idx, f in enumerate(face_data): 355 | f['idx'] = idx 356 | 357 | for elem in mesh_data: 358 | elem['fidx'] = np.zeros((len(elem['faces']),)) 359 | for idx, f in enumerate(elem['faces']): 360 | fkey = tuple(np.sort(f)) 361 | elem['fidx'][idx] = face_hash[fkey]['idx'] 362 | 363 | 364 | 365 | 366 | 367 | 368 | 369 | # compute mesh stats 370 | def PolyArea(x,y): 371 | return 0.5*np.abs(np.sum(x * np.roll(y,1,axis=1),axis = 1)-np.sum(y * np.roll(x,1,axis=1), axis = 1)) 372 | area = np.zeros((0,1)) 373 | for cells,nv,ij in zip(cell_list, vertex_count, cell_ij): 374 | if cells.size == 0: 375 | continue 376 | 377 | xcoord = vertices[np.ravel(cells),0].reshape( (cells.shape[0], nv) ) 378 | ycoord = vertices[np.ravel(cells),1].reshape( (cells.shape[0], nv) ) 379 | 380 | in1 = xcoord >= XX[ij][:,None] 381 | in2 = xcoord <= XX[ij[0]+1, ij[1]][:,None] 382 | in3 = ycoord >= YY[ij][:,None] 383 | in4 = ycoord <= YY[ij[0], ij[1]+1][:,None] 384 | 385 | all_in = np.logical_and(in1,in2) 386 | all_in = np.logical_and(all_in,in3) 387 | all_in = np.logical_and(all_in, in4) 388 | any_out = np.logical_not(all_in) 389 | num_out = np.sum(any_out) 390 | 391 | if num_out > 0: 392 | print("There are some geomtrical vertices that lie outside a Cartesian cell") 393 | quit() 394 | 395 | ar = PolyArea(xcoord,ycoord) 396 | area = np.vstack( (area,ar[:,None]) ) 397 | 398 | 399 | 400 | 401 | 402 | reg_vol = area[0] 403 | min_vol_frac = np.min(area) / reg_vol 404 | str_whole = str(cells_whole.shape[0]) 405 | str_cut = str(num_cuts) 406 | str_tot = str(cells_whole.shape[0]+num_cuts) 407 | str_min_vol = '%.8e' % min_vol_frac[0] 408 | 409 | 410 | console.print("Embedded grid metadata", style="bold red") 411 | table = Table(show_header = False) 412 | table.add_column("Name", style="dim", width=15) 413 | table.add_column("Value",justify="right") 414 | table.add_row("whole cells", str_whole) 415 | table.add_row("cut cells", str_cut ) 416 | table.add_row("total cells", str_tot ) 417 | table.add_row("min. vol. frac.", str_min_vol ) 418 | console.print(table) 419 | 420 | # reorder vertices counterclockwise 421 | if plot_flag: 422 | console.print("Plotting...", style="bold blue") 423 | plot_mesh(vertices,cell_list,vertex_count, dom, num_regular_vertices) 424 | 425 | return vertices, cell_list, domain, mesh_data, face_data 426 | -------------------------------------------------------------------------------- /pygrid2d/__init__.py: -------------------------------------------------------------------------------- 1 | from .PyGrid2D import * 2 | -------------------------------------------------------------------------------- /pygrid2d/annulus.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .domain import Domain 3 | 4 | class Annulus(Domain): 5 | 6 | name = 'annulus' 7 | left = 0 8 | right = 3.0001 9 | bottom = 0 10 | top = 3.0001 11 | R1 = 0.75 12 | R2 = 1.25 13 | sx = 1.5 14 | sy = 1.5 15 | 16 | 17 | def in_domain(self, X,Y): 18 | R = np.sqrt( (X-self.sx)**2. + (Y-self.sy)**2 ) 19 | bval = np.logical_and( np.less_equal(self.R1 , R) , np.less_equal(R , self.R2) ) 20 | return bval.astype(int) 21 | 22 | def bc(self,x,y): 23 | r = np.sqrt( (x-self.sx)**2. + (y-self.sy)**2.) 24 | r1 = -1*(np.abs(r-self.R1) < 1e-14) 25 | r2 = -2*(np.abs(r-self.R2) < 1e-14) 26 | 27 | sanity_check = np.logical_not(np.logical_xor(r1,r2)) 28 | num_wrong = np.sum(sanity_check) 29 | 30 | if(num_wrong > 0): 31 | print("DUPLICATE BOUNDARY CONDITIONS\n") 32 | quit() 33 | 34 | return r1+r2 35 | 36 | def bc_id(self, bid): 37 | return bid 38 | 39 | def vertex2bc(self, x, y): 40 | r = np.sqrt( (x-self.sx)**2. + (y-self.sy)**2.) 41 | r1 = -1*(np.abs(r-self.R1) < 1e-14) 42 | r2 = -1*(np.abs(r-self.R2) < 1e-14) 43 | bc = r1+r2 44 | 45 | decided = np.where(np.logical_xor(r1, r2)) 46 | out = np.zeros(x.shape) 47 | out[decided] = bc[decided] 48 | return out 49 | 50 | 51 | 52 | 53 | def curved_points(self,wgt,X1,Y1,X2,Y2): 54 | bc1 = self.bc(X1,Y1) 55 | bc2 = self.bc(X2,Y2) 56 | sanity_check = np.logical_not( np.equal(bc1,bc2) ) 57 | num_wrong = np.sum(sanity_check) 58 | if(num_wrong > 0): 59 | print("not the same\n") 60 | quit() 61 | 62 | radii = np.where(np.equal(bc1, -1) , self.R1, self.R2) 63 | angle1 = np.arctan2( Y1-self.sy, X1-self.sx ) 64 | angle2 = np.arctan2( Y2-self.sy, X2-self.sx ) 65 | 66 | 67 | idx_jump = np.where(angle2-angle1 > np.pi ) 68 | angle1[idx_jump] = angle1[idx_jump] + 2.* np.pi 69 | idx_jump = np.where(angle2-angle1 < -np.pi ) 70 | angle2[idx_jump] = angle2[idx_jump] + 2.* np.pi 71 | 72 | 73 | angles = wgt[None,:]*angle1[:,None] + (1.-wgt[None,:])*angle2[:,None] 74 | 75 | 76 | points = np.zeros( (angles.shape[0], angles.shape[1], 2) ) 77 | points[:,:,0] = radii[:,None] * np.cos(angles)+self.sx 78 | points[:,:,1] = radii[:,None] * np.sin(angles)+self.sy 79 | return points 80 | 81 | -------------------------------------------------------------------------------- /pygrid2d/annulus_acoustics.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .domain import Domain 3 | 4 | class Annulus_acoustics(Domain): 5 | 6 | name = 'annulus_acoustics' 7 | left = 0. 8 | right = 21. 9 | bottom = 0. 10 | top = 21. 11 | R1 = 0.5 12 | R2 = 10. 13 | sx = 10.5 14 | sy = 10.5 15 | 16 | 17 | def in_domain(self, X,Y): 18 | R = np.sqrt( (X-self.sx)**2. + (Y-self.sy)**2 ) 19 | bval = np.logical_and( np.less_equal(self.R1 , R) , np.less_equal(R , self.R2) ) 20 | return bval.astype(int) 21 | 22 | def bc(self,x,y): 23 | r = np.sqrt( (x-self.sx)**2. + (y-self.sy)**2.) 24 | r1 = -1*(np.abs(r-self.R1) < 1e-14) 25 | r2 = -2*(np.abs(r-self.R2) < 1e-14) 26 | 27 | sanity_check = np.logical_not(np.logical_xor(r1,r2)) 28 | num_wrong = np.sum(sanity_check) 29 | 30 | if(num_wrong > 0): 31 | print("DUPLICATE BOUNDARY CONDITIONS\n") 32 | quit() 33 | 34 | return r1+r2 35 | 36 | def bc_id(self, bid): 37 | return bid 38 | 39 | def vertex2bc(self, x, y): 40 | r = np.sqrt( (x-self.sx)**2. + (y-self.sy)**2.) 41 | r1 = -1*(np.abs(r-self.R1) < 1e-14) 42 | r2 = -1*(np.abs(r-self.R2) < 1e-14) 43 | bc = r1+r2 44 | 45 | decided = np.where(np.logical_xor(r1, r2)) 46 | out = np.zeros(x.shape) 47 | out[decided] = bc[decided] 48 | return out 49 | 50 | 51 | 52 | 53 | def curved_points(self,wgt,X1,Y1,X2,Y2): 54 | bc1 = self.bc(X1,Y1) 55 | bc2 = self.bc(X2,Y2) 56 | sanity_check = np.logical_not( np.equal(bc1,bc2) ) 57 | num_wrong = np.sum(sanity_check) 58 | if(num_wrong > 0): 59 | print("not the same\n") 60 | quit() 61 | 62 | radii = np.where(np.equal(bc1, -1) , self.R1, self.R2) 63 | angle1 = np.arctan2( Y1-self.sy, X1-self.sx ) 64 | angle2 = np.arctan2( Y2-self.sy, X2-self.sx ) 65 | 66 | 67 | idx_jump = np.where(angle2-angle1 > np.pi ) 68 | angle1[idx_jump] = angle1[idx_jump] + 2.* np.pi 69 | idx_jump = np.where(angle2-angle1 < -np.pi ) 70 | angle2[idx_jump] = angle2[idx_jump] + 2.* np.pi 71 | 72 | 73 | angles = wgt[None,:]*angle1[:,None] + (1.-wgt[None,:])*angle2[:,None] 74 | 75 | 76 | points = np.zeros( (angles.shape[0], angles.shape[1], 2) ) 77 | points[:,:,0] = radii[:,None] * np.cos(angles)+self.sx 78 | points[:,:,1] = radii[:,None] * np.sin(angles)+self.sy 79 | return points 80 | 81 | -------------------------------------------------------------------------------- /pygrid2d/bisection.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | def bisection(a,b,func): 3 | # you only need 55 iterations to get to machine precision 4 | max_step = 55 5 | 6 | init_diff = np.abs(a-b) 7 | 8 | for step in range(max_step): 9 | c = (a + b)/2.0 10 | fa = func(a) 11 | fc = func(c) 12 | fb = func(b) 13 | 14 | a = np.where( np.sign(fc) == np.sign(fa), c, a ) 15 | b = np.where( np.sign(fc) == np.sign(fb), c, b ) 16 | 17 | if init_diff.size > 0: 18 | max_res = np.max(init_diff)/2.**max_step 19 | if max_res > 1e-15: 20 | print("BISECTION NOT CONVERGED {}\n".format(max_res)) 21 | quit() 22 | 23 | return c 24 | -------------------------------------------------------------------------------- /pygrid2d/blobs.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .domain import Domain 3 | from .bisection import * 4 | 5 | class Blobs(Domain): 6 | name = 'blobs' 7 | left = 0 8 | right = 20. 9 | bottom = 0 10 | top = 20. 11 | num_blobs = 5 12 | num_modes = 7 13 | sx = 10 14 | sy = 10 15 | def __init__(self): 16 | 17 | self.num_blobs = 5 18 | theta = np.linspace( 0, 2 * np.pi, self.num_blobs+1)[:,None] 19 | theta = theta[:-1]-3*np.pi/2 20 | Ro = 5 21 | self.centroids = np.hstack( (Ro * np.cos(theta)+self.sx, Ro*np.sin(theta)+self.sy ) ) 22 | 23 | np.random.seed(1) 24 | self.modes_sin = (np.random.rand( self.num_blobs, self.num_modes )-0.5)*2. 25 | self.modes_cos = (np.random.rand( self.num_blobs, self.num_modes )-0.5)*2. 26 | print(self.modes_sin) 27 | print(self.modes_cos) 28 | 29 | scale = 1.2*np.array( range(1,self.num_modes+1) ) 30 | scale[0] = 1 31 | self.modes_sin[:,0] = 2 32 | self.modes_cos[:,0] = 2 33 | self.modes_sin = self.modes_sin / scale 34 | self.modes_cos = self.modes_cos / scale 35 | 36 | 37 | def in_domain(self, X,Y): 38 | Xp = X.ravel() 39 | Yp = Y.ravel() 40 | R = np.sqrt( (Xp[:,None] - self.centroids[:,0])**2 + (Yp[:,None] - self.centroids[:,1])**2) 41 | theta = np.arctan2(Yp[:,None] - self.centroids[:,1], Xp[:,None] - self.centroids[:,0]) 42 | 43 | ntheta = np.array( range(self.num_modes) )[None,None,:] * theta[:,:,None] 44 | R_blob = np.sum(self.modes_sin[None,:,:] * np.sin(ntheta) + self.modes_cos[None,:,:] * np.cos(ntheta), axis = 2) 45 | 46 | bval = np.logical_not(np.sum(R <= R_blob, axis = 1) > 0) 47 | return bval.astype(int).reshape( X.shape ) 48 | 49 | def bc(self,x,y): 50 | Xp = x.ravel() 51 | Yp = y.ravel() 52 | R = np.sqrt( (Xp[:,None] - self.centroids[:,0])**2 + (Yp[:,None] - self.centroids[:,1])**2) 53 | theta = np.arctan2(Yp[:,None] - self.centroids[:,1], Xp[:,None] - self.centroids[:,0]) 54 | 55 | 56 | ntheta = np.array( range(self.num_modes) )[None,None,:] * theta[:,:,None] 57 | R_blob = np.sum(self.modes_sin[None,:,:] * np.sin(ntheta) + self.modes_cos[None,:,:] * np.cos(ntheta), axis = 2) 58 | 59 | rdiff = np.sqrt( (Xp[:,None]-self.centroids[:,0])**2. + (Yp[:,None]-self.centroids[:,1])**2.)-R_blob 60 | idx = -np.where(rdiff < 1e-14)[1]-1 61 | 62 | return idx 63 | def bc_id(self,bid): 64 | return -1 65 | 66 | def vertex2bc(self,x,y): 67 | Xp = x.ravel() 68 | Yp = y.ravel() 69 | R = np.sqrt( (Xp[:,None] - self.centroids[:,0])**2 + (Yp[:,None] - self.centroids[:,1])**2) 70 | theta = np.arctan2(Yp[:,None] - self.centroids[:,1], Xp[:,None] - self.centroids[:,0]) 71 | 72 | 73 | ntheta = np.array( range(self.num_modes) )[None,None,:] * theta[:,:,None] 74 | R_blob = np.sum(self.modes_sin[None,:,:] * np.sin(ntheta) + self.modes_cos[None,:,:] * np.cos(ntheta), axis = 2) 75 | 76 | rdiff = np.sqrt( (Xp[:,None]-self.centroids[:,0])**2. + (Yp[:,None]-self.centroids[:,1])**2.)-R_blob 77 | decided = np.where(rdiff < 1e-14)[0] 78 | 79 | 80 | out = np.zeros(x.shape) 81 | out[decided] = -1 82 | 83 | if decided.size == 0: 84 | out[:] = -2 85 | return out 86 | 87 | 88 | 89 | def target_ratio(self, wgt, idx,R1, angle1, angle2, R3, angle3) : 90 | X1,Y1 = R1 * np.cos(angle1), R1* np.sin(angle1) 91 | 92 | ntheta = np.array( range(self.num_modes) )[None,:] * angle2[:,None] 93 | R2 = np.sum(self.modes_sin[idx,:] * np.sin(ntheta) + self.modes_cos[idx,:] * np.cos(ntheta), axis = 1) 94 | X2,Y2 = R2 * np.cos(angle2), R2 * np.sin(angle2) 95 | 96 | X3,Y3 = R3 * np.cos(angle3), R3 * np.sin(angle3) 97 | 98 | 99 | l1 = np.sqrt( (X3-X2)**2. + (Y3-Y2)**2. ) 100 | l3 = np.sqrt( (X3-X1)**2. + (Y3-Y1)**2. ) 101 | 102 | return l1/l3 - wgt 103 | 104 | def curved_points(self,wgt,X1,Y1,X2,Y2): 105 | idx = -self.bc(X1,Y1) - 1 106 | 107 | R1 = np.sqrt( (X1 - self.centroids[idx,0])**2 + (Y1 - self.centroids[idx,1])**2) 108 | R2 = np.sqrt( (X2 - self.centroids[idx,0])**2 + (Y2 - self.centroids[idx,1])**2) 109 | angle1 = np.arctan2(Y1 - self.centroids[idx,1], X1 - self.centroids[idx,0]) 110 | angle2 = np.arctan2(Y2 - self.centroids[idx,1], X2 - self.centroids[idx,0]) 111 | 112 | 113 | idx_jump = np.where(angle2-angle1 > np.pi ) 114 | angle1[idx_jump] = angle1[idx_jump] + 2.* np.pi 115 | idx_jump = np.where(angle2-angle1 < -np.pi ) 116 | angle2[idx_jump] = angle2[idx_jump] + 2.* np.pi 117 | 118 | 119 | points = np.zeros( (X1.shape[0], wgt.size, 2) ) 120 | for qq in range(wgt.size): 121 | angle3 = bisection( angle1, angle2, lambda qin : self.target_ratio(wgt[qq], idx,R1, angle1, qin, R2, angle2) ) 122 | 123 | ntheta = np.array( range(self.num_modes) )[None,:] * angle3[:,None] 124 | R3 = np.sum(self.modes_sin[idx,:] * np.sin(ntheta) + self.modes_cos[idx,:] * np.cos(ntheta), axis = 1) 125 | X3,Y3 = R3 * np.cos(angle3)+self.centroids[idx,0], R3 * np.sin(angle3) + self.centroids[idx,1] 126 | 127 | points[:,qq,0] = X3 128 | points[:,qq,1] = Y3 129 | 130 | 131 | 132 | return points 133 | 134 | 135 | -------------------------------------------------------------------------------- /pygrid2d/channel.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .domain import Domain 3 | 4 | class Channel(Domain): 5 | name = 'channel' 6 | left = 0 7 | right = 5. 8 | bottom = 0 9 | top = 5. 10 | num_blobs = 5 11 | 12 | 13 | def __init__(self): 14 | self.x1 = 6*5/30 + 0.5*5/30 15 | self.y1 = 0 16 | self.s1 = 1. 17 | 18 | self.x2 = 0 19 | self.y2 = 6*5/30 + 0.5*5/30 20 | self.s2 = 1. 21 | 22 | 23 | 24 | def in_domain(self, X,Y): 25 | Xp = X.ravel() 26 | Yp = Y.ravel() 27 | d1 = -self.s1 * (Xp-self.x1) + (Yp-self.y1) 28 | d2 = -self.s2 * (Xp-self.x2) + (Yp-self.y2) 29 | bval = np.logical_and( d1 > 0 , d2 < 0 ) 30 | return bval.astype(int).reshape( X.shape ) 31 | 32 | def bc(self,x,y): 33 | idx = -np.ones( (x.size) ).astype(int) 34 | return idx 35 | def bc_id(self,bid): 36 | return bid[0] 37 | 38 | 39 | def vertex2bc(self, x, y): 40 | d1 = -self.s1 * (x-self.x1) + (y-self.y1) 41 | d2 = -self.s2 * (x-self.x2) + (y-self.y2) 42 | 43 | r1 = -1*(np.abs(d1)<1e-14) 44 | r2 = -1*(np.abs(d2)<1e-14) 45 | left = -2*(np.abs(x-self.left)<1e-14) 46 | right = -2*(np.abs(x-self.right)<1e-14) 47 | top = -2*(np.abs(y-self.top)<1e-14) 48 | bot = -2*(np.abs(y-self.bottom)<1e-14) 49 | bc = r1+r2+top+bot+left+right 50 | 51 | decided = np.where(np.logical_xor(np.logical_xor(np.logical_xor(np.logical_xor(np.logical_xor(r1, r2), top), bot), left), right)) 52 | out = np.zeros(x.shape) 53 | out[decided] = bc[decided] 54 | return out 55 | 56 | 57 | 58 | 59 | 60 | def curved_points(self,wgt,X1,Y1,X2,Y2): 61 | points = np.zeros( (X1.shape[0], wgt.size, 2) ) 62 | points[:,:,0] = wgt[None,:]*X1[:,None] + (1.-wgt[None,:])*X2[:,None] 63 | points[:,:,1] = wgt[None,:]*Y1[:,None] + (1.-wgt[None,:])*Y2[:,None] 64 | return points 65 | -------------------------------------------------------------------------------- /pygrid2d/circles.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .domain import Domain 3 | 4 | class Circles(Domain): 5 | name = 'circles' 6 | left = 0 7 | right = 20. 8 | bottom = 0 9 | top = 20. 10 | sx = 10 11 | sy = 10 12 | num_blobs = 5 13 | 14 | def __init__(self): 15 | theta = np.linspace( 0, 2 * np.pi, self.num_blobs+1)[:,None] 16 | theta = theta[:-1]-3*np.pi/2 17 | Ro = 5 18 | self.centroids = np.hstack( (Ro * np.cos(theta)+self.sx, Ro*np.sin(theta)+self.sy ) ) 19 | self.num_blobs = self.centroids.shape[0] 20 | self.Ri = 2*np.ones ((1,self.num_blobs) ) 21 | 22 | 23 | def in_domain(self, X,Y): 24 | Xp = X.ravel() 25 | Yp = Y.ravel() 26 | R = np.sqrt( (Xp[:,None] - self.centroids[None,:,0])**2 + (Yp[:,None] - self.centroids[None,:,1])**2) 27 | theta = np.arctan2(Yp[:,None] - self.centroids[:,1], Xp[:,None] - self.centroids[:,0]) 28 | 29 | bval = np.logical_not(np.sum(R <= self.Ri, axis = 1) > 0) 30 | return bval.astype(int).reshape( X.shape ) 31 | 32 | def bc(self,x,y): 33 | Xp = x.ravel() 34 | Yp = y.ravel() 35 | 36 | rdiff = np.sqrt( (Xp[:,None]-self.centroids[:,0])**2. + (Yp[:,None]-self.centroids[:,1])**2.)-self.Ri 37 | bools = rdiff < 1e-14 38 | idx = -np.where(rdiff < 1e-14)[1]-1 39 | return idx 40 | def bc_id(self,bid): 41 | return bid[0] 42 | 43 | 44 | 45 | def vertex2bc(self,x,y): 46 | Xp = x.ravel() 47 | Yp = y.ravel() 48 | 49 | rdiff = np.sqrt( (Xp[:,None]-self.centroids[:,0])**2. + (Yp[:,None]-self.centroids[:,1])**2.)-self.Ri 50 | bools = rdiff < 1e-14 51 | decided = np.where(rdiff < 1e-14)[0] 52 | 53 | out = np.zeros(x.shape) 54 | out[decided] = -1 55 | 56 | if decided.size == 0: 57 | out[:] = -2 58 | return out 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | def curved_points(self,wgt,X1,Y1,X2,Y2): 68 | idx = -self.bc(X1,Y1) - 1 69 | 70 | radii = self.Ri[ 0, idx ] 71 | angle1 = np.arctan2( Y1-self.centroids[idx,1], X1-self.centroids[idx,0] ) 72 | angle2 = np.arctan2( Y2-self.centroids[idx,1], X2-self.centroids[idx,0] ) 73 | 74 | 75 | idx_jump = np.where(angle2-angle1 > np.pi ) 76 | angle1[idx_jump] = angle1[idx_jump] + 2.* np.pi 77 | idx_jump = np.where(angle2-angle1 < -np.pi ) 78 | angle2[idx_jump] = angle2[idx_jump] + 2.* np.pi 79 | 80 | 81 | angles = wgt[None,:]*angle1[:,None] + (1.-wgt[None,:])*angle2[:,None] 82 | 83 | 84 | points = np.zeros( (angles.shape[0], angles.shape[1], 2) ) 85 | points[:,:,0] = radii[:,None] * np.cos(angles)+self.centroids[idx,0][:,None] 86 | points[:,:,1] = radii[:,None] * np.sin(angles)+self.centroids[idx,1][:,None] 87 | 88 | return points 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /pygrid2d/domain.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | class Domain: 3 | 4 | def is_corner(self, irreg_edges, vertices): 5 | X1 = vertices[irreg_edges[:,0], 0] 6 | Y1 = vertices[irreg_edges[:,0], 1] 7 | X2 = vertices[irreg_edges[:,1], 0] 8 | Y2 = vertices[irreg_edges[:,1], 1] 9 | 10 | 11 | bc1 = self.bc(X1,Y1) 12 | bc2 = self.bc(X2,Y2) 13 | vals = np.logical_not(np.equal(bc1,bc2) ) 14 | return vals 15 | 16 | def compute_curved(self, edges,vertices, q): 17 | 18 | 19 | wgt = np.linspace(0.,1.,q+1) 20 | wgt = wgt[1:-1] 21 | X1 = vertices[edges[:,0],0] 22 | Y1 = vertices[edges[:,0],1] 23 | X2 = vertices[edges[:,1],0] 24 | Y2 = vertices[edges[:,1],1] 25 | extra_vertices=self.curved_points(wgt,X1,Y1,X2,Y2) 26 | 27 | out_vertices = extra_vertices.reshape( (-1, 2) ) 28 | out_cells = np.arange(wgt.size * X1.size).reshape( (-1, wgt.size) ) 29 | return out_vertices,out_cells 30 | 31 | 32 | def compute_corner(self, edges, vertices, q): 33 | 34 | X1 = vertices[edges[:,0], 0] 35 | Y1 = vertices[edges[:,0], 1] 36 | X2 = vertices[edges[:,1], 0] 37 | Y2 = vertices[edges[:,1], 1] 38 | bc1 = self.bc(X1,Y1) 39 | bc2 = self.bc(X2,Y2) 40 | sanity_check = np.equal(bc1,bc2) 41 | num_wrong = np.sum(sanity_check) 42 | if(num_wrong > 0): 43 | print("not the same\n") 44 | quit() 45 | num_corners = edges.shape[0] 46 | new_corner_coord = self.get_corner_coord(bc1,bc2) 47 | 48 | wgt = np.linspace(0.,1.,q+1) 49 | wgt1 = wgt[:-1] 50 | wgt2 = wgt[1:-1] 51 | extra_vertices1=self.curved_points(wgt1, X1,Y1,new_corner_coord[:,0],new_corner_coord[:,1]) 52 | extra_vertices2=self.curved_points(wgt2, X2,Y2,new_corner_coord[:,0],new_corner_coord[:,1]) 53 | extra_vertices1[:,:,0] = np.fliplr(extra_vertices1[:,:,0]) 54 | extra_vertices1[:,:,1] = np.fliplr(extra_vertices1[:,:,1]) 55 | # extra_vertices2[:,:,0] = np.fliplr(extra_vertices2[:,:,0]) 56 | # extra_vertices2[:,:,1] = np.fliplr(extra_vertices2[:,:,1]) 57 | 58 | extra_vertices1 = extra_vertices1.reshape( (-1,2) ) 59 | extra_vertices2 = extra_vertices2.reshape( (-1,2) ) 60 | extra_vertices = np.vstack( (extra_vertices1, extra_vertices2) ) 61 | 62 | extra_cells1 = np.arange( 0, X1.shape[0] * q ).reshape( (-1, q ) ) 63 | extra_cells2 = np.zeros( (extra_cells1.shape[0],0) ).astype(int) 64 | if q > 1: 65 | extra_cells2 = np.arange( 0, X1.shape[0] * (q-1) ).reshape( (-1, q-1 ) ) + np.max(extra_cells1)+1 66 | extra_cells = np.fliplr(np.hstack( ( extra_cells1, extra_cells2) )) 67 | 68 | return extra_vertices, extra_cells 69 | -------------------------------------------------------------------------------- /pygrid2d/doublemach.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .domain import Domain 3 | 4 | class DoubleMach(Domain): 5 | name = 'doublemach' 6 | 7 | def __init__(self): 8 | self.left = 0 9 | self.right = 2.5 10 | self.bottom = 0 11 | self.top = 1.75 12 | self.corner_x = 1./6. 13 | self.corner_y = 1e-10 14 | 15 | def in_domain(self, X,Y): 16 | dist_from_wedge = (X - self.corner_x) * np.sin(30*np.pi/180) + (Y - self.corner_y) * -np.cos(30 * np.pi/180) 17 | bval1 = np.less_equal(dist_from_wedge, 0) 18 | bval2 = np.less_equal(self.corner_y, Y) 19 | bval = np.logical_and(bval1, bval2) 20 | return bval.astype(int) 21 | 22 | def bc_id(self,bid): 23 | return bid 24 | 25 | 26 | 27 | def vertex2bc(self, x, y): 28 | dist_from_wedge = (x - self.corner_x) * np.sin(30*np.pi/180) + (y - self.corner_y) * -np.cos(30 * np.pi/180) 29 | bval1 = -1*np.less_equal(-dist_from_wedge, 1e-14) 30 | bval2 = -1*np.less_equal(y, self.corner_y+1e-14) 31 | left = -2*(np.abs(x-self.left)<1e-14) 32 | right = -2*(np.abs(x-self.right)<1e-14) 33 | top = -2*(np.abs(y-self.top)<1e-14) 34 | 35 | bc = bval1+bval2+left+top+right 36 | 37 | decided = np.where(np.logical_xor(np.logical_xor(np.logical_xor(np.logical_xor(bval1, bval2), left), right), top)) 38 | out = np.zeros(x.shape) 39 | out[decided] = bc[decided] 40 | return out 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | def bc(self,x,y): 49 | dist_from_wedge = (x - self.corner_x) * np.sin(30*np.pi/180) + (y - self.corner_y) * -np.cos(30 * np.pi/180) 50 | bc_out = -1*(np.abs(y-self.corner_y) < 1e-13) - 2 * (np.abs(dist_from_wedge) < 1e-13) 51 | return bc_out.astype(int) 52 | 53 | def curved_points(self,wgt,X1,Y1,X2,Y2): 54 | points = np.zeros( (X1.shape[0], wgt.size, 2) ) 55 | points[:,:,0] = wgt[None,:]*X1[:,None] + (1.-wgt[None,:])*X2[:,None] 56 | points[:,:,1] = wgt[None,:]*Y1[:,None] + (1.-wgt[None,:])*Y2[:,None] 57 | return points 58 | 59 | def get_corner_coord(self,bc1, bc2): 60 | return np.array([self.corner_x, self.corner_y]).reshape((-1,2)) 61 | 62 | -------------------------------------------------------------------------------- /pygrid2d/output.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | 3 | def output_nor(vertices, mesh_data, face_data, domain, Nx, Ny, q): 4 | assert q == 1 5 | 6 | f = open(domain.name+"_"+str(Nx)+"_"+str(Ny)+"_q" + str(q)+".nor", 'w') 7 | num_faces = len(face_data) 8 | nor = np.zeros((num_faces,3)) 9 | count = 0 10 | for face in face_data: 11 | v = face['vertices'] 12 | x = np.zeros((2,)) 13 | y = np.zeros((2,)) 14 | for i in range(2): 15 | x[i] = vertices[v[i],0] 16 | y[i] = vertices[v[i],1] 17 | dx = x[1]-x[0] 18 | dy = y[1]-y[0] 19 | nn = np.sqrt(dx**2 + dy**2) 20 | nor[count,0] = dy/nn 21 | nor[count,1] = -dx/nn 22 | count+=1 23 | np.savetxt(f,nor) 24 | f.close() 25 | 26 | def output_ply(vertices, cells, domain, Nx, Ny, q): 27 | f = open(domain.name+"_"+str(Nx)+"_"+str(Ny)+"_q" + str(q)+".ply", 'w') 28 | f.write("ply\n") 29 | f.write("format ascii 1.0\n") 30 | f.write("comment this file is a " +str(Nx)+"x"+str(Ny)+" " + domain.name + "\n") 31 | f.write("element vertex " + str(vertices.shape[0]) + "\n") 32 | f.write("property float x\n") 33 | f.write("property float y\n") 34 | tot_count = 0 35 | for c in cells: 36 | tot_count = tot_count + c.shape[0] 37 | 38 | f.write("element face " + str(tot_count) +"\n") 39 | f.write("end_header\n") 40 | np.savetxt(f,vertices) 41 | for c in cells: 42 | np.savetxt(f,c,fmt='%i') 43 | 44 | f.close() 45 | 46 | def output_unstructured(vertices, mesh_data, face_data, domain, Nx, Ny, q): 47 | tot_elem = len(mesh_data) 48 | tot_face = len(face_data) 49 | 50 | f = open(domain.name+"_"+str(Nx)+"_"+str(Ny)+"_q" + str(q)+".unstr", 'w') 51 | f.write("vertices " + str(vertices.shape[0]) + "\n") 52 | np.savetxt(f,vertices) 53 | 54 | f.write("cells " + str(tot_elem) + "\n") 55 | for c in mesh_data: 56 | cdata = np.concatenate( ([c['cut']], c['fidx']) ) 57 | np.savetxt(f, cdata.reshape((1,-1)), fmt='%i') 58 | 59 | f.write("faces " + str(tot_face) + "\n") 60 | for face in face_data: 61 | fdata = np.concatenate( ([face['cut']], face['vertices']) ) 62 | np.savetxt(f, fdata.reshape((1,-1)), fmt='%i') 63 | 64 | f.write("faces left right " + str(tot_face) + "\n") 65 | for face in face_data: 66 | np.savetxt(f, np.array(face['lr']).reshape((1,-1)), fmt='%i') 67 | 68 | 69 | 70 | def output_ag(vertices, cells, cells_ij, nv, ncf, domain, Nx, Ny, q, vertex_idx, vert_in): 71 | 72 | irr = -np.ones( (Nx, Ny) ).astype(int) 73 | irr[cells_ij[0]] = 1 74 | 75 | irr_num = 2 76 | for c in range(1, len(cells_ij)): 77 | if len(cells_ij[c]) > 0: 78 | irr[cells_ij[c]] = np.arange( cells_ij[c][0].size ) + irr_num 79 | irr_num = irr_num + cells_ij[c][0].size 80 | 81 | f = open(domain.name + "_" + str(Nx) + "x" + str(Ny)+"_q"+str(q)+".dat","w") 82 | f.write(str(Nx) + " " + str(Ny) + "\n") 83 | f.write("{:.16E} {:.16E} {:.16E} {:.16E}\n".format(domain.left, domain.bottom, domain.right, domain.top)) 84 | f.write("{:.16E} {:.16E}\n".format( (domain.right - domain.left) / Nx, (domain.top - domain.bottom) / Ny ) ) 85 | np.savetxt(f, irr, fmt = '%i') 86 | f.write("{}\n{}\n{}\n".format(4,0,q) ) 87 | f.write("{}\n".format( 0 ) ) 88 | f.write("{} {}\n".format( -1,-1 )) 89 | dx = (domain.right - domain.left) / Nx 90 | dy = (domain.top - domain.bottom) / Ny 91 | np.savetxt(f, np.array([ [0,0], [0,dy], [dx,dy],[dx,0] ]) , fmt = '%.16E') 92 | 93 | # compute side data 94 | hb_list = [None]*len(cells) 95 | ht_list = [None]*len(cells) 96 | vl_list = [None]*len(cells) 97 | vr_list = [None]*len(cells) 98 | tot_cell_count = 0 99 | for cid1 in range( 1, len(cells) ): 100 | c = cells[cid1] 101 | v = nv[cid1] 102 | tot_cell_count = tot_cell_count + c.shape[0] 103 | if c.shape[0] == 0: 104 | continue 105 | 106 | ij = cells_ij[cid1] 107 | 108 | v1 = ij 109 | v2 = (v1[0]+1, v1[1] ) 110 | v3 = (v1[0]+1, v1[1]+1) 111 | v4 = (v1[0] , v1[1]+1) 112 | 113 | 114 | where_v1 = np.where( np.logical_and(vertex_idx[v1][:,None] == c, vert_in[v1][:,None]) ) 115 | where_v2 = np.where( np.logical_and(vertex_idx[v2][:,None] == c, vert_in[v2][:,None]) ) 116 | where_v3 = np.where( np.logical_and(vertex_idx[v3][:,None] == c, vert_in[v3][:,None]) ) 117 | where_v4 = np.where( np.logical_and(vertex_idx[v4][:,None] == c, vert_in[v4][:,None]) ) 118 | 119 | idx_v1 = -np.ones(c.shape[0]).astype(int) 120 | idx_v2 = -np.ones(c.shape[0]).astype(int) 121 | idx_v3 = -np.ones(c.shape[0]).astype(int) 122 | idx_v4 = -np.ones(c.shape[0]).astype(int) 123 | 124 | idx_v1[where_v1[0]] = where_v1[1] 125 | idx_v2[where_v2[0]] = where_v2[1] 126 | idx_v3[where_v3[0]] = where_v3[1] 127 | idx_v4[where_v4[0]] = where_v4[1] 128 | 129 | hb = np.where( np.logical_and(idx_v1 > -1, idx_v2 > -1) , idx_v1, -1) 130 | hb = np.where( np.logical_and(idx_v1 > -1, idx_v2 == -1) , idx_v1, hb) 131 | hb = np.where( np.logical_and(idx_v1 == -1, idx_v2 > -1) , idx_v2-1, hb) 132 | 133 | ht = np.where( np.logical_and(idx_v3 > -1, idx_v4 > -1) , idx_v3, -1) 134 | ht = np.where( np.logical_and(idx_v3 > -1, idx_v4 == -1) , idx_v3, ht) 135 | ht = np.where( np.logical_and(idx_v3 == -1, idx_v4 > -1) , idx_v4-1, ht) 136 | 137 | 138 | vl = np.where( np.logical_and(idx_v4 > -1, idx_v1 > -1) , idx_v4, -1) 139 | vl = np.where( np.logical_and(idx_v4 > -1, idx_v1 == -1) , idx_v4, vl) 140 | vl = np.where( np.logical_and(idx_v4 == -1, idx_v1 > -1) , idx_v1-1, vl) 141 | 142 | vr = np.where( np.logical_and(idx_v2 > -1, idx_v3 > -1) , idx_v2, -1) 143 | vr = np.where( np.logical_and(idx_v2 > -1, idx_v3 == -1) , idx_v2, vr) 144 | vr = np.where( np.logical_and(idx_v2 == -1, idx_v3 > -1) , idx_v3-1, vr) 145 | 146 | # hb_list[cid1] = hb 147 | # ht_list[cid1] = ht 148 | # vl_list[cid1] = vl 149 | # vr_list[cid1] = vr 150 | # need to flip the sides 151 | num = v - (ncf[cid1] * (q-1) + ncf[cid1] - 1) - 2 152 | hb_list[cid1] = np.where(hb>-1, num-hb, hb) 153 | ht_list[cid1] = np.where(ht>-1, num-ht, ht) 154 | vl_list[cid1] = np.where(vl>-1, num-vl, vl) 155 | vr_list[cid1] = np.where(vr>-1, num-vr, vr) 156 | 157 | 158 | 159 | for cid2 in range(c.shape[0]): 160 | X1 = vertices[c[cid2,0],0] 161 | Y1 = vertices[c[cid2,0],1] 162 | if ncf[cid1] == 1: 163 | X2 = vertices[c[cid2, -ncf[cid1] *(q-1) - 1 ],0] 164 | Y2 = vertices[c[cid2, -ncf[cid1] *(q-1) - 1 ],1] 165 | else: 166 | X2 = vertices[c[cid2, -ncf[cid1] *(q-1) - 1 -1 ],0] 167 | Y2 = vertices[c[cid2, -ncf[cid1] *(q-1) - 1 -1 ],1] 168 | 169 | bc1 = domain.bc(X1,Y1) 170 | bc2 = domain.bc(X2,Y2) 171 | bid1 = domain.bc_id(bc1) 172 | bid2 = domain.bc_id(bc2) 173 | f.write("{}\n{}\n{}\n".format(v - (ncf[cid1] * (q-1) + ncf[cid1] - 1), ncf[cid1] * (q-1) + ncf[cid1] - 1 , q)) 174 | f.write("{}\n".format( ncf[cid1] ) ) 175 | f.write("{} {}\n".format( bid1, bid2 )) 176 | cl = c[cid2,:] 177 | num = v - (ncf[cid1] * (q-1) + ncf[cid1] - 1) 178 | cl[:num] = np.flip(cl[:num]) 179 | cl[num:] = np.flip(cl[num:]) 180 | np.savetxt(f, vertices[cl,:], fmt = '%.16E') 181 | 182 | np.savetxt( f, np.array( [ 3, 2, 1, 0] ).reshape( (1,-1) ).astype(int) , fmt = "%i") 183 | for cid1 in range(1,len(cells)): 184 | c = cells[cid1] 185 | if c.shape[0] == 0: 186 | continue 187 | np.savetxt(f, np.hstack( (hb_list[cid1][:,None], 188 | vr_list[cid1][:,None], 189 | ht_list[cid1][:,None], 190 | vl_list[cid1][:,None] ) ) , fmt = '%i') 191 | 192 | f.close() 193 | 194 | 195 | # from matplotlib import collections as mc 196 | # from matplotlib.collections import LineCollection 197 | # import matplotlib.pyplot as plt 198 | # for cid1 in range(1, len(cells)): 199 | # c = cells[cid1] 200 | # v = nv[cid1] 201 | # if c.shape[0] == 0: 202 | # continue 203 | # 204 | # for cid2 in range(c.shape[0]): 205 | # XX = vertices[c[cid2,:],0] 206 | # YY = vertices[c[cid2,:],1] 207 | # XX = np.hstack( (XX, XX[0] ) ) 208 | # YY = np.hstack( (YY, YY[0] ) ) 209 | # 210 | # plt.plot(XX,YY) 211 | # if hb_list[cid1][cid2] > -1: 212 | # plt.scatter(np.mean(XX[hb_list[cid1][cid2]:hb_list[cid1][cid2]+2]), 213 | # np.mean(YY[hb_list[cid1][cid2]:hb_list[cid1][cid2]+2])+0.01, c = 'black',s=2) 214 | # if ht_list[cid1][cid2] > -1: 215 | # plt.scatter(np.mean(XX[ht_list[cid1][cid2]:ht_list[cid1][cid2]+2]), 216 | # np.mean(YY[ht_list[cid1][cid2]:ht_list[cid1][cid2]+2])-0.01, c = 'green', s=2) 217 | # if vl_list[cid1][cid2] > -1: 218 | # plt.scatter(np.mean(XX[vl_list[cid1][cid2]:vl_list[cid1][cid2]+2])+0.01, 219 | # np.mean(YY[vl_list[cid1][cid2]:vl_list[cid1][cid2]+2]), c = 'blue',s=2) 220 | # if vr_list[cid1][cid2] > -1: 221 | # plt.scatter(np.mean(XX[vr_list[cid1][cid2]:vr_list[cid1][cid2]+2])-0.01, 222 | # np.mean(YY[vr_list[cid1][cid2]:vr_list[cid1][cid2]+2]), c = 'purple', s=2) 223 | # plt.show() 224 | 225 | 226 | 227 | -------------------------------------------------------------------------------- /pygrid2d/plot_mesh.py: -------------------------------------------------------------------------------- 1 | from matplotlib import collections as mc 2 | from matplotlib.collections import LineCollection 3 | import numpy as np 4 | import matplotlib.pyplot as plt 5 | 6 | 7 | 8 | def plot_mesh(vertices, cell_list, vertex_counts, dom, regular_vertices): 9 | 10 | ax = plt.axes() 11 | ax.set_xlim(dom[0], dom[2]) 12 | ax.set_ylim(dom[1], dom[3]) 13 | 14 | for cells,nv in zip(cell_list,vertex_counts): 15 | if cells.size == 0: 16 | continue 17 | 18 | segs = np.zeros((cells.shape[0], nv+1, 2)) 19 | segs[:,0:nv,0] = vertices[np.ravel(cells),0].reshape( (cells.shape[0], nv) ) 20 | segs[:,0:nv,1] = vertices[np.ravel(cells),1].reshape( (cells.shape[0], nv) ) 21 | 22 | segs[:,nv,:] = segs[:,0,:] 23 | line_segments = LineCollection(segs, linestyle='solid', linewidth = 0.5) 24 | 25 | 26 | ax.add_collection(line_segments) 27 | ax.set_aspect('equal', 'box') 28 | 29 | plt.scatter(vertices[regular_vertices:,0], vertices[regular_vertices:,1], color = 'red', s = 1) 30 | plt.scatter(vertices[0:regular_vertices,0], vertices[0:regular_vertices,1], color = 'black', s = 1) 31 | plt.show() 32 | -------------------------------------------------------------------------------- /pygrid2d/ringleb.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .domain import Domain 3 | from .bisection import * 4 | 5 | class Ringleb(Domain): 6 | gamma = 1.4 7 | gm1 = gamma - 1. 8 | kmin = 0.7 9 | kmax = 1.2 10 | qmin = 0.5 11 | sx = 1.5 12 | sy = 0 13 | name = 'ringleb' 14 | left = 0 15 | right = 2.75 16 | bottom = 0 17 | top = 2.75 18 | 19 | 20 | 21 | def compute_J(self,c): 22 | return 1. / c + 1. / (3. * c ** 3) + 1. / (5. * c ** 5) -.5 * np.log((1. + c) / (1. - c)) 23 | def compute_rho(self,c): 24 | return c ** (2. / self.gm1) 25 | def compute_q2(self,c): 26 | return 2. * (1. - c ** 2) / self.gm1 27 | 28 | def eqn(self,x, y, c): 29 | J = self.compute_J(c) 30 | rho = self.compute_rho(c) 31 | q2 = self.compute_q2(c) 32 | 33 | return (x - J / 2.) ** 2 + y ** 2 - 1. / (4. * rho ** 2 * q2 ** 2) 34 | 35 | def compute_c(self,x, y): 36 | clow =.5*np.ones(x.size) 37 | chigh = 0.9999*np.ones(x.size) 38 | 39 | c = bisection(clow, chigh, lambda cin : self.eqn(np.ravel(x),np.ravel(y),cin) ) 40 | return c.reshape(x.shape) 41 | 42 | def kq2xy(self, k, q): 43 | c = np.sqrt(2. + q**2 - self.gamma * q**2)/np.sqrt(2) 44 | J = self.compute_J(c) 45 | rho = self.compute_rho(c) 46 | q2 = q**2 47 | k2 = k**2 48 | 49 | x = (0.5/rho) * (1./q2 - 2./k**2.) + 0.5 * J + self.sx 50 | y = np.sqrt(1. - q2/k**2.)/(k * rho * q ) + self.sy 51 | return x,y 52 | 53 | def xy2kq(self,x,y): 54 | x = x - self.sx 55 | y = y - self.sy 56 | 57 | c = self.compute_c(x, y) 58 | J = self.compute_J(c) 59 | rho = self.compute_rho(c) 60 | q2 = self.compute_q2(c) 61 | 62 | q = np.sqrt(q2) 63 | k = np.sqrt(2. / (1. / q2 - 2. * rho * (x - J / 2.))) 64 | return k,q 65 | 66 | def in_domain(self,x,y): 67 | k,q = self.xy2kq(x,y) 68 | c1 = np.greater_equal(q,self.qmin) 69 | c2 = np.logical_and(np.less_equal(self.kmin, k), np.less_equal(k,self.kmax) ) 70 | return np.logical_and(c1,c2).astype(int) 71 | 72 | def bc_id(self, bid): 73 | if bid == -1 or bid == -2: 74 | return -1 75 | else: 76 | return -2 77 | 78 | # DEPRECATE THIS. 79 | def bc(self,x,y): 80 | k,q = self.xy2kq(x,y) 81 | dk_min = -1*(np.abs(k-self.kmin) < 1e-13) 82 | dk_max = -2*(np.abs(k-self.kmax) < 1e-13) 83 | dq_min = -3*(np.abs(q-self.qmin) < 1e-13) 84 | 85 | sanity_check = np.logical_not(np.logical_xor(np.logical_xor(dk_min, dk_max), dq_min)) 86 | num_wrong = np.sum(sanity_check) 87 | if(num_wrong > 0): 88 | print("DUPLICATE BOUNDARY CONDITIONS\n") 89 | quit() 90 | 91 | return dk_min+dk_max+dq_min 92 | 93 | # -1 reflecting, -2 is inflow/outflow 94 | def vertex2bc(self, x, y): 95 | k,q = self.xy2kq(x,y) 96 | dk_min = -1*(np.abs(k-self.kmin) < 1e-13) 97 | dk_max = -1*(np.abs(k-self.kmax) < 1e-13) 98 | dq_min = -2*(np.abs(q-self.qmin) < 1e-13) 99 | bot = -2*(np.abs(y) < 1e-13) 100 | bc = dk_min+dk_max+dq_min+bot 101 | decided = np.where(np.logical_xor(np.logical_xor(np.logical_xor(dk_min, dk_max), dq_min), bot)) 102 | 103 | out = np.zeros(x.shape) 104 | out[decided] = bc[decided] 105 | return out 106 | 107 | 108 | def target_ratio(self, wgt, k1, q1, k2, q2, k3, q3) : 109 | X1,Y1 = self.kq2xy(k1,q1) 110 | X2,Y2 = self.kq2xy(k2,q2) 111 | X3,Y3 = self.kq2xy(k3,q3) 112 | 113 | l1 = np.sqrt( (X3-X2)**2. + (Y3-Y2)**2. ) 114 | l3 = np.sqrt( (X3-X1)**2. + (Y3-Y1)**2. ) 115 | 116 | return l1/l3 - wgt 117 | 118 | 119 | def curved_points(self,wgt,X1,Y1,X2,Y2): 120 | bc1 = self.bc(X1,Y1) 121 | # bc2 = self.bc(X2,Y2) 122 | # sanity_check = np.logical_not( np.equal(bc1,bc2) ) 123 | # num_wrong = np.sum(sanity_check) 124 | # if(num_wrong > 0): 125 | # print("not the same\n") 126 | # quit() 127 | 128 | 129 | points = np.zeros( (X1.shape[0], wgt.size, 2) ) 130 | for qq in range(wgt.size): 131 | # boundary -1 132 | idx1 = np.where( bc1 == -1 )[0] 133 | k1,q1 = self.xy2kq(X1[idx1], Y1[idx1]) 134 | k3,q3 = self.xy2kq(X2[idx1], Y2[idx1]) 135 | q2 = bisection( q1, q3, lambda qin : self.target_ratio(wgt[qq], self.kmin, q1, 136 | self.kmin, qin, 137 | self.kmin, q3 ) ) 138 | x2,y2 = self.kq2xy(self.kmin,q2) 139 | points[idx1,qq,0] = x2 140 | points[idx1,qq,1] = y2 141 | 142 | # boundary -2 143 | idx2 = np.where( bc1 == -2)[0] 144 | k1,q1 = self.xy2kq(X1[idx2], Y1[idx2]) 145 | k3,q3 = self.xy2kq(X2[idx2], Y2[idx2]) 146 | q2 = bisection( q1, q3, lambda qin : self.target_ratio(wgt[qq], self.kmax, q1, 147 | self.kmax, qin, 148 | self.kmax, q3 ) ) 149 | 150 | x2,y2 = self.kq2xy(self.kmax,q2) 151 | points[idx2,qq,0] = x2 152 | points[idx2,qq,1] = y2 153 | 154 | 155 | # boundary -3 156 | idx3 = np.where( bc1 == -3)[0] 157 | k1,q1 = self.xy2kq(X1[idx3], Y1[idx3]) 158 | k3,q3 = self.xy2kq(X2[idx3], Y2[idx3]) 159 | k2 = bisection( k1, k3, lambda kin : self.target_ratio(wgt[qq], k1 , self.qmin, 160 | kin, self.qmin, 161 | k3 , self.qmin ) ) 162 | 163 | x2,y2 = self.kq2xy(k2,self.qmin) 164 | points[idx3,qq,0] = x2 165 | points[idx3,qq,1] = y2 166 | 167 | 168 | 169 | 170 | return points 171 | 172 | 173 | 174 | 175 | def get_corner_coord(self,bc1, bc2): 176 | k13,q13 = self.kq2xy(np.array([self.kmin]), np.array([self.qmin])) 177 | k23,q23 = self.kq2xy(np.array([self.kmax]), np.array([self.qmin])) 178 | 179 | corner13 = np.hstack( (k13,q13) ).reshape( (-1,2) ) 180 | corner23 = np.hstack( (k23,q23) ).reshape( (-1,2) ) 181 | 182 | corner_coords = np.zeros( (bc1.shape[0], 2) ) 183 | corner_coords[:,0] = np.where( np.logical_and(bc1 == -1,bc2 == -3) , corner13[:,0], corner23[:,0] ) 184 | corner_coords[:,1] = np.where( np.logical_and(bc1 == -1,bc2 == -3) , corner13[:,1], corner23[:,1] ) 185 | 186 | return corner_coords 187 | 188 | 189 | 190 | 191 | 192 | -------------------------------------------------------------------------------- /pygrid2d/supersonic.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | from .domain import Domain 3 | 4 | class Supersonic(Domain): 5 | name = 'supersonic' 6 | left = 0 7 | right = 1.43 8 | bottom = 0 9 | top = 1.43 10 | R1 = 1. 11 | R2 = 1.384 12 | 13 | 14 | def in_domain(self, X,Y): 15 | 16 | R = np.sqrt( X**2 + Y**2) 17 | bval = np.logical_and( np.less_equal(self.R1 , R) , np.less_equal(R , self.R2) ) 18 | return bval.astype(int) 19 | def bc_id(self,bid): 20 | return bid 21 | def bc(self,x,y): 22 | r = np.sqrt(x**2. + y**2.) 23 | r1 = -1*(np.abs(r-self.R1) < 1e-14) 24 | r2 = -2*(np.abs(r-self.R2) < 1e-14) 25 | 26 | sanity_check = np.logical_not(np.logical_xor(r1,r2)) 27 | num_wrong = np.sum(sanity_check) 28 | if(num_wrong > 0): 29 | print("DUPLICATE BOUNDARY CONDITIONS\n") 30 | quit() 31 | 32 | return r1+r2 33 | 34 | # -1 reflecting, -2 is inflow/outflow 35 | def vertex2bc(self, x, y): 36 | r = np.sqrt(x**2. + y**2.) 37 | r1 = -1*(np.abs(r-self.R1) < 1e-14) 38 | r2 = -1*(np.abs(r-self.R2) < 1e-14) 39 | bot= -2*(np.abs(y < 1e-14)) 40 | left=-2*(np.abs(x < 1e-14)) 41 | bc = r1+r2+bot+left 42 | decided = np.where(np.logical_xor(np.logical_xor(np.logical_xor(r1, r2), bot), left)) 43 | out = np.zeros(x.shape) 44 | out[decided] = bc[decided] 45 | return out 46 | 47 | 48 | 49 | 50 | 51 | def curved_points(self,wgt,X1,Y1,X2,Y2): 52 | bc1 = self.bc(X1,Y1) 53 | bc2 = self.bc(X2,Y2) 54 | sanity_check = np.logical_not( np.equal(bc1,bc2) ) 55 | num_wrong = np.sum(sanity_check) 56 | if(num_wrong > 0): 57 | print("not the same\n") 58 | quit() 59 | 60 | radii = np.where(np.equal(bc1, -1) , self.R1, self.R2) 61 | angle1 = np.arctan2( Y1, X1 ) 62 | angle2 = np.arctan2( Y2, X2 ) 63 | angles = wgt[None,:]*angle1[:,None] + (1.-wgt[None,:])*angle2[:,None] 64 | 65 | points = np.zeros( (angles.shape[0], angles.shape[1], 2) ) 66 | points[:,:,0] = radii[:,None] * np.cos(angles) 67 | points[:,:,1] = radii[:,None] * np.sin(angles) 68 | return points 69 | 70 | -------------------------------------------------------------------------------- /setup.py: -------------------------------------------------------------------------------- 1 | from setuptools import setup, Extension 2 | from setuptools.command.build_ext import build_ext 3 | import sys 4 | import os 5 | import setuptools 6 | 7 | __version__ = '0.0.1' 8 | 9 | setup( 10 | name='PyGrid2D', 11 | long_description='', 12 | install_requires=['numpy', 'scipy', 'argparse', 'matplotlib', 'pytest', 'rich'], 13 | packages = ["pygrid2d"], 14 | package_dir = {"pygrid2d": "pygrid2d"}, 15 | zip_safe=False, 16 | ) 17 | -------------------------------------------------------------------------------- /tests/data/annulus_10_10_q1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment this file is a 10x10 annulus 4 | element vertex 92 5 | property float x 6 | property float y 7 | element face 64 8 | end_header 9 | 3.000099999999999989e-01 1.200039999999999996e+00 10 | 3.000099999999999989e-01 1.500049999999999883e+00 11 | 3.000099999999999989e-01 1.800059999999999993e+00 12 | 6.000199999999999978e-01 9.000299999999999967e-01 13 | 6.000199999999999978e-01 1.200039999999999996e+00 14 | 6.000199999999999978e-01 1.500049999999999883e+00 15 | 6.000199999999999978e-01 1.800059999999999993e+00 16 | 6.000199999999999978e-01 2.100070000000000103e+00 17 | 9.000299999999999967e-01 6.000199999999999978e-01 18 | 9.000299999999999967e-01 9.000299999999999967e-01 19 | 9.000299999999999967e-01 2.100070000000000103e+00 20 | 9.000299999999999967e-01 2.400079999999999991e+00 21 | 1.200039999999999996e+00 3.000099999999999989e-01 22 | 1.200039999999999996e+00 6.000199999999999978e-01 23 | 1.200039999999999996e+00 2.400079999999999991e+00 24 | 1.200039999999999996e+00 2.700089999999999879e+00 25 | 1.500049999999999883e+00 3.000099999999999989e-01 26 | 1.500049999999999883e+00 6.000199999999999978e-01 27 | 1.500049999999999883e+00 2.400079999999999991e+00 28 | 1.500049999999999883e+00 2.700089999999999879e+00 29 | 1.800059999999999993e+00 3.000099999999999989e-01 30 | 1.800059999999999993e+00 6.000199999999999978e-01 31 | 1.800059999999999993e+00 2.400079999999999991e+00 32 | 1.800059999999999993e+00 2.700089999999999879e+00 33 | 2.100070000000000103e+00 6.000199999999999978e-01 34 | 2.100070000000000103e+00 9.000299999999999967e-01 35 | 2.100070000000000103e+00 2.100070000000000103e+00 36 | 2.100070000000000103e+00 2.400079999999999991e+00 37 | 2.400079999999999991e+00 9.000299999999999967e-01 38 | 2.400079999999999991e+00 1.200039999999999996e+00 39 | 2.400079999999999991e+00 1.500049999999999883e+00 40 | 2.400079999999999991e+00 1.800059999999999993e+00 41 | 2.400079999999999991e+00 2.100070000000000103e+00 42 | 2.700089999999999879e+00 1.200039999999999996e+00 43 | 2.700089999999999879e+00 1.500049999999999883e+00 44 | 2.700089999999999879e+00 1.800059999999999993e+00 45 | 2.865240017206766021e-01 1.200039999999999996e+00 46 | 2.500000009999999717e-01 1.500049999999999883e+00 47 | 2.865487251644588396e-01 1.800059999999999993e+00 48 | 4.033979759730513814e-01 9.000299999999999967e-01 49 | 4.034526936333296954e-01 2.100070000000000103e+00 50 | 6.325116717788070719e-01 6.000199999999999978e-01 51 | 8.125961897108804344e-01 1.200039999999999996e+00 52 | 7.500000016666668046e-01 1.500049999999999883e+00 53 | 8.126398350209695920e-01 1.800059999999999993e+00 54 | 6.326154292356818143e-01 2.400079999999999991e+00 55 | 1.149965716107693492e+00 3.000099999999999989e-01 56 | 1.049960002777531098e+00 9.000299999999999967e-01 57 | 1.050093348459927967e+00 2.100070000000000103e+00 58 | 1.150308719153593007e+00 2.700089999999999879e+00 59 | 1.850034283892306508e+00 3.000099999999999989e-01 60 | 1.950039997222468902e+00 9.000299999999999967e-01 61 | 1.949906651540072033e+00 2.100070000000000103e+00 62 | 1.849691280846406993e+00 2.700089999999999879e+00 63 | 2.367488328221193150e+00 6.000199999999999978e-01 64 | 2.187403810289120010e+00 1.200039999999999996e+00 65 | 2.249999998333333195e+00 1.500049999999999883e+00 66 | 2.187360164979030408e+00 1.800059999999999993e+00 67 | 2.367384570764317964e+00 2.400079999999999991e+00 68 | 2.596602024026948285e+00 9.000299999999999967e-01 69 | 2.596547306366669972e+00 2.100070000000000103e+00 70 | 2.713475998279323065e+00 1.200039999999999996e+00 71 | 2.749999998999999917e+00 1.500049999999999883e+00 72 | 2.713451274835541049e+00 1.800059999999999993e+00 73 | 3.000099999999999989e-01 1.149965716107693492e+00 74 | 3.000099999999999989e-01 1.850034283892306508e+00 75 | 6.000199999999999978e-01 6.325116717788070719e-01 76 | 6.000199999999999978e-01 2.367488328221193150e+00 77 | 9.000299999999999967e-01 4.033979759730513814e-01 78 | 9.000299999999999967e-01 1.049960002777531098e+00 79 | 9.000299999999999967e-01 1.950039997222468902e+00 80 | 9.000299999999999967e-01 2.596602024026948285e+00 81 | 1.200039999999999996e+00 2.865240017206766021e-01 82 | 1.200039999999999996e+00 8.125961897108804344e-01 83 | 1.200039999999999996e+00 2.187403810289120010e+00 84 | 1.200039999999999996e+00 2.713475998279323065e+00 85 | 1.500049999999999883e+00 2.500000009999999717e-01 86 | 1.500049999999999883e+00 7.500000016666668046e-01 87 | 1.500049999999999883e+00 2.249999998333333195e+00 88 | 1.500049999999999883e+00 2.749999998999999917e+00 89 | 1.800059999999999993e+00 2.865487251644588396e-01 90 | 1.800059999999999993e+00 8.126398350209695920e-01 91 | 1.800059999999999993e+00 2.187360164979030408e+00 92 | 1.800059999999999993e+00 2.713451274835541049e+00 93 | 2.100070000000000103e+00 4.034526936333296954e-01 94 | 2.100070000000000103e+00 1.050093348459927967e+00 95 | 2.100070000000000103e+00 1.949906651540072033e+00 96 | 2.100070000000000103e+00 2.596547306366669972e+00 97 | 2.400079999999999991e+00 6.326154292356818143e-01 98 | 2.400079999999999991e+00 2.367384570764317964e+00 99 | 2.700089999999999879e+00 1.150308719153593007e+00 100 | 2.700089999999999879e+00 1.849691280846406993e+00 101 | 0 4 5 1 102 | 1 5 6 2 103 | 12 16 17 13 104 | 14 18 19 15 105 | 16 20 21 17 106 | 18 22 23 19 107 | 29 33 34 30 108 | 30 34 35 31 109 | 64 0 36 110 | 61 33 90 111 | 89 32 60 112 | 59 28 88 113 | 87 27 58 114 | 54 24 84 115 | 83 23 53 116 | 86 26 52 117 | 51 25 85 118 | 50 20 80 119 | 49 15 75 120 | 48 10 70 121 | 69 9 47 122 | 72 12 46 123 | 45 11 71 124 | 91 35 63 125 | 68 8 41 126 | 38 2 65 127 | 66 3 39 128 | 40 7 67 129 | 62 34 33 61 130 | 36 0 1 37 131 | 37 1 2 38 132 | 56 30 31 57 133 | 55 29 30 56 134 | 79 19 23 83 135 | 82 22 18 78 136 | 77 17 21 81 137 | 75 15 19 79 138 | 63 35 34 62 139 | 78 18 14 74 140 | 73 13 17 77 141 | 44 6 5 43 142 | 76 16 12 72 143 | 43 5 4 42 144 | 80 20 16 76 145 | 46 12 13 8 68 146 | 47 9 8 13 73 147 | 60 32 31 35 91 148 | 90 33 29 28 59 149 | 74 14 11 10 48 150 | 58 27 26 32 89 151 | 57 31 32 26 86 152 | 71 11 14 15 49 153 | 85 25 28 29 55 154 | 88 28 25 24 54 155 | 39 3 4 0 64 156 | 65 2 6 7 40 157 | 53 23 22 27 87 158 | 52 26 27 22 82 159 | 67 7 10 11 45 160 | 81 21 24 25 51 161 | 84 24 21 20 50 162 | 41 8 9 3 66 163 | 42 4 3 9 69 164 | 70 10 7 6 44 165 | -------------------------------------------------------------------------------- /tests/data/annulus_20_20_q2.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment this file is a 20x20 annulus 4 | element vertex 364 5 | property float x 6 | property float y 7 | element face 202 8 | end_header 9 | 3.000099999999999989e-01 1.200039999999999996e+00 10 | 3.000099999999999989e-01 1.350044999999999940e+00 11 | 3.000099999999999989e-01 1.500049999999999883e+00 12 | 3.000099999999999989e-01 1.650055000000000049e+00 13 | 3.000099999999999989e-01 1.800059999999999993e+00 14 | 4.500149999999999983e-01 9.000299999999999967e-01 15 | 4.500149999999999983e-01 1.050035000000000052e+00 16 | 4.500149999999999983e-01 1.200039999999999996e+00 17 | 4.500149999999999983e-01 1.350044999999999940e+00 18 | 4.500149999999999983e-01 1.500049999999999883e+00 19 | 4.500149999999999983e-01 1.650055000000000049e+00 20 | 4.500149999999999983e-01 1.800059999999999993e+00 21 | 4.500149999999999983e-01 1.950064999999999937e+00 22 | 4.500149999999999983e-01 2.100070000000000103e+00 23 | 6.000199999999999978e-01 7.500249999999999417e-01 24 | 6.000199999999999978e-01 9.000299999999999967e-01 25 | 6.000199999999999978e-01 1.050035000000000052e+00 26 | 6.000199999999999978e-01 1.200039999999999996e+00 27 | 6.000199999999999978e-01 1.350044999999999940e+00 28 | 6.000199999999999978e-01 1.500049999999999883e+00 29 | 6.000199999999999978e-01 1.650055000000000049e+00 30 | 6.000199999999999978e-01 1.800059999999999993e+00 31 | 6.000199999999999978e-01 1.950064999999999937e+00 32 | 6.000199999999999978e-01 2.100070000000000103e+00 33 | 6.000199999999999978e-01 2.250074999999999825e+00 34 | 7.500249999999999417e-01 6.000199999999999978e-01 35 | 7.500249999999999417e-01 7.500249999999999417e-01 36 | 7.500249999999999417e-01 9.000299999999999967e-01 37 | 7.500249999999999417e-01 1.050035000000000052e+00 38 | 7.500249999999999417e-01 1.200039999999999996e+00 39 | 7.500249999999999417e-01 1.350044999999999940e+00 40 | 7.500249999999999417e-01 1.650055000000000049e+00 41 | 7.500249999999999417e-01 1.800059999999999993e+00 42 | 7.500249999999999417e-01 1.950064999999999937e+00 43 | 7.500249999999999417e-01 2.100070000000000103e+00 44 | 7.500249999999999417e-01 2.250074999999999825e+00 45 | 7.500249999999999417e-01 2.400079999999999991e+00 46 | 9.000299999999999967e-01 4.500149999999999983e-01 47 | 9.000299999999999967e-01 6.000199999999999978e-01 48 | 9.000299999999999967e-01 7.500249999999999417e-01 49 | 9.000299999999999967e-01 9.000299999999999967e-01 50 | 9.000299999999999967e-01 1.950064999999999937e+00 51 | 9.000299999999999967e-01 2.100070000000000103e+00 52 | 9.000299999999999967e-01 2.250074999999999825e+00 53 | 9.000299999999999967e-01 2.400079999999999991e+00 54 | 9.000299999999999967e-01 2.550085000000000157e+00 55 | 1.050035000000000052e+00 4.500149999999999983e-01 56 | 1.050035000000000052e+00 6.000199999999999978e-01 57 | 1.050035000000000052e+00 7.500249999999999417e-01 58 | 1.050035000000000052e+00 2.100070000000000103e+00 59 | 1.050035000000000052e+00 2.250074999999999825e+00 60 | 1.050035000000000052e+00 2.400079999999999991e+00 61 | 1.050035000000000052e+00 2.550085000000000157e+00 62 | 1.200039999999999996e+00 3.000099999999999989e-01 63 | 1.200039999999999996e+00 4.500149999999999983e-01 64 | 1.200039999999999996e+00 6.000199999999999978e-01 65 | 1.200039999999999996e+00 7.500249999999999417e-01 66 | 1.200039999999999996e+00 2.250074999999999825e+00 67 | 1.200039999999999996e+00 2.400079999999999991e+00 68 | 1.200039999999999996e+00 2.550085000000000157e+00 69 | 1.200039999999999996e+00 2.700089999999999879e+00 70 | 1.350044999999999940e+00 3.000099999999999989e-01 71 | 1.350044999999999940e+00 4.500149999999999983e-01 72 | 1.350044999999999940e+00 6.000199999999999978e-01 73 | 1.350044999999999940e+00 7.500249999999999417e-01 74 | 1.350044999999999940e+00 2.250074999999999825e+00 75 | 1.350044999999999940e+00 2.400079999999999991e+00 76 | 1.350044999999999940e+00 2.550085000000000157e+00 77 | 1.350044999999999940e+00 2.700089999999999879e+00 78 | 1.500049999999999883e+00 3.000099999999999989e-01 79 | 1.500049999999999883e+00 4.500149999999999983e-01 80 | 1.500049999999999883e+00 6.000199999999999978e-01 81 | 1.500049999999999883e+00 2.250074999999999825e+00 82 | 1.500049999999999883e+00 2.400079999999999991e+00 83 | 1.500049999999999883e+00 2.550085000000000157e+00 84 | 1.500049999999999883e+00 2.700089999999999879e+00 85 | 1.650055000000000049e+00 3.000099999999999989e-01 86 | 1.650055000000000049e+00 4.500149999999999983e-01 87 | 1.650055000000000049e+00 6.000199999999999978e-01 88 | 1.650055000000000049e+00 7.500249999999999417e-01 89 | 1.650055000000000049e+00 2.250074999999999825e+00 90 | 1.650055000000000049e+00 2.400079999999999991e+00 91 | 1.650055000000000049e+00 2.550085000000000157e+00 92 | 1.650055000000000049e+00 2.700089999999999879e+00 93 | 1.800059999999999993e+00 3.000099999999999989e-01 94 | 1.800059999999999993e+00 4.500149999999999983e-01 95 | 1.800059999999999993e+00 6.000199999999999978e-01 96 | 1.800059999999999993e+00 7.500249999999999417e-01 97 | 1.800059999999999993e+00 2.250074999999999825e+00 98 | 1.800059999999999993e+00 2.400079999999999991e+00 99 | 1.800059999999999993e+00 2.550085000000000157e+00 100 | 1.800059999999999993e+00 2.700089999999999879e+00 101 | 1.950064999999999937e+00 4.500149999999999983e-01 102 | 1.950064999999999937e+00 6.000199999999999978e-01 103 | 1.950064999999999937e+00 7.500249999999999417e-01 104 | 1.950064999999999937e+00 9.000299999999999967e-01 105 | 1.950064999999999937e+00 2.100070000000000103e+00 106 | 1.950064999999999937e+00 2.250074999999999825e+00 107 | 1.950064999999999937e+00 2.400079999999999991e+00 108 | 1.950064999999999937e+00 2.550085000000000157e+00 109 | 2.100070000000000103e+00 4.500149999999999983e-01 110 | 2.100070000000000103e+00 6.000199999999999978e-01 111 | 2.100070000000000103e+00 7.500249999999999417e-01 112 | 2.100070000000000103e+00 9.000299999999999967e-01 113 | 2.100070000000000103e+00 1.050035000000000052e+00 114 | 2.100070000000000103e+00 1.950064999999999937e+00 115 | 2.100070000000000103e+00 2.100070000000000103e+00 116 | 2.100070000000000103e+00 2.250074999999999825e+00 117 | 2.100070000000000103e+00 2.400079999999999991e+00 118 | 2.100070000000000103e+00 2.550085000000000157e+00 119 | 2.250074999999999825e+00 6.000199999999999978e-01 120 | 2.250074999999999825e+00 7.500249999999999417e-01 121 | 2.250074999999999825e+00 9.000299999999999967e-01 122 | 2.250074999999999825e+00 1.050035000000000052e+00 123 | 2.250074999999999825e+00 1.200039999999999996e+00 124 | 2.250074999999999825e+00 1.350044999999999940e+00 125 | 2.250074999999999825e+00 1.500049999999999883e+00 126 | 2.250074999999999825e+00 1.650055000000000049e+00 127 | 2.250074999999999825e+00 1.800059999999999993e+00 128 | 2.250074999999999825e+00 1.950064999999999937e+00 129 | 2.250074999999999825e+00 2.100070000000000103e+00 130 | 2.250074999999999825e+00 2.250074999999999825e+00 131 | 2.250074999999999825e+00 2.400079999999999991e+00 132 | 2.400079999999999991e+00 7.500249999999999417e-01 133 | 2.400079999999999991e+00 9.000299999999999967e-01 134 | 2.400079999999999991e+00 1.050035000000000052e+00 135 | 2.400079999999999991e+00 1.200039999999999996e+00 136 | 2.400079999999999991e+00 1.350044999999999940e+00 137 | 2.400079999999999991e+00 1.500049999999999883e+00 138 | 2.400079999999999991e+00 1.650055000000000049e+00 139 | 2.400079999999999991e+00 1.800059999999999993e+00 140 | 2.400079999999999991e+00 1.950064999999999937e+00 141 | 2.400079999999999991e+00 2.100070000000000103e+00 142 | 2.400079999999999991e+00 2.250074999999999825e+00 143 | 2.550085000000000157e+00 9.000299999999999967e-01 144 | 2.550085000000000157e+00 1.050035000000000052e+00 145 | 2.550085000000000157e+00 1.200039999999999996e+00 146 | 2.550085000000000157e+00 1.350044999999999940e+00 147 | 2.550085000000000157e+00 1.500049999999999883e+00 148 | 2.550085000000000157e+00 1.650055000000000049e+00 149 | 2.550085000000000157e+00 1.800059999999999993e+00 150 | 2.550085000000000157e+00 1.950064999999999937e+00 151 | 2.550085000000000157e+00 2.100070000000000103e+00 152 | 2.700089999999999879e+00 1.200039999999999996e+00 153 | 2.700089999999999879e+00 1.350044999999999940e+00 154 | 2.700089999999999879e+00 1.500049999999999883e+00 155 | 2.700089999999999879e+00 1.650055000000000049e+00 156 | 2.700089999999999879e+00 1.800059999999999993e+00 157 | 2.865240017206766021e-01 1.200039999999999996e+00 158 | 2.590271969237197824e-01 1.350044999999999940e+00 159 | 2.500000009999999717e-01 1.500049999999999883e+00 160 | 2.590392846769885571e-01 1.650055000000000049e+00 161 | 2.865487251644588396e-01 1.800059999999999993e+00 162 | 4.033979759730513814e-01 9.000299999999999967e-01 163 | 3.337961161207702032e-01 1.050035000000000052e+00 164 | 3.338347047802355805e-01 1.950064999999999937e+00 165 | 4.034526936333296954e-01 2.100070000000000103e+00 166 | 4.999812504882720221e-01 7.500249999999999417e-01 167 | 5.000562543947781879e-01 2.250074999999999825e+00 168 | 6.325116717788070719e-01 6.000199999999999978e-01 169 | 7.500000016666668046e-01 1.500049999999999883e+00 170 | 6.326154292356818143e-01 2.400079999999999991e+00 171 | 8.217437801427838195e-01 4.500149999999999983e-01 172 | 8.999737515949823852e-01 1.050035000000000052e+00 173 | 8.125961897108804344e-01 1.200039999999999996e+00 174 | 7.651438930137410832e-01 1.350044999999999940e+00 175 | 7.651643061370794197e-01 1.650055000000000049e+00 176 | 8.126398350209695920e-01 1.800059999999999993e+00 177 | 8.218986117290423277e-01 2.550085000000000157e+00 178 | 1.049960002777531098e+00 9.000299999999999967e-01 179 | 9.000487555017491204e-01 1.950064999999999937e+00 180 | 1.149965716107693492e+00 3.000099999999999989e-01 181 | 1.050093348459927967e+00 2.100070000000000103e+00 182 | 1.150308719153593007e+00 2.700089999999999879e+00 183 | 1.493876326674306920e+00 7.500249999999999417e-01 184 | 1.506123673325693080e+00 7.500249999999999417e-01 185 | 1.850034283892306508e+00 3.000099999999999989e-01 186 | 1.950039997222468902e+00 9.000299999999999967e-01 187 | 1.949906651540072033e+00 2.100070000000000103e+00 188 | 1.849691280846406993e+00 2.700089999999999879e+00 189 | 2.100026248405018059e+00 1.050035000000000052e+00 190 | 2.099951244498250880e+00 1.950064999999999937e+00 191 | 2.178256219857216180e+00 4.500149999999999983e-01 192 | 2.187403810289120010e+00 1.200039999999999996e+00 193 | 2.234856106986258695e+00 1.350044999999999940e+00 194 | 2.249999998333333195e+00 1.500049999999999883e+00 195 | 2.234835693862920358e+00 1.650055000000000049e+00 196 | 2.187360164979030408e+00 1.800059999999999993e+00 197 | 2.178101388270957450e+00 2.550085000000000157e+00 198 | 2.367488328221193150e+00 6.000199999999999978e-01 199 | 2.367384570764317964e+00 2.400079999999999991e+00 200 | 2.500018749511728089e+00 7.500249999999999417e-01 201 | 2.499943745605222034e+00 2.250074999999999825e+00 202 | 2.596602024026948285e+00 9.000299999999999967e-01 203 | 2.666203883879229686e+00 1.050035000000000052e+00 204 | 2.666165295219764531e+00 1.950064999999999937e+00 205 | 2.596547306366669972e+00 2.100070000000000103e+00 206 | 2.713475998279323065e+00 1.200039999999999996e+00 207 | 2.740972803076280329e+00 1.350044999999999940e+00 208 | 2.749999998999999917e+00 1.500049999999999883e+00 209 | 2.740960715323011776e+00 1.650055000000000049e+00 210 | 2.713451274835541049e+00 1.800059999999999993e+00 211 | 3.000099999999999989e-01 1.149965716107693492e+00 212 | 3.000099999999999989e-01 1.850034283892306508e+00 213 | 4.500149999999999983e-01 8.217437801427838195e-01 214 | 4.500149999999999983e-01 2.178256219857216180e+00 215 | 6.000199999999999978e-01 6.325116717788070719e-01 216 | 6.000199999999999978e-01 2.367488328221193150e+00 217 | 7.500249999999999417e-01 4.999812504882720221e-01 218 | 7.500249999999999417e-01 1.493876326674306920e+00 219 | 7.500249999999999417e-01 1.506123673325693080e+00 220 | 7.500249999999999417e-01 2.500018749511728089e+00 221 | 9.000299999999999967e-01 4.033979759730513814e-01 222 | 9.000299999999999967e-01 1.049960002777531098e+00 223 | 9.000299999999999967e-01 1.950039997222468902e+00 224 | 9.000299999999999967e-01 2.596602024026948285e+00 225 | 1.050035000000000052e+00 3.337961161207702032e-01 226 | 1.050035000000000052e+00 8.999737515949823852e-01 227 | 1.050035000000000052e+00 2.100026248405018059e+00 228 | 1.050035000000000052e+00 2.666203883879229686e+00 229 | 1.200039999999999996e+00 2.865240017206766021e-01 230 | 1.200039999999999996e+00 8.125961897108804344e-01 231 | 1.200039999999999996e+00 2.187403810289120010e+00 232 | 1.200039999999999996e+00 2.713475998279323065e+00 233 | 1.350044999999999940e+00 2.590271969237197824e-01 234 | 1.350044999999999940e+00 7.651438930137410832e-01 235 | 1.350044999999999940e+00 2.234856106986258695e+00 236 | 1.350044999999999940e+00 2.740972803076280329e+00 237 | 1.500049999999999883e+00 2.500000009999999717e-01 238 | 1.500049999999999883e+00 7.500000016666668046e-01 239 | 1.500049999999999883e+00 2.249999998333333195e+00 240 | 1.500049999999999883e+00 2.749999998999999917e+00 241 | 1.650055000000000049e+00 2.590392846769885571e-01 242 | 1.650055000000000049e+00 7.651643061370794197e-01 243 | 1.650055000000000049e+00 2.234835693862920358e+00 244 | 1.650055000000000049e+00 2.740960715323011776e+00 245 | 1.800059999999999993e+00 2.865487251644588396e-01 246 | 1.800059999999999993e+00 8.126398350209695920e-01 247 | 1.800059999999999993e+00 2.187360164979030408e+00 248 | 1.800059999999999993e+00 2.713451274835541049e+00 249 | 1.950064999999999937e+00 3.338347047802355805e-01 250 | 1.950064999999999937e+00 9.000487555017491204e-01 251 | 1.950064999999999937e+00 2.099951244498250880e+00 252 | 1.950064999999999937e+00 2.666165295219764531e+00 253 | 2.100070000000000103e+00 4.034526936333296954e-01 254 | 2.100070000000000103e+00 1.050093348459927967e+00 255 | 2.100070000000000103e+00 1.949906651540072033e+00 256 | 2.100070000000000103e+00 2.596547306366669972e+00 257 | 2.250074999999999825e+00 5.000562543947781879e-01 258 | 2.250074999999999825e+00 2.499943745605222034e+00 259 | 2.400079999999999991e+00 6.326154292356818143e-01 260 | 2.400079999999999991e+00 2.367384570764317964e+00 261 | 2.550085000000000157e+00 8.218986117290423277e-01 262 | 2.550085000000000157e+00 2.178101388270957450e+00 263 | 2.700089999999999879e+00 1.150308719153593007e+00 264 | 2.700089999999999879e+00 1.849691280846406993e+00 265 | 2.930072950968449774e-01 1.174932914138380635e+00 266 | 8.605411844690118439e-01 2.574054199395777953e+00 267 | 9.696699141100894037e-01 9.696699141100892927e-01 268 | 9.000393776206285779e-01 1.950052498708936710e+00 269 | 1.174932914138380191e+00 2.930072950968449774e-01 270 | 1.050064173698165515e+00 2.100048124911731762e+00 271 | 1.175105412612293954e+00 2.707039148945125540e+00 272 | 1.421595387264094290e+00 7.541094472365716950e-01 273 | 1.578455364048747311e+00 7.541147837287706102e-01 274 | 1.825116818954990894e+00 2.930206903046814748e-01 275 | 1.950052498708936710e+00 9.000393776206286889e-01 276 | 1.949985829687622907e+00 2.100010627472832070e+00 277 | 1.824944322394921103e+00 2.707025760844939732e+00 278 | 2.100048124911731762e+00 1.050064173698165515e+00 279 | 2.100010627472832070e+00 1.949985829687623129e+00 280 | 2.139586970776575559e+00 4.260221106499240129e-01 281 | 2.139507788011103528e+00 2.574025041176017048e+00 282 | 2.310324606445072426e+00 5.482258502198968930e-01 283 | 2.310269743780334117e+00 2.451820856208851485e+00 284 | 2.451861369265910362e+00 6.897778491677566404e-01 285 | 2.451820856208851485e+00 2.310269743780334117e+00 286 | 2.574054199395777953e+00 8.605411844690120660e-01 287 | 2.574025041176017492e+00 2.139507788011103528e+00 288 | 2.707039148945125540e+00 1.175105412612293954e+00 289 | 7.541147837287706102e-01 1.578455364048746867e+00 290 | 7.541094472365716950e-01 1.421595387264094290e+00 291 | 2.707025760844939732e+00 1.824944322394920881e+00 292 | 8.604619995536626487e-01 4.259929488196547709e-01 293 | 6.897229841677213757e-01 5.481853344195954936e-01 294 | 4.259929488196545488e-01 8.604619995536629817e-01 295 | 2.930206903046812528e-01 1.825116818954990450e+00 296 | 5.482258502198968930e-01 2.310324606445072426e+00 297 | 4.260221106499237909e-01 2.139586970776575114e+00 298 | 5.481853344195951605e-01 6.897229841677217088e-01 299 | 6.897778491677563073e-01 2.451861369265909918e+00 300 | 3.661603048266643956e-01 2.026220054396673298e+00 301 | 2.026220054396672854e+00 3.661603048266643956e-01 302 | 8.519302398556560796e-01 1.122500879489166881e+00 303 | 7.849257429621091520e-01 1.273794768138072353e+00 304 | 1.725477428216736220e+00 2.729495802906527491e+00 305 | 1.726305898656997684e+00 2.215042404499935280e+00 306 | 1.726305898656997684e+00 7.849575955000649419e-01 307 | 1.725477428216736220e+00 2.705041970934725093e-01 308 | 2.026220054396673298e+00 2.633839695173335826e+00 309 | 2.215074257037890959e+00 1.273794768138072575e+00 310 | 2.215042404499935280e+00 1.726305898656997684e+00 311 | 2.246196779148256439e+00 1.575434519874973960e+00 312 | 3.661137538447578610e-01 9.738802600358227313e-01 313 | 2.705041970934725093e-01 1.725477428216736220e+00 314 | 2.522633711069464102e-01 1.575188462669470102e+00 315 | 2.633886246155241917e+00 9.738802600358221762e-01 316 | 2.633839695173335826e+00 2.026220054396672854e+00 317 | 2.522573381593506969e-01 1.424911719803878318e+00 318 | 2.704858257729441107e-01 1.274622770948881323e+00 319 | 2.729514174227055889e+00 1.274622770948881101e+00 320 | 2.747742661840649525e+00 1.424911719803878096e+00 321 | 2.747736628893053812e+00 1.575188462669469880e+00 322 | 2.246206934021969026e+00 1.424665999591598675e+00 323 | 1.575188462669469880e+00 2.747736628893053812e+00 324 | 1.424665999591598675e+00 2.246206934021969026e+00 325 | 1.122500879489166881e+00 8.519302398556559686e-01 326 | 1.273794768138072575e+00 7.849257429621090409e-01 327 | 1.273794768138072575e+00 2.215074257037890959e+00 328 | 1.274622770948881101e+00 2.729514174227055889e+00 329 | 1.424911719803878096e+00 2.522573381593506969e-01 330 | 9.738802600358218431e-01 3.661137538447580830e-01 331 | 9.738802600358218431e-01 2.633886246155241917e+00 332 | 1.274622770948881101e+00 2.704858257729441107e-01 333 | 7.849575955000649419e-01 1.726305898656997684e+00 334 | 2.729495802906527491e+00 1.725477428216736220e+00 335 | 1.424911719803878096e+00 2.747742661840649525e+00 336 | 1.575188462669469880e+00 2.522633711069464102e-01 337 | 1.575434519874973960e+00 2.246196779148256439e+00 338 | 1.099643797390770450e+00 3.158484425411089980e-01 339 | 2.525681626995558204e+00 7.855231284053035834e-01 340 | 2.383883476483184438e+00 2.383883476483184438e+00 341 | 2.525645901199951471e+00 2.214528155744571958e+00 342 | 6.161674730099772068e-01 2.383934423039645090e+00 343 | 1.503086861968449428e+00 7.500063525047777624e-01 344 | 1.049997500509913806e+00 9.000018746256993607e-01 345 | 2.383934423039645090e+00 6.161674730099768738e-01 346 | 2.684191602492212780e+00 1.900237740083223326e+00 347 | 7.854475100521500774e-01 4.743710519348003363e-01 348 | 7.855231284053034724e-01 2.525681626995558204e+00 349 | 8.519812978717762331e-01 1.877586760483008099e+00 350 | 9.000018746256992497e-01 1.049997500509913806e+00 351 | 9.697141109541707049e-01 2.030374279051005981e+00 352 | 2.684208761540500365e+00 1.099813032332742635e+00 353 | 1.122532388968425554e+00 2.148088113316481085e+00 354 | 2.214528155744571958e+00 2.525645901199951471e+00 355 | 6.161165235168156729e-01 6.161165235168155618e-01 356 | 1.900406972572422637e+00 3.158656088452682642e-01 357 | 1.877586760483008099e+00 8.519812978717763441e-01 358 | 1.496963137614909511e+00 7.500061483806323981e-01 359 | 4.743710519348001142e-01 7.854475100521504105e-01 360 | 1.877514751805904325e+00 2.148060654699023075e+00 361 | 1.900237740083223326e+00 2.684191602492212780e+00 362 | 3.158484425411085539e-01 1.099643797390771116e+00 363 | 2.030374279051005981e+00 9.697141109541707049e-01 364 | 3.158656088452682642e-01 1.900406972572422637e+00 365 | 2.214603771463635074e+00 4.744067815113299780e-01 366 | 2.148088113316481085e+00 1.122532388968425554e+00 367 | 7.500061483806323981e-01 1.496963137614909511e+00 368 | 1.099813032332742635e+00 2.684208761540500365e+00 369 | 7.500063525047777624e-01 1.503086861968449872e+00 370 | 2.148060654699023075e+00 1.877514751805904325e+00 371 | 2.030330085889910485e+00 2.030330085889910485e+00 372 | 4.744067815113302000e-01 2.214603771463635518e+00 373 | 0 7 8 1 374 | 1 8 9 2 375 | 2 9 10 3 376 | 3 10 11 4 377 | 5 15 16 6 378 | 6 16 17 7 379 | 7 17 18 8 380 | 8 18 19 9 381 | 9 19 20 10 382 | 10 20 21 11 383 | 11 21 22 12 384 | 12 22 23 13 385 | 14 26 27 15 386 | 15 27 28 16 387 | 16 28 29 17 388 | 17 29 30 18 389 | 20 31 32 21 390 | 21 32 33 22 391 | 22 33 34 23 392 | 23 34 35 24 393 | 25 38 39 26 394 | 26 39 40 27 395 | 33 41 42 34 396 | 34 42 43 35 397 | 35 43 44 36 398 | 37 46 47 38 399 | 38 47 48 39 400 | 42 49 50 43 401 | 43 50 51 44 402 | 44 51 52 45 403 | 46 54 55 47 404 | 47 55 56 48 405 | 50 57 58 51 406 | 51 58 59 52 407 | 53 61 62 54 408 | 54 62 63 55 409 | 55 63 64 56 410 | 57 65 66 58 411 | 58 66 67 59 412 | 59 67 68 60 413 | 61 69 70 62 414 | 62 70 71 63 415 | 65 72 73 66 416 | 66 73 74 67 417 | 67 74 75 68 418 | 69 76 77 70 419 | 70 77 78 71 420 | 72 80 81 73 421 | 73 81 82 74 422 | 74 82 83 75 423 | 76 84 85 77 424 | 77 85 86 78 425 | 78 86 87 79 426 | 80 88 89 81 427 | 81 89 90 82 428 | 82 90 91 83 429 | 85 92 93 86 430 | 86 93 94 87 431 | 88 97 98 89 432 | 89 98 99 90 433 | 92 100 101 93 434 | 93 101 102 94 435 | 94 102 103 95 436 | 96 106 107 97 437 | 97 107 108 98 438 | 98 108 109 99 439 | 101 110 111 102 440 | 102 111 112 103 441 | 103 112 113 104 442 | 105 119 120 106 443 | 106 120 121 107 444 | 107 121 122 108 445 | 111 123 124 112 446 | 112 124 125 113 447 | 113 125 126 114 448 | 114 126 127 115 449 | 115 127 128 116 450 | 116 128 129 117 451 | 117 129 130 118 452 | 118 130 131 119 453 | 119 131 132 120 454 | 120 132 133 121 455 | 124 134 135 125 456 | 125 135 136 126 457 | 126 136 137 127 458 | 127 137 138 128 459 | 128 138 139 129 460 | 129 139 140 130 461 | 130 140 141 131 462 | 131 141 142 132 463 | 136 143 144 137 464 | 137 144 145 138 465 | 138 145 146 139 466 | 139 146 147 140 467 | 202 0 148 256 468 | 168 45 215 257 469 | 213 40 169 258 470 | 170 41 214 259 471 | 220 53 171 260 472 | 172 49 218 261 473 | 173 60 223 262 474 | 225 64 174 263 475 | 175 79 233 264 476 | 176 84 236 265 477 | 177 95 241 266 478 | 242 96 178 267 479 | 239 91 179 268 480 | 180 104 245 269 481 | 246 105 181 270 482 | 182 100 244 271 483 | 247 109 188 272 484 | 189 110 248 273 485 | 249 122 190 274 486 | 191 123 250 275 487 | 251 133 192 276 488 | 193 134 252 277 489 | 253 142 196 278 490 | 197 143 254 279 491 | 166 31 210 280 492 | 209 30 165 281 493 | 255 147 201 282 494 | 212 37 162 283 495 | 208 25 159 284 496 | 204 5 153 285 497 | 152 4 203 286 498 | 158 24 207 287 499 | 156 13 205 288 500 | 206 14 157 289 501 | 161 36 211 290 502 | 155 12 13 156 291 503 | 244 100 92 240 292 504 | 164 29 28 163 293 505 | 165 30 29 164 294 506 | 235 83 91 239 295 507 | 238 88 80 234 296 508 | 233 79 87 237 297 509 | 236 84 76 232 298 510 | 243 99 109 247 299 511 | 183 114 115 184 300 512 | 186 117 118 187 301 513 | 185 116 117 186 302 514 | 153 5 6 154 303 515 | 151 3 4 152 304 516 | 150 2 3 151 305 517 | 194 135 134 193 306 518 | 196 142 141 195 307 519 | 149 1 2 150 308 520 | 148 0 1 149 309 521 | 198 144 143 197 310 522 | 199 145 144 198 311 523 | 200 146 145 199 312 524 | 184 115 116 185 313 525 | 231 75 83 235 314 526 | 230 72 65 226 315 527 | 217 48 56 221 316 528 | 221 56 64 225 317 529 | 226 65 57 222 318 530 | 223 60 68 227 319 531 | 228 69 61 224 320 532 | 216 46 37 212 321 533 | 215 45 52 219 322 534 | 224 61 53 220 323 535 | 167 32 31 166 324 536 | 201 147 146 200 325 537 | 227 68 75 231 326 538 | 232 76 69 228 327 539 | 234 80 72 230 328 540 | 171 53 54 46 216 329 541 | 252 134 124 123 191 330 542 | 190 122 121 133 251 331 543 | 192 133 132 142 253 332 544 | 207 24 35 36 161 333 545 | 229 71 78 79 175 334 546 | 169 40 39 48 217 335 547 | 250 123 111 110 189 336 548 | 195 141 140 147 255 337 549 | 162 37 38 25 208 338 550 | 211 36 44 45 168 339 551 | 214 41 33 32 167 340 552 | 163 28 27 40 213 341 553 | 218 49 42 41 170 342 554 | 254 143 136 135 194 343 555 | 222 57 50 49 172 344 556 | 188 109 108 122 249 345 557 | 159 25 26 14 206 346 558 | 240 92 85 84 176 347 559 | 237 87 94 95 177 348 560 | 174 64 63 71 229 349 561 | 157 14 15 5 204 350 562 | 178 96 97 88 238 351 563 | 179 91 90 99 243 352 564 | 154 6 7 0 202 353 565 | 241 95 103 104 180 354 566 | 203 4 11 12 155 355 567 | 248 110 101 100 182 356 568 | 245 104 113 114 183 357 569 | 160 19 18 30 209 358 570 | 219 52 59 60 173 359 571 | 210 31 20 19 160 360 572 | 187 118 119 105 246 361 573 | 181 105 106 96 242 362 574 | 205 13 23 24 158 363 575 | -------------------------------------------------------------------------------- /tests/data/ringleb_10_10_q1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment this file is a 10x10 ringleb 4 | element vertex 76 5 | property float x 6 | property float y 7 | element face 56 8 | end_header 9 | 2.750000000000000222e-01 0.000000000000000000e+00 10 | 2.750000000000000222e-01 2.750000000000000222e-01 11 | 2.750000000000000222e-01 5.500000000000000444e-01 12 | 2.750000000000000222e-01 8.250000000000000666e-01 13 | 5.500000000000000444e-01 0.000000000000000000e+00 14 | 5.500000000000000444e-01 2.750000000000000222e-01 15 | 5.500000000000000444e-01 5.500000000000000444e-01 16 | 5.500000000000000444e-01 8.250000000000000666e-01 17 | 5.500000000000000444e-01 1.100000000000000089e+00 18 | 5.500000000000000444e-01 1.375000000000000000e+00 19 | 8.250000000000000666e-01 0.000000000000000000e+00 20 | 8.250000000000000666e-01 2.750000000000000222e-01 21 | 8.250000000000000666e-01 5.500000000000000444e-01 22 | 8.250000000000000666e-01 8.250000000000000666e-01 23 | 8.250000000000000666e-01 1.100000000000000089e+00 24 | 8.250000000000000666e-01 1.375000000000000000e+00 25 | 8.250000000000000666e-01 1.650000000000000133e+00 26 | 1.100000000000000089e+00 0.000000000000000000e+00 27 | 1.100000000000000089e+00 2.750000000000000222e-01 28 | 1.100000000000000089e+00 5.500000000000000444e-01 29 | 1.100000000000000089e+00 8.250000000000000666e-01 30 | 1.100000000000000089e+00 1.100000000000000089e+00 31 | 1.100000000000000089e+00 1.375000000000000000e+00 32 | 1.100000000000000089e+00 1.650000000000000133e+00 33 | 1.100000000000000089e+00 1.925000000000000266e+00 34 | 1.375000000000000000e+00 8.250000000000000666e-01 35 | 1.375000000000000000e+00 1.100000000000000089e+00 36 | 1.375000000000000000e+00 1.375000000000000000e+00 37 | 1.375000000000000000e+00 1.650000000000000133e+00 38 | 1.375000000000000000e+00 1.925000000000000266e+00 39 | 1.375000000000000000e+00 2.200000000000000178e+00 40 | 1.650000000000000133e+00 1.100000000000000089e+00 41 | 1.650000000000000133e+00 1.375000000000000000e+00 42 | 1.650000000000000133e+00 1.650000000000000133e+00 43 | 1.650000000000000133e+00 1.925000000000000266e+00 44 | 1.650000000000000133e+00 2.200000000000000178e+00 45 | 1.925000000000000266e+00 1.375000000000000000e+00 46 | 1.925000000000000266e+00 1.650000000000000133e+00 47 | 1.925000000000000266e+00 1.925000000000000266e+00 48 | 2.200000000000000178e+00 1.650000000000000133e+00 49 | 2.200000000000000178e+00 1.925000000000000266e+00 50 | 2.475000000000000089e+00 1.650000000000000133e+00 51 | 1.153273608441890419e-01 0.000000000000000000e+00 52 | 1.296652444106435320e-01 2.750000000000000222e-01 53 | 1.729283363852144317e-01 5.500000000000000444e-01 54 | 2.458427796736056825e-01 8.250000000000000666e-01 55 | 3.495400722060805210e-01 1.100000000000000089e+00 56 | 4.854292026150551775e-01 1.375000000000000000e+00 57 | 6.550201945921436675e-01 1.650000000000000133e+00 58 | 8.597361231358844336e-01 1.925000000000000266e+00 59 | 1.174911449283293052e+00 0.000000000000000000e+00 60 | 1.198549638569732068e+00 2.750000000000000222e-01 61 | 1.274075630548783256e+00 5.500000000000000444e-01 62 | 1.100767976502352141e+00 2.200000000000000178e+00 63 | 1.418872274707509984e+00 8.250000000000000666e-01 64 | 1.666883276864896235e+00 1.100000000000000089e+00 65 | 1.791483817774122134e+00 2.200000000000000178e+00 66 | 2.043064516586292179e+00 1.375000000000000000e+00 67 | 2.427405764172755553e+00 1.925000000000000266e+00 68 | 2.548024568662285994e+00 1.650000000000000133e+00 69 | 2.750000000000000222e-01 9.112770729834005490e-01 70 | 5.500000000000000444e-01 1.486426683825145201e+00 71 | 8.250000000000000666e-01 1.881546794753625296e+00 72 | 1.100000000000000089e+00 2.199186019489850707e+00 73 | 1.375000000000000000e+00 7.570508895261280902e-01 74 | 1.375000000000000000e+00 2.268176642232577755e+00 75 | 1.650000000000000133e+00 1.084875409065677143e+00 76 | 1.650000000000000133e+00 2.232127320977054907e+00 77 | 1.925000000000000266e+00 1.298309532729689408e+00 78 | 1.925000000000000266e+00 2.160765946079065358e+00 79 | 2.200000000000000178e+00 1.468180995750270057e+00 80 | 2.200000000000000178e+00 2.050408878838001492e+00 81 | 2.475000000000000089e+00 1.614109207329323059e+00 82 | 2.475000000000000089e+00 1.894252799153392619e+00 83 | 1.171130345340839041e+00 2.273162711063530406e+00 84 | 2.701710295342564461e+00 1.722391886541290829e+00 85 | 0 4 5 1 86 | 1 5 6 2 87 | 2 6 7 3 88 | 4 10 11 5 89 | 5 11 12 6 90 | 6 12 13 7 91 | 7 13 14 8 92 | 8 14 15 9 93 | 10 17 18 11 94 | 11 18 19 12 95 | 12 19 20 13 96 | 13 20 21 14 97 | 14 21 22 15 98 | 15 22 23 16 99 | 20 25 26 21 100 | 21 26 27 22 101 | 22 27 28 23 102 | 23 28 29 24 103 | 26 31 32 27 104 | 27 32 33 28 105 | 28 33 34 29 106 | 29 34 35 30 107 | 32 36 37 33 108 | 33 37 38 34 109 | 37 39 40 38 110 | 71 40 58 111 | 57 36 68 112 | 67 35 56 113 | 55 31 66 114 | 54 25 64 115 | 59 41 72 116 | 49 24 63 117 | 47 9 61 118 | 48 16 62 119 | 45 3 60 120 | 42 0 1 43 121 | 43 1 2 44 122 | 51 18 17 50 123 | 52 19 18 51 124 | 72 41 39 70 125 | 46 8 9 47 126 | 69 38 40 71 127 | 65 30 35 67 128 | 44 2 3 45 129 | 58 40 39 41 73 130 | 70 39 37 36 57 131 | 62 16 23 24 49 132 | 68 36 32 31 55 133 | 66 31 26 25 54 134 | 63 24 29 30 53 135 | 64 25 20 19 52 136 | 61 9 15 16 48 137 | 56 35 34 38 69 138 | 60 3 7 8 46 139 | 53 30 65 74 140 | 73 41 59 75 141 | -------------------------------------------------------------------------------- /tests/data/ringleb_20_20_q2.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment this file is a 20x20 ringleb 4 | element vertex 291 5 | property float x 6 | property float y 7 | element face 188 8 | end_header 9 | 1.375000000000000111e-01 0.000000000000000000e+00 10 | 1.375000000000000111e-01 1.375000000000000111e-01 11 | 1.375000000000000111e-01 2.750000000000000222e-01 12 | 2.750000000000000222e-01 0.000000000000000000e+00 13 | 2.750000000000000222e-01 1.375000000000000111e-01 14 | 2.750000000000000222e-01 2.750000000000000222e-01 15 | 2.750000000000000222e-01 4.125000000000000333e-01 16 | 2.750000000000000222e-01 5.500000000000000444e-01 17 | 2.750000000000000222e-01 6.875000000000000000e-01 18 | 2.750000000000000222e-01 8.250000000000000666e-01 19 | 4.125000000000000333e-01 0.000000000000000000e+00 20 | 4.125000000000000333e-01 1.375000000000000111e-01 21 | 4.125000000000000333e-01 2.750000000000000222e-01 22 | 4.125000000000000333e-01 4.125000000000000333e-01 23 | 4.125000000000000333e-01 5.500000000000000444e-01 24 | 4.125000000000000333e-01 6.875000000000000000e-01 25 | 4.125000000000000333e-01 8.250000000000000666e-01 26 | 4.125000000000000333e-01 9.625000000000001332e-01 27 | 4.125000000000000333e-01 1.100000000000000089e+00 28 | 5.500000000000000444e-01 0.000000000000000000e+00 29 | 5.500000000000000444e-01 1.375000000000000111e-01 30 | 5.500000000000000444e-01 2.750000000000000222e-01 31 | 5.500000000000000444e-01 4.125000000000000333e-01 32 | 5.500000000000000444e-01 5.500000000000000444e-01 33 | 5.500000000000000444e-01 6.875000000000000000e-01 34 | 5.500000000000000444e-01 8.250000000000000666e-01 35 | 5.500000000000000444e-01 9.625000000000001332e-01 36 | 5.500000000000000444e-01 1.100000000000000089e+00 37 | 5.500000000000000444e-01 1.237500000000000044e+00 38 | 5.500000000000000444e-01 1.375000000000000000e+00 39 | 6.875000000000000000e-01 0.000000000000000000e+00 40 | 6.875000000000000000e-01 1.375000000000000111e-01 41 | 6.875000000000000000e-01 2.750000000000000222e-01 42 | 6.875000000000000000e-01 4.125000000000000333e-01 43 | 6.875000000000000000e-01 5.500000000000000444e-01 44 | 6.875000000000000000e-01 6.875000000000000000e-01 45 | 6.875000000000000000e-01 8.250000000000000666e-01 46 | 6.875000000000000000e-01 9.625000000000001332e-01 47 | 6.875000000000000000e-01 1.100000000000000089e+00 48 | 6.875000000000000000e-01 1.237500000000000044e+00 49 | 6.875000000000000000e-01 1.375000000000000000e+00 50 | 6.875000000000000000e-01 1.512500000000000178e+00 51 | 6.875000000000000000e-01 1.650000000000000133e+00 52 | 8.250000000000000666e-01 0.000000000000000000e+00 53 | 8.250000000000000666e-01 1.375000000000000111e-01 54 | 8.250000000000000666e-01 2.750000000000000222e-01 55 | 8.250000000000000666e-01 4.125000000000000333e-01 56 | 8.250000000000000666e-01 5.500000000000000444e-01 57 | 8.250000000000000666e-01 6.875000000000000000e-01 58 | 8.250000000000000666e-01 8.250000000000000666e-01 59 | 8.250000000000000666e-01 9.625000000000001332e-01 60 | 8.250000000000000666e-01 1.100000000000000089e+00 61 | 8.250000000000000666e-01 1.237500000000000044e+00 62 | 8.250000000000000666e-01 1.375000000000000000e+00 63 | 8.250000000000000666e-01 1.512500000000000178e+00 64 | 8.250000000000000666e-01 1.650000000000000133e+00 65 | 8.250000000000000666e-01 1.787500000000000089e+00 66 | 9.625000000000001332e-01 0.000000000000000000e+00 67 | 9.625000000000001332e-01 1.375000000000000111e-01 68 | 9.625000000000001332e-01 2.750000000000000222e-01 69 | 9.625000000000001332e-01 4.125000000000000333e-01 70 | 9.625000000000001332e-01 5.500000000000000444e-01 71 | 9.625000000000001332e-01 6.875000000000000000e-01 72 | 9.625000000000001332e-01 8.250000000000000666e-01 73 | 9.625000000000001332e-01 9.625000000000001332e-01 74 | 9.625000000000001332e-01 1.100000000000000089e+00 75 | 9.625000000000001332e-01 1.237500000000000044e+00 76 | 9.625000000000001332e-01 1.375000000000000000e+00 77 | 9.625000000000001332e-01 1.512500000000000178e+00 78 | 9.625000000000001332e-01 1.650000000000000133e+00 79 | 9.625000000000001332e-01 1.787500000000000089e+00 80 | 9.625000000000001332e-01 1.925000000000000266e+00 81 | 1.100000000000000089e+00 0.000000000000000000e+00 82 | 1.100000000000000089e+00 1.375000000000000111e-01 83 | 1.100000000000000089e+00 2.750000000000000222e-01 84 | 1.100000000000000089e+00 4.125000000000000333e-01 85 | 1.100000000000000089e+00 5.500000000000000444e-01 86 | 1.100000000000000089e+00 6.875000000000000000e-01 87 | 1.100000000000000089e+00 8.250000000000000666e-01 88 | 1.100000000000000089e+00 9.625000000000001332e-01 89 | 1.100000000000000089e+00 1.100000000000000089e+00 90 | 1.100000000000000089e+00 1.237500000000000044e+00 91 | 1.100000000000000089e+00 1.375000000000000000e+00 92 | 1.100000000000000089e+00 1.512500000000000178e+00 93 | 1.100000000000000089e+00 1.650000000000000133e+00 94 | 1.100000000000000089e+00 1.787500000000000089e+00 95 | 1.100000000000000089e+00 1.925000000000000266e+00 96 | 1.100000000000000089e+00 2.062500000000000000e+00 97 | 1.237500000000000044e+00 5.500000000000000444e-01 98 | 1.237500000000000044e+00 6.875000000000000000e-01 99 | 1.237500000000000044e+00 8.250000000000000666e-01 100 | 1.237500000000000044e+00 9.625000000000001332e-01 101 | 1.237500000000000044e+00 1.100000000000000089e+00 102 | 1.237500000000000044e+00 1.237500000000000044e+00 103 | 1.237500000000000044e+00 1.375000000000000000e+00 104 | 1.237500000000000044e+00 1.512500000000000178e+00 105 | 1.237500000000000044e+00 1.650000000000000133e+00 106 | 1.237500000000000044e+00 1.787500000000000089e+00 107 | 1.237500000000000044e+00 1.925000000000000266e+00 108 | 1.237500000000000044e+00 2.062500000000000000e+00 109 | 1.237500000000000044e+00 2.200000000000000178e+00 110 | 1.375000000000000000e+00 8.250000000000000666e-01 111 | 1.375000000000000000e+00 9.625000000000001332e-01 112 | 1.375000000000000000e+00 1.100000000000000089e+00 113 | 1.375000000000000000e+00 1.237500000000000044e+00 114 | 1.375000000000000000e+00 1.375000000000000000e+00 115 | 1.375000000000000000e+00 1.512500000000000178e+00 116 | 1.375000000000000000e+00 1.650000000000000133e+00 117 | 1.375000000000000000e+00 1.787500000000000089e+00 118 | 1.375000000000000000e+00 1.925000000000000266e+00 119 | 1.375000000000000000e+00 2.062500000000000000e+00 120 | 1.375000000000000000e+00 2.200000000000000178e+00 121 | 1.512500000000000178e+00 9.625000000000001332e-01 122 | 1.512500000000000178e+00 1.100000000000000089e+00 123 | 1.512500000000000178e+00 1.237500000000000044e+00 124 | 1.512500000000000178e+00 1.375000000000000000e+00 125 | 1.512500000000000178e+00 1.512500000000000178e+00 126 | 1.512500000000000178e+00 1.650000000000000133e+00 127 | 1.512500000000000178e+00 1.787500000000000089e+00 128 | 1.512500000000000178e+00 1.925000000000000266e+00 129 | 1.512500000000000178e+00 2.062500000000000000e+00 130 | 1.512500000000000178e+00 2.200000000000000178e+00 131 | 1.650000000000000133e+00 1.100000000000000089e+00 132 | 1.650000000000000133e+00 1.237500000000000044e+00 133 | 1.650000000000000133e+00 1.375000000000000000e+00 134 | 1.650000000000000133e+00 1.512500000000000178e+00 135 | 1.650000000000000133e+00 1.650000000000000133e+00 136 | 1.650000000000000133e+00 1.787500000000000089e+00 137 | 1.650000000000000133e+00 1.925000000000000266e+00 138 | 1.650000000000000133e+00 2.062500000000000000e+00 139 | 1.650000000000000133e+00 2.200000000000000178e+00 140 | 1.787500000000000089e+00 1.237500000000000044e+00 141 | 1.787500000000000089e+00 1.375000000000000000e+00 142 | 1.787500000000000089e+00 1.512500000000000178e+00 143 | 1.787500000000000089e+00 1.650000000000000133e+00 144 | 1.787500000000000089e+00 1.787500000000000089e+00 145 | 1.787500000000000089e+00 1.925000000000000266e+00 146 | 1.787500000000000089e+00 2.062500000000000000e+00 147 | 1.787500000000000089e+00 2.200000000000000178e+00 148 | 1.925000000000000266e+00 1.375000000000000000e+00 149 | 1.925000000000000266e+00 1.512500000000000178e+00 150 | 1.925000000000000266e+00 1.650000000000000133e+00 151 | 1.925000000000000266e+00 1.787500000000000089e+00 152 | 1.925000000000000266e+00 1.925000000000000266e+00 153 | 1.925000000000000266e+00 2.062500000000000000e+00 154 | 2.062500000000000000e+00 1.512500000000000178e+00 155 | 2.062500000000000000e+00 1.650000000000000133e+00 156 | 2.062500000000000000e+00 1.787500000000000089e+00 157 | 2.062500000000000000e+00 1.925000000000000266e+00 158 | 2.062500000000000000e+00 2.062500000000000000e+00 159 | 2.200000000000000178e+00 1.512500000000000178e+00 160 | 2.200000000000000178e+00 1.650000000000000133e+00 161 | 2.200000000000000178e+00 1.787500000000000089e+00 162 | 2.200000000000000178e+00 1.925000000000000266e+00 163 | 2.337500000000000355e+00 1.650000000000000133e+00 164 | 2.337500000000000355e+00 1.787500000000000089e+00 165 | 2.337500000000000355e+00 1.925000000000000266e+00 166 | 2.475000000000000089e+00 1.650000000000000133e+00 167 | 2.475000000000000089e+00 1.787500000000000089e+00 168 | 2.612500000000000266e+00 1.787500000000000089e+00 169 | 1.153273608441890419e-01 0.000000000000000000e+00 170 | 1.189078927512169370e-01 1.375000000000000111e-01 171 | 1.296652444106435320e-01 2.750000000000000222e-01 172 | 1.476463551597039237e-01 4.125000000000000333e-01 173 | 1.729283363852144317e-01 5.500000000000000444e-01 174 | 2.056167066694657430e-01 6.875000000000000000e-01 175 | 2.458427796736056825e-01 8.250000000000000666e-01 176 | 2.937601237632599949e-01 9.625000000000001332e-01 177 | 3.495400722060805210e-01 1.100000000000000089e+00 178 | 4.133663718369552376e-01 1.237500000000000044e+00 179 | 4.854292026150551775e-01 1.375000000000000000e+00 180 | 5.659189474364978434e-01 1.512500000000000178e+00 181 | 6.550201945921436675e-01 1.650000000000000133e+00 182 | 7.529064717928368733e-01 1.787500000000000089e+00 183 | 8.597361231358844336e-01 1.925000000000000266e+00 184 | 9.756495683035739663e-01 2.062500000000000000e+00 185 | 1.174911449283293052e+00 0.000000000000000000e+00 186 | 1.180755584239393308e+00 1.375000000000000111e-01 187 | 1.198549638569732068e+00 2.750000000000000222e-01 188 | 1.229130214568662449e+00 4.125000000000000333e-01 189 | 1.100767976502352141e+00 2.200000000000000178e+00 190 | 1.274075630548783256e+00 5.500000000000000444e-01 191 | 1.336002241008678926e+00 6.875000000000000000e-01 192 | 1.418872274707509984e+00 8.250000000000000666e-01 193 | 1.527698097758846796e+00 9.625000000000001332e-01 194 | 1.666883276864896235e+00 1.100000000000000089e+00 195 | 1.838588189812711438e+00 1.237500000000000044e+00 196 | 1.791483817774122134e+00 2.200000000000000178e+00 197 | 2.043064516586292179e+00 1.375000000000000000e+00 198 | 2.174356821153275554e+00 2.062500000000000000e+00 199 | 2.279774046919356145e+00 1.512500000000000178e+00 200 | 2.427405764172755553e+00 1.925000000000000266e+00 201 | 2.548024568662285994e+00 1.650000000000000133e+00 202 | 2.622616665758568111e+00 1.787500000000000089e+00 203 | 1.375000000000000111e-01 3.418425257376704884e-01 204 | 2.750000000000000222e-01 9.112770729834005490e-01 205 | 4.125000000000000333e-01 1.235744532829674114e+00 206 | 5.500000000000000444e-01 1.486426683825145201e+00 207 | 6.875000000000000000e-01 1.697024276540493481e+00 208 | 8.250000000000000666e-01 1.881546794753625296e+00 209 | 9.625000000000001332e-01 2.047431923108654850e+00 210 | 1.100000000000000089e+00 2.199186019489850707e+00 211 | 1.237500000000000044e+00 4.420281887100235840e-01 212 | 1.237500000000000044e+00 2.273548544022773399e+00 213 | 1.375000000000000000e+00 7.570508895261280902e-01 214 | 1.375000000000000000e+00 2.268176642232577755e+00 215 | 1.512500000000000178e+00 9.453050037748282897e-01 216 | 1.512500000000000178e+00 2.254421229209579103e+00 217 | 1.650000000000000133e+00 1.084875409065677143e+00 218 | 1.650000000000000133e+00 2.232127320977054907e+00 219 | 1.787500000000000089e+00 1.199233996429582838e+00 220 | 1.787500000000000089e+00 2.201035477995205270e+00 221 | 1.925000000000000266e+00 1.298309532729689408e+00 222 | 1.925000000000000266e+00 2.160765946079065358e+00 223 | 2.062500000000000000e+00 1.387031407315830744e+00 224 | 2.062500000000000000e+00 2.110793517158022325e+00 225 | 2.200000000000000178e+00 1.468180995750270057e+00 226 | 2.200000000000000178e+00 2.050408878838001492e+00 227 | 2.337500000000000355e+00 1.543488048790818024e+00 228 | 2.337500000000000355e+00 1.978658982432062619e+00 229 | 2.475000000000000089e+00 1.614109207329323059e+00 230 | 2.475000000000000089e+00 1.894252799153392619e+00 231 | 2.612500000000000266e+00 1.680861445152717515e+00 232 | 2.612500000000000266e+00 1.795406211819999154e+00 233 | 2.617563918888557328e+00 1.791460243290622811e+00 234 | 1.396401624682898301e+00 7.913646620742262883e-01 235 | 1.520065676276150857e+00 9.539318838685978408e-01 236 | 1.037201630517034179e+00 2.131415161172656614e+00 237 | 1.658419629780177207e+00 1.092462200648527393e+00 238 | 9.105885133500360995e-01 1.986664373381467952e+00 239 | 7.886228238778814070e-01 1.834778534570276953e+00 240 | 1.812929265521739719e+00 1.218519353489345480e+00 241 | 6.711729628249281099e-01 1.673572561401594383e+00 242 | 1.254697217276110832e+00 4.963713383590652728e-01 243 | 1.983655331938669164e+00 1.337228891625851901e+00 244 | 5.171934815508973937e-01 1.431018599730416785e+00 245 | 1.789492143419733061e+00 2.200518640482463262e+00 246 | 2.382764778048900300e+00 1.952345302424229878e+00 247 | 1.333718038982691922e-01 3.084466478860710681e-01 248 | 2.511460810975295388e+00 1.632158955796660260e+00 249 | 2.600798776453512318e-01 8.682554603467428356e-01 250 | 2.118756976164232420e+00 2.087393981133923493e+00 251 | 3.802062402155246268e-01 1.168255676310809843e+00 252 | 2.239789722511151382e+00 1.490514740563452678e+00 253 | 1.718999293752021318e+00 2.217645457481354665e+00 254 | 2.269371977670901597e+00 2.015701484805561883e+00 255 | 2.406033915240337606e+00 1.579216216532244088e+00 256 | 1.994160945192004153e+00 2.136882729507520118e+00 257 | 1.581428839540995224e+00 2.244326215983387218e+00 258 | 1.443862467186346921e+00 2.262342998968447372e+00 259 | 1.306298522634126158e+00 2.271902744747986702e+00 260 | 2.544682520074922127e+00 1.846101516074703408e+00 261 | 2.130887820234888430e+00 1.428213715037596199e+00 262 | 1.162230053927792994e-01 6.877912302611925710e-02 263 | 1.233931804989776282e-01 2.063257408633339118e-01 264 | 1.303083345940040605e+00 6.195977098656454407e-01 265 | 1.212237987427241537e+00 3.440867897116494656e-01 266 | 1.188144446017219469e+00 2.064283999089354116e-01 267 | 3.207986450338347062e-01 1.031601582429318986e+00 268 | 1.176370469925865692e+00 6.879661759376411168e-02 269 | 1.593998765635673553e-01 4.814191140438928707e-01 270 | 4.485832469267914124e-01 1.306683084493248437e+00 271 | 1.883903670243258777e-01 6.189657158030369422e-01 272 | 2.248550444983012930e-01 7.565119593684763721e-01 273 | 6.097063989622442115e-01 1.581750600832056985e+00 274 | 1.100383966679508108e+00 2.199593030098491386e+00 275 | 2.451299130579895902e+00 1.909774371229110201e+00 276 | 2.308592226413525239e+00 1.528077186439617652e+00 277 | 1.423379753437790107e-01 3.772058375681144327e-01 278 | 2.580226005998695893e+00 1.665506287248856410e+00 279 | 2.842604224662133028e-01 9.369326712539876034e-01 280 | 2.187197319135045781e+00 2.056494379700688047e+00 281 | 2.052773707920409141e+00 1.381029494010159286e+00 282 | 5.579313498858323728e-01 1.499480554492269135e+00 283 | 1.858549971149660252e+00 2.181402422076672121e+00 284 | 1.881527483923024491e+00 1.268280140902374065e+00 285 | 7.198878853774050013e-01 1.742491792713958487e+00 286 | 8.422991092074464392e-01 1.903328697098850109e+00 287 | 1.726318942955418878e+00 1.150659121421370834e+00 288 | 9.690669474590476451e-01 2.054972807644245059e+00 289 | 1.587254284950002203e+00 1.025241011915662082e+00 290 | 1.463986933185886130e+00 8.864371940241118075e-01 291 | 1.233237667497463885e+00 4.272858256314303049e-01 292 | 4.129330509965729590e-01 1.236622333015434227e+00 293 | 1.354961643872869104e+00 7.225724807090752044e-01 294 | 1.135777975233303483e+00 2.236746763492971191e+00 295 | 1.171130345340839041e+00 2.273162711063530406e+00 296 | 2.662532738249540731e+00 1.755389404477541992e+00 297 | 2.701710295342564461e+00 1.722391886541290829e+00 298 | 1.204312880917796313e+00 2.273597813748805319e+00 299 | 2.657043024222215610e+00 1.701760636459916265e+00 300 | 0 3 4 1 301 | 1 4 5 2 302 | 3 10 11 4 303 | 4 11 12 5 304 | 5 12 13 6 305 | 6 13 14 7 306 | 7 14 15 8 307 | 8 15 16 9 308 | 10 19 20 11 309 | 11 20 21 12 310 | 12 21 22 13 311 | 13 22 23 14 312 | 14 23 24 15 313 | 15 24 25 16 314 | 16 25 26 17 315 | 17 26 27 18 316 | 19 30 31 20 317 | 20 31 32 21 318 | 21 32 33 22 319 | 22 33 34 23 320 | 23 34 35 24 321 | 24 35 36 25 322 | 25 36 37 26 323 | 26 37 38 27 324 | 27 38 39 28 325 | 28 39 40 29 326 | 30 43 44 31 327 | 31 44 45 32 328 | 32 45 46 33 329 | 33 46 47 34 330 | 34 47 48 35 331 | 35 48 49 36 332 | 36 49 50 37 333 | 37 50 51 38 334 | 38 51 52 39 335 | 39 52 53 40 336 | 40 53 54 41 337 | 41 54 55 42 338 | 43 57 58 44 339 | 44 58 59 45 340 | 45 59 60 46 341 | 46 60 61 47 342 | 47 61 62 48 343 | 48 62 63 49 344 | 49 63 64 50 345 | 50 64 65 51 346 | 51 65 66 52 347 | 52 66 67 53 348 | 53 67 68 54 349 | 54 68 69 55 350 | 55 69 70 56 351 | 57 72 73 58 352 | 58 73 74 59 353 | 59 74 75 60 354 | 60 75 76 61 355 | 61 76 77 62 356 | 62 77 78 63 357 | 63 78 79 64 358 | 64 79 80 65 359 | 65 80 81 66 360 | 66 81 82 67 361 | 67 82 83 68 362 | 68 83 84 69 363 | 69 84 85 70 364 | 70 85 86 71 365 | 76 88 89 77 366 | 77 89 90 78 367 | 78 90 91 79 368 | 79 91 92 80 369 | 80 92 93 81 370 | 81 93 94 82 371 | 82 94 95 83 372 | 83 95 96 84 373 | 84 96 97 85 374 | 85 97 98 86 375 | 86 98 99 87 376 | 90 101 102 91 377 | 91 102 103 92 378 | 92 103 104 93 379 | 93 104 105 94 380 | 94 105 106 95 381 | 95 106 107 96 382 | 96 107 108 97 383 | 97 108 109 98 384 | 98 109 110 99 385 | 99 110 111 100 386 | 102 112 113 103 387 | 103 113 114 104 388 | 104 114 115 105 389 | 105 115 116 106 390 | 106 116 117 107 391 | 107 117 118 108 392 | 108 118 119 109 393 | 109 119 120 110 394 | 110 120 121 111 395 | 113 122 123 114 396 | 114 123 124 115 397 | 115 124 125 116 398 | 116 125 126 117 399 | 117 126 127 118 400 | 118 127 128 119 401 | 119 128 129 120 402 | 120 129 130 121 403 | 123 131 132 124 404 | 124 132 133 125 405 | 125 133 134 126 406 | 126 134 135 127 407 | 127 135 136 128 408 | 128 136 137 129 409 | 129 137 138 130 410 | 132 139 140 133 411 | 133 140 141 134 412 | 134 141 142 135 413 | 135 142 143 136 414 | 136 143 144 137 415 | 140 145 146 141 416 | 141 146 147 142 417 | 142 147 148 143 418 | 143 148 149 144 419 | 145 150 151 146 420 | 146 151 152 147 421 | 147 152 153 148 422 | 151 154 155 152 423 | 152 155 156 153 424 | 154 157 158 155 425 | 223 159 193 224 426 | 183 101 204 225 427 | 184 112 206 226 428 | 175 87 201 227 429 | 185 122 208 228 430 | 174 71 200 229 431 | 173 56 199 230 432 | 186 131 210 231 433 | 172 42 198 232 434 | 181 88 202 233 435 | 188 139 212 234 436 | 170 29 197 235 437 | 211 138 187 236 438 | 219 156 191 237 439 | 162 2 194 238 440 | 192 157 220 239 441 | 166 9 195 240 442 | 215 149 189 241 443 | 168 18 196 242 444 | 190 150 216 243 445 | 209 130 138 211 244 446 | 217 153 156 219 245 447 | 220 157 154 218 246 448 | 213 144 149 215 247 449 | 207 121 130 209 248 450 | 205 111 121 207 249 451 | 203 100 111 205 250 452 | 221 158 159 223 251 453 | 216 150 145 214 252 454 | 160 0 1 161 253 455 | 161 1 2 162 254 456 | 182 89 88 181 255 457 | 179 75 74 178 256 458 | 178 74 73 177 257 459 | 167 17 18 168 258 460 | 177 73 72 176 259 461 | 163 6 7 164 260 462 | 169 28 29 170 261 463 | 164 7 8 165 262 464 | 165 8 9 166 263 465 | 171 41 42 172 264 466 | 201 87 99 100 180 265 467 | 191 156 155 158 221 266 468 | 218 154 151 150 190 267 469 | 194 2 5 6 163 268 470 | 222 159 158 157 192 269 471 | 195 9 16 17 167 270 472 | 189 149 148 153 217 271 473 | 214 145 140 139 188 272 474 | 197 29 40 41 171 273 475 | 187 138 137 144 213 274 476 | 212 139 132 131 186 275 477 | 198 42 55 56 173 276 478 | 199 56 70 71 174 277 479 | 210 131 123 122 185 278 480 | 200 71 86 87 175 279 481 | 208 122 113 112 184 280 482 | 206 112 102 101 183 281 483 | 202 88 76 75 179 282 484 | 196 18 27 28 169 283 485 | 204 101 90 89 182 284 486 | 180 100 203 289 286 285 487 | 193 159 222 290 288 287 488 | -------------------------------------------------------------------------------- /tests/data/supersonic_10_10_q1.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment this file is a 10x10 supersonic 4 | element vertex 74 5 | property float x 6 | property float y 7 | element face 53 8 | end_header 9 | 0.000000000000000000e+00 1.000999999999999890e+00 10 | 0.000000000000000000e+00 1.143999999999999906e+00 11 | 0.000000000000000000e+00 1.286999999999999922e+00 12 | 1.429999999999999882e-01 1.000999999999999890e+00 13 | 1.429999999999999882e-01 1.143999999999999906e+00 14 | 1.429999999999999882e-01 1.286999999999999922e+00 15 | 2.859999999999999765e-01 1.000999999999999890e+00 16 | 2.859999999999999765e-01 1.143999999999999906e+00 17 | 2.859999999999999765e-01 1.286999999999999922e+00 18 | 4.289999999999999369e-01 1.000999999999999890e+00 19 | 4.289999999999999369e-01 1.143999999999999906e+00 20 | 4.289999999999999369e-01 1.286999999999999922e+00 21 | 5.719999999999999529e-01 8.579999999999998739e-01 22 | 5.719999999999999529e-01 1.000999999999999890e+00 23 | 5.719999999999999529e-01 1.143999999999999906e+00 24 | 7.149999999999999689e-01 7.149999999999999689e-01 25 | 7.149999999999999689e-01 8.579999999999998739e-01 26 | 7.149999999999999689e-01 1.000999999999999890e+00 27 | 7.149999999999999689e-01 1.143999999999999906e+00 28 | 8.579999999999998739e-01 5.719999999999999529e-01 29 | 8.579999999999998739e-01 7.149999999999999689e-01 30 | 8.579999999999998739e-01 8.579999999999998739e-01 31 | 8.579999999999998739e-01 1.000999999999999890e+00 32 | 1.000999999999999890e+00 0.000000000000000000e+00 33 | 1.000999999999999890e+00 1.429999999999999882e-01 34 | 1.000999999999999890e+00 2.859999999999999765e-01 35 | 1.000999999999999890e+00 4.289999999999999369e-01 36 | 1.000999999999999890e+00 5.719999999999999529e-01 37 | 1.000999999999999890e+00 7.149999999999999689e-01 38 | 1.000999999999999890e+00 8.579999999999998739e-01 39 | 1.143999999999999906e+00 0.000000000000000000e+00 40 | 1.143999999999999906e+00 1.429999999999999882e-01 41 | 1.143999999999999906e+00 2.859999999999999765e-01 42 | 1.143999999999999906e+00 4.289999999999999369e-01 43 | 1.143999999999999906e+00 5.719999999999999529e-01 44 | 1.143999999999999906e+00 7.149999999999999689e-01 45 | 1.286999999999999922e+00 0.000000000000000000e+00 46 | 1.286999999999999922e+00 1.429999999999999882e-01 47 | 1.286999999999999922e+00 2.859999999999999765e-01 48 | 1.286999999999999922e+00 4.289999999999999369e-01 49 | 5.136496860701855738e-01 8.579999999999998739e-01 50 | 5.090058938755033235e-01 1.286999999999999922e+00 51 | 6.991244524403361638e-01 7.149999999999999689e-01 52 | 8.202536193153919797e-01 5.719999999999999529e-01 53 | 7.789223324568377294e-01 1.143999999999999906e+00 54 | 1.000000000000000000e+00 0.000000000000000000e+00 55 | 9.897226884334822117e-01 1.429999999999999882e-01 56 | 9.582296175760796064e-01 2.859999999999999765e-01 57 | 9.033044890843839880e-01 4.289999999999999369e-01 58 | 9.557483978537448799e-01 1.000999999999999890e+00 59 | 1.085952116808102996e+00 8.579999999999998739e-01 60 | 1.260266638453942267e+00 5.719999999999999529e-01 61 | 1.185002531642865176e+00 7.149999999999999689e-01 62 | 1.383999999999999897e+00 0.000000000000000000e+00 63 | 1.376592532305765282e+00 1.429999999999999882e-01 64 | 1.354127025060795297e+00 2.859999999999999765e-01 65 | 1.315832436140711881e+00 4.289999999999999369e-01 66 | 0.000000000000000000e+00 1.000000000000000000e+00 67 | 0.000000000000000000e+00 1.383999999999999897e+00 68 | 1.429999999999999882e-01 9.897226884334822117e-01 69 | 1.429999999999999882e-01 1.376592532305765282e+00 70 | 2.859999999999999765e-01 9.582296175760796064e-01 71 | 2.859999999999999765e-01 1.354127025060795297e+00 72 | 4.289999999999999369e-01 9.033044890843839880e-01 73 | 4.289999999999999369e-01 1.315832436140711881e+00 74 | 5.719999999999999529e-01 8.202536193153919797e-01 75 | 5.719999999999999529e-01 1.260266638453942267e+00 76 | 7.149999999999999689e-01 6.991244524403361638e-01 77 | 7.149999999999999689e-01 1.185002531642865176e+00 78 | 8.579999999999998739e-01 5.136496860701855738e-01 79 | 8.579999999999998739e-01 1.085952116808102996e+00 80 | 1.000999999999999890e+00 9.557483978537448799e-01 81 | 1.143999999999999906e+00 7.789223324568377294e-01 82 | 1.286999999999999922e+00 5.090058938755033235e-01 83 | 0 3 4 1 84 | 1 4 5 2 85 | 3 6 7 4 86 | 4 7 8 5 87 | 6 9 10 7 88 | 7 10 11 8 89 | 9 13 14 10 90 | 12 16 17 13 91 | 13 17 18 14 92 | 15 20 21 16 93 | 16 21 22 17 94 | 19 27 28 20 95 | 20 28 29 21 96 | 23 30 31 24 97 | 24 31 32 25 98 | 25 32 33 26 99 | 26 33 34 27 100 | 27 34 35 28 101 | 30 36 37 31 102 | 31 37 38 32 103 | 32 38 39 33 104 | 73 39 56 105 | 72 35 52 106 | 71 29 50 107 | 65 12 40 108 | 70 22 49 109 | 64 11 41 110 | 67 15 42 111 | 69 19 43 112 | 68 18 44 113 | 55 38 37 54 114 | 54 37 36 53 115 | 52 35 34 51 116 | 47 25 26 48 117 | 46 24 25 47 118 | 45 23 24 46 119 | 59 3 0 57 120 | 66 14 18 68 121 | 62 8 11 64 122 | 63 9 6 61 123 | 60 5 8 62 124 | 61 6 3 59 125 | 58 2 5 60 126 | 56 39 38 55 127 | 43 19 20 15 67 128 | 42 15 16 12 65 129 | 41 11 10 14 66 130 | 48 26 27 19 69 131 | 49 22 21 29 71 132 | 40 12 13 9 63 133 | 50 29 28 35 72 134 | 51 34 33 39 73 135 | 44 18 17 22 70 136 | -------------------------------------------------------------------------------- /tests/data/supersonic_20_20_q2.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment this file is a 20x20 supersonic 4 | element vertex 284 5 | property float x 6 | property float y 7 | element face 177 8 | end_header 9 | 0.000000000000000000e+00 1.000999999999999890e+00 10 | 0.000000000000000000e+00 1.072500000000000009e+00 11 | 0.000000000000000000e+00 1.143999999999999906e+00 12 | 0.000000000000000000e+00 1.215499999999999803e+00 13 | 0.000000000000000000e+00 1.286999999999999922e+00 14 | 0.000000000000000000e+00 1.358499999999999819e+00 15 | 7.149999999999999412e-02 1.000999999999999890e+00 16 | 7.149999999999999412e-02 1.072500000000000009e+00 17 | 7.149999999999999412e-02 1.143999999999999906e+00 18 | 7.149999999999999412e-02 1.215499999999999803e+00 19 | 7.149999999999999412e-02 1.286999999999999922e+00 20 | 7.149999999999999412e-02 1.358499999999999819e+00 21 | 1.429999999999999882e-01 1.000999999999999890e+00 22 | 1.429999999999999882e-01 1.072500000000000009e+00 23 | 1.429999999999999882e-01 1.143999999999999906e+00 24 | 1.429999999999999882e-01 1.215499999999999803e+00 25 | 1.429999999999999882e-01 1.286999999999999922e+00 26 | 1.429999999999999882e-01 1.358499999999999819e+00 27 | 2.144999999999999685e-01 1.000999999999999890e+00 28 | 2.144999999999999685e-01 1.072500000000000009e+00 29 | 2.144999999999999685e-01 1.143999999999999906e+00 30 | 2.144999999999999685e-01 1.215499999999999803e+00 31 | 2.144999999999999685e-01 1.286999999999999922e+00 32 | 2.144999999999999685e-01 1.358499999999999819e+00 33 | 2.859999999999999765e-01 1.000999999999999890e+00 34 | 2.859999999999999765e-01 1.072500000000000009e+00 35 | 2.859999999999999765e-01 1.143999999999999906e+00 36 | 2.859999999999999765e-01 1.215499999999999803e+00 37 | 2.859999999999999765e-01 1.286999999999999922e+00 38 | 3.574999999999999845e-01 1.000999999999999890e+00 39 | 3.574999999999999845e-01 1.072500000000000009e+00 40 | 3.574999999999999845e-01 1.143999999999999906e+00 41 | 3.574999999999999845e-01 1.215499999999999803e+00 42 | 3.574999999999999845e-01 1.286999999999999922e+00 43 | 4.289999999999999369e-01 9.294999999999998819e-01 44 | 4.289999999999999369e-01 1.000999999999999890e+00 45 | 4.289999999999999369e-01 1.072500000000000009e+00 46 | 4.289999999999999369e-01 1.143999999999999906e+00 47 | 4.289999999999999369e-01 1.215499999999999803e+00 48 | 4.289999999999999369e-01 1.286999999999999922e+00 49 | 5.004999999999999449e-01 9.294999999999998819e-01 50 | 5.004999999999999449e-01 1.000999999999999890e+00 51 | 5.004999999999999449e-01 1.072500000000000009e+00 52 | 5.004999999999999449e-01 1.143999999999999906e+00 53 | 5.004999999999999449e-01 1.215499999999999803e+00 54 | 5.004999999999999449e-01 1.286999999999999922e+00 55 | 5.719999999999999529e-01 8.579999999999998739e-01 56 | 5.719999999999999529e-01 9.294999999999998819e-01 57 | 5.719999999999999529e-01 1.000999999999999890e+00 58 | 5.719999999999999529e-01 1.072500000000000009e+00 59 | 5.719999999999999529e-01 1.143999999999999906e+00 60 | 5.719999999999999529e-01 1.215499999999999803e+00 61 | 6.434999999999999609e-01 7.864999999999999769e-01 62 | 6.434999999999999609e-01 8.579999999999998739e-01 63 | 6.434999999999999609e-01 9.294999999999998819e-01 64 | 6.434999999999999609e-01 1.000999999999999890e+00 65 | 6.434999999999999609e-01 1.072500000000000009e+00 66 | 6.434999999999999609e-01 1.143999999999999906e+00 67 | 6.434999999999999609e-01 1.215499999999999803e+00 68 | 7.149999999999999689e-01 7.149999999999999689e-01 69 | 7.149999999999999689e-01 7.864999999999999769e-01 70 | 7.149999999999999689e-01 8.579999999999998739e-01 71 | 7.149999999999999689e-01 9.294999999999998819e-01 72 | 7.149999999999999689e-01 1.000999999999999890e+00 73 | 7.149999999999999689e-01 1.072500000000000009e+00 74 | 7.149999999999999689e-01 1.143999999999999906e+00 75 | 7.864999999999999769e-01 6.434999999999999609e-01 76 | 7.864999999999999769e-01 7.149999999999999689e-01 77 | 7.864999999999999769e-01 7.864999999999999769e-01 78 | 7.864999999999999769e-01 8.579999999999998739e-01 79 | 7.864999999999999769e-01 9.294999999999998819e-01 80 | 7.864999999999999769e-01 1.000999999999999890e+00 81 | 7.864999999999999769e-01 1.072500000000000009e+00 82 | 8.579999999999998739e-01 5.719999999999999529e-01 83 | 8.579999999999998739e-01 6.434999999999999609e-01 84 | 8.579999999999998739e-01 7.149999999999999689e-01 85 | 8.579999999999998739e-01 7.864999999999999769e-01 86 | 8.579999999999998739e-01 8.579999999999998739e-01 87 | 8.579999999999998739e-01 9.294999999999998819e-01 88 | 8.579999999999998739e-01 1.000999999999999890e+00 89 | 8.579999999999998739e-01 1.072500000000000009e+00 90 | 9.294999999999998819e-01 4.289999999999999369e-01 91 | 9.294999999999998819e-01 5.004999999999999449e-01 92 | 9.294999999999998819e-01 5.719999999999999529e-01 93 | 9.294999999999998819e-01 6.434999999999999609e-01 94 | 9.294999999999998819e-01 7.149999999999999689e-01 95 | 9.294999999999998819e-01 7.864999999999999769e-01 96 | 9.294999999999998819e-01 8.579999999999998739e-01 97 | 9.294999999999998819e-01 9.294999999999998819e-01 98 | 9.294999999999998819e-01 1.000999999999999890e+00 99 | 1.000999999999999890e+00 0.000000000000000000e+00 100 | 1.000999999999999890e+00 7.149999999999999412e-02 101 | 1.000999999999999890e+00 1.429999999999999882e-01 102 | 1.000999999999999890e+00 2.144999999999999685e-01 103 | 1.000999999999999890e+00 2.859999999999999765e-01 104 | 1.000999999999999890e+00 3.574999999999999845e-01 105 | 1.000999999999999890e+00 4.289999999999999369e-01 106 | 1.000999999999999890e+00 5.004999999999999449e-01 107 | 1.000999999999999890e+00 5.719999999999999529e-01 108 | 1.000999999999999890e+00 6.434999999999999609e-01 109 | 1.000999999999999890e+00 7.149999999999999689e-01 110 | 1.000999999999999890e+00 7.864999999999999769e-01 111 | 1.000999999999999890e+00 8.579999999999998739e-01 112 | 1.000999999999999890e+00 9.294999999999998819e-01 113 | 1.072500000000000009e+00 0.000000000000000000e+00 114 | 1.072500000000000009e+00 7.149999999999999412e-02 115 | 1.072500000000000009e+00 1.429999999999999882e-01 116 | 1.072500000000000009e+00 2.144999999999999685e-01 117 | 1.072500000000000009e+00 2.859999999999999765e-01 118 | 1.072500000000000009e+00 3.574999999999999845e-01 119 | 1.072500000000000009e+00 4.289999999999999369e-01 120 | 1.072500000000000009e+00 5.004999999999999449e-01 121 | 1.072500000000000009e+00 5.719999999999999529e-01 122 | 1.072500000000000009e+00 6.434999999999999609e-01 123 | 1.072500000000000009e+00 7.149999999999999689e-01 124 | 1.072500000000000009e+00 7.864999999999999769e-01 125 | 1.072500000000000009e+00 8.579999999999998739e-01 126 | 1.143999999999999906e+00 0.000000000000000000e+00 127 | 1.143999999999999906e+00 7.149999999999999412e-02 128 | 1.143999999999999906e+00 1.429999999999999882e-01 129 | 1.143999999999999906e+00 2.144999999999999685e-01 130 | 1.143999999999999906e+00 2.859999999999999765e-01 131 | 1.143999999999999906e+00 3.574999999999999845e-01 132 | 1.143999999999999906e+00 4.289999999999999369e-01 133 | 1.143999999999999906e+00 5.004999999999999449e-01 134 | 1.143999999999999906e+00 5.719999999999999529e-01 135 | 1.143999999999999906e+00 6.434999999999999609e-01 136 | 1.143999999999999906e+00 7.149999999999999689e-01 137 | 1.215499999999999803e+00 0.000000000000000000e+00 138 | 1.215499999999999803e+00 7.149999999999999412e-02 139 | 1.215499999999999803e+00 1.429999999999999882e-01 140 | 1.215499999999999803e+00 2.144999999999999685e-01 141 | 1.215499999999999803e+00 2.859999999999999765e-01 142 | 1.215499999999999803e+00 3.574999999999999845e-01 143 | 1.215499999999999803e+00 4.289999999999999369e-01 144 | 1.215499999999999803e+00 5.004999999999999449e-01 145 | 1.215499999999999803e+00 5.719999999999999529e-01 146 | 1.215499999999999803e+00 6.434999999999999609e-01 147 | 1.286999999999999922e+00 0.000000000000000000e+00 148 | 1.286999999999999922e+00 7.149999999999999412e-02 149 | 1.286999999999999922e+00 1.429999999999999882e-01 150 | 1.286999999999999922e+00 2.144999999999999685e-01 151 | 1.286999999999999922e+00 2.859999999999999765e-01 152 | 1.286999999999999922e+00 3.574999999999999845e-01 153 | 1.286999999999999922e+00 4.289999999999999369e-01 154 | 1.286999999999999922e+00 5.004999999999999449e-01 155 | 1.358499999999999819e+00 0.000000000000000000e+00 156 | 1.358499999999999819e+00 7.149999999999999412e-02 157 | 1.358499999999999819e+00 1.429999999999999882e-01 158 | 1.358499999999999819e+00 2.144999999999999685e-01 159 | 2.644499007373617427e-01 1.358499999999999819e+00 160 | 3.688221115931095140e-01 9.294999999999998819e-01 161 | 5.136496860701855738e-01 8.579999999999998739e-01 162 | 5.090058938755033235e-01 1.286999999999999922e+00 163 | 6.175902768016996447e-01 7.864999999999999769e-01 164 | 6.991244524403361638e-01 7.149999999999999689e-01 165 | 6.618275832873699027e-01 1.215499999999999803e+00 166 | 7.654461117544462123e-01 6.434999999999999609e-01 167 | 7.789223324568377294e-01 1.143999999999999906e+00 168 | 8.202536193153919797e-01 5.719999999999999529e-01 169 | 9.033044890843839880e-01 4.289999999999999369e-01 170 | 8.657365361355613409e-01 5.004999999999999449e-01 171 | 8.747569662483403174e-01 1.072500000000000009e+00 172 | 1.000000000000000000e+00 0.000000000000000000e+00 173 | 9.974405997351420972e-01 7.149999999999999412e-02 174 | 9.897226884334822117e-01 1.429999999999999882e-01 175 | 9.767239886477652178e-01 2.144999999999999685e-01 176 | 9.582296175760796064e-01 2.859999999999999765e-01 177 | 9.339131383592373936e-01 3.574999999999999845e-01 178 | 9.557483978537448799e-01 1.000999999999999890e+00 179 | 1.025419792085173309e+00 9.294999999999998819e-01 180 | 1.138803648571605098e+00 7.864999999999999769e-01 181 | 1.085952116808102996e+00 8.579999999999998739e-01 182 | 1.185002531642865176e+00 7.149999999999999689e-01 183 | 1.260266638453942267e+00 5.719999999999999529e-01 184 | 1.225301493510882800e+00 6.434999999999999609e-01 185 | 1.354127025060795297e+00 2.859999999999999765e-01 186 | 1.337030197863907865e+00 3.574999999999999845e-01 187 | 1.315832436140711881e+00 4.289999999999999369e-01 188 | 1.290331643415753682e+00 5.004999999999999449e-01 189 | 1.383999999999999897e+00 0.000000000000000000e+00 190 | 1.382151854898729937e+00 7.149999999999999412e-02 191 | 1.376592532305765282e+00 1.429999999999999882e-01 192 | 1.367276764228808172e+00 2.144999999999999685e-01 193 | 0.000000000000000000e+00 1.000000000000000000e+00 194 | 0.000000000000000000e+00 1.383999999999999897e+00 195 | 7.149999999999999412e-02 9.974405997351420972e-01 196 | 7.149999999999999412e-02 1.382151854898729937e+00 197 | 1.429999999999999882e-01 9.897226884334822117e-01 198 | 1.429999999999999882e-01 1.376592532305765282e+00 199 | 2.144999999999999685e-01 9.767239886477652178e-01 200 | 2.144999999999999685e-01 1.367276764228808172e+00 201 | 2.859999999999999765e-01 9.582296175760796064e-01 202 | 2.859999999999999765e-01 1.354127025060795297e+00 203 | 3.574999999999999845e-01 9.339131383592373936e-01 204 | 3.574999999999999845e-01 1.337030197863907865e+00 205 | 4.289999999999999369e-01 9.033044890843839880e-01 206 | 4.289999999999999369e-01 1.315832436140711881e+00 207 | 5.004999999999999449e-01 8.657365361355613409e-01 208 | 5.004999999999999449e-01 1.290331643415753682e+00 209 | 5.719999999999999529e-01 8.202536193153919797e-01 210 | 5.719999999999999529e-01 1.260266638453942267e+00 211 | 6.434999999999999609e-01 7.654461117544462123e-01 212 | 6.434999999999999609e-01 1.225301493510882800e+00 213 | 7.149999999999999689e-01 6.991244524403361638e-01 214 | 7.149999999999999689e-01 1.185002531642865176e+00 215 | 7.864999999999999769e-01 6.175902768016996447e-01 216 | 7.864999999999999769e-01 1.138803648571605098e+00 217 | 8.579999999999998739e-01 5.136496860701855738e-01 218 | 8.579999999999998739e-01 1.085952116808102996e+00 219 | 9.294999999999998819e-01 3.688221115931095140e-01 220 | 9.294999999999998819e-01 1.025419792085173309e+00 221 | 1.000999999999999890e+00 9.557483978537448799e-01 222 | 1.072500000000000009e+00 8.747569662483403174e-01 223 | 1.143999999999999906e+00 7.789223324568377294e-01 224 | 1.215499999999999803e+00 6.618275832873699027e-01 225 | 1.286999999999999922e+00 5.090058938755033235e-01 226 | 1.358499999999999819e+00 2.644499007373617427e-01 227 | 1.363117196079755900e+00 2.395151555782309427e-01 228 | 7.472424544641453892e-01 1.164939789966159323e+00 229 | 9.168960782800008591e-01 3.991260222470523478e-01 230 | 7.760811889786333184e-01 6.306330058865543542e-01 231 | 6.526821908413561468e-01 1.220435150984486850e+00 232 | 8.664045913325901793e-01 1.079258580747823881e+00 233 | 7.071067811865475727e-01 7.071067811865474617e-01 234 | 6.306330058865543542e-01 7.760811889786332074e-01 235 | 5.047556957621252005e-01 1.288672839628310252e+00 236 | 8.396338442858469753e-01 5.431528399352892889e-01 237 | 9.427032735510673112e-01 1.013294891942173592e+00 238 | 1.013294891942173592e+00 9.427032735510673112e-01 239 | 5.431528399352891778e-01 8.396338442858470863e-01 240 | 3.991260222470524588e-01 9.168960782800008591e-01 241 | 1.164939789966159323e+00 7.472424544641455002e-01 242 | 2.395151555782308317e-01 1.363117196079755900e+00 243 | 1.220435150984486850e+00 6.526821908413560358e-01 244 | 1.288672839628310252e+00 5.047556957621252005e-01 245 | 1.079258580747823881e+00 8.664045913325901793e-01 246 | 1.112952207598135290e+00 8.226745307850712452e-01 247 | 1.379835392712868591e+00 1.072860150109191113e-01 248 | 1.383537886575543219e+00 3.576194080414032278e-02 249 | 8.852426784378444324e-01 4.651294446411570749e-01 250 | 1.303572347394880593e+00 4.649248703902602031e-01 251 | 1.326912996855664773e+00 3.933928046819339941e-01 252 | 9.942245953310976381e-01 1.073194019677480016e-01 253 | 1.346053439550209507e+00 3.218635392135151818e-01 254 | 9.838730588602221383e-01 1.788681191521557801e-01 255 | 9.681370910463381607e-01 2.504207917492760616e-01 256 | 9.467465947705459017e-01 3.219796349000597635e-01 257 | 1.243298152962424963e+00 6.080014003604121697e-01 258 | 9.993599450986471178e-01 3.577289661781582475e-02 259 | 8.226745307850712452e-01 1.112952207598135068e+00 260 | 3.577289661781597740e-02 9.993599450986471178e-01 261 | 3.576194080414023257e-02 1.383537886575543219e+00 262 | 1.073194019677481681e-01 9.942245953310976381e-01 263 | 1.072860150109193333e-01 1.379835392712868591e+00 264 | 1.788681191521558356e-01 9.838730588602221383e-01 265 | 1.788106774879955063e-01 1.372400357627570733e+00 266 | 6.080014003604121697e-01 1.243298152962424963e+00 267 | 2.504207917492759505e-01 9.681370910463381607e-01 268 | 3.933928046819340496e-01 1.326912996855664773e+00 269 | 1.372400357627570733e+00 1.788106774879954231e-01 270 | 3.219796349000597080e-01 9.467465947705459017e-01 271 | 4.651294446411572414e-01 8.852426784378443214e-01 272 | 4.649248703902600921e-01 1.303572347394880593e+00 273 | 3.218635392135152928e-01 1.346053439550209507e+00 274 | 7.827154784822470956e-01 1.141408112703035993e+00 275 | 1.356356312318817814e+00 2.752336353589392992e-01 276 | 2.752336353589391882e-01 1.356356312318817814e+00 277 | 1.274022722009587216e+00 5.406682012133523507e-01 278 | 1.200545679089603190e+00 6.885826547476223691e-01 279 | 1.141408112703035993e+00 7.827154784822473177e-01 280 | 1.049316950897943634e+00 9.024355581193826970e-01 281 | 9.786357851621817483e-01 9.786357851621816373e-01 282 | 9.317237673287008803e-01 3.631677592997660242e-01 283 | 5.070895975435781855e-01 8.618933461067511681e-01 284 | 5.406682012133522397e-01 1.274022722009587216e+00 285 | 5.950345228383880913e-01 8.037001409919570794e-01 286 | 6.717859090666189470e-01 7.407453627121376449e-01 287 | 6.885826547476223691e-01 1.200545679089602968e+00 288 | 9.024355581193826970e-01 1.049316950897943856e+00 289 | 8.618933461067510571e-01 5.070895975435782965e-01 290 | 7.407453627121376449e-01 6.717859090666189470e-01 291 | 3.631677592997660797e-01 9.317237673287008803e-01 292 | 8.037001409919571904e-01 5.950345228383880913e-01 293 | 0 6 7 1 294 | 1 7 8 2 295 | 2 8 9 3 296 | 3 9 10 4 297 | 4 10 11 5 298 | 6 12 13 7 299 | 7 13 14 8 300 | 8 14 15 9 301 | 9 15 16 10 302 | 10 16 17 11 303 | 12 18 19 13 304 | 13 19 20 14 305 | 14 20 21 15 306 | 15 21 22 16 307 | 16 22 23 17 308 | 18 24 25 19 309 | 19 25 26 20 310 | 20 26 27 21 311 | 21 27 28 22 312 | 24 29 30 25 313 | 25 30 31 26 314 | 26 31 32 27 315 | 27 32 33 28 316 | 29 35 36 30 317 | 30 36 37 31 318 | 31 37 38 32 319 | 32 38 39 33 320 | 34 40 41 35 321 | 35 41 42 36 322 | 36 42 43 37 323 | 37 43 44 38 324 | 38 44 45 39 325 | 40 47 48 41 326 | 41 48 49 42 327 | 42 49 50 43 328 | 43 50 51 44 329 | 46 53 54 47 330 | 47 54 55 48 331 | 48 55 56 49 332 | 49 56 57 50 333 | 50 57 58 51 334 | 52 60 61 53 335 | 53 61 62 54 336 | 54 62 63 55 337 | 55 63 64 56 338 | 56 64 65 57 339 | 59 67 68 60 340 | 60 68 69 61 341 | 61 69 70 62 342 | 62 70 71 63 343 | 63 71 72 64 344 | 66 74 75 67 345 | 67 75 76 68 346 | 68 76 77 69 347 | 69 77 78 70 348 | 70 78 79 71 349 | 71 79 80 72 350 | 73 83 84 74 351 | 74 84 85 75 352 | 75 85 86 76 353 | 76 86 87 77 354 | 77 87 88 78 355 | 78 88 89 79 356 | 81 96 97 82 357 | 82 97 98 83 358 | 83 98 99 84 359 | 84 99 100 85 360 | 85 100 101 86 361 | 86 101 102 87 362 | 87 102 103 88 363 | 90 104 105 91 364 | 91 105 106 92 365 | 92 106 107 93 366 | 93 107 108 94 367 | 94 108 109 95 368 | 95 109 110 96 369 | 96 110 111 97 370 | 97 111 112 98 371 | 98 112 113 99 372 | 99 113 114 100 373 | 100 114 115 101 374 | 101 115 116 102 375 | 104 117 118 105 376 | 105 118 119 106 377 | 106 119 120 107 378 | 107 120 121 108 379 | 108 121 122 109 380 | 109 122 123 110 381 | 110 123 124 111 382 | 111 124 125 112 383 | 112 125 126 113 384 | 113 126 127 114 385 | 117 128 129 118 386 | 118 129 130 119 387 | 119 130 131 120 388 | 120 131 132 121 389 | 121 132 133 122 390 | 122 133 134 123 391 | 123 134 135 124 392 | 124 135 136 125 393 | 125 136 137 126 394 | 128 138 139 129 395 | 129 139 140 130 396 | 130 140 141 131 397 | 131 141 142 132 398 | 132 142 143 133 399 | 133 143 144 134 400 | 134 144 145 135 401 | 138 146 147 139 402 | 139 147 148 140 403 | 140 148 149 141 404 | 217 149 183 218 405 | 205 65 158 219 406 | 210 81 160 220 407 | 206 66 157 221 408 | 203 58 156 222 409 | 209 80 162 223 410 | 204 59 155 224 411 | 202 52 154 225 412 | 199 45 153 226 413 | 208 73 159 227 414 | 211 89 169 228 415 | 212 103 170 229 416 | 200 46 152 230 417 | 196 34 151 231 418 | 214 127 173 232 419 | 191 23 150 233 420 | 215 137 175 234 421 | 216 145 179 235 422 | 213 116 172 236 423 | 172 116 115 171 237 424 | 182 148 147 181 238 425 | 181 147 146 180 239 426 | 160 81 82 161 240 427 | 179 145 144 178 241 428 | 178 144 143 177 242 429 | 164 91 92 165 243 430 | 177 143 142 176 244 431 | 165 92 93 166 245 432 | 166 93 94 167 246 433 | 167 94 95 168 247 434 | 175 137 136 174 248 435 | 163 90 91 164 249 436 | 207 72 80 209 250 437 | 186 6 0 184 251 438 | 185 5 11 187 252 439 | 188 12 6 186 253 440 | 187 11 17 189 254 441 | 190 18 12 188 255 442 | 189 17 23 191 256 443 | 201 51 58 203 257 444 | 192 24 18 190 258 445 | 195 33 39 197 259 446 | 183 149 148 182 260 447 | 194 29 24 192 261 448 | 198 40 34 196 262 449 | 197 39 45 199 263 450 | 193 28 33 195 264 451 | 158 65 64 72 207 265 452 | 176 142 141 149 217 266 453 | 150 23 22 28 193 267 454 | 174 136 135 145 216 268 455 | 173 127 126 137 215 269 456 | 171 115 114 127 214 270 457 | 170 103 102 116 213 271 458 | 169 89 88 103 212 272 459 | 168 95 96 81 210 273 460 | 152 46 47 40 198 274 461 | 153 45 44 51 201 275 462 | 154 52 53 46 200 276 463 | 155 59 60 52 202 277 464 | 156 58 57 65 205 278 465 | 162 80 79 89 211 279 466 | 161 82 83 73 208 280 467 | 157 66 67 59 204 281 468 | 151 34 35 29 194 282 469 | 159 73 74 66 206 283 470 | -------------------------------------------------------------------------------- /tests/data/supersonic_30_30_q3.ply: -------------------------------------------------------------------------------- 1 | ply 2 | format ascii 1.0 3 | comment this file is a 30x30 supersonic 4 | element vertex 628 5 | property float x 6 | property float y 7 | element face 367 8 | end_header 9 | 0.000000000000000000e+00 1.000999999999999890e+00 10 | 0.000000000000000000e+00 1.048666666666666636e+00 11 | 0.000000000000000000e+00 1.096333333333333160e+00 12 | 0.000000000000000000e+00 1.143999999999999906e+00 13 | 0.000000000000000000e+00 1.191666666666666652e+00 14 | 0.000000000000000000e+00 1.239333333333333176e+00 15 | 0.000000000000000000e+00 1.286999999999999922e+00 16 | 0.000000000000000000e+00 1.334666666666666668e+00 17 | 0.000000000000000000e+00 1.382333333333333192e+00 18 | 4.766666666666666274e-02 1.000999999999999890e+00 19 | 4.766666666666666274e-02 1.048666666666666636e+00 20 | 4.766666666666666274e-02 1.096333333333333160e+00 21 | 4.766666666666666274e-02 1.143999999999999906e+00 22 | 4.766666666666666274e-02 1.191666666666666652e+00 23 | 4.766666666666666274e-02 1.239333333333333176e+00 24 | 4.766666666666666274e-02 1.286999999999999922e+00 25 | 4.766666666666666274e-02 1.334666666666666668e+00 26 | 4.766666666666666274e-02 1.382333333333333192e+00 27 | 9.533333333333332549e-02 1.000999999999999890e+00 28 | 9.533333333333332549e-02 1.048666666666666636e+00 29 | 9.533333333333332549e-02 1.096333333333333160e+00 30 | 9.533333333333332549e-02 1.143999999999999906e+00 31 | 9.533333333333332549e-02 1.191666666666666652e+00 32 | 9.533333333333332549e-02 1.239333333333333176e+00 33 | 9.533333333333332549e-02 1.286999999999999922e+00 34 | 9.533333333333332549e-02 1.334666666666666668e+00 35 | 1.429999999999999882e-01 1.000999999999999890e+00 36 | 1.429999999999999882e-01 1.048666666666666636e+00 37 | 1.429999999999999882e-01 1.096333333333333160e+00 38 | 1.429999999999999882e-01 1.143999999999999906e+00 39 | 1.429999999999999882e-01 1.191666666666666652e+00 40 | 1.429999999999999882e-01 1.239333333333333176e+00 41 | 1.429999999999999882e-01 1.286999999999999922e+00 42 | 1.429999999999999882e-01 1.334666666666666668e+00 43 | 1.906666666666666510e-01 1.000999999999999890e+00 44 | 1.906666666666666510e-01 1.048666666666666636e+00 45 | 1.906666666666666510e-01 1.096333333333333160e+00 46 | 1.906666666666666510e-01 1.143999999999999906e+00 47 | 1.906666666666666510e-01 1.191666666666666652e+00 48 | 1.906666666666666510e-01 1.239333333333333176e+00 49 | 1.906666666666666510e-01 1.286999999999999922e+00 50 | 1.906666666666666510e-01 1.334666666666666668e+00 51 | 2.383333333333333137e-01 1.000999999999999890e+00 52 | 2.383333333333333137e-01 1.048666666666666636e+00 53 | 2.383333333333333137e-01 1.096333333333333160e+00 54 | 2.383333333333333137e-01 1.143999999999999906e+00 55 | 2.383333333333333137e-01 1.191666666666666652e+00 56 | 2.383333333333333137e-01 1.239333333333333176e+00 57 | 2.383333333333333137e-01 1.286999999999999922e+00 58 | 2.383333333333333137e-01 1.334666666666666668e+00 59 | 2.859999999999999765e-01 1.000999999999999890e+00 60 | 2.859999999999999765e-01 1.048666666666666636e+00 61 | 2.859999999999999765e-01 1.096333333333333160e+00 62 | 2.859999999999999765e-01 1.143999999999999906e+00 63 | 2.859999999999999765e-01 1.191666666666666652e+00 64 | 2.859999999999999765e-01 1.239333333333333176e+00 65 | 2.859999999999999765e-01 1.286999999999999922e+00 66 | 2.859999999999999765e-01 1.334666666666666668e+00 67 | 3.336666666666666670e-01 9.533333333333332549e-01 68 | 3.336666666666666670e-01 1.000999999999999890e+00 69 | 3.336666666666666670e-01 1.048666666666666636e+00 70 | 3.336666666666666670e-01 1.096333333333333160e+00 71 | 3.336666666666666670e-01 1.143999999999999906e+00 72 | 3.336666666666666670e-01 1.191666666666666652e+00 73 | 3.336666666666666670e-01 1.239333333333333176e+00 74 | 3.336666666666666670e-01 1.286999999999999922e+00 75 | 3.336666666666666670e-01 1.334666666666666668e+00 76 | 3.813333333333333020e-01 9.533333333333332549e-01 77 | 3.813333333333333020e-01 1.000999999999999890e+00 78 | 3.813333333333333020e-01 1.048666666666666636e+00 79 | 3.813333333333333020e-01 1.096333333333333160e+00 80 | 3.813333333333333020e-01 1.143999999999999906e+00 81 | 3.813333333333333020e-01 1.191666666666666652e+00 82 | 3.813333333333333020e-01 1.239333333333333176e+00 83 | 3.813333333333333020e-01 1.286999999999999922e+00 84 | 4.289999999999999369e-01 9.056666666666666199e-01 85 | 4.289999999999999369e-01 9.533333333333332549e-01 86 | 4.289999999999999369e-01 1.000999999999999890e+00 87 | 4.289999999999999369e-01 1.048666666666666636e+00 88 | 4.289999999999999369e-01 1.096333333333333160e+00 89 | 4.289999999999999369e-01 1.143999999999999906e+00 90 | 4.289999999999999369e-01 1.191666666666666652e+00 91 | 4.289999999999999369e-01 1.239333333333333176e+00 92 | 4.289999999999999369e-01 1.286999999999999922e+00 93 | 4.766666666666666274e-01 9.056666666666666199e-01 94 | 4.766666666666666274e-01 9.533333333333332549e-01 95 | 4.766666666666666274e-01 1.000999999999999890e+00 96 | 4.766666666666666274e-01 1.048666666666666636e+00 97 | 4.766666666666666274e-01 1.096333333333333160e+00 98 | 4.766666666666666274e-01 1.143999999999999906e+00 99 | 4.766666666666666274e-01 1.191666666666666652e+00 100 | 4.766666666666666274e-01 1.239333333333333176e+00 101 | 4.766666666666666274e-01 1.286999999999999922e+00 102 | 5.243333333333333179e-01 8.579999999999998739e-01 103 | 5.243333333333333179e-01 9.056666666666666199e-01 104 | 5.243333333333333179e-01 9.533333333333332549e-01 105 | 5.243333333333333179e-01 1.000999999999999890e+00 106 | 5.243333333333333179e-01 1.048666666666666636e+00 107 | 5.243333333333333179e-01 1.096333333333333160e+00 108 | 5.243333333333333179e-01 1.143999999999999906e+00 109 | 5.243333333333333179e-01 1.191666666666666652e+00 110 | 5.243333333333333179e-01 1.239333333333333176e+00 111 | 5.719999999999999529e-01 8.579999999999998739e-01 112 | 5.719999999999999529e-01 9.056666666666666199e-01 113 | 5.719999999999999529e-01 9.533333333333332549e-01 114 | 5.719999999999999529e-01 1.000999999999999890e+00 115 | 5.719999999999999529e-01 1.048666666666666636e+00 116 | 5.719999999999999529e-01 1.096333333333333160e+00 117 | 5.719999999999999529e-01 1.143999999999999906e+00 118 | 5.719999999999999529e-01 1.191666666666666652e+00 119 | 5.719999999999999529e-01 1.239333333333333176e+00 120 | 6.196666666666665879e-01 8.103333333333332389e-01 121 | 6.196666666666665879e-01 8.579999999999998739e-01 122 | 6.196666666666665879e-01 9.056666666666666199e-01 123 | 6.196666666666665879e-01 9.533333333333332549e-01 124 | 6.196666666666665879e-01 1.000999999999999890e+00 125 | 6.196666666666665879e-01 1.048666666666666636e+00 126 | 6.196666666666665879e-01 1.096333333333333160e+00 127 | 6.196666666666665879e-01 1.143999999999999906e+00 128 | 6.196666666666665879e-01 1.191666666666666652e+00 129 | 6.673333333333333339e-01 7.626666666666666039e-01 130 | 6.673333333333333339e-01 8.103333333333332389e-01 131 | 6.673333333333333339e-01 8.579999999999998739e-01 132 | 6.673333333333333339e-01 9.056666666666666199e-01 133 | 6.673333333333333339e-01 9.533333333333332549e-01 134 | 6.673333333333333339e-01 1.000999999999999890e+00 135 | 6.673333333333333339e-01 1.048666666666666636e+00 136 | 6.673333333333333339e-01 1.096333333333333160e+00 137 | 6.673333333333333339e-01 1.143999999999999906e+00 138 | 6.673333333333333339e-01 1.191666666666666652e+00 139 | 7.149999999999999689e-01 7.149999999999999689e-01 140 | 7.149999999999999689e-01 7.626666666666666039e-01 141 | 7.149999999999999689e-01 8.103333333333332389e-01 142 | 7.149999999999999689e-01 8.579999999999998739e-01 143 | 7.149999999999999689e-01 9.056666666666666199e-01 144 | 7.149999999999999689e-01 9.533333333333332549e-01 145 | 7.149999999999999689e-01 1.000999999999999890e+00 146 | 7.149999999999999689e-01 1.048666666666666636e+00 147 | 7.149999999999999689e-01 1.096333333333333160e+00 148 | 7.149999999999999689e-01 1.143999999999999906e+00 149 | 7.626666666666666039e-01 6.673333333333333339e-01 150 | 7.626666666666666039e-01 7.149999999999999689e-01 151 | 7.626666666666666039e-01 7.626666666666666039e-01 152 | 7.626666666666666039e-01 8.103333333333332389e-01 153 | 7.626666666666666039e-01 8.579999999999998739e-01 154 | 7.626666666666666039e-01 9.056666666666666199e-01 155 | 7.626666666666666039e-01 9.533333333333332549e-01 156 | 7.626666666666666039e-01 1.000999999999999890e+00 157 | 7.626666666666666039e-01 1.048666666666666636e+00 158 | 7.626666666666666039e-01 1.096333333333333160e+00 159 | 7.626666666666666039e-01 1.143999999999999906e+00 160 | 8.103333333333332389e-01 6.196666666666665879e-01 161 | 8.103333333333332389e-01 6.673333333333333339e-01 162 | 8.103333333333332389e-01 7.149999999999999689e-01 163 | 8.103333333333332389e-01 7.626666666666666039e-01 164 | 8.103333333333332389e-01 8.103333333333332389e-01 165 | 8.103333333333332389e-01 8.579999999999998739e-01 166 | 8.103333333333332389e-01 9.056666666666666199e-01 167 | 8.103333333333332389e-01 9.533333333333332549e-01 168 | 8.103333333333332389e-01 1.000999999999999890e+00 169 | 8.103333333333332389e-01 1.048666666666666636e+00 170 | 8.103333333333332389e-01 1.096333333333333160e+00 171 | 8.579999999999998739e-01 5.243333333333333179e-01 172 | 8.579999999999998739e-01 5.719999999999999529e-01 173 | 8.579999999999998739e-01 6.196666666666665879e-01 174 | 8.579999999999998739e-01 6.673333333333333339e-01 175 | 8.579999999999998739e-01 7.149999999999999689e-01 176 | 8.579999999999998739e-01 7.626666666666666039e-01 177 | 8.579999999999998739e-01 8.103333333333332389e-01 178 | 8.579999999999998739e-01 8.579999999999998739e-01 179 | 8.579999999999998739e-01 9.056666666666666199e-01 180 | 8.579999999999998739e-01 9.533333333333332549e-01 181 | 8.579999999999998739e-01 1.000999999999999890e+00 182 | 8.579999999999998739e-01 1.048666666666666636e+00 183 | 9.056666666666666199e-01 4.289999999999999369e-01 184 | 9.056666666666666199e-01 4.766666666666666274e-01 185 | 9.056666666666666199e-01 5.243333333333333179e-01 186 | 9.056666666666666199e-01 5.719999999999999529e-01 187 | 9.056666666666666199e-01 6.196666666666665879e-01 188 | 9.056666666666666199e-01 6.673333333333333339e-01 189 | 9.056666666666666199e-01 7.149999999999999689e-01 190 | 9.056666666666666199e-01 7.626666666666666039e-01 191 | 9.056666666666666199e-01 8.103333333333332389e-01 192 | 9.056666666666666199e-01 8.579999999999998739e-01 193 | 9.056666666666666199e-01 9.056666666666666199e-01 194 | 9.056666666666666199e-01 9.533333333333332549e-01 195 | 9.056666666666666199e-01 1.000999999999999890e+00 196 | 9.533333333333332549e-01 3.336666666666666670e-01 197 | 9.533333333333332549e-01 3.813333333333333020e-01 198 | 9.533333333333332549e-01 4.289999999999999369e-01 199 | 9.533333333333332549e-01 4.766666666666666274e-01 200 | 9.533333333333332549e-01 5.243333333333333179e-01 201 | 9.533333333333332549e-01 5.719999999999999529e-01 202 | 9.533333333333332549e-01 6.196666666666665879e-01 203 | 9.533333333333332549e-01 6.673333333333333339e-01 204 | 9.533333333333332549e-01 7.149999999999999689e-01 205 | 9.533333333333332549e-01 7.626666666666666039e-01 206 | 9.533333333333332549e-01 8.103333333333332389e-01 207 | 9.533333333333332549e-01 8.579999999999998739e-01 208 | 9.533333333333332549e-01 9.056666666666666199e-01 209 | 9.533333333333332549e-01 9.533333333333332549e-01 210 | 9.533333333333332549e-01 1.000999999999999890e+00 211 | 1.000999999999999890e+00 0.000000000000000000e+00 212 | 1.000999999999999890e+00 4.766666666666666274e-02 213 | 1.000999999999999890e+00 9.533333333333332549e-02 214 | 1.000999999999999890e+00 1.429999999999999882e-01 215 | 1.000999999999999890e+00 1.906666666666666510e-01 216 | 1.000999999999999890e+00 2.383333333333333137e-01 217 | 1.000999999999999890e+00 2.859999999999999765e-01 218 | 1.000999999999999890e+00 3.336666666666666670e-01 219 | 1.000999999999999890e+00 3.813333333333333020e-01 220 | 1.000999999999999890e+00 4.289999999999999369e-01 221 | 1.000999999999999890e+00 4.766666666666666274e-01 222 | 1.000999999999999890e+00 5.243333333333333179e-01 223 | 1.000999999999999890e+00 5.719999999999999529e-01 224 | 1.000999999999999890e+00 6.196666666666665879e-01 225 | 1.000999999999999890e+00 6.673333333333333339e-01 226 | 1.000999999999999890e+00 7.149999999999999689e-01 227 | 1.000999999999999890e+00 7.626666666666666039e-01 228 | 1.000999999999999890e+00 8.103333333333332389e-01 229 | 1.000999999999999890e+00 8.579999999999998739e-01 230 | 1.000999999999999890e+00 9.056666666666666199e-01 231 | 1.000999999999999890e+00 9.533333333333332549e-01 232 | 1.048666666666666636e+00 0.000000000000000000e+00 233 | 1.048666666666666636e+00 4.766666666666666274e-02 234 | 1.048666666666666636e+00 9.533333333333332549e-02 235 | 1.048666666666666636e+00 1.429999999999999882e-01 236 | 1.048666666666666636e+00 1.906666666666666510e-01 237 | 1.048666666666666636e+00 2.383333333333333137e-01 238 | 1.048666666666666636e+00 2.859999999999999765e-01 239 | 1.048666666666666636e+00 3.336666666666666670e-01 240 | 1.048666666666666636e+00 3.813333333333333020e-01 241 | 1.048666666666666636e+00 4.289999999999999369e-01 242 | 1.048666666666666636e+00 4.766666666666666274e-01 243 | 1.048666666666666636e+00 5.243333333333333179e-01 244 | 1.048666666666666636e+00 5.719999999999999529e-01 245 | 1.048666666666666636e+00 6.196666666666665879e-01 246 | 1.048666666666666636e+00 6.673333333333333339e-01 247 | 1.048666666666666636e+00 7.149999999999999689e-01 248 | 1.048666666666666636e+00 7.626666666666666039e-01 249 | 1.048666666666666636e+00 8.103333333333332389e-01 250 | 1.048666666666666636e+00 8.579999999999998739e-01 251 | 1.096333333333333160e+00 0.000000000000000000e+00 252 | 1.096333333333333160e+00 4.766666666666666274e-02 253 | 1.096333333333333160e+00 9.533333333333332549e-02 254 | 1.096333333333333160e+00 1.429999999999999882e-01 255 | 1.096333333333333160e+00 1.906666666666666510e-01 256 | 1.096333333333333160e+00 2.383333333333333137e-01 257 | 1.096333333333333160e+00 2.859999999999999765e-01 258 | 1.096333333333333160e+00 3.336666666666666670e-01 259 | 1.096333333333333160e+00 3.813333333333333020e-01 260 | 1.096333333333333160e+00 4.289999999999999369e-01 261 | 1.096333333333333160e+00 4.766666666666666274e-01 262 | 1.096333333333333160e+00 5.243333333333333179e-01 263 | 1.096333333333333160e+00 5.719999999999999529e-01 264 | 1.096333333333333160e+00 6.196666666666665879e-01 265 | 1.096333333333333160e+00 6.673333333333333339e-01 266 | 1.096333333333333160e+00 7.149999999999999689e-01 267 | 1.096333333333333160e+00 7.626666666666666039e-01 268 | 1.096333333333333160e+00 8.103333333333332389e-01 269 | 1.143999999999999906e+00 0.000000000000000000e+00 270 | 1.143999999999999906e+00 4.766666666666666274e-02 271 | 1.143999999999999906e+00 9.533333333333332549e-02 272 | 1.143999999999999906e+00 1.429999999999999882e-01 273 | 1.143999999999999906e+00 1.906666666666666510e-01 274 | 1.143999999999999906e+00 2.383333333333333137e-01 275 | 1.143999999999999906e+00 2.859999999999999765e-01 276 | 1.143999999999999906e+00 3.336666666666666670e-01 277 | 1.143999999999999906e+00 3.813333333333333020e-01 278 | 1.143999999999999906e+00 4.289999999999999369e-01 279 | 1.143999999999999906e+00 4.766666666666666274e-01 280 | 1.143999999999999906e+00 5.243333333333333179e-01 281 | 1.143999999999999906e+00 5.719999999999999529e-01 282 | 1.143999999999999906e+00 6.196666666666665879e-01 283 | 1.143999999999999906e+00 6.673333333333333339e-01 284 | 1.143999999999999906e+00 7.149999999999999689e-01 285 | 1.143999999999999906e+00 7.626666666666666039e-01 286 | 1.191666666666666652e+00 0.000000000000000000e+00 287 | 1.191666666666666652e+00 4.766666666666666274e-02 288 | 1.191666666666666652e+00 9.533333333333332549e-02 289 | 1.191666666666666652e+00 1.429999999999999882e-01 290 | 1.191666666666666652e+00 1.906666666666666510e-01 291 | 1.191666666666666652e+00 2.383333333333333137e-01 292 | 1.191666666666666652e+00 2.859999999999999765e-01 293 | 1.191666666666666652e+00 3.336666666666666670e-01 294 | 1.191666666666666652e+00 3.813333333333333020e-01 295 | 1.191666666666666652e+00 4.289999999999999369e-01 296 | 1.191666666666666652e+00 4.766666666666666274e-01 297 | 1.191666666666666652e+00 5.243333333333333179e-01 298 | 1.191666666666666652e+00 5.719999999999999529e-01 299 | 1.191666666666666652e+00 6.196666666666665879e-01 300 | 1.191666666666666652e+00 6.673333333333333339e-01 301 | 1.239333333333333176e+00 0.000000000000000000e+00 302 | 1.239333333333333176e+00 4.766666666666666274e-02 303 | 1.239333333333333176e+00 9.533333333333332549e-02 304 | 1.239333333333333176e+00 1.429999999999999882e-01 305 | 1.239333333333333176e+00 1.906666666666666510e-01 306 | 1.239333333333333176e+00 2.383333333333333137e-01 307 | 1.239333333333333176e+00 2.859999999999999765e-01 308 | 1.239333333333333176e+00 3.336666666666666670e-01 309 | 1.239333333333333176e+00 3.813333333333333020e-01 310 | 1.239333333333333176e+00 4.289999999999999369e-01 311 | 1.239333333333333176e+00 4.766666666666666274e-01 312 | 1.239333333333333176e+00 5.243333333333333179e-01 313 | 1.239333333333333176e+00 5.719999999999999529e-01 314 | 1.286999999999999922e+00 0.000000000000000000e+00 315 | 1.286999999999999922e+00 4.766666666666666274e-02 316 | 1.286999999999999922e+00 9.533333333333332549e-02 317 | 1.286999999999999922e+00 1.429999999999999882e-01 318 | 1.286999999999999922e+00 1.906666666666666510e-01 319 | 1.286999999999999922e+00 2.383333333333333137e-01 320 | 1.286999999999999922e+00 2.859999999999999765e-01 321 | 1.286999999999999922e+00 3.336666666666666670e-01 322 | 1.286999999999999922e+00 3.813333333333333020e-01 323 | 1.286999999999999922e+00 4.289999999999999369e-01 324 | 1.286999999999999922e+00 4.766666666666666274e-01 325 | 1.334666666666666668e+00 0.000000000000000000e+00 326 | 1.334666666666666668e+00 4.766666666666666274e-02 327 | 1.334666666666666668e+00 9.533333333333332549e-02 328 | 1.334666666666666668e+00 1.429999999999999882e-01 329 | 1.334666666666666668e+00 1.906666666666666510e-01 330 | 1.334666666666666668e+00 2.383333333333333137e-01 331 | 1.334666666666666668e+00 2.859999999999999765e-01 332 | 1.334666666666666668e+00 3.336666666666666670e-01 333 | 1.382333333333333192e+00 0.000000000000000000e+00 334 | 1.382333333333333192e+00 4.766666666666666274e-02 335 | 6.790107182921265028e-02 1.382333333333333192e+00 336 | 3.019197833126467945e-01 9.533333333333332549e-01 337 | 3.662251887689988994e-01 1.334666666666666668e+00 338 | 4.239904349025916952e-01 9.056666666666666199e-01 339 | 5.136496860701855738e-01 8.579999999999998739e-01 340 | 5.090058938755033235e-01 1.286999999999999922e+00 341 | 5.859691876616797135e-01 8.103333333333332389e-01 342 | 6.160429277971537498e-01 1.239333333333333176e+00 343 | 6.467917404818614990e-01 7.626666666666666039e-01 344 | 6.991244524403361638e-01 7.149999999999999689e-01 345 | 7.038370234333766184e-01 1.191666666666666652e+00 346 | 7.447591706197529415e-01 6.673333333333333339e-01 347 | 7.848650981042679664e-01 6.196666666666665879e-01 348 | 7.789223324568377294e-01 1.143999999999999906e+00 349 | 8.515130977005318513e-01 5.243333333333333179e-01 350 | 8.202536193153919797e-01 5.719999999999999529e-01 351 | 8.446947509143303279e-01 1.096333333333333160e+00 352 | 9.033044890843839880e-01 4.289999999999999369e-01 353 | 8.790841193474541182e-01 4.766666666666666274e-01 354 | 9.031911327189956484e-01 1.048666666666666636e+00 355 | 9.426911241523150409e-01 3.336666666666666670e-01 356 | 9.244376068123196788e-01 3.813333333333333020e-01 357 | 1.000000000000000000e+00 0.000000000000000000e+00 358 | 9.988632983991796443e-01 4.766666666666666274e-02 359 | 9.954454056127615136e-01 9.533333333333332549e-02 360 | 9.897226884334822117e-01 1.429999999999999882e-01 361 | 9.816548386384198466e-01 1.906666666666666510e-01 362 | 9.711834132758971894e-01 2.383333333333333137e-01 363 | 9.582296175760796064e-01 2.859999999999999765e-01 364 | 9.557483978537448799e-01 1.000999999999999890e+00 365 | 1.046529449604209017e+00 9.056666666666666199e-01 366 | 1.003300331683168345e+00 9.533333333333332549e-01 367 | 1.085952116808102996e+00 8.579999999999998739e-01 368 | 1.121969647044379403e+00 8.103333333333332389e-01 369 | 1.185002531642865176e+00 7.149999999999999689e-01 370 | 1.154900669129408808e+00 7.626666666666666039e-01 371 | 1.237525443060554675e+00 6.196666666666665879e-01 372 | 1.212485967845493118e+00 6.673333333333333339e-01 373 | 1.280831977878267747e+00 5.243333333333333179e-01 374 | 1.260266638453942267e+00 5.719999999999999529e-01 375 | 1.330428836461721165e+00 3.813333333333333020e-01 376 | 1.315832436140711881e+00 4.289999999999999369e-01 377 | 1.299324781911316062e+00 4.766666666666666274e-01 378 | 1.380712698411786121e+00 9.533333333333332549e-02 379 | 1.376592532305765282e+00 1.429999999999999882e-01 380 | 1.370803495115993087e+00 1.906666666666666510e-01 381 | 1.363324327598617547e+00 2.383333333333333137e-01 382 | 1.354127025060795297e+00 2.859999999999999765e-01 383 | 1.343176293550312650e+00 3.336666666666666670e-01 384 | 1.383999999999999897e+00 0.000000000000000000e+00 385 | 1.383178907043079775e+00 4.766666666666666274e-02 386 | 0.000000000000000000e+00 1.000000000000000000e+00 387 | 0.000000000000000000e+00 1.383999999999999897e+00 388 | 4.766666666666666274e-02 9.988632983991796443e-01 389 | 4.766666666666666274e-02 1.383178907043079775e+00 390 | 9.533333333333332549e-02 9.954454056127615136e-01 391 | 9.533333333333332549e-02 1.380712698411786121e+00 392 | 1.429999999999999882e-01 9.897226884334822117e-01 393 | 1.429999999999999882e-01 1.376592532305765282e+00 394 | 1.906666666666666510e-01 9.816548386384198466e-01 395 | 1.906666666666666510e-01 1.370803495115993087e+00 396 | 2.383333333333333137e-01 9.711834132758971894e-01 397 | 2.383333333333333137e-01 1.363324327598617547e+00 398 | 2.859999999999999765e-01 9.582296175760796064e-01 399 | 2.859999999999999765e-01 1.354127025060795297e+00 400 | 3.336666666666666670e-01 9.426911241523150409e-01 401 | 3.336666666666666670e-01 1.343176293550312650e+00 402 | 3.813333333333333020e-01 9.244376068123196788e-01 403 | 3.813333333333333020e-01 1.330428836461721165e+00 404 | 4.289999999999999369e-01 9.033044890843839880e-01 405 | 4.289999999999999369e-01 1.315832436140711881e+00 406 | 4.766666666666666274e-01 8.790841193474541182e-01 407 | 4.766666666666666274e-01 1.299324781911316062e+00 408 | 5.243333333333333179e-01 8.515130977005318513e-01 409 | 5.243333333333333179e-01 1.280831977878267747e+00 410 | 5.719999999999999529e-01 8.202536193153919797e-01 411 | 5.719999999999999529e-01 1.260266638453942267e+00 412 | 6.196666666666665879e-01 7.848650981042679664e-01 413 | 6.196666666666665879e-01 1.237525443060554675e+00 414 | 6.673333333333333339e-01 7.447591706197529415e-01 415 | 6.673333333333333339e-01 1.212485967845493118e+00 416 | 7.149999999999999689e-01 6.991244524403361638e-01 417 | 7.149999999999999689e-01 1.185002531642865176e+00 418 | 7.626666666666666039e-01 6.467917404818614990e-01 419 | 7.626666666666666039e-01 1.154900669129408808e+00 420 | 8.103333333333332389e-01 5.859691876616797135e-01 421 | 8.103333333333332389e-01 1.121969647044379403e+00 422 | 8.579999999999998739e-01 5.136496860701855738e-01 423 | 8.579999999999998739e-01 1.085952116808102996e+00 424 | 9.056666666666666199e-01 4.239904349025916952e-01 425 | 9.056666666666666199e-01 1.046529449604209017e+00 426 | 9.533333333333332549e-01 3.019197833126467945e-01 427 | 9.533333333333332549e-01 1.003300331683168345e+00 428 | 1.000999999999999890e+00 9.557483978537448799e-01 429 | 1.048666666666666636e+00 9.031911327189956484e-01 430 | 1.096333333333333160e+00 8.446947509143303279e-01 431 | 1.143999999999999906e+00 7.789223324568377294e-01 432 | 1.191666666666666652e+00 7.038370234333766184e-01 433 | 1.239333333333333176e+00 6.160429277971537498e-01 434 | 1.286999999999999922e+00 5.090058938755033235e-01 435 | 1.334666666666666668e+00 3.662251887689988994e-01 436 | 1.382333333333333192e+00 6.790107182921265028e-02 437 | 1.382929949565056882e+00 5.441281646808274891e-02 438 | 1.382648089426469662e+00 6.115767168011551624e-02 439 | 1.073736626314562459e+00 8.732386027373169046e-01 440 | 1.061307317899705671e+00 8.883033136111407879e-01 441 | 1.002534201206846776e+00 9.541389707010971000e-01 442 | 1.001767423814195146e+00 9.549439923810559838e-01 443 | 7.735209257709301234e-01 1.147659085876325591e+00 444 | 7.681023303712909422e-01 1.151292669167224281e+00 445 | 9.549439923810559838e-01 1.001767423814195146e+00 446 | 9.541389707010971000e-01 1.002534201206846998e+00 447 | 4.982605211900067999e-01 1.291198068858322889e+00 448 | 4.874805291206937841e-01 1.295306424645615628e+00 449 | 5.973208509974835545e-01 8.020023696745801622e-01 450 | 6.085540863857593630e-01 7.935123968427927332e-01 451 | 6.014442483085543634e-01 1.246483379823637216e+00 452 | 5.867625972458746508e-01 1.253461469082027824e+00 453 | 1.113542632949932276e+00 8.218751758040463429e-01 454 | 1.104996891326465391e+00 8.333293887526391774e-01 455 | 6.536930689307257625e-01 7.567597846291315156e-01 456 | 6.605404548957100053e-01 7.507904550846185021e-01 457 | 9.463565710360172245e-01 3.231241873598316716e-01 458 | 9.499041214135546252e-01 3.125414534450475790e-01 459 | 6.917395773962582428e-01 1.198729476180362186e+00 460 | 6.795712651631792278e-01 1.205669480232669510e+00 461 | 7.507904550846185021e-01 6.605404548957100053e-01 462 | 7.567597846291314045e-01 6.536930689307257625e-01 463 | 8.883033136111407879e-01 1.061307317899705671e+00 464 | 8.732386027373166826e-01 1.073736626314562459e+00 465 | 7.935123968427926222e-01 6.085540863857593630e-01 466 | 8.020023696745801622e-01 5.973208509974836655e-01 467 | 9.040949640332268666e-01 4.273315995918839927e-01 468 | 9.048823574552410376e-01 4.256617426622285594e-01 469 | 8.333293887526391774e-01 1.104996891326465391e+00 470 | 8.218751758040463429e-01 1.113542632949932276e+00 471 | 7.044558565954077700e-01 7.097478045816205672e-01 472 | 7.097478045816205672e-01 7.044558565954077700e-01 473 | 4.256617426622287259e-01 9.048823574552410376e-01 474 | 4.273315995918842147e-01 9.040949640332267556e-01 475 | 5.172199003345291368e-01 8.558525426134689917e-01 476 | 5.207811366942290965e-01 8.536902293358327176e-01 477 | 8.536902293358327176e-01 5.207811366942292075e-01 478 | 8.558525426134688807e-01 5.172199003345293589e-01 479 | 1.151292669167224281e+00 7.681023303712908312e-01 480 | 1.147659085876325591e+00 7.735209257709301234e-01 481 | 1.340427748366815219e+00 3.445423796984478648e-01 482 | 1.337591143955479733e+00 3.553954580630859228e-01 483 | 1.205669480232669510e+00 6.795712651631793388e-01 484 | 1.198729476180362186e+00 6.917395773962583538e-01 485 | 3.125414534450473569e-01 9.499041214135547362e-01 486 | 3.231241873598316161e-01 9.463565710360173355e-01 487 | 6.115767168011522481e-02 1.382648089426469662e+00 488 | 5.441281646808247136e-02 1.382929949565056882e+00 489 | 1.253461469082027602e+00 5.867625972458748729e-01 490 | 1.246483379823636994e+00 6.014442483085545854e-01 491 | 3.553954580630856452e-01 1.337591143955479955e+00 492 | 3.445423796984478648e-01 1.340427748366815219e+00 493 | 1.295306424645615628e+00 4.874805291206940616e-01 494 | 1.291198068858322889e+00 4.982605211900070774e-01 495 | 1.350664042489059025e+00 3.019315225793967605e-01 496 | 1.347013629797686463e+00 3.178211464633231009e-01 497 | 1.360444419219798640e+00 2.542577082680185230e-01 498 | 1.357378511984408398e+00 2.701473212952386072e-01 499 | 8.874403750567547711e-01 4.609225322319644991e-01 500 | 8.955146867181976722e-01 4.450319605062184047e-01 501 | 1.368495151649871344e+00 2.065841714914179728e-01 502 | 1.366001983570956257e+00 2.224737757134824800e-01 503 | 1.374846660880421956e+00 1.589108525744974409e-01 504 | 1.372916895778090618e+00 1.748004499051740990e-01 505 | 1.379522444415559379e+00 1.112376975387366629e-01 506 | 1.378148994917206771e+00 1.271272897874108077e-01 507 | 9.307921957527145462e-01 3.655487495886703408e-01 508 | 9.368772888129235366e-01 3.496583270945305966e-01 509 | 1.175184646591262538e+00 7.310246551356315292e-01 510 | 1.165150075680256636e+00 7.469145206396058390e-01 511 | 9.994947461017428259e-01 3.178446971419675998e-02 512 | 9.998736785468809174e-01 1.589424264092500691e-02 513 | 1.325754273175725695e+00 3.972802627318687274e-01 514 | 1.320888572568633013e+00 4.131699152377854012e-01 515 | 9.968377947691052787e-01 7.946326773967449242e-02 516 | 9.979771887564469202e-01 6.357303454908387608e-02 517 | 9.918844843645718834e-01 1.271423205578194604e-01 518 | 9.937922196396951069e-01 1.112520749631572131e-01 519 | 9.846000888829082864e-01 1.748218091994503676e-01 520 | 9.872896050008620472e-01 1.589315445631918622e-01 521 | 9.749322481898907711e-01 2.225019358104670386e-01 522 | 9.784230312989307121e-01 2.066116449375774988e-01 523 | 1.274175724186693559e+00 5.403075271484883979e-01 524 | 1.267320253762135307e+00 5.561972441537952339e-01 525 | 9.628090057689806525e-01 2.701829350831523868e-01 526 | 9.671273279737627737e-01 2.542926099719176047e-01 527 | 1.032366605879928789e+00 9.217782765198774264e-01 528 | 1.017955745882159979e+00 9.376684378955575383e-01 529 | 1.229385251293945380e+00 6.356633573684443705e-01 530 | 1.221038291602595915e+00 6.515531370810930811e-01 531 | 9.376684378955574273e-01 1.017955745882159979e+00 532 | 9.217782765198770933e-01 1.032366605879928789e+00 533 | 1.310523075472462384e+00 4.449553557989819330e-01 534 | 1.305020253284182363e+00 4.608450265741059759e-01 535 | 1.589424264092486119e-02 9.998736785468809174e-01 536 | 3.178446971419685019e-02 9.994947461017428259e-01 537 | 8.309747785539218778e-01 5.563100910528772092e-01 538 | 8.413958590903387602e-01 5.404192893537672626e-01 539 | 4.450319605062184602e-01 8.955146867181975612e-01 540 | 4.609225322319646656e-01 8.874403750567547711e-01 541 | 2.701473212952385516e-01 1.357378511984408620e+00 542 | 2.542577082680182454e-01 1.360444419219798640e+00 543 | 5.404192893537671516e-01 8.413958590903387602e-01 544 | 5.563100910528772092e-01 8.309747785539218778e-01 545 | 5.561972441537953449e-01 1.267320253762135307e+00 546 | 5.403075271484886200e-01 1.274175724186693559e+00 547 | 2.542926099719177158e-01 9.671273279737627737e-01 548 | 2.701829350831522758e-01 9.628090057689806525e-01 549 | 3.496583270945305411e-01 9.368772888129236476e-01 550 | 3.655487495886703964e-01 9.307921957527144352e-01 551 | 2.224737757134821747e-01 1.366001983570956257e+00 552 | 2.065841714914177785e-01 1.368495151649871344e+00 553 | 6.515531370810928591e-01 1.221038291602596138e+00 554 | 6.356633573684442595e-01 1.229385251293945380e+00 555 | 4.608450265741056984e-01 1.305020253284182363e+00 556 | 4.449553557989816555e-01 1.310523075472462384e+00 557 | 2.066116449375775266e-01 9.784230312989307121e-01 558 | 2.225019358104670386e-01 9.749322481898907711e-01 559 | 1.383908759429328450e+00 1.589168256594387929e-02 560 | 1.383635049747432344e+00 3.178126980502902349e-02 561 | 1.589315445631919177e-01 9.872896050008620472e-01 562 | 1.748218091994503676e-01 9.846000888829082864e-01 563 | 1.271272897874108632e-01 1.378148994917206771e+00 564 | 1.112376975387367600e-01 1.379522444415559379e+00 565 | 1.112520749631571854e-01 9.937922196396951069e-01 566 | 1.271423205578194604e-01 9.918844843645718834e-01 567 | 7.469145206396058390e-01 1.165150075680256636e+00 568 | 7.310246551356313072e-01 1.175184646591262760e+00 569 | 4.131699152377852347e-01 1.320888572568633013e+00 570 | 3.972802627318690050e-01 1.325754273175725695e+00 571 | 6.357303454908384832e-02 9.979771887564469202e-01 572 | 7.946326773967454793e-02 9.968377947691052787e-01 573 | 3.178126980502866267e-02 1.383635049747432344e+00 574 | 1.589168256594404929e-02 1.383908759429328450e+00 575 | 1.748004499051740157e-01 1.372916895778090618e+00 576 | 1.589108525744974409e-01 1.374846660880421956e+00 577 | 3.178211464633229899e-01 1.347013629797686463e+00 578 | 3.019315225793968716e-01 1.350664042489059025e+00 579 | 1.333273092352131872e+00 3.712665635494035721e-01 580 | 1.331860475558581447e+00 3.763026357134229283e-01 581 | 2.913156285657443889e-01 9.566269934270855702e-01 582 | 2.966222775278930524e-01 9.549948819099323138e-01 583 | 1.284964328928142496e+00 5.141232083676523512e-01 584 | 1.282908310702018717e+00 5.192323818211770359e-01 585 | 1.381853647389043038e+00 7.704866772110934015e-02 586 | 1.381313427860228149e+00 8.619288841328871797e-02 587 | 8.619288841328857920e-02 1.381313427860228149e+00 588 | 7.704866772110927076e-02 1.381853647389043038e+00 589 | 1.238731881485789943e+00 6.172514283423528036e-01 590 | 1.238129251203765158e+00 6.184593416818957579e-01 591 | 3.763026357134228173e-01 1.331860475558581447e+00 592 | 3.712665635494033500e-01 1.333273092352131872e+00 593 | 8.136666709772203410e-01 5.813317026800171039e-01 594 | 8.169734689242978964e-01 5.766752561657204623e-01 595 | 3.956490089234183105e-01 9.184017975471938655e-01 596 | 4.098691868858755916e-01 9.121443140432938801e-01 597 | 8.535789942890767978e-01 1.089430539551947685e+00 598 | 8.491438868367945370e-01 1.092890964116595143e+00 599 | 7.999310089027333870e-01 1.129409748937848734e+00 600 | 7.894603772432692290e-01 1.136753408951525879e+00 601 | 7.701716219628401694e-01 6.378367132135998041e-01 602 | 7.775714358418439609e-01 6.287946104753547871e-01 603 | 8.652027564434097151e-01 5.014221676818106932e-01 604 | 8.722312680543450325e-01 4.890936669272146764e-01 605 | 9.048420499209907097e-01 1.047242505198666462e+00 606 | 9.040168717677735666e-01 1.047954911033489145e+00 607 | 7.250732134363094827e-01 6.886717905919655935e-01 608 | 7.349936338122436963e-01 6.780740064738313144e-01 609 | 7.112859695792203008e-01 1.187235557705272004e+00 610 | 7.075649652292641534e-01 1.189456943306528514e+00 611 | 6.780740064738312034e-01 7.349936338122438073e-01 612 | 6.886717905919654825e-01 7.250732134363094827e-01 613 | 1.189456943306528514e+00 7.075649652292639313e-01 614 | 1.187235557705272004e+00 7.112859695792205228e-01 615 | 9.121443140432938801e-01 4.098691868858755361e-01 616 | 9.184017975471938655e-01 3.956490089234182550e-01 617 | 6.184593416818955358e-01 1.238129251203765158e+00 618 | 6.172514283423528036e-01 1.238731881485789721e+00 619 | 5.766752561657204623e-01 8.169734689242978964e-01 620 | 5.813317026800169929e-01 8.136666709772204520e-01 621 | 5.192323818211769249e-01 1.282908310702018717e+00 622 | 5.141232083676523512e-01 1.284964328928142496e+00 623 | 9.549948819099323138e-01 2.966222775278931079e-01 624 | 9.566269934270855702e-01 2.913156285657444444e-01 625 | 9.861492499410658974e-01 9.710641878066932353e-01 626 | 9.710641878066934574e-01 9.861492499410657864e-01 627 | 4.890936669272146209e-01 8.722312680543451435e-01 628 | 5.014221676818106932e-01 8.652027564434097151e-01 629 | 1.047954911033489367e+00 9.040168717677735666e-01 630 | 1.047242505198666462e+00 9.048420499209907097e-01 631 | 1.136753408951525879e+00 7.894603772432692290e-01 632 | 1.129409748937848734e+00 7.999310089027336090e-01 633 | 6.287946104753546761e-01 7.775714358418439609e-01 634 | 6.378367132135998041e-01 7.701716219628402804e-01 635 | 1.092890964116595143e+00 8.491438868367947590e-01 636 | 1.089430539551947463e+00 8.535789942890771309e-01 637 | 0 9 10 1 638 | 1 10 11 2 639 | 2 11 12 3 640 | 3 12 13 4 641 | 4 13 14 5 642 | 5 14 15 6 643 | 6 15 16 7 644 | 7 16 17 8 645 | 9 18 19 10 646 | 10 19 20 11 647 | 11 20 21 12 648 | 12 21 22 13 649 | 13 22 23 14 650 | 14 23 24 15 651 | 15 24 25 16 652 | 18 26 27 19 653 | 19 27 28 20 654 | 20 28 29 21 655 | 21 29 30 22 656 | 22 30 31 23 657 | 23 31 32 24 658 | 24 32 33 25 659 | 26 34 35 27 660 | 27 35 36 28 661 | 28 36 37 29 662 | 29 37 38 30 663 | 30 38 39 31 664 | 31 39 40 32 665 | 32 40 41 33 666 | 34 42 43 35 667 | 35 43 44 36 668 | 36 44 45 37 669 | 37 45 46 38 670 | 38 46 47 39 671 | 39 47 48 40 672 | 40 48 49 41 673 | 42 50 51 43 674 | 43 51 52 44 675 | 44 52 53 45 676 | 45 53 54 46 677 | 46 54 55 47 678 | 47 55 56 48 679 | 48 56 57 49 680 | 50 59 60 51 681 | 51 60 61 52 682 | 52 61 62 53 683 | 53 62 63 54 684 | 54 63 64 55 685 | 55 64 65 56 686 | 56 65 66 57 687 | 58 67 68 59 688 | 59 68 69 60 689 | 60 69 70 61 690 | 61 70 71 62 691 | 62 71 72 63 692 | 63 72 73 64 693 | 64 73 74 65 694 | 67 76 77 68 695 | 68 77 78 69 696 | 69 78 79 70 697 | 70 79 80 71 698 | 71 80 81 72 699 | 72 81 82 73 700 | 73 82 83 74 701 | 75 84 85 76 702 | 76 85 86 77 703 | 77 86 87 78 704 | 78 87 88 79 705 | 79 88 89 80 706 | 80 89 90 81 707 | 81 90 91 82 708 | 82 91 92 83 709 | 84 94 95 85 710 | 85 95 96 86 711 | 86 96 97 87 712 | 87 97 98 88 713 | 88 98 99 89 714 | 89 99 100 90 715 | 90 100 101 91 716 | 93 102 103 94 717 | 94 103 104 95 718 | 95 104 105 96 719 | 96 105 106 97 720 | 97 106 107 98 721 | 98 107 108 99 722 | 99 108 109 100 723 | 100 109 110 101 724 | 102 112 113 103 725 | 103 113 114 104 726 | 104 114 115 105 727 | 105 115 116 106 728 | 106 116 117 107 729 | 107 117 118 108 730 | 108 118 119 109 731 | 111 121 122 112 732 | 112 122 123 113 733 | 113 123 124 114 734 | 114 124 125 115 735 | 115 125 126 116 736 | 116 126 127 117 737 | 117 127 128 118 738 | 118 128 129 119 739 | 120 131 132 121 740 | 121 132 133 122 741 | 122 133 134 123 742 | 123 134 135 124 743 | 124 135 136 125 744 | 125 136 137 126 745 | 126 137 138 127 746 | 127 138 139 128 747 | 130 141 142 131 748 | 131 142 143 132 749 | 132 143 144 133 750 | 133 144 145 134 751 | 134 145 146 135 752 | 135 146 147 136 753 | 136 147 148 137 754 | 137 148 149 138 755 | 138 149 150 139 756 | 140 152 153 141 757 | 141 153 154 142 758 | 142 154 155 143 759 | 143 155 156 144 760 | 144 156 157 145 761 | 145 157 158 146 762 | 146 158 159 147 763 | 147 159 160 148 764 | 148 160 161 149 765 | 151 164 165 152 766 | 152 165 166 153 767 | 153 166 167 154 768 | 154 167 168 155 769 | 155 168 169 156 770 | 156 169 170 157 771 | 157 170 171 158 772 | 158 171 172 159 773 | 159 172 173 160 774 | 162 176 177 163 775 | 163 177 178 164 776 | 164 178 179 165 777 | 165 179 180 166 778 | 166 180 181 167 779 | 167 181 182 168 780 | 168 182 183 169 781 | 169 183 184 170 782 | 170 184 185 171 783 | 171 185 186 172 784 | 174 189 190 175 785 | 175 190 191 176 786 | 176 191 192 177 787 | 177 192 193 178 788 | 178 193 194 179 789 | 179 194 195 180 790 | 180 195 196 181 791 | 181 196 197 182 792 | 182 197 198 183 793 | 183 198 199 184 794 | 184 199 200 185 795 | 185 200 201 186 796 | 187 209 210 188 797 | 188 210 211 189 798 | 189 211 212 190 799 | 190 212 213 191 800 | 191 213 214 192 801 | 192 214 215 193 802 | 193 215 216 194 803 | 194 216 217 195 804 | 195 217 218 196 805 | 196 218 219 197 806 | 197 219 220 198 807 | 198 220 221 199 808 | 199 221 222 200 809 | 202 223 224 203 810 | 203 224 225 204 811 | 204 225 226 205 812 | 205 226 227 206 813 | 206 227 228 207 814 | 207 228 229 208 815 | 208 229 230 209 816 | 209 230 231 210 817 | 210 231 232 211 818 | 211 232 233 212 819 | 212 233 234 213 820 | 213 234 235 214 821 | 214 235 236 215 822 | 215 236 237 216 823 | 216 237 238 217 824 | 217 238 239 218 825 | 218 239 240 219 826 | 219 240 241 220 827 | 223 242 243 224 828 | 224 243 244 225 829 | 225 244 245 226 830 | 226 245 246 227 831 | 227 246 247 228 832 | 228 247 248 229 833 | 229 248 249 230 834 | 230 249 250 231 835 | 231 250 251 232 836 | 232 251 252 233 837 | 233 252 253 234 838 | 234 253 254 235 839 | 235 254 255 236 840 | 236 255 256 237 841 | 237 256 257 238 842 | 238 257 258 239 843 | 239 258 259 240 844 | 242 260 261 243 845 | 243 261 262 244 846 | 244 262 263 245 847 | 245 263 264 246 848 | 246 264 265 247 849 | 247 265 266 248 850 | 248 266 267 249 851 | 249 267 268 250 852 | 250 268 269 251 853 | 251 269 270 252 854 | 252 270 271 253 855 | 253 271 272 254 856 | 254 272 273 255 857 | 255 273 274 256 858 | 256 274 275 257 859 | 257 275 276 258 860 | 260 277 278 261 861 | 261 278 279 262 862 | 262 279 280 263 863 | 263 280 281 264 864 | 264 281 282 265 865 | 265 282 283 266 866 | 266 283 284 267 867 | 267 284 285 268 868 | 268 285 286 269 869 | 269 286 287 270 870 | 270 287 288 271 871 | 271 288 289 272 872 | 272 289 290 273 873 | 273 290 291 274 874 | 277 292 293 278 875 | 278 293 294 279 876 | 279 294 295 280 877 | 280 295 296 281 878 | 281 296 297 282 879 | 282 297 298 283 880 | 283 298 299 284 881 | 284 299 300 285 882 | 285 300 301 286 883 | 286 301 302 287 884 | 287 302 303 288 885 | 288 303 304 289 886 | 292 305 306 293 887 | 293 306 307 294 888 | 294 307 308 295 889 | 295 308 309 296 890 | 296 309 310 297 891 | 297 310 311 298 892 | 298 311 312 299 893 | 299 312 313 300 894 | 300 313 314 301 895 | 301 314 315 302 896 | 305 316 317 306 897 | 306 317 318 307 898 | 307 318 319 308 899 | 308 319 320 309 900 | 309 320 321 310 901 | 310 321 322 311 902 | 311 322 323 312 903 | 316 324 325 317 904 | 427 325 376 428 429 905 | 420 241 358 430 431 906 | 419 222 357 432 433 907 | 410 150 339 434 435 908 | 418 201 355 436 437 909 | 398 92 331 438 439 910 | 403 111 332 440 441 911 | 402 110 333 442 443 912 | 421 259 359 444 445 913 | 405 120 334 446 447 914 | 417 187 346 448 449 915 | 406 129 336 450 451 916 | 409 140 337 452 453 917 | 414 173 345 454 455 918 | 411 151 338 456 457 919 | 415 174 343 458 459 920 | 412 161 342 460 461 921 | 407 130 335 462 463 922 | 395 75 329 464 465 923 | 399 93 330 466 467 924 | 413 162 340 468 469 925 | 422 276 361 470 471 926 | 426 323 374 472 473 927 | 423 291 363 474 475 928 | 391 58 327 476 477 929 | 380 17 326 478 479 930 | 424 304 365 480 481 931 | 392 66 328 482 483 932 | 425 315 368 484 485 933 | 374 323 322 373 486 487 934 | 373 322 321 372 488 489 935 | 343 174 175 344 490 491 936 | 372 321 320 371 492 493 937 | 371 320 319 370 494 495 938 | 370 319 318 369 496 497 939 | 346 187 188 347 498 499 940 | 361 276 275 360 500 501 941 | 348 202 203 349 502 503 942 | 367 314 313 366 504 505 943 | 349 203 204 350 506 507 944 | 350 204 205 351 508 509 945 | 351 205 206 352 510 511 946 | 352 206 207 353 512 513 947 | 365 304 303 364 514 515 948 | 353 207 208 354 516 517 949 | 357 222 221 356 518 519 950 | 363 291 290 362 520 521 951 | 416 186 201 418 522 523 952 | 368 315 314 367 524 525 953 | 379 9 0 377 526 527 954 | 340 162 163 341 528 529 955 | 397 84 75 395 530 531 956 | 388 49 57 390 532 533 957 | 401 102 93 399 534 535 958 | 400 101 110 402 536 537 959 | 389 50 42 387 538 539 960 | 393 67 58 391 540 541 961 | 386 41 49 388 542 543 962 | 404 119 129 406 544 545 963 | 396 83 92 398 546 547 964 | 387 42 34 385 548 549 965 | 376 325 324 375 550 551 966 | 385 34 26 383 552 553 967 | 382 25 33 384 554 555 968 | 383 26 18 381 556 557 969 | 408 139 150 410 558 559 970 | 394 74 83 396 560 561 971 | 381 18 9 379 562 563 972 | 378 8 17 380 564 565 973 | 384 33 41 386 566 567 974 | 390 57 66 392 568 569 975 | 366 313 312 323 426 570 571 976 | 327 58 59 50 389 572 573 977 | 364 303 302 315 425 574 575 978 | 369 318 317 325 427 576 577 979 | 326 17 16 25 382 578 579 980 | 362 290 289 304 424 580 581 981 | 328 66 65 74 394 582 583 982 | 341 163 164 151 411 584 585 983 | 329 75 76 67 393 586 587 984 | 342 161 160 173 414 588 589 985 | 339 150 149 161 412 590 591 986 | 338 151 152 140 409 592 593 987 | 344 175 176 162 413 594 595 988 | 345 173 172 186 416 596 597 989 | 337 140 141 130 407 598 599 990 | 336 129 128 139 408 600 601 991 | 335 130 131 120 405 602 603 992 | 360 275 274 291 423 604 605 993 | 347 188 189 174 415 606 607 994 | 333 110 109 119 404 608 609 995 | 332 111 112 102 401 610 611 996 | 331 92 91 101 400 612 613 997 | 354 208 209 187 417 614 615 998 | 355 201 200 222 419 616 617 999 | 330 93 94 84 397 618 619 1000 | 356 221 220 241 420 620 621 1001 | 359 259 258 276 422 622 623 1002 | 334 120 121 111 403 624 625 1003 | 358 241 240 259 421 626 627 1004 | -------------------------------------------------------------------------------- /tests/test_PyGrid.py: -------------------------------------------------------------------------------- 1 | import pytest 2 | import numpy as np 3 | import pygrid2d as pg2d 4 | 5 | 6 | def load_vertices_elem(domain, Nx, Ny, q): 7 | f = open("./data/" + domain.name+"_"+str(Nx)+"_"+str(Ny)+"_q" + str(q)+".ply", 'r') 8 | line = f.readline() 9 | line = f.readline() 10 | line = f.readline() 11 | line = f.readline().split(" ") 12 | Nv = int(line[-1]) 13 | 14 | line = f.readline() 15 | line = f.readline() 16 | line = f.readline() 17 | line = f.readline() 18 | 19 | vertices = np.zeros( (Nv, 2) ) 20 | for v in range(Nv): 21 | line = f.readline().split(" ") 22 | line = [float(l.strip('\n')) for l in line] 23 | line = np.array(line) 24 | vertices[v,:] = line 25 | 26 | return vertices 27 | 28 | @pytest.mark.parametrize("Nx,Ny,q,bid", [ 29 | (10,10,1,0), 30 | (20,20,2,0), 31 | (30,30,3,0), 32 | (40,40,4,0), 33 | (50,50,5,0), 34 | (10,10,1,1), 35 | (20,20,2,1), 36 | (30,30,3,1), 37 | (40,40,4,1), 38 | (50,50,5,1), 39 | (10,10,1,2), 40 | (20,20,2,2), 41 | (30,30,3,2), 42 | (40,40,4,2) 43 | ]) 44 | def test_PyGrid(Nx, Ny, q, bid): 45 | vertices, elem, domain, mesh_data, face_data = pg2d.PyGrid2D(Nx, Ny, False, q, bid) 46 | vertices_loaded = load_vertices_elem(domain, Nx, Ny, q) 47 | 48 | err = np.linalg.norm(vertices - vertices_loaded) 49 | assert err < 1e-12 50 | --------------------------------------------------------------------------------