Skip to content

Find optimal mesh resolution regarding wavelength - #41

Merged
thomaslepoix merged 21 commits into
mainfrom
dev/optimal-resolution
Oct 21, 2026
Merged

thomaslepoix merged 21 commits into
mainfrom
dev/optimal-resolution

Conversation

@thomaslepoix

@thomaslepoix thomaslepoix commented Jan 31, 2026 •

Copy link
Copy Markdown
Member

Fixes #14

This implementation introduces a crucial feature: wavelength-related resolution. It also clarifies the semantic of "resolution". And also, adds a by axis, by Property rule system for some global settings (lmin, Smoothness, Minimal resolution).

The precedence of those rules is as follows, by decreasing priority order:

axis material value
axis material by name ...
* material by name ...
axis material by type ...
* material by type ...
axis * ...
* * ...

Note: wavelength-related resolution is implemented here only regarding vacuum, not actual properties.


Trying instructions:

  • Run the mesher.
nix develop
	cmake -S . -B build
	cmake --build build #-j

	build/src/openemsh test/lpf2.csx \
		--per-mat-type-lmin=*,*,1 \
		--per-mat-type-res-min=*,*,10 \
		-Gv
  • Click [⊹] or press [F] to fit the view.
  • Press [SPACE] or [E] for global settings edition.
  • Observe the name of some settings (Maximal feature resolution, Minimal resolution, Diagonal minimal resolution) and observe their tooltips by hovering those with the mouse pointer, observe especially the accuracy helpers.
  • Double-click on the ... value of lmin and add a new rule : { X, CONDUCTOR, 4 }.
  • Validate lmin edition, then edit Minimal resolution and add a new rule : { *, DIELECTRIC, 130 }.
  • Validate global edition and observe the differences in the mesh.
  • Edit globally again [E], edit Minimal resolution and add another new rule : { Y, By name... -> Sub1.substrate, 20 }, validate.
  • Observe the mesh again, you can go back [CTRL]+[Z] and forth [CTRL]+[SHIFT]+[Z] in history or hide [.] and show [X] the mesh to better understand the differences.

@thomaslepoix thomaslepoix added this to the 0.0.1 milestone Jan 31, 2026
@thomaslepoix
thomaslepoix force-pushed the dev/optimal-resolution branch 2 times, most recently from c36aa46 to 036c14c Compare October 8, 2026 12:54
@thomaslepoix
thomaslepoix force-pushed the dev/optimal-resolution branch 4 times, most recently from 209c191 to a49d8e2 Compare October 11, 2026 18:08
@thomaslepoix
thomaslepoix force-pushed the dev/optimal-resolution branch from a49d8e2 to de0703c Compare October 13, 2026 03:14
@thomaslepoix
thomaslepoix force-pushed the dev/optimal-resolution branch from de0703c to e929e30 Compare October 17, 2026 00:06
@thomaslepoix
thomaslepoix marked this pull request as ready for review October 17, 2026 00:55
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
11.9% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@thomaslepoix
thomaslepoix merged commit bbed903 into main Oct 21, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Find optimal mesh resolution regarding wavelength

1 participant