Lattice#
- class gyptis.Lattice(vectors, **kwargs)[source]#
Unit cell for periodic problems.
- Parameters:
dim (int) – Geometric dimension (either 2 or 3, the default is 3).
vectors (tuple) – In 2D, a tuple of lengh 2 with the \((x,y)\) coordinates of 2 basis vectors. In 3D, a tuple of lengh 3 with the \((x,y,z)\) coordinates of 3 basis vectors.
**kwargs (dictionary) – Additional parameters. See the parent class
Geometry
.
- add_physical(idf, name, dim=None)#
Add a physical domain.
- add_polygon(vertices, surface=True, mesh_size=0.0, **kwargs)#
Adds a polygon.
- add_spline(points, mesh_size=0.0, surface=True, **kwargs)#
Adds a spline.
- build(interactive=False, generate_mesh=True, write_mesh=True, read_info=True, read_mesh=True, finalize=True, check_subdomains=True)#
Build the geometry.
- Parameters:
interactive (bool) – Open
gmsh
GUI? (the default is False).generate_mesh (type) – Mesh with
gmsh
? (the default is True).write_mesh (type) – Write mesh to disk? (the default is True).
read_info (type) – Read subdomain markers information? (the default is True).
read_mesh (type) – Read mesh information? (the default is True).
finalize (type) – Finalize
gmsh
API? (the default is True).check_subdomains (type) – Sanity check of subdomains names? (the default is True).
- Returns:
A dictionary containing the mesh and markers.
- Return type: