Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new optimization objectives and parametrizations #336

Merged
merged 139 commits into from
Jun 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
139 commits
Select commit Hold shift + click to select a range
f3f9c53
Add deleted files
arvigj Aug 18, 2023
16b11c0
Remove spline parametrizations
arvigj Aug 18, 2023
ca44dbd
Add spline parametrizations back in
arvigj Aug 18, 2023
24ba1cb
Revert "Add spline parametrizations back in"
arvigj Aug 18, 2023
00e8511
remove parametrizations
arvigj Aug 18, 2023
6fbfdbd
add bbw parametrizations back in
arvigj Aug 18, 2023
66f126d
Add spline parametrizations back in
arvigj Aug 18, 2023
5d54487
remove mooney rivlin c3
arvigj Aug 18, 2023
44e3124
add mr c3 param
arvigj Aug 18, 2023
3ce4996
remove spline parametrization
arvigj Aug 18, 2023
bccaa77
add cubic hermite spline
arvigj Aug 18, 2023
b98b749
Add 3 parameter mooney rivlin model
arvigj Aug 21, 2023
4165e75
Add ContactForceMatch and LayerThickness Forms
arvigj Aug 21, 2023
5047b5a
fix 3 parameter mr spec
arvigj Aug 22, 2023
ac5d850
Add pressure assembler
arvigj Sep 8, 2023
ccf49db
change default fdelta to zero
arvigj Sep 13, 2023
edd3365
Add implicit pressure formulation
arvigj Sep 14, 2023
8394ed9
Make problem nonlinear if pressure is enabled
arvigj Sep 20, 2023
9db1b76
Add smoothstep function
arvigj Sep 20, 2023
345073b
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-master
arvigj Sep 27, 2023
6c2817b
Check that pressure is only used for 3d
arvigj Sep 27, 2023
9a3892b
fix pressure derivative for p2
arvigj Sep 27, 2023
8416b8a
Add back deleted parametrizations
arvigj Sep 28, 2023
e305792
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-master
arvigj Nov 2, 2023
c976be2
fixes
arvigj Oct 11, 2023
53cc7c1
Add symbolic mooney rivlin material model
arvigj Oct 19, 2023
3f4bd41
fix default input spec
arvigj Oct 19, 2023
a180d26
add mooney rivlin fixed size matrix
arvigj Oct 19, 2023
9c07904
speed up mooney rivlin computations
arvigj Oct 19, 2023
553978b
Refactor mooney rivlin symbolic
arvigj Oct 20, 2023
422aa64
Mooney rivlin symbolic differentiable speedup
arvigj Oct 20, 2023
9f6040e
speed up mooney rivlin symbolic
arvigj Oct 20, 2023
4b1a425
fix pressure shape derivative
arvigj Oct 24, 2023
4f5ccd8
Add displacement target form
arvigj Nov 1, 2023
4b09c0a
Fix LayerThickness Form
arvigj Nov 2, 2023
80326c0
fix merge issues
arvigj Nov 2, 2023
08cce63
fix unit tests
arvigj Nov 2, 2023
ce7fdfc
update polyfem data version
arvigj Nov 3, 2023
33d855d
fix layer thickness form
arvigj Nov 3, 2023
15278a7
update polyfem data
arvigj Nov 6, 2023
ec4177b
Remove autodiff rotation matrix
arvigj Nov 6, 2023
2253f86
add surface selection to boundary smoothing
arvigj Nov 7, 2023
b9c3e85
save file in the case of opt fail in line search
arvigj Nov 10, 2023
d9ef499
Add SLIM into the optimization pipeline
arvigj Nov 14, 2023
de65503
fix spec files
arvigj Nov 14, 2023
79d8bbb
fix spec files
arvigj Nov 14, 2023
22c8f66
fix optimization specific options on nonlinear solver
arvigj Nov 14, 2023
0a8134d
fix Slim smoothing
arvigj Nov 15, 2023
01d708c
Add checks for AMIPS
arvigj Nov 20, 2023
09c575e
fix contact force match form
arvigj Nov 29, 2023
5239773
greene poylfem compilation file
Nov 30, 2023
8da4704
remove file
Nov 30, 2023
74a517c
fix amips form
arvigj Dec 1, 2023
51e6d74
Merge branch 'working_actuators' of github.com:geometryprocessing/adj…
arvigj Dec 1, 2023
addc722
additional fixes to amips form
arvigj Dec 1, 2023
ba0b1af
move spec files
arvigj Dec 1, 2023
3a9e3c9
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-master
arvigj Dec 1, 2023
d68799d
remove amips optimization form
arvigj Dec 1, 2023
f89414c
fixes
arvigj Dec 4, 2023
bc91f99
fix more tests
arvigj Dec 4, 2023
edc64f6
Fix bbw to rotate around control pt
arvigj Dec 5, 2023
135c87c
fix save to file
arvigj Dec 5, 2023
1d87288
Add symbolic diff utils
arvigj Dec 5, 2023
46b5f67
set slim to default
arvigj Dec 6, 2023
12e9b07
fix spec
arvigj Dec 7, 2023
91e3205
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-master
arvigj Dec 7, 2023
c293be9
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-master
arvigj Dec 8, 2023
b1467e0
return on 2d slim
arvigj Dec 8, 2023
2f2195f
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-master
arvigj Dec 13, 2023
1ab73cc
Merge branch 'polyfem-master' into working_actuators_new
arvigj Dec 13, 2023
310799b
Fixes to slim for optimization
arvigj Dec 14, 2023
a39f158
Merge branch 'update-ipc' of github.com:polyfem/polyfem into working_…
arvigj Dec 15, 2023
1aa4a62
change layer_thickness objective to make it smoother
arvigj Dec 16, 2023
08ab2bf
Merge branch 'update-ipc' of github.com:polyfem/polyfem into working_…
arvigj Dec 18, 2023
52c00b5
Merge branch 'update-ipc' of github.com:polyfem/polyfem into working_…
arvigj Dec 18, 2023
1294d6a
Merge branch 'update-ipc' of github.com:polyfem/polyfem into working_…
arvigj Dec 18, 2023
82433b9
Merge branch 'main' of github.com:polyfem/polyfem into working_actuat…
arvigj Dec 18, 2023
aa2e160
Fix Contact Force objectives
arvigj Dec 20, 2023
2a43671
optimization fixes
arvigj Dec 22, 2023
16514ae
add pressure form unit tests
arvigj Dec 27, 2023
ed5c92d
Merge branch 'main' of github.com:polyfem/polyfem into working_actuat…
arvigj Dec 28, 2023
5289b20
fix optimization
arvigj Dec 29, 2023
bf1a6cd
Merge branch 'main' of github.com:polyfem/polyfem into working_actuat…
arvigj Jan 2, 2024
34f2e3b
Merge branch 'main' of github.com:polyfem/polyfem into working_actuat…
arvigj Jan 2, 2024
0940023
add in log option for layer thickness
arvigj Jan 30, 2024
29777af
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-master
arvigj Jan 31, 2024
bf4c8d9
pressure cavity implementation
arvigj Feb 6, 2024
5f8d84f
fix pressure form name
arvigj Feb 6, 2024
ec8898a
fix pressure potential for 2d
arvigj Feb 7, 2024
e3a822f
pressure control
arvigj Mar 14, 2024
56409d9
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-main
arvigj Mar 18, 2024
a35c2ab
add dirichlet optimization
arvigj May 17, 2024
9973a71
fix dirichlet optimization
arvigj May 17, 2024
5f32ffd
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-main
arvigj May 20, 2024
bb09688
add tests
arvigj May 21, 2024
217a13b
change collision mesh in objective
arvigj May 21, 2024
c327825
add test for ProxyContactForceNorm
arvigj May 23, 2024
35c7dd7
Merge branch 'polyfem-main' into working_actuators_new
arvigj May 23, 2024
9eeaa16
fixes
arvigj May 28, 2024
a7b5ae8
Merge branch 'main' of github.com:polyfem/polyfem into polyfem-main
arvigj May 28, 2024
47f861a
fixes
arvigj May 28, 2024
8028074
More fixes
arvigj May 28, 2024
c1f0bac
fix unit tests
arvigj May 29, 2024
1c8d280
Merge branch 'main' into pr_pressure_optimization
arvigj May 29, 2024
203bd07
fix deprecated igl function
arvigj May 29, 2024
3f79f47
fix copy by value
arvigj May 29, 2024
e92123b
fix differentiable
arvigj May 29, 2024
bf1b289
fix more deprecated igl functions
arvigj May 29, 2024
30eb9d7
remove SumObjective default log
arvigj May 29, 2024
c4cfa15
fix unit tests
arvigj May 29, 2024
aec17ad
run slim only for shape parameters
arvigj May 30, 2024
95224e8
refactoring
arvigj May 30, 2024
3ff45c2
refactor
arvigj May 30, 2024
268e792
Merge branch 'main' into pr_pressure_optimization
arvigj May 30, 2024
23e2f3b
clean smoothing form
Huangzizhou May 30, 2024
f4fca09
enable slim for 2D, clean code
Huangzizhou May 30, 2024
949e120
fixes
arvigj May 30, 2024
edc9d97
update tests and json
arvigj May 30, 2024
030500c
fix unit test tolerances
arvigj May 30, 2024
1fa2c8f
Merge branch 'main' into pr_pressure_optimization
arvigj May 31, 2024
7ed7864
Merge pull request #338 from polyfem/pr_pr_pressure_optimization
Huangzizhou Jun 2, 2024
96f639b
fix compile error
Huangzizhou Jun 3, 2024
7185204
Merge branch 'main' into pr_pressure_optimization
Huangzizhou Jun 4, 2024
6590a98
remove comments
arvigj Jun 5, 2024
dec4471
Merge branch 'pr_pressure_optimization' of https://github.com/polyfem…
arvigj Jun 5, 2024
af0bfbb
fix spec to pass unit tests
arvigj Jun 5, 2024
40d6a72
fix spec
arvigj Jun 5, 2024
6b8bdad
fix json spec
Huangzizhou Jun 5, 2024
541b90f
Merge branch 'main' into pr_pressure_optimization
arvigj Jun 5, 2024
ae08ae9
Merge branch 'main' into pr_pressure_optimization
arvigj Jun 6, 2024
9344480
test mooney rivlin
arvigj Jun 6, 2024
961b8f5
Merge branch 'pr_pressure_optimization' of https://github.com/polyfem…
arvigj Jun 6, 2024
4703e50
retrigger checks
arvigj Jun 6, 2024
ca1a2b8
remove include eigen
arvigj Jun 6, 2024
7f2c738
undo previous commit
arvigj Jun 6, 2024
b042782
remove finite diff include
arvigj Jun 6, 2024
49e9bc3
fix mac unit tests
arvigj Jun 6, 2024
a1cb6b3
make unit test faster
arvigj Jun 10, 2024
b1be302
Merge branch 'main' into pr_pressure_optimization
teseoch Jun 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,10 @@ target_link_libraries(polyfem PUBLIC simple_bvh::simple_bvh)
include(mshio)
target_link_libraries(polyfem PUBLIC mshio)

