Triangular mesh

class freshkiss3d.TriangularMesh

Freshkiss3D two-dimensional triangular mesh.

Parameters
  • TG (geomalgo.Triangulation2D) – Triangulation containing: Vertices x-coordinate, Vertices y-coordinate and Array of shape (triangle_numbers, 3), giving the 3 vertices of each triangle.

  • boundary_labels (array, int32, 2D) – Array of shape (boundary_edge_numbers, 3), giving for each boundary edges: - its first vertice, - its second vertice, - its label, to apply boundary conditions.

NV

Number of vertices

Type

int

NT

Number of triangles

Type

int

NI

Number of intern edges

Type

int

NB

Number of boundary edges

Type

int

triangulation

Triangulation containing: Vertices x-coordinate, Vertices y-coordinate and Array of shape (triangle_numbers, 3), giving the 3 vertices of each triangle.

Type

geomalgo.Triangulation2D

vertices

Vertices collection.

Type

freshkiss3d.mesh.Vertices

triangles

Triangles collection.

Type

freshkiss3d.mesh.Triangles

intern_edges
Type

geomalgo.InternEdges

boundary_edges
Type

geomalgo.BoundaryEdges

static from_msh_file()

Build a fk.TriangularMesh from a .msh file.

Parameters

filepath (char) – link to .msh file

refine_by_splitting()

Refine mesh by splitting each triangle in 4

Examples using freshkiss3d.TriangularMesh

Riemann problem 2d

Riemann problem 2d

Riemann problem 2d
Water drop

Water drop

Water drop
Dam break

Dam break

Dam break
Canal

Canal

Canal
Thacker 2d

Thacker 2d

Thacker 2d
Height source

Height source

Height source
Bump

Bump

Bump
Thacker

Thacker

Thacker
Tracer source

Tracer source

Tracer source
Vertical flowrate

Vertical flowrate

Vertical flowrate
River

River

River
Wind effect

Wind effect

Wind effect
Stationnary vortex

Stationnary vortex

Stationnary vortex
Topography source

Topography source

Topography source
Generate meshes from .geo files with Gmsh

Generate meshes from .geo files with Gmsh

Generate meshes from .geo files with Gmsh
Construct a Mesh from a .msh file

Construct a Mesh from a .msh file

Construct a Mesh from a .msh file
Refine a TriangularMesh by splitting

Refine a TriangularMesh by splitting

Refine a TriangularMesh by splitting
Bump mesh convergence

Bump mesh convergence

Bump mesh convergence
Thacker2d mesh convergence

Thacker2d mesh convergence

Thacker2d mesh convergence
Thacker3d mesh convergence

Thacker3d mesh convergence

Thacker3d mesh convergence
Restart

Restart

Restart
Analytical solutions

Analytical solutions

Analytical solutions
Batch

Batch

Batch
Post-processing with Matplotlib

Post-processing with Matplotlib

Post-processing with Matplotlib
Initialization

Initialization

Initialization

Examples using freshkiss3d.TriangularMesh.from_msh_file

Riemann problem 2d

Riemann problem 2d

Riemann problem 2d
Water drop

Water drop

Water drop
Dam break

Dam break

Dam break
Canal

Canal

Canal
Height source

Height source

Height source
Bump

Bump

Bump
Thacker

Thacker

Thacker
Tracer source

Tracer source

Tracer source
Vertical flowrate

Vertical flowrate

Vertical flowrate
River

River

River
Stationnary vortex

Stationnary vortex

Stationnary vortex
Generate meshes from .geo files with Gmsh

Generate meshes from .geo files with Gmsh

Generate meshes from .geo files with Gmsh
Construct a Mesh from a .msh file

Construct a Mesh from a .msh file

Construct a Mesh from a .msh file
Refine a TriangularMesh by splitting

Refine a TriangularMesh by splitting

Refine a TriangularMesh by splitting
Restart

Restart

Restart
Batch

Batch

Batch
Post-processing with Matplotlib

Post-processing with Matplotlib

Post-processing with Matplotlib
Initialization

Initialization

Initialization
freshkiss3d.read_msh()

Read mesh file. Compatible format: .msh/.msh (GMSH)/.mesh (MEDIT)

Parameters

file_in (string) – Mesh file name (with format extension)

Examples using freshkiss3d.read_msh

Thacker 2d

Thacker 2d

Thacker 2d
Wind effect

Wind effect

Wind effect
Topography source

Topography source

Topography source
Convert mesh file to .msh format

Convert mesh file to .msh format

Convert mesh file to .msh format
Construct a Mesh from a .msh file

Construct a Mesh from a .msh file

Construct a Mesh from a .msh file
Bump mesh convergence

Bump mesh convergence

Bump mesh convergence
Thacker2d mesh convergence

Thacker2d mesh convergence

Thacker2d mesh convergence
Thacker3d mesh convergence

Thacker3d mesh convergence

Thacker3d mesh convergence
Analytical solutions

Analytical solutions

Analytical solutions