Skip to content

2D Format

Michael Tao edited this page Mar 25, 2020 · 2 revisions

The binary boundary_curve_to_cutmesh2 takes as input a file of the following format:

Input:

Vertices
vertex_idx0, vertex_x0, vertex_y0
vertex_idx1, vertex_x1, vertex_y1
...

Edges
edge_idx0, vertex_idx0_0, vertex_idx1_0 boundary_condition_index0_0 boundary_condition_index1_0
edge_idx1, vertex_idx0_1, vertex_idx1_1 boundary_condition_index0_1 boundary_condition_index1_1
...

with the flags

  • --Nx grid cells in the x axis
  • --Ny grid cells in the y axis
  • --mx min vertex coordinate in the x axis
  • --my min vertex coordinate in the y axis
  • --Mx min vertex coordinate in the x axis
  • --My min vertex coordinate in the y axis . and outputs a 2D cut-mesh of the form
Vertices
vertex_idx0, vertex_x0, vertex_y0
vertex_idx1, vertex_x1, vertex_y1
...

Edges
edge_idx0, vertex_idx0_0, vertex_idx1_0 boundary_condition_index0_0 boundary_condition_index1_0
edge_idx1, vertex_idx0_1, vertex_idx1_1 boundary_condition_index0_1 boundary_condition_index1_1
...

Elements
element_idx0, vertex_count0, vertex_idx0_0, ..., vertex_idxN_0 region_id0
element_idx1, vertex_count1, vertex_idx0_1, ..., vertex_idxM_1 region_id1
...

where vertex_countI is the number of vertices in the element. Element indices may be repeated in the case of non-simple cut-faces to represent multiple boundary curves at once.

Clone this wiki locally