# Nanospline
include(nanospline)
target_link_libraries(polyfem PUBLIC nanospline)

# Geogram
include(geogram)
target_link_libraries(polyfem PUBLIC geogram)
Expand Down
13 changes: 13 additions & 0 deletions cmake/recipes/nanospline.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Nanospline (https://github.com/qnzhou/nanospline)
# License: Mozilla Public License 2.0

if(TARGET nanospline)
return()
endif()

message(STATUS "Third-party: creating target 'nanospline'")

option(NANOSPLINE_BUILD_TESTS "Build Tests" OFF)

include(CPM)
CPMAddPackage("gh:qnzhou/nanospline#de2e4d4daceb5e5058ea3092ddf1c6e5ba447c38")
2 changes: 1 addition & 1 deletion cmake/recipes/polyfem_data.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ else()
PREFIX ${FETCHCONTENT_BASE_DIR}/polyfem-test-data
SOURCE_DIR ${POLYFEM_DATA_DIR}
GIT_REPOSITORY https://github.com/polyfem/polyfem-data
GIT_TAG fbfcf330e3a5725414917c9fa33e5a2476a754a7
GIT_TAG 0a722d760163b1dc9178b306e631102bbc9ad845
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
Expand Down
39 changes: 33 additions & 6 deletions json-specs/input-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -2056,13 +2056,13 @@
"pointer": "/materials/*/c3",
"type": "include",
"spec_file": "value-no.json",
"doc": "Third Parameter for 3 parameter Mooney-Rivlin"
"doc": "Third Parameter for Mooney-Rivlin"
},
{
"pointer": "/materials/*/d1",
"type": "include",
"spec_file": "value-no.json",
"doc": "MooneyRivlin third parameterFourth Parameter for 3 parameter Mooney-Rivlin"
"doc": "Fourth Parameter for Mooney-Rivlin"
},
{
"pointer": "/materials/*/alphas",
Expand Down Expand Up @@ -2271,6 +2271,17 @@
"type": "string",
"doc": "Dirichlet boundary condition loaded from a file, <node_id> <bc values>, 1 for scalar, 2/3 for tensor depending on dimension."
},
{
"pointer": "/boundary_conditions/dirichlet_boundary/*/value/*",
"type": "list",
"doc": "Dirichlet boundary condition specified per timestep."
},
{
"pointer": "/boundary_conditions/dirichlet_boundary/*/value/*/*",
"type": "include",
"spec_file": "value0.json",
"doc": "Dirichlet boundary condition specified per timestep."
},
{
"pointer": "/boundary_conditions/dirichlet_boundary/*/dimension",
"type": "list",
Expand Down Expand Up @@ -2370,7 +2381,7 @@
"value"
],
"optional": [
"interpolation"
"time_reference"
],
"doc": "pressure BC entry"
},
Expand All @@ -2388,10 +2399,26 @@
"doc": "Values of pressure boundary condition as a function of $x,y,z,t$"
},
{
"pointer": "/boundary_conditions/pressure_boundary/*/interpolation",
"pointer": "/boundary_conditions/pressure_boundary/*/value",
"type": "list",
"doc": "Values of pressure boundary condition specified per timestep"
},
{
"pointer": "/boundary_conditions/pressure_boundary/*/value/*",
"type": "include",
"spec_file": "interpolation.json",
"doc": "interpolation of boundary condition"
"spec_file": "value0.json",
"doc": "Values of pressure boundary condition specified per timestep"
},
{
"pointer": "/boundary_conditions/pressure_boundary/*/time_reference",
"default": [],
"type": "list",
"doc": "List of times when the pressure boundary condition is specified"
},
{
"pointer": "/boundary_conditions/pressure_boundary/*/time_reference/*",
"type": "float",
"doc": "Values of pressure boundary condition for timestep"
},
{
"pointer": "/boundary_conditions/pressure_cavity",
Expand Down
133 changes: 125 additions & 8 deletions json-specs/objective-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
"divide",
"plus-const",
"target",
"sdf-target",
"mesh-target",
"center-target",
"function-target",
"displacement-target",
"node-target",
"position",
"acceleration",
Expand All @@ -19,6 +22,8 @@
"stress",
"stress_norm",
"elastic_energy",
"quadratic_contact_force_norm",
"log_contact_force_norm",
"max_stress",
"compliance",
"weighted_solution",
Expand All @@ -31,6 +36,7 @@
"volume",
"soft_constraint",
"layer_thickness",
"layer_thickness_log",
"AMIPS",
"parametrized_product"
],
Expand Down Expand Up @@ -98,6 +104,44 @@
],
"doc": "TODO"
},
{
"pointer": "/",
"type": "object",
"type_name": "sdf-target",
"required": [
"state",
"type",
"delta"
],
"optional": [
"control_points",
"control_points_grid",
"knots",
"knots_u",
"knots_v",
"weight",
"print_energy",
"surface_selection"
],
"doc": "TODO"
},
{
"pointer": "/",
"type": "object",
"type_name": "mesh-target",
"required": [
"state",
"type",
"delta",
"mesh_path"
],
"optional": [
"weight",
"print_energy",
"surface_selection"
],
"doc": "TODO"
},
{
"pointer": "/",
"type": "object",
Expand Down Expand Up @@ -148,6 +192,23 @@
],
"doc": "TODO"
},
{
"pointer": "/",
"type": "object",
"type_name": "displacement-target",
"required": [
"state",
"type"
],
"optional": [
"weight",
"print_energy",
"target_displacement",
"active_dimension",
"surface_selection"
],
"doc": "TODO"
},
{
"pointer": "/",
"type": "object",
Expand Down Expand Up @@ -571,6 +632,38 @@
],
"doc": "Lp Norm of elastic stress over the volume selection"
},
{
arvigj marked this conversation as resolved.
Show resolved Hide resolved
"pointer": "/",
"type": "object",
"type_name": "quadratic_contact_force_norm",
"required": [
"state",
"type"
],
"optional": [
"surface_selection",
"dhat",
"weight",
"print_energy"
],
"doc": "Lp Norm of elastic stress over the volume selection"
},
{
"pointer": "/",
"type": "object",
"type_name": "log_contact_force_norm",
"required": [
"state",
"type"
],
"optional": [
"surface_selection",
"dhat",
"weight",
"print_energy"
],
"doc": "Lp Norm of elastic stress over the volume selection"
},
{
"pointer": "/force_matching_function",
"type": "list"
Expand Down Expand Up @@ -730,9 +823,29 @@
"pointer": "/",
"type": "object",
"type_name": "layer_thickness",
"required": [
"type",
"state"
],
"optional": [
"adjacent_boundary_id",
"dmin",
"boundary_ids",
"dhat",
"weight",
"print_energy"
],
"doc": "TODO"
},
{
"pointer": "/",
"type": "object",
"type_name": "layer_thickness_log",
"required": [
"type",
"state",
"dmin"
],
"optional": [
"boundary_ids",
"dhat",
"weight",
"print_energy"
Expand All @@ -746,15 +859,19 @@
"doc": "The support size of barrier function"
},
{
"pointer": "/adjacent_boundary_id",
"type": "int",
"default": -1,
"pointer": "/dmin",
"type": "float",
"doc": "The min distance of barrier function"
},
{
"pointer": "/boundary_ids",
"type": "list",
"default": [],
"doc": "TODO"
},
{
"pointer": "/dmin",
"type": "float",
"default": 0.0,
"pointer": "/boundary_ids/*",
"type": "int",
"doc": "TODO"
},
{
Expand Down
Loading
Loading