Skip to content

adding flexible fields to tweak and optimize cells size #11

Open
oscarfasanchez wants to merge 29 commits intorhugman:developfrom
oscarfasanchez:flex_fields2
Open

adding flexible fields to tweak and optimize cells size #11
oscarfasanchez wants to merge 29 commits intorhugman:developfrom
oscarfasanchez:flex_fields2

Conversation

@oscarfasanchez
Copy link
Copy Markdown

This pull request introduces a new flexible mesh field system for controlling mesh refinement and growth, adds a comprehensive example of mesh field usage, and improves test coverage for geometry simplification and mesh field integration. It also makes several minor fixes and clarifications to documentation and test parameters.

Mesh field system and API improvements:

  • Introduced a new mesh field framework with a base class MeshField and several built-in field types (ThresholdField, ExponentialField, AutoLinearField, AutoExponentialField), enabling advanced and customizable mesh size control. (src/vorflow/fields.py)
  • Updated the package API to expose the new field classes directly in vorflow.__init__.py for easier access. (src/vorflow/__init__.py)

Examples and documentation:

  • Added a new example script field_capabilities_example.py that demonstrates all mesh field types, including implicit/explicit thresholds, exponential growth, field-only features, and line/point refinement. (examples/field_capabilities_example.py)
  • Clarified parameter documentation in the comprehensive notebook example (comprehensive_demo.ipynb), fixing the description and usage of the mesh growth parameter (dist_max instead of dist_max_out).

Testing improvements:

  • Added tests for geometry simplification (polygons, lines, points), point deduplication, and line densification options in test_conceptual_mesh.py, ensuring robust handling of noisy or redundant input data.
  • Added and updated integration tests to cover the new mesh field system, including tests for field-only lines and polygons, and updated test parameters to use dist_max for consistent mesh growth control. (test_gmsh_integration_simple_square, test_gmsh_integration_with_internal_line, and others in test_integration_gmsh.py) [1] [2] [3] [4] [5]

Other improvements:

  • Updated notebook metadata to reflect the new version of the Python kernel used. (comprehensive_demo.ipynb)

oscarfasanchez and others added 29 commits December 8, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant