Wildmeshing Toolkit
Loading...
Searching...
No Matches
Functions | Variables
conftest Namespace Reference

Functions

 _write_groups_msh (path, dim, coords, groups)
 
 _tet_grid (nx, ny, nz)
 
 make_two_boxes_3d (path)
 
 make_jagged_2d (path, nx=16, ny=8)
 
 boxes3d (tmp_path)
 
 jagged2d (tmp_path)
 

Variables

str cand = up / "build" / "bin"
 
 POLYFEM_BIN = os.environ.get("POLYFEM_BIN")
 
 needs_polyfem
 

Detailed Description

Fixtures: synthetic multi-tag meshes and PolyFEM discovery.

Meshes are built directly with gmsh (Freudenthal/Kuhn tet grids, conforming
across cells) so tests are deterministic and need no external data.

Function Documentation

◆ _tet_grid()

conftest._tet_grid (   nx,
  ny,
  nz 
)
protected
Freudenthal 6-tet-per-cube grid. Returns (coords, cube_tets) where
cube_tets[(i,j,k)] = list of 4-tuples of 1-based node tags. Conforming
across cubes (consistent main diagonal).

◆ _write_groups_msh()

conftest._write_groups_msh (   path,
  dim,
  coords,
  groups 
)
protected
Write a physical-groups .msh: coords (n,3) 1-based-node-tag order,
groups = {name: [prim vertex tuples]} written in insertion order
(first group owns the node block, matching wmtk's convention).

◆ make_jagged_2d()

conftest.make_jagged_2d (   path,
  nx = 16,
  ny = 8 
)
2D triangle grid with a staircase tag_0/ambient interface: tag_0 =
squares with i < 4 + (j % 2). The interface zigzags between x=4 and
x=5 — high turning angle, ideal smoothing target.

◆ make_two_boxes_3d()

conftest.make_two_boxes_3d (   path)
7x4x4 unit-cube tet grid: tag_0 = box x in [1,2], tag_1 = box x in
[3,4] (both y,z in [1,3]), ambient elsewhere. The bodies are fully
interior, separated by a 1-unit ambient gap along x.

Variable Documentation

◆ needs_polyfem

conftest.needs_polyfem
Initial value:
1= pytest.mark.skipif(
2 POLYFEM_BIN is None,
3 reason="export POLYFEM_BIN=/path/to/PolyFEM_bin to run the polyfem tests")