-
Notifications
You must be signed in to change notification settings - Fork 13
Bring python binding back to work #16
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
Open
Huangzizhou
wants to merge
34
commits into
polyfem:main
Choose a base branch
from
Huangzizhou:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 26 commits
Commits
Show all changes
34 commits
Select commit
Hold shift + click to select a range
0d8cb2c
update polyfem
Huangzizhou fe02e7e
fix set_log_level
Huangzizhou 96420e6
separate classes into separate folders
Huangzizhou 5d713ba
polyfem_command
Huangzizhou a5de325
command line tool
Huangzizhou d317a58
shape derivative python interface
Huangzizhou 94b57c5
fix memory issue, support multiple states
Huangzizhou 6433fec
python binding for adjoint form
Huangzizhou 1c0de74
Update README.md
Huangzizhou 6bb996e
Update README.md
Huangzizhou 51f0e8d
initial condition opt
Huangzizhou 946d4bf
Merge branch 'main' of https://github.com/Huangzizhou/polyfem-python
Huangzizhou 84e5221
python binding material opt
Huangzizhou 40e9b2d
python binding for friction coeff
Huangzizhou 670378e
more util functions
Huangzizhou 37cdee6
update polyfem
Huangzizhou ced1fdd
fix bug in test
Huangzizhou 2fc4990
fix missing option
Huangzizhou 4ec050b
fix import error
Huangzizhou 41179a1
Update README.md
Huangzizhou 9c90b3a
fix double free
Huangzizhou 53e4959
Merge branch 'main' of github.com:Huangzizhou/polyfem-python
Huangzizhou b0b5490
Update README.md
Huangzizhou a40b7f3
fix test
Huangzizhou d205e08
update polyfem
Huangzizhou fc87731
Merge branch 'main' of https://github.com/Huangzizhou/polyfem-python
Huangzizhou 323b256
fix tests
Huangzizhou efb6bfa
comment missing files
Huangzizhou 68cb9a7
Update Pybind
Huangzizhou aa0c9df
python binding fixes
arvigj e63f747
Merge pull request #2 from arvigj/main
Huangzizhou efc994f
Update setup.py
arvigj c5c25f9
Update setup.py
arvigj 566f0d2
Merge pull request #3 from arvigj/main
Huangzizhou File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
set(CPM_DOWNLOAD_VERSION 0.39.0) | ||
|
||
if(CPM_SOURCE_CACHE) | ||
set(CPM_DOWNLOAD_LOCATION "${CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
elseif(DEFINED ENV{CPM_SOURCE_CACHE}) | ||
set(CPM_DOWNLOAD_LOCATION "$ENV{CPM_SOURCE_CACHE}/cpm/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
else() | ||
set(CPM_DOWNLOAD_LOCATION "${CMAKE_BINARY_DIR}/cmake/CPM_${CPM_DOWNLOAD_VERSION}.cmake") | ||
endif() | ||
|
||
# Expand relative path. This is important if the provided path contains a tilde (~) | ||
get_filename_component(CPM_DOWNLOAD_LOCATION ${CPM_DOWNLOAD_LOCATION} ABSOLUTE) | ||
|
||
function(download_cpm) | ||
message(STATUS "Downloading CPM.cmake to ${CPM_DOWNLOAD_LOCATION}") | ||
file(DOWNLOAD | ||
https://github.com/cpm-cmake/CPM.cmake/releases/download/v${CPM_DOWNLOAD_VERSION}/CPM.cmake | ||
${CPM_DOWNLOAD_LOCATION} | ||
) | ||
endfunction() | ||
|
||
if(NOT (EXISTS ${CPM_DOWNLOAD_LOCATION})) | ||
download_cpm() | ||
else() | ||
# resume download if it previously failed | ||
file(READ ${CPM_DOWNLOAD_LOCATION} check) | ||
if("${check}" STREQUAL "") | ||
download_cpm() | ||
endif() | ||
unset(check) | ||
endif() | ||
|
||
include(${CPM_DOWNLOAD_LOCATION}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# | ||
# Copyright 2021 Adobe. All rights reserved. | ||
# This file is licensed to you under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. You may obtain a copy | ||
# of the License at http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software distributed under | ||
# the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS | ||
# OF ANY KIND, either express or implied. See the License for the specific language | ||
# governing permissions and limitations under the License. | ||
# | ||
|
||
if(DEFINED ENV{CPM_SOURCE_CACHE}) | ||
set(CPM_SOURCE_CACHE_DEFAULT $ENV{CPM_SOURCE_CACHE}) | ||
else() | ||
# Set CPM cache folder if unset | ||
file(REAL_PATH "~/.cache/CPM" CPM_SOURCE_CACHE_DEFAULT EXPAND_TILDE) | ||
endif() | ||
|
||
set(CPM_SOURCE_CACHE | ||
${CPM_SOURCE_CACHE_DEFAULT} | ||
CACHE PATH "Directory to download CPM dependencies" | ||
) | ||
message(STATUS "Using CPM cache folder: ${CPM_SOURCE_CACHE}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[build-system] | ||
requires = ["setuptools", "wheel", "pybind11", "cmake"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "polyfempy" | ||
version = "0.8" | ||
description="Polyfem Python Bindings" | ||
readme = "README.md" | ||
authors = [ | ||
{ name = "Zizhou Huang", email = "zizhou@nyu.edu" }, | ||
] | ||
requires-python = ">=3.6" | ||
classifiers = [ | ||
"Programming Language :: Python :: 3", | ||
"License :: OSI Approved :: MIT License" | ||
] |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.