Skip to content

Geometric constraints in Julia package#5

Open
lxvm wants to merge 49 commits intomainfrom
constraints_jl
Open

Geometric constraints in Julia package#5
lxvm wants to merge 49 commits intomainfrom
constraints_jl

Conversation

@lxvm
Copy link
Copy Markdown
Collaborator

@lxvm lxvm commented Mar 31, 2026

This is an initial implementation of the length scale constraints in the Julia package. There is a high-level api provided by SSP.constraint_solid and SSP.constraint_void that calculates the constraints, with some limitations, and has ChainRulesCore.jl rrules. I also have a low-level api in SSP.Constrain that provides a LengthConstraintProblem with more flexibility regarding the points at which the constraints are imposed and manual adjoints.

An example of the high-level api is in SSP/examples/julia/ssp_constrained.jl and an example of the low-level api is in SSP/examples/julia/constraint.jl

I have tested these on real problems and they are working well.

I still need to write documentation for the new apis. Update: done

lxvm and others added 30 commits March 12, 2026 22:12
@stevengj
Copy link
Copy Markdown
Contributor

stevengj commented Apr 2, 2026

Could @Riarrieta take a look?

@Riarrieta
Copy link
Copy Markdown
Collaborator

Thanks @lxvm.

I checked the geometric constraint formulas and units—they seem correct.
I added the following:

  • added a constraint duality test cheking that 'constraint_solid(x) == constraint_void(1-x)'. (8c49e79)
  • the geometric constraint decay rate is no longer a magic number (c = 64), now it can be specified to the GeometricConstraint struct. (cc234d2)
  • in the pythonic api, now 'constraint_solid' and 'constraint_void' can receive 'conic_radius' and 'constraint_threshold'. (cc234d2)
  • added examples/julia/ssp_constrained_paper.jl, which replicates Fig. 1 of [1]. (45e6413)

[1] R. Arrieta, G. Romano, and S. G. Johnson, “Hyperparameter-free minimum-lengthscale constraints for topology optimization,” arXiv.org e-Print archive, 2507.16108, July 2025.

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.

3 participants