Skip to content

Commit 68665d0

Browse files
author
teseoch
authored
Merge pull request #5 from polyfem/action
Action
2 parents 23fdd3c + f998f0e commit 68665d0

27 files changed

Lines changed: 1445 additions & 447 deletions

.clang-format

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
# https://clang.llvm.org/docs/ClangFormatStyleOptions.html
3+
Language: Cpp
4+
BasedOnStyle: LLVM
5+
# ColumnLimit: 80
6+
ColumnLimit: 0
7+
UseTab: ForContinuationAndIndentation
8+
IndentWidth: 4
9+
TabWidth: 4
10+
BreakBeforeBraces: Custom
11+
BraceWrapping:
12+
AfterCaseLabel: true
13+
AfterClass: true
14+
AfterControlStatement: Always
15+
AfterEnum: true
16+
AfterFunction: true
17+
AfterNamespace: true
18+
AfterObjCDeclaration: true
19+
AfterStruct: true
20+
AfterUnion: true
21+
AfterExternBlock: true
22+
BeforeCatch: true
23+
BeforeElse: true
24+
BeforeLambdaBody: false
25+
BeforeWhile: false
26+
IndentBraces: false
27+
SplitEmptyFunction: true
28+
SplitEmptyRecord: true
29+
SplitEmptyNamespace: true
30+
AllowShortIfStatementsOnASingleLine: false
31+
IndentCaseLabels: false
32+
SortIncludes: false
33+
BreakStringLiterals: false
34+
AlignTrailingComments: true
35+
FixNamespaceComments: true
36+
ContinuationIndentWidth: 4
37+
NamespaceIndentation: All
38+
AccessModifierOffset: -4
39+
BreakBeforeBinaryOperators: NonAssignment
40+
# ReflowComments: true
41+
# BinPackParameters: false
42+
# AllowAllParametersOfDeclarationOnNextLine: true
43+
# AlignAfterOpenBracket: AlwaysBreak
44+
...

.github/workflows/continuous.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@ jobs:
2525
name: Windows
2626
- os: macOS-latest
2727
name: MacOS
28+
env:
29+
if: runner.os == 'Windows'
30+
USE_CHOLMOD: 0
2831
steps:
2932
- name: Checkout repository
3033
uses: actions/checkout@v2
@@ -52,6 +55,7 @@ jobs:
5255
echo "CMAKE_GENERATOR=NMake Makefiles" >> $GITHUB_ENV
5356
echo "CXX=cl.exe" >> $GITHUB_ENV
5457
echo "CC=cl.exe" >> $GITHUB_ENV
58+
echo "USE_CHOLMOD=0" >> $GITHUB_ENV
5559
conda init powershell
5660
5761
- name: Build (Debug)

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ __pycache__
1313
*.obj
1414
*.pyc
1515
*.vtu
16+
*.pvd
1617
*.egg-info
1718
*.so
18-
temp-plot.html
19+
temp-plot.html
20+
data*
21+
*libTracyClient.*

CMakeLists.txt

Lines changed: 23 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
################################################################################
2-
cmake_minimum_required(VERSION 3.1)
3-
project(polyfempy)
4-
################################################################################
2+
# Check required CMake version
3+
set(REQUIRED_CMAKE_VERSION "3.14.0")
4+
cmake_minimum_required(VERSION ${REQUIRED_CMAKE_VERSION})
55

6-
if(INPUT_THIRD_PARTY_DIR)
7-
set(THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_THIRD_PARTY_DIR}/)
6+
if(INPUT_POLYFEMPY_DATA_ROOT)
7+
set(POLYFEMPY_DATA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/${INPUT_POLYFEMPY_DATA_ROOT}/")
88
else()
9-
set(THIRD_PARTY_DIR ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/)
9+
set(POLYFEMPY_DATA_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/data/")
10+
endif()
11+
if(NOT EXISTS ${POLYFEMPY_DATA_ROOT})
12+
file(MAKE_DIRECTORY ${POLYFEMPY_DATA_ROOT})
1013
endif()
11-
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
14+
15+
project(polyfempy)
16+
################################################################################
17+
18+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
19+
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/recipes/")
1220

1321
# Color output
1422
include(UseColors)
1523

1624
# Prepend function
1725
include(PrependCurrentPath)
1826

19-
2027
# Extra warnings
2128
include(Warnings)
2229

@@ -29,38 +36,24 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
2936
# Generate position independent code by default
3037
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
3138

32-
################################################################################
33-
34-
35-
# Setup dependencies
36-
include(PolyfemPythonDependencies)
37-
3839
################################################################################
3940
# Polyfem library
4041
################################################################################
4142

42-
43-
44-
45-
# polyfem
46-
polyfem_python_download_polyfem()
47-
add_subdirectory(${THIRD_PARTY_DIR}/polyfem)
48-
49-
# pybind11
50-
polyfem_python_download_pybind11()
51-
add_subdirectory(${THIRD_PARTY_DIR}/pybind11)
52-
43+
# dependencies
44+
include(polyfem)
45+
include(pybind11)
46+
include(pybind11_json)
5347

5448
#for testing purpose
55-
polyfem_python_download_data()
56-
49+
include(polyfem_data)
5750

5851
################################################################################
5952
# Subdirectories
6053
################################################################################
61-
add_library(polyfempy MODULE src/binding.cpp)
62-
target_link_libraries(polyfempy PRIVATE polyfem)
63-
target_link_libraries(polyfempy PRIVATE pybind11::module)
54+
add_library(polyfempy MODULE src/binding.cpp src/raster.cpp)
55+
target_link_libraries(polyfempy PRIVATE polyfem::polyfem pybind11::module pybind11::json)
56+
6457
set_target_properties(polyfempy PROPERTIES PREFIX "${PYTHON_MODULE_PREFIX}" SUFFIX "${PYTHON_MODULE_EXTENSION}")
6558

6659

cmake/DownloadProject.CMakeLists.cmake.in

Lines changed: 0 additions & 17 deletions
This file was deleted.

cmake/DownloadProject.cmake

Lines changed: 0 additions & 182 deletions
This file was deleted.

cmake/PolyfemPythonDependencies.cmake

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